Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 11:21 am
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: DNID bug???
PostPosted: Mon Mar 22, 2010 11:02 am 
Offline

Joined: Mon Mar 22, 2010 10:35 am
Posts: 5
Hi all,
we've just moved from v1.4.2 to v1.6.0. We are always little nervous when upgrading well working solution, but everything seems to work fine so far.

Anyway there is one issue with DNID in CDRs (Call Report). We are using IAX trunk to access A2B. Since upgrade there are instead of access phone numbers in DNID column just "unknown".

So I did diff of AGI a2billing.php from 1.4.2 and found little modification regarding DNID:
Quote:
- if ($agi->request['agi_extension']=='s'){
- $A2B->dnid = $agi->request['agi_dnid'];
- }else{
- $A2B->dnid = $agi->request['agi_extension'];
- }
+ $A2B->dnid = $agi->request['agi_dnid'];
+ $A2B->extension = $agi->request['agi_extension'];


When I use code fragment from v1.4.2 (the if else structure) instead of the one from v1.6.0 DNID start to work as before.

Can anybody tell me what was the reason for this change? I'm probably missing some good reason for that and maybe some side effect ...


Thanks

Milan Benicek
http://www.siphone.cz/


Top
 Profile  
 
 Post subject: Re: DNID bug???
PostPosted: Mon Mar 22, 2010 6:15 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Later version implement the correct behaviour, that is to say that if you have an access number for a calling card system, the access number dialled to access the system will be displayed, e.g. the DNID.

When terminating from a PBX, no DNID is involved, so none is displayed.

Joe


Top
 Profile  
 
 Post subject: Re: DNID bug???
PostPosted: Fri Mar 26, 2010 3:38 pm 
Offline

Joined: Mon Mar 22, 2010 10:35 am
Posts: 5
Hi,
well I've found that my change did broke calling from A2B SIP accounts. The problem is that A2B do not see the dialed phone number.
So I reverted all changes made to a2billing.php and solved the issue through dial plan configuration.

Now there is following code in a2billing.php:
Quote:
$A2B->dnid = $agi->request['agi_dnid'];
$A2B->extension = $agi->request['agi_extension'];

and the AGI script is being launched like this:
Quote:
exten => _X.,1,NoOp()
exten => _X.,n,Set(CALLERID(dnid)=${EXTEN})
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1)
exten => _X.,n,Hangup

Now everything seems to work fine.

Regards
Milan Benicek
http://www.siphone.cz/


Top
 Profile  
 
 Post subject: Re: DNID bug???
PostPosted: Tue Mar 30, 2010 6:31 am 
Offline
User avatar

Joined: Mon Oct 26, 2009 8:20 am
Posts: 93
Update my system from 1.4 to 1.6 and have the same problem with that

Where is the a2billing.php file located?

Is it in: /var/lib/asterisk/agi-bin/a2billing.php ?

In my a2billing.php I still have this entry

Quote:
$A2B->dnid = $agi->request['agi_dnid'];
$A2B->extension = $agi->request['agi_extension'];


The DNID is still showing "Unknown"

Any thoughts for that?

Cheers
Skiller


Top
 Profile  
 
 Post subject: Re: DNID bug???
PostPosted: Tue Mar 30, 2010 12:55 pm 
Offline

Joined: Mon Mar 22, 2010 10:35 am
Posts: 5
Hi,
yes, I was talking about PHP AGI script located in /var/lib/asterisk/agi-bin/a2billing.php

The entry you've mentioned is correct for 1.6.0 version.

The trick is this:
Quote:
exten => _X.,n,Set(CALLERID(dnid)=${EXTEN})


It fills the empty part of CALLERID called DNID needed by A2B. Previously there was if/then structure in a2billing.php which used EXTENSION part of CALLERID instead.

It's clean from A2B point of view since no changes to 1.6 are needed but might be dirty from some other point of views. Anyway it works fine for me now.

Regards
Milan Benicek
http://www.siphone.cz/


Top
 Profile  
 
 Post subject: Re: DNID bug???
PostPosted: Tue Mar 30, 2010 3:21 pm 
Offline
User avatar

Joined: Mon Oct 26, 2009 8:20 am
Posts: 93
Hi Milan,

in which file do I have to edit this entry?

Quote:
exten => _X.,n,Set(CALLERID(dnid)=${EXTEN})


Thx.
Skiller


Top
 Profile  
 
 Post subject: Re: DNID bug???
PostPosted: Wed Mar 31, 2010 12:24 pm 
Offline

Joined: Mon Mar 22, 2010 10:35 am
Posts: 5
Hi,
it's part of asterisk dialplan /etc/asterisk/extensions.conf or one of its includes (default is extensions_a2billing.conf).

Areski suggests at least following for launching A2B AGI script:
Quote:
[a2billing]
exten => _X.,1,Answer(1)
exten => _X.,n,DeadAgi(a2billing.php|1)
exten => _X.,n,Hangup


and I recommend to modify it this way:
Quote:
[a2billing]
exten => _X.,1,Answer(1)
exten => _X.,n,Set(CALLERID(dnid)=${EXTEN})
exten => _X.,n,DeadAgi(a2billing.php|1)
exten => _X.,n,Hangup


Regards
Milan Benicek
http://www.siphone.cz/


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 10 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