OK, I have set up a linksys for PSTN to VOIP gateway. When I call its PSTN number, call comes to FreePBX Inbound Route where DID=myCIDcallbacktriggerDIDnum, with any callerID.
From this inbound route, call is sent to custom destination "A2B - CID Callback", which in turn calls custom-a2billing-cid-callback in extensions_custom.conf, which is like:
[custom-a2billing-cid-callback] exten => _X.,1,DeadAgi(a2billing.php|8|cid-callback|9) exten => _X.,n,Hangup
Here I am using conf 8 for the cllback leg, and I am using country prefix 9, you will see soon why ...
NOW, I set up a user account in A2Billing and add my mobile number for CID (as 0533xxxxxxx because that's how it is seen from a fixed phone), and I test.
I call my Linksys, and from Putty, I see the call come to A2Billing. My mobile's CID is seen as 0533xxxxxxx, as it should be, which is authenticated because it exists just like that in my account). Rate is found in the rate table because I have that 9 for the country prefix in
exten => _X.,1,DeadAgi(a2billing.php|8|cid-callback|9)
Hence, it checks for 90533xxxxxxx in the rate table, finds the rate, and initiates the call to 0533xxxxxxx with Caller ID 0533xxxxxxx.
1) However, most carriers want to have caller ID in standard form, like 90533xxxxxxx. If not, they do further manipulation on the callerID (such as putting another - their own - country code to the beginning, etc). So, I'd rateher have the CID 90533xxxxxxx on the callback leg.
2) Furthermore, if you have in the callback group in A2Billing conf;
PD Caller ID callerid=902161111111 Set the callerID for the predictive dialer and call-back.
This works for the callback leg of WebCallbck, but not on CID Callback.
3) What if I were not calling from my mobile, but say, from another fixed phone, in the same area code, then the CID coming to A2Billing was going to be only 7 digits xxxxxxx. It was going to go be looked for as 9xxxxxxx in the rate table, and fail. So, there has to be a mechanism to sanitize the CallerID so that, if it comes as 0xxxxxxxxxx or just xxxxxxx, the number can be manipulated into a standard 90xxxxxxxxxx form, before checking the rate table, and then, preferably the sanitised number called back, so that you get a proper callerID on the A-Leg as well as B-Leg.
4) If set, why wouldn't CID Callback also use the callerid=902161111111 in the callback group in a2billing conf?
Especially (3) above seems to be a problem.
Please comment, anyone ....
Burak
|