Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 7:05 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Extension being used instead of DNID
PostPosted: Sat Mar 09, 2013 9:52 pm 
Offline

Joined: Sat Mar 09, 2013 9:38 pm
Posts: 11
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.


Top
 Profile  
 
 Post subject: Re: Extension being used instead of DNID
PostPosted: Sun Mar 10, 2013 11:34 am 
Offline

Joined: Sat Mar 09, 2013 9:38 pm
Posts: 11
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.


Top
 Profile  
 
 Post subject: Re: Extension being used instead of DNID
PostPosted: Mon Mar 11, 2013 8:09 pm 
Offline

Joined: Mon Mar 11, 2013 7:23 pm
Posts: 9
did u sort it out because i have similar issue..
http://forum.asterisk2billing.org/viewtopic.php?f=33&t=10247&sid=7eb58add5199a0e40f40734e1e6633f4


Top
 Profile  
 
 Post subject: Re: Extension being used instead of DNID
PostPosted: Fri Mar 15, 2013 6:01 pm 
Offline

Joined: Sat Mar 09, 2013 9:38 pm
Posts: 11
Yes indeed, this solution has been running in production for several days without a glitch.


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


All times are UTC


Who is online

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