Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 25, 2024 5:16 am
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Manipulate Calling card dialed number
PostPosted: Mon Jan 03, 2011 9:44 pm 
Offline

Joined: Sun Dec 27, 2009 8:39 pm
Posts: 80
Hi,

I was wondering where one could modify the number a customer dialed. For example, we have a client that is using us for international calls by dialing one of our access numbers. However, if they want to dial a US number, they are required to dial 1+NXXNXXXXXX. When dialing international, they need to dial 011+NX. This works well when they are using a pbx platform, but because they are dialing direct, we need to inject a 1 so that a2billing correctly routes the number. Otherwise, if they dial 3055555555, they end up calling Greece instead of Miami...

TIA,

Carlos.


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Tue Jan 04, 2011 5:48 pm 
Offline

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

Prefix a 1 in the dial plan which calls A2Billing where the extension matches NXXNXXXXXX then pass 1NXXNXXXXXX into A2Billing.

Joe


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Tue Jan 04, 2011 10:17 pm 
Offline

Joined: Sun Dec 27, 2009 8:39 pm
Posts: 80
Where would we be able to manipulate the dial plan?

Let me try to clarify what is occurring. Customer is dialing into a DID, and then the DID is sending that call to the calling card app (a2billing.php|2) (where user is authorized by CID) and then prompted to enter the destination number. I'm not sure where we would be able to manipulate this? Customer is used to dialing 011+number for intl, but for domestic, they may dial 1+number or just number.

Thanks,

Carlos.


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Wed Jan 05, 2011 12:04 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Come on, you have been round this stuff for long enough to understand how it works.


Code:
[A2Billing]

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

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


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Wed Jan 05, 2011 4:33 am 
Offline

Joined: Sun Dec 27, 2009 8:39 pm
Posts: 80
I must be really dense right now...I'll owe you some stone crabs next time you're down in Miami (given they're in season)

As I have always understood it (only been using a2b since you set it up last year, almost 1 year in 2 weeks)...

Customer is trying to call New York - 212-555-1212
Access number is - 305-555-1212

Right now, customer calls 305-555-1212. That DID is routed through inbound routes over to the custom destination, which directs the call to custom-a2billing,${EXTEN},1.

That sends it here, where it matches on _x.:

Code:
[custom-a2billing]
; call through service for calling cards
exten => _X.,1,Answer(1)
exten => _X.,n,DeadAgi(a2billing.php|2)
exten => _X.,n,Hangup


Using your bit of code, would simply be looking for NXXNXXXXXX, which would only be good before entering the a2b side of things. Similar to having a trunk's inbound context add/strip context, like we had to do for a few carriers. I'm not trying to manupulate the inbound caller ID or the DID the customer dialed.

The issue is that when a2b answers the call, and prompts the customer for the number to dial, if the customer enters 2125551212#, a2b sees no international codes (00,011,09) and matches the rate to Morocco. That rate uses an "international" trunk, which automatically appends 011. The customer would need to know to enter 1-212-555-1212 to have a2b match the route to 1212, which would then send the call out to the proper carrier. I need to manipulate the number they entered to match the rates. I think I'm going to need to modify/dig around the php side of things, but I don't know where.

I am imagining you're going to tell me to manipulate something somewhere else...

Thanks again, and sorry if i'm just not getting it...

Sorry for not understanding what is apparently very obvious to you.


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Wed Jan 05, 2011 8:22 am 
Offline

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

My humble and abject apologies for not reading the post properly. Yes the above code would be perfect for a VoIP client, but in a calling acrd environment, not so.

The answer to this is in the way you do your rate tables.

You need a set of rate tables for the USA, e.g. NXXXNXXXXX, and a set which begin 011 for all international destinations, these select different A2Billing trunks which add a leading 1, which I am assuming your carrier requires and removes the for International calls, which I assume your carrier does not.

Note also, you can use regex expressions in the rates.

Joe


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Wed Jan 05, 2011 1:00 pm 
Offline

Joined: Sun Dec 27, 2009 8:39 pm
Posts: 80
Joe - no apologies needed.

I was hoping to avoid that. I have already manipulated our rate cards/tables to use an international trunk that automatically adds a 011 when dialing out, since it's being stripped on the way in. This would also make things a bit more difficult as I would need 3 rate tables, one with 1NXX and one with NXX. This would be needed to handle the 2 possible dialing patterns that the customer may enter. Then the international would be all with 011, and make sure that we don't strip the 011.

Would there not be a more elegant way to do this? I'm thinking that maybe an option to always add a prefix if 011 was not found or something along those lines.

Thanks.


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Wed Jan 05, 2011 1:26 pm 
Offline

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

You can use the Remove International Dial code setting, to remove the leading 1, so ALL your USA numbers are in 10 digit format, which would remove the need for duplicate 10 and 11 digit rate tables.

So you would have a "National" Rate table, consisting of 10 digit dial codes for the USA, sending them to a USA trunk, and bolting a 1 on the front as necessary, then an international rate table that had rates such as 01144 (for the UK) which would match international calls (make sure 011 is not stripped in the international prefix setting in the agi-conf) which would pass the call to the trunk, which in turn strips the 011 if your carrier demands it.

Joe


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Wed Jan 05, 2011 3:12 pm 
Offline

Joined: Sun Dec 27, 2009 8:39 pm
Posts: 80
So then I would use a REGEX for each rate, and have 212NXXXXXX. Would this not cause a problem with international numbers too? I'm not sure if all international destinations are at least 7 digits or more. I don't want to have the opposite issue, where a customer is trying to dial Panama 507x. and have it match a route to Minnesota. Obviously I wouldn't have a rate for "507X." but "507".

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Wed Jan 05, 2011 3:23 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
For Panama they would be dialling 011507... for which you would have a rate, whereas for Minnesota they would be dialling 507... and if they dialled 1507... the agi-conf would strip the 1 as previously described.

So entry in rate table would be

011507 = panama
507 = Minnesota

Job done

Joe


Top
 Profile  
 
 Post subject: Re: Manipulate Calling card dialed number
PostPosted: Wed Jan 05, 2011 3:53 pm 
Offline

Joined: Sun Dec 27, 2009 8:39 pm
Posts: 80
I skipped over the statement you had about stripping the 1 instead of 011. That would work then.

Thanks again for your help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 36 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group