How To Add Area Code To Outgoing Number In Asterisk 13.13

Home » Asterisk Users » How To Add Area Code To Outgoing Number In Asterisk 13.13
Asterisk Users 3 Comments

Hi, my SIP provider requires 10 digits for all outgoing calls; Users dial 7
digits for outgoing. Here is how I added the area code to all outgoing calls in Asterisk 1.8

Extensions.conf

; Adding Area code and striping 7 for local numbers

exten => _7XXXXXXX,n,Set(CALLERID(all)=”My ID” )

exten => _7XXXXXXX,n,Dial(SIP/mySIPprovider/1731${EXTEN:1},80)

This syntax does not work in Asterisk 13.13. has anybody dealt with this issue?

Thanks Motty

3 thoughts on - How To Add Area Code To Outgoing Number In Asterisk 13.13

  • Thank you Carlos, you’re right I am using PJSIP. Should I not use it?

    Thanks, Motty

    From: Carlos Chavez [mailto:cursor@telecomab.mx]
    Sent: Saturday, December 31, 2016 5:55 PM
    To: Asterisk Users Mailing List – Non-Commercial Discussion Cc: Motty Cruz Subject: Re: [asterisk-users] how to add area code to outgoing number in Asterisk 13.13

    Hi, my SIP provider requires 10 digits for all outgoing calls; Users dial 7 digits for outgoing. Here is how I added the area code to all outgoing calls in Asterisk 1.8

    Extensions.conf

    ; Adding Area code and striping 7 for local numbers

    exten => _7XXXXXXX,n,Set(CALLERID(all)=”My ID” )

    exten => _7XXXXXXX,n,Dial(SIP/mySIPprovider/1731${EXTEN:1},80)

    This syntax does not work in Asterisk 13.13. has anybody dealt with this issue?

    Thanks Motty

    The syntax has not changed so it should work. You are still using chan_sip right? Maybe you are using PJSIP which does have a different syntax? It is probably better if you send the output from the cli so we can see what error the dialplan is throwing at you.

  • PJSIP allows the following two formats:
    PJSIP/@
    PJSIP/
    /

    Where in the second case the SIP URI can contain the number. Provided you use either of those (the first would be preferable in this case) it will place the number in there.


    Joshua Colp Digium, Inc. | Senior Software Developer
    445 Jan Davis Drive NW – Huntsville, AL 35806 – US
    Check us out at: http://www.digium.com & http://www.asterisk.org