asterisk2billing.org
http://forum.asterisk2billing.org/

dialing 10 digit number (North Ameria, NXXNXXXXX)
http://forum.asterisk2billing.org/viewtopic.php?f=23&t=7981
Page 1 of 1

Author:  square [ Tue Aug 03, 2010 11:58 pm ]
Post subject:  dialing 10 digit number (North Ameria, NXXNXXXXX)

I am using A2billing1.5.1 in north American market for residential VOIP serivce.
The termination service needs:

<termination service pre-fix> + <country code> + <phone number>

So while dialing 10 digit north american number, the above string looks like:

12345 + 1 + 2121234567

I noticed that if I dial only 10 digits, I get engage tone,
If I dial 1+10 digit number, the call goes through

What I can do to have my customers dial 10 digit norhtamerican number as well?

Following addition to extensions_a2billing.conf doesn't seem to do any magic

;USA/Canada
exten => _1NXXNXXXXXX,1,DeadAgi(a2billing.php|1)
exten => _1NXXNXXXXXX,n,Hangup()

;10 digit dialing
exten => NXXNXXXXXX,1,DeadAgi(a2billing.php|1)
exten => NXXNXXXXXX,n,Hangup()

This will affect my 911 service well, as it looks like for 911 to pass through, the customer
must dial 1911...hmmmm

Any help/suggestions/comments very much appreciated.

Thank you

Author:  square [ Wed Aug 04, 2010 1:30 am ]
Post subject:  Re: dialing 10 digit number (North Ameria, NXXNXXXXX)

Even doing the following

exten => _*1+NXXNXXXXXX,n,Macro(dialout-trunk,4,${EXTEN},,)
exten => _*1+NXXNXXXXXX,n,Macro(dialout-trunk,3,${EXTEN},,)
exten => _*1+NXXNXXXXXX,n,Macro(dialout-trunk,2,${EXTEN},,)

still sending the following

To: <sip:1015641405194886046@ipaddress>
^
(notice that the 10 digit number 5194886046 is not pre-fixed by country code 1)

instead of

To: <sip:10156414015194886046@ipaddress> which is expected by termination service.

Anyone knows how to fix it?

Thanks for your help

Author:  jroper [ Wed Aug 04, 2010 9:02 am ]
Post subject:  Re: dialing 10 digit number (North Ameria, NXXNXXXXX)

Hi

There is some good info on Asterisk dial-plans at http://www.voip-info.org/wiki/view/Asterisk+variables on how to concatenate strings, and this is not an Asterisk support forum.

However, something as below should work.


Code:
[10-digit-dialling]

exten => NXXNXXXXXX,1,Goto(A2Billing,1${EXTEN},1)
exten => 1NXXNXXXXXX,1,Goto(A2Billing,${EXTEN},1)

[A2Billing]

exten => _x.,1,DeadAGI(a2billing.php,1)
exten => _x.,n,Hangup()

Author:  square [ Wed Aug 04, 2010 12:49 pm ]
Post subject:  Re: dialing 10 digit number (North Ameria, NXXNXXXXX)

I tried your suggested mods as well, the file looks like:

; For standard inbound call
[a2billing]
exten => _x.,1,DeadAgi(a2billing.php|1)
exten => _x.,n,Hangup
exten => _7775,1,VoicemailMain(${CDR(accountcode)})

;10 digit dialing
[10-digit-dialing]
exten => NXXNXXXXXX,1,Goto(a2billing,1${EXTEN},1)
exten => 1NXXNXXXXXX,1,Goto(a2billing,1${EXTEN},1)

It appears that some other parameters are overriding this asterisk setting.

Our setup was done by you folks (early this year), has a SIP server,
two ASTERISK servers, one WEB and one DATABASE server (Enterprise
Residential what it used to be called as).

Would like to know why settings on asterisk server are NOT taking any effect.
This is the reason why I am trying to be on this forum.

Thanks

Author:  jroper [ Wed Aug 04, 2010 2:03 pm ]
Post subject:  Re: dialing 10 digit number (North Ameria, NXXNXXXXX)

Hi

Understood now, yes your system will be slightly different, and I have spotted some errors in the dialplan I gave you.

Try this:-

Code:
; For standard inbound call
[a2billing]
exten => _x.,1,DeadAgi(a2billing.php|1)
exten => _x.,n,Hangup
exten => _7775,1,VoicemailMain(${CDR(accountcode)})

exten => _NXXNXXXXXX,1,Goto(a2billing-USA,1${EXTEN},1)

[a2billing-USA]
exten => _x.,1,DeadAgi(a2billing.php|1)
exten => _x.,n,Hangup


What happens is if there is a pattern match of 10 digits, then it will call a2billing.php, and pre-pend a 1, in the a2billing-USA context, otherwise the call will proceed as normal.

I hope this clarifies. Don't forget to reload asterisk.

Joe

Author:  square [ Wed Aug 04, 2010 4:18 pm ]
Post subject:  Re: dialing 10 digit number (North Ameria, NXXNXXXXX)

Thanks, that works. Now E911 service will also work. Thats great.

thank you

Author:  adnauseum [ Mon Sep 03, 2012 4:34 pm ]
Post subject:  Re: dialing 10 digit number (North Ameria, NXXNXXXXX)

Hi, I am very new to a2billing.

I have looked at what was written in this post and wonder how to do this via FreePBX in our a2billing server.

We have a few PBXs (elastix) and they are supposed to connect to a2billing to account for calls. The problem we have is, if the client dials a 10 digit number the infamous recording of 'your call cannot be completed...' is heard.

In FreePBX (in clients PBX) dial maniuplation rules it seems I have to add the area code. Like 212. (the . has to be there)

The info you have given seems to be applied directly to the .conf files. I don't know which conf file though.

Can you please tell me what it should look in in the FreePBX UI/GUI so that customers dialing 10 digit numbers will work. We have two dial rates, Canada-USA and International.

Thanks in advance for your help.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/