Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Dec 03, 2026 10:47 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Can A2Bill be configured for wholesale 1+ orig. & term.
PostPosted: Mon Jul 12, 2010 10:17 pm 
Offline

Joined: Sun May 09, 2010 7:12 pm
Posts: 7
Hi All,

The calling card aspect of A2Billing works pretty much out of the box. I need to configured the system to handle wholesale 1+ Origination and Termination.
Here is the call flow
1. End user originate call by dialing 1-NPA-NXX example : ANI = 626-321-1234 (Originating number) DNIS = 972-321-1234 (Dialed number)

2. ILEC (AT&T, Verizon, Quest etc.) route the call via CIC code (0444 - GLobal Crossing) on their Tandem to the selected Long Distance Carrier trunk group.

3. LD Carrier send the call based on ANI and DNIS to our network and we hand off to A2Billing for rating, Least Cost Routing and billing of the call.

4. A2Billing check and validate the ANI exist in mysql and have enough credit, will immediately route the call using the supplied DNIS via LCR to our terminating carrier.

5. The user will not have to enter their PIN as the ANI is authenticated, A2Bill pay an IVR message on their balance based on the destination DNIS number. It then route the call out immediately via LCR.

6. This is a typical 1+ long distance service and not a Prepaid/Postpaid calling card.

The A2Bill docs does not seems to contain info on such configuration. Any suggestion is highly welcomed and appreciated. :)

Thank you All


PS: jroper any suggestion if the above is doable ?


Top
 Profile  
 
 Post subject: Re: Can A2Bill be configured for wholesale 1+ orig. & term.
PostPosted: Tue Jul 13, 2010 9:54 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

This all sounds doable, but you may have to do some work with the Asterisk Dialplan to set the right variables in the right places, or it may just work out of the box - check and see what happens, and let us know.

Joe


Top
 Profile  
 
 Post subject: Re: Can A2Bill be configured for wholesale 1+ orig. & term.
PostPosted: Wed Jul 14, 2010 3:34 am 
Offline

Joined: Sun May 09, 2010 7:12 pm
Posts: 7
jroper wrote:
Hi

This all sounds doable, but you may have to do some work with the Asterisk Dialplan to set the right variables in the right places, or it may just work out of the box - check and see what happens, and let us know.

Joe


Joe,

Thanks for the reply. This pretty cut and dry if it is in a typical call routing within the Asterisk dial plan

;--- 1+ LD Terminate to Global Crossing ---
exten => _1NXXNXXXXXX,1,NoOp("LCR 1+ to GBLX NY & LA")
exten => _1NXXNXXXXXX,n,Set(CALLERID(name)=)
exten => _1NXXNXXXXXX,n,Dial(SIP/${EXTEN}@GBLX_NY)
exten => _1NXXNXXXXXX,n,Dial(SIP/${EXTEN}@GBLX_LA)
exten => _1NXXNXXXXXX,n,Congestion
exten => _1NXXNXXXXXX,n,Hangup

The above code is how I handle calls originate from customer and turn around to route is out based on the DNIS that was send over PRI signalling.

The above configuration is typical wholesale Origination and Termination, which is the basic function of a Tandem switch.

From my understanding there are 2 ways to invoke the scripts.

;#1
[did]
; DID routing application ???
exten => _X.,1,AGI(a2billing.php,1,did)

;#2
[card]
; CallingCard application
exten => _X.,n,AGI(a2billing.php,1)

I would appreciate if you could explain the logic on how the A2bill script handle the "did" parameter, how can one invoke A2bill to route the call based on the DID to a vendor trunk without asking the user the destination they wish to call.

Does this works if I assign the variable "did" to the inbound DNIS (destination dial number) and invoke the A2Bill script to route based on the set "did" value ?

[did_routing]
; DID routing application ???
exten => _X.,1,NoOp("Set the DNIS for A2bill routing")
exten => _X.,n,Set(did=${EXTEN})
exten => _X.,n,AGI(a2billing.php,1,did)

I will gladly purchase support hour from Star2Bill in implementing the above. Let me know if you're game for it.

Thank you very much.


Top
 Profile  
 
 Post subject: Re: Can A2Bill be configured for wholesale 1+ orig. & term.
PostPosted: Wed Jul 14, 2010 6:08 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

We don't charge for answering questions on the forum where the answers are for the benefit of all.

We do charge if we are contacted directly on a one to one basis, e.g. via [email protected], or if sent a private message.

1. YOU MUST USE deadAGI, ; in CAPS, bold and underlined so you take notice.

2. Yes, those are the ways to invoke A2Billing, the first as a DID, and you need a matching DID, and a DID destination in A2Billing, the second will call A2Billing to deliver the call onwards. In your example, they will use the parameters in agi-conf1

3. If you set use_dnid = yes, A2Billing will attempt to the call using the value of the extension.

I trust that this clarifies.


Top
 Profile  
 
 Post subject: Re: Can A2Bill be configured for wholesale 1+ orig. & term.
PostPosted: Wed Jul 14, 2010 7:54 am 
Offline

Joined: Sun May 09, 2010 7:12 pm
Posts: 7
Joe,

Thanks for the prompt reply. I found out the "use_dnid=yes" while poking around the A2Billing.php code. In the following test, I have change the DNID variable to 6262460105, however for some reason Asterisk 1.6.2.9 does not update the ${EXTEN} variable which A2Billing.php code was using for the outbound call. Due to this bug, A2Bill will never dialed the changed DNID number. The following hack to the A2billing.php code and fixed the problem. The script will dialed the change DNID number correctly, yeah!

// Fixed A2Billing.php Row: 427 Column : 25
$A2B->dnid = $agi->request['agi_dnid'];
// BUG $A2B->extension = $agi->request['agi_extension'];
$A2B->extension = $agi->request['agi_dnid'];

[a2billing]
; CallingCard application
exten => _X.,1,NoOp("Inbound [anon-iax2] ANI=${CALLERID(number)} DNIS=${EXTEN}")
exten => _X.,n,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,NoOp("Before Change ## CALLERID(dnid)=${CALLERID(dnid)}")
exten => _X.,n,Set(CALLERID(dnid)=6262460105)
exten => _X.,n,NoOp("After Change ## CALLERID(dnid)=${CALLERID(dnid)}")
exten => _X.,n,NoOp("BUG!! A2Bill uses $EXTEN variable instead of CALLERID(dnid) ANI=${CALLERID(number)} DNIS=${EXTEN}")
exten => _X.,n,AGI(a2billing.php,1)
;exten => _X.,n,Dial(SIP/sippuas,20)
exten => _X.,n,Wait(1)
exten => _X,.n,Hangup

Everything now works just fine for my test case in simulating a 1+ call origination and termination without invoking Calling Card IVR prompt for the DNID.

Case closed :)

Thank you very much.


Top
 Profile  
 
 Post subject: Re: Can A2Bill be configured for wholesale 1+ orig. & term.
PostPosted: Wed Jul 14, 2010 8:29 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

The DNID is usually defined as the number you called access the platform, clearly in VoIP, this does not usually apply, only really in calling cards. The way we have it configured at the moment, is correct behaviour
Quote:
exten => _X.,n,AGI(a2billing.php,1)


Which part of this sentence did you not understand?

Quote:
1. YOU MUST USE deadAGI, ; in CAPS, bold and underlined so you take notice.


if you did understand the sentence, why are you ignoring the advice given?

Joe


Top
 Profile  
 
 Post subject: Re: Can A2Bill be configured for wholesale 1+ orig. & term.
PostPosted: Thu Jul 15, 2010 2:50 am 
Offline

Joined: Sun May 09, 2010 7:12 pm
Posts: 7
jroper wrote:
Hi

The DNID is usually defined as the number you called access the platform, clearly in VoIP, this does not usually apply, only really in calling cards. The way we have it configured at the moment, is correct behaviour
Quote:
exten => _X.,n,AGI(a2billing.php,1)


Which part of this sentence did you not understand?

Quote:
1. YOU MUST USE deadAGI, ; in CAPS, bold and underlined so you take notice.


if you did understand the sentence, why are you ignoring the advice given?

Joe


Executing [4052432003@a2billing:4] DeadAGI("SIP/121.35.218.18-00000001", "a2billing.php,1") in new stack
[Jul 14 22:19:08] WARNING[3366]: res_agi.c:3311 deadagi_exec: DeadAGI has been deprecated, please use AGI in all cases!

FYI DeadAGI is deprecated in asterisk 1.6.xx


Top
 Profile  
 
 Post subject: Re: Can A2Bill be configured for wholesale 1+ orig. & term.
PostPosted: Thu Jul 15, 2010 7:28 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Please ignore this error, and go with deadagi

Joe


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group