asterisk2billing.org http://forum.asterisk2billing.org/ |
|
Extension being used instead of DNID http://forum.asterisk2billing.org/viewtopic.php?f=34&t=10245 |
Page 1 of 1 |
Author: | chrisips2 [ Sat Mar 09, 2013 9:52 pm ] |
Post subject: | Extension being used instead of DNID |
Hi I'm a newbie so please forgive me if this is obvious but I cannot seem to find an answer anywhere. I have a customer set-up in A2Billing (yep, just the one!!). I have an Asterisk server that appears to be working perfectly. I wish for a particular type of call to be charged to the customer. So, my Asterisk dial plan looks like this: Code: exten => _90Z.,n,Set(CALLERID(num)=441123456789) exten => _90Z.,n,Set(CDR(accountcode)=1234567890) exten => _90Z.,n,Set(agi_dnid=44${EXTEN:2}) exten => _90Z.,n,Set(agi_extension=44${EXTEN:2}) exten => _90Z.,n,DeadAGI(a2billing.php,1) I have use_dnid=Yes in agi_conf1 A2Billing attempts to dial the dialled extension instead of the DNID. So I get a message like: Code: AGI Script Executing Application: (DIAL) Options: (SIP/provider-out/901987654321,60,HL(0:61000:30000)) What I really want to see is a message like: Code: AGI Script Executing Application: (DIAL) Options: (SIP/provider-out/441987654321,60,HL(0:61000:30000)) The 90 should really have been changed to a 44. Anyway because the number being dialled is not what I had intended, the call fails. What am I doing wrong? It appears that dispite my best efforts, A2Billing is ignoring DNID in favour of what I can only describe as ${EXTEN}! Many thanks. |
Author: | chrisips2 [ Sun Mar 10, 2013 11:34 am ] |
Post subject: | Re: Extension being used instead of DNID |
I've found something that works for me. Perhaps someone can let me know if I've done the right thing? I've changed the extension in Asterisk to: Code: exten => _90Z.,n,Set(CALLERID(num)=44123456789) exten => _90Z.,n,Set(CALLERID(dnid)=44${EXTEN:2}) exten => _90Z.,n,Set(CDR(accountcode)=1234567890) exten => _90Z.,n,DeadAGI(a2billing.php,1) exten => _90Z.,n,Hangup() and I've changed this line in a2billing.php: Code: $A2B->extension = $agi->request['agi_extension']; to: Code: $A2B->extension = $agi->request['agi_dnid']; I will have to watch out, should I upgrade A2Billing in the future that the changes to the PHP don't revert but other than that, could this cause a problem? Thanks. |
Author: | trkostas1 [ Mon Mar 11, 2013 8:09 pm ] |
Post subject: | Re: Extension being used instead of DNID |
did u sort it out because i have similar issue.. http://forum.asterisk2billing.org/viewtopic.php?f=33&t=10247&sid=7eb58add5199a0e40f40734e1e6633f4 |
Author: | chrisips2 [ Fri Mar 15, 2013 6:01 pm ] |
Post subject: | Re: Extension being used instead of DNID |
Yes indeed, this solution has been running in production for several days without a glitch. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |