Hello, I would like to add area code if clients dial 7 digits, it that possible? currently clients dial prefix 9 plus local number, however my SIP provider is requiring to dial 10 digits. is it possible to add area code? Thanks, Motty
On 27 April 2015 21:32:42 BST, Motty Cruz <motty.cruz at gmail.com> wrote:>Hello, > >I would like to add area code if clients dial 7 digits, it that >possible? currently clients dial prefix 9 plus local number, however my > >SIP provider is requiring to dial 10 digits. is it possible to add area > >code?rQuite simple - you need to match on NXXXXXXX and when passing it to the SIP provider, present ${AREACODE}${EXTEN}, having first defined AREACODE in [globals]. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150427/77d0f9d5/attachment.html>
Thanks for your reply,
[globals]
AREACODE=381
[outbound]
exten => _NXXXXXX,1,Dial(SIP/SIP-Provider/1${AREACODE}${EXTEN},80)
did not work for me, any ideas?
Thanks,
On 04/27/2015 01:59 PM, Phil Reynolds wrote:>
>
> On 27 April 2015 21:32:42 BST, Motty Cruz <motty.cruz at gmail.com>
wrote:
> >Hello,
> >
> >I would like to add area code if clients dial 7 digits, it that
> >possible? currently clients dial prefix 9 plus local number, however my
> >
> >SIP provider is requiring to dial 10 digits. is it possible to add area
> >
> >code?r
>
> Quite simple - you need to match on NXXXXXXX and when passing it to
> the SIP provider, present ${AREACODE}${EXTEN}, having first defined
> AREACODE in [globals].
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20150427/58ec5755/attachment.html>
Motty
Yes
From your dial plan accept 9 + 7 digits then concat your dialed number
together with your areacode.
This s a brief example.
exten => _9XXXXXXX,1,Set(l_HomeAreaCode=555)
exten => _9XXXXXXX,n,Set(dialnumber=${l_HomeAreaCode}${EXTEN-1}) ;; This
line should combine your area code and the last 7 digits of your dialed
phone number
exten => _9XXXXXXX,n,Dial(SIP/${dialnumber},35)
Thanks
Bryant Zimmerman (ZK Tech Inc.)
616-855-1030 Ext. 2003
----------------------------------------
From: "Motty Cruz" <motty.cruz at gmail.com>
Sent: Monday, April 27, 2015 4:33 PM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] adding area code
Hello,
I would like to add area code if clients dial 7 digits, it that
possible? currently clients dial prefix 9 plus local number, however my
SIP provider is requiring to dial 10 digits. is it possible to add area
code?
Thanks,
Motty
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20150427/88f2dbed/attachment.html>
On Mon, 27 Apr 2015, Bryant Zimmerman wrote:> exten => _9XXXXXXX,n,Set(dialnumber=${l_HomeAreaCode}${EXTEN-1})Missing a colon? ${EXTEN:-1} -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
here is what I have:
exten => _9XXXXXXX,1,Set(l_HomeAreaCode=381)
exten => _9XXXXXXX,n,Set(dialnumber=${l_HomeAreaCode}${EXTEN:-1})
exten => _9XXXXXXX,n,Dial(SIP/SIP-Provider/${dialnumber},80)
not having success;
"Got SIP reponse 503" Service Unavailable"
On 04/27/2015 02:19 PM, Bryant Zimmerman wrote:> Motty
> Yes
> From your dial plan accept 9 + 7 digits then concat your dialed number
> together with your areacode.
> This s a brief example.
> exten => _9XXXXXXX,1,Set(l_HomeAreaCode=555)
> exten => _9XXXXXXX,n,Set(dialnumber=${l_HomeAreaCode}${EXTEN-1}) ;;
> This line should combine your area code and the last 7 digits of your
> dialed phone number
> exten => _9XXXXXXX,n,Dial(SIP/${dialnumber},35)
> Thanks
>
> Bryant Zimmerman (ZK Tech Inc.)
> 616-855-1030 Ext. 2003
> ------------------------------------------------------------------------
> *From*: "Motty Cruz" <motty.cruz at gmail.com>
> *Sent*: Monday, April 27, 2015 4:33 PM
> *To*: asterisk-users at lists.digium.com
> *Subject*: [asterisk-users] adding area code
> Hello,
>
> I would like to add area code if clients dial 7 digits, it that
> possible? currently clients dial prefix 9 plus local number, however my
> SIP provider is requiring to dial 10 digits. is it possible to add area
> code?
>
> Thanks,
> Motty
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20150427/2d333b04/attachment.html>