Closed powerpbx closed 8 years ago
When you call A2Billing from the dialplan the first parameter passed next to a2billing.php
is the idconfig which is used to load agi-conf1 or agi-conf2, eg:
; For standard inbound call
[a2billing]
exten => _X.,1,NoOp(A2Billing Start)
exten => _X.,n,DeadAgi(a2billing.php|1)
exten => _X.,n,Hangup
Hello,
I understand how to select agi-confX in the dialplan. However, agi-conf1 is still hardcoded and always used for other things such as rate simulator.
Yes on the web UI there is no way to modify it at the moment.
On Mon, Jun 27, 2016 at 4:17 PM, powerpbx notifications@github.com wrote:
Hello,
I understand how to select agi-conf in the dialplan. However, agi-conf1 is still hardcoded for other things such as rate simulator.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Star2Billing/a2billing/issues/139#issuecomment-228758463, or mute the thread https://github.com/notifications/unsubscribe/AADQzxh-_ciZcl-1m8SR0KT35apYheMGks5qP9twgaJpZM4I-cYV .
Kind regards, /Areski
Arezqui Belaid Founder at Star2Billing (www.star2billing.com) & Newfies-Dialer (www.newfies-dialer.org)
Tel: +34650784355 Twitter: http://twitter.com/areskib LinkedIn: http://www.linkedin.com/in/areski
Doing anything that does not explicity override the agi-conf number will use agi-conf1. This appears to be hardcoded this way in /common/lib/Class.A2Billing.php
This can cause inconsistent behaviour. For example, when using the rate simulator, it uses agi-conf1. However, when dialing the number it will use agi-confX depending on what you have that set to in the asterisk dialplan. If you have the stripped international prefix setting set differently between the two, it will not be the same result.
I am not sure if there are any other scenarios besides rate simulator where this situation comes up. If not then perhaps the rate simulator should access the asterisk dialplan and parse out any agi-conf overrides, the same way a2billing.php does it.
Otherwise, correcting this appears to be just a matter of adding the $idconfig variable in /etc/a2billing.conf. If the variable doesn't need to be available that early, it could be added into global settings. We could probably do this. Just want to check if anyone has any suggestions first.