how to eliminate plus sign in asterisk caller id?

Discussion in 'General' started by davidlu766, May 19, 2010.

  1. davidlu766

    Joined:
    Oct 10, 2009
    Messages:
    7
    Likes Received:
    0
    Hi,

    I have Gizmo5 and when they send calls via DID to my Elastix box, they always add a plus sign in front of it, how do I get rid of it? Because my Cisco phone can't redial a number that has a plus sign in front of it, it won't even send it to asterisk. (it's that picky) And I have other DID providers and they don't have this problem.

    thx
     
  2. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    send your DID to its own context, and remove the + in the CID.

    I remember seeing a few example in this forum on the same subject.
    Also if I remember well, in the latest freepbx version there was a context for that.
     
  3. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    yes, in the latest freePBX versions they added the context

    Code:
    [from-pstn-e164-us]
    
    DIDs in an NPA e164 format of +1NXXNXXXXXX will be converted to 10 digit DIDs
    ;
    ;  DIDs in any other format will be delivered as they are, including e164 non NPA
    ;  DIDs which means they will need the full format including the + in the inbound
    ;  route.
    ;
    ;  CallerID(number) presented in e164 NPA format will be trimmed to a 10 digit CID
    ;
    ;  CallerID(number) presented in e164 non-NPA (country code other than 1) will be
    ;  reformated from: +<CountryCode><Number> to 011<CountryCode><Number>
    
    if you have a FreePBX version equal or above 2.6
    just replace in your trunk: context=from-trunk by context=from-pstn-e164-us

    If you are not happy with what this context, just create your own in extensions_custom.conf like the following draft
    replace 011 by your international code
    replace in your trunk: context=from-trunk by context=from-mytrunkstripplus

    Code:
    [from-mytrunkstripplus]
    exten => _[0-9+]./_X.,1,Goto(from-pstn,${EXTEN},1)
    exten => _[0-9+]./_+X.,1,Set(CALLERID(number)=011${CALLERID(number):1})
    exten => _[0-9+].,1,Goto(from-pstn,${EXTEN},1)
    exten => s/_X.,1,Goto(from-pstn,${EXTEN},1)
    exten => s/_+X.,1,Set(CALLERID(number)=011${CALLERID(number):1})
    exten => s/_011X.,n,Goto(from-pstn,${EXTEN},1)
    exten => s,1,Goto(from-pstn,${EXTEN},1)
     
  4. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
  5. davidlu766

    Joined:
    Oct 10, 2009
    Messages:
    7
    Likes Received:
    0
    I have tried both of them and they can't seem to work. Maybe it's me. But, where should I put the "from-pstn-e164-us"? Is it in the PEER Details? USER Context? OR USER Details??? And also should the brackets be included as well?

    thnx
     
  6. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    what's your version of freePBX?
    what are the settings of your trunk?
     

Share This Page