asterisk2billing.org
http://forum.asterisk2billing.org/

timeout in a2billing
http://forum.asterisk2billing.org/viewtopic.php?f=18&t=4439
Page 1 of 1

Author:  pilitorrent [ Fri Oct 17, 2008 2:01 pm ]
Post subject:  timeout in a2billing

I need known where can change the timeout in a2billing.conf
Thanks

Author:  Swift [ Thu Oct 23, 2008 7:58 am ]
Post subject: 

Hi,

in /etc/asterisk/a2billing.conf there is one timeout option (in sec.) for the callback to be considered as failed..

To go a little bit deeper, callback happens when A2B callback daemon asks asterisk to initiate the call using the (originate) command..

one of the parameters to be passed to this command is the timeout (in mili sec.)... A2B always passes the value 30,000. you can see this in the Admin UI-->> callback list --> edit ..

To change this value, edit the file /var/lib/asterisk/agi-bin/a2billing.php

Code:
if ($A2B->config["database"]['dbtype'] != "postgres"){
                  // MYSQL
                  $QUERY = " INSERT INTO cc_callback_spool (uniqueid, status, server_ip, num_attempt, channel, exten, context, priority, variable, id_server_group, callback_time, account, callerid, timeout ) VALUES ('$uniqueid', '$status', '$server_ip', '$num_attempt', '$channel', '$exten', '$context', '$priority', '$variable', '$id_server_group', ADDDATE( CURRENT_TIMESTAMP, INTERVAL $sec_wait_before_callback SECOND ), '$account', '$callerid', '30000')";
               }else{
                  // POSTGRESQL
                  $QUERY = " INSERT INTO cc_callback_spool (uniqueid, status, server_ip, num_attempt, channel, exten, context, priority, variable, id_server_group, callback_time, account, callerid, timeout ) VALUES ('$uniqueid', '$status', '$server_ip', '$num_attempt', '$channel', '$exten', '$context', '$priority', '$variable', '$id_server_group',  (CURRENT_TIMESTAMP + INTERVAL '$sec_wait_before_callback SECOND'), '$account', '$callerid', '30000')";
               }



Please make sure to backup the file before you make any change!

Regards,

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/