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.