Hello,
i've been developping a smartphone app allowing users/clients to seamlessly make callback calls. The dialplan is as following :
[billmycall] exten => _X.,1,NoOp(Calling ${EXTEN}) ; Answer() exten => _X.,n,Goto(a2billing_main,${EXTEN},1))
[callback-a] ; A-Leg exten => _X.,1,Set(CDR(accountcode)=...............) exten => _X.,n,Set(CALLERID(all)=${destination}) exten => _X.,n,NoOp(Exten _X. => Calling ${EXTEN} and then bridging to ${CALLERID(num)}) exten => _X.,n,Goto(billmycall,${EXTEN},1)
[callback-b] ; B-Leg exten => _X.,1,NoOp(bridging from ${CALLERID(num)} to ${EXTEN}) exten => _X.,n,Set(CDR(accountcode)=............) exten => _X.,n,Goto((billmycall,${EXTEN},1)
The phone app sends A-Leg to callback-a context and B-Leg to callback-b context. When A-Leg answers, B-Leg is then called and Asterisk bridges both channels. Everything works, A calls B and both can talk without problem.
The problem is on the billing side. When the A-Leg calls through callback-a context, when the call is answered, A2Bill inserts a new row on the CDR table, with callduration 00:00:00 and SELL to 00:00:00 , so no billing is done. But the B-Leg which is called by callback-b context is correctly billed : duration is correct, value is also correct. This results in 1 call (the A-Leg) not being billed, and thus resulting in loss of revenue.
What i have found so far is that while the A-Leg is being connected, A2Bill drops the call with no reason, and Asterisk continues to process the call until it is hangup by the user.
Both calls (A and B legs) use the same trunk (SIP), same rate card, same customer ID/Account number. I though it could some kind of simultaneous access limitation on account's configuration, but no, Simultaneous Access parameter is set correctly (Simultaneous Access = 1) and i've have double-checked by making several simultaneous calls using the same customer account and all calls are correctly billed and processed. The only problem found is when bridging calls.
Any clues anyone?
Using : Operation System Version : Debian GNU/Linux 7.3 (wheezy) Asterisk Version : 1.8 PHP Version : 5.4.4-14+deb7u9 A2B DataBase Version : 2.0.7
Thanks in advance,
SC
|