Hello everyone ,
I am looking for help about the configuration of a CID callback application on my server. I tried to configure it by myself but the server is not calling back.
I am using asterisk 1_8, a2billing 1_9_4 , and a Centos 6.2.
in my extension.conf , i have already configured a DID number to perform the [a2billing-cid-callback] context when i call it
exten => 331749XXXXX,1,Goto(a2billing-cid-callback,${EXTEN},1)
i have configure that context in my extensions.conf as follows :
# extensions.conf
[a2billing-cid-callback] exten => h,1,Hangup exten => _X.,1,Ringing exten => _X.,n,Wait(2) exten => _X.,n,Agi(a2billing.php,3,cid-callback) ;last parameter is the callback area code exten => _X.,n,Hangup()
# When i dial the 331749..... , i get somethin like this in the CLI :
a2billing.php,3,cid-callback,: file:Class.A2Billing.php - line:2629 - uniqueid:1340965430.1 - [SET CHANNEL(language) en] a2billing.php,3,cid-callback,: file:Class.A2Billing.php - line:2721 - uniqueid:1340965430.1 - - Account code ::> 0846060874 a2billing.php,3,cid-callback,: file:Class.A2Billing.php - line:750 - uniqueid:1340965430.1 - [CARD STATUS UPDATE] a2billing.php,3,cid-callback,: file:Class.A2Billing.php - line:759 - uniqueid:1340965430.1 - [QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse+1, credit=credit-0.25 WHERE username='0846060874'] a2billing.php,3,cid-callback,: file:a2billing.php - line:742 - uniqueid:1340965430.1 - [TRY : callingcard_ivr_authenticate] a2billing.php,3,cid-callback,: file:a2billing.php - line:759 - uniqueid:1340965430.1 - [destination: - 33980450212] a2billing.php,3,cid-callback,: file:Class.RateEngine.php - line:98 - uniqueid:1340965430.1 - [CC_asterisk_rate-engine: (1, 33980450212)] a2billing.php,3,cid-callback,: file:Class.RateEngine.php - line:120 - uniqueid:1340965430.1 - [CC_asterisk_rate-engine - CALLERID : 33980450212] a2billing.php,3,cid-callback,: file:Class.RateEngine.php - line:182 - uniqueid:1340965430.1 - [rate-engine: Count Total result 1] a2billing.php,3,cid-callback,: file:Class.RateEngine.php - line:270 - uniqueid:1340965430.1 - [CC_asterisk_rate-engine: Count Total result 1] a2billing.php,3,cid-callback,: file:Class.RateEngine.php - line:271 - uniqueid:1340965430.1 - [CC_asterisk_rate-engine: number_trunk 1] a2billing.php,3,cid-callback,: file:a2billing.php - line:763 - uniqueid:1340965430.1 - [resfindrate: - 1] a2billing.php,3,cid-callback,: file:Class.RateEngine.php - line:285 - uniqueid:1340965430.1 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT (4.90501)] a2billing.php,3,cid-callback,: file:Class.RateEngine.php - line:291 - uniqueid:1340965430.1 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT: k=0 - res_calcultimeout:14715] a2billing.php,3,cid-callback,: file:a2billing.php - line:916 - uniqueid:1340965430.1 - [CALLBACK-ALL : INSERT CALLBACK REQUEST IN SPOOL : 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 ('07251-p7wjjop', 'PENDING', 'localhost', '0', 'sip/sip.flowroute.com/92294878#33980450212', '1000', 'a2billing-callback', '1', 'IDCONF=3,CALLED=33980450212,,MODE=CID,CBID=07251-p7wjjop,LEG=0846060874,RI=0.02,IB=0,BB=0,CC=0,DC=0,SC_A=0.00000,TC_A=0,C_A=0,BB_A=0,SC_B=0.00000,TC_B=0,C_B=0,BB_B=0,SC_C=0,TC_C=0,C_C=0,BB_C=0', '1', ADDDATE( CURRENT_TIMESTAMP, INTERVAL 10 SECOND ), '0846060874', '33980450212', '20000')] a2billing.php,3,cid-callback,: file:Class.A2Billing.php - line:750 - uniqueid:1340965430.1 - [CARD STATUS UPDATE] a2billing.php,3,cid-callback,: file:Class.A2Billing.php - line:759 - uniqueid:1340965430.1 - [QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse-1, credit=credit+0.25 WHERE username='0846060874'] -- <SIP/95.170.6.9-00000001>AGI Script a2billing.php completed, returning 4 == Spawn extension (a2billing-cid-callback, 33174900027, 3) exited non-zero on 'SIP/95.170.6.9-00000001' -- Executing [h@a2billing-cid-callback:1] Hangup("SIP/95.170.6.9-00000001", "") in new stack == Spawn extension (a2billing-cid-callback, h, 1) exited non-zero on 'SIP/95.170.6.9-00000001'
# in my daemon log ( /var/log/a2billing/a2b-daemon-callback.log) , i have :
"2012-06-29 12:36:00,095 - root - MainThread - INFO - waiting..." "2012-06-29 12:36:05,109 - root - MainThread - INFO - waiting..." "2012-06-29 12:36:10,123 - root - MainThread - INFO - waiting..." "2012-06-29 12:36:10,127 - root - MainThread - INFO - [<callback_daemon.database.CallBack_Spool object at 0x98bae4c>, <callback_daemon.database.CallBack_Spool object at 0x9855e6c>]" "2012-06-29 12:36:10,148 - root - MainThread - INFO - try_originate : sip/sip.flowroute.com/92294878#33980450212 : 1000 : a2billing-callback" "2012-06-29 12:36:10,171 - root - MainThread - INFO - try_originate : sip/sip.flowroute.com/92294878#33980450212 : 1000 : a2billing-callback" "2012-06-29 12:36:15,182 - root - MainThread - INFO - waiting..." "2012-06-29 12:36:20,196 - root - MainThread - INFO - waiting..." "2012-06-29 12:36:25,205 - root - MainThread - INFO - waiting..."
Also, when i go to the a2billing web interface , in Callback->Add , i have Pending then Error as status what is not normal i guess .
And in Callback->Server , i have localhost as manager host and server hostname, default as group, myasterisk as manager username.
Thank you all for your support.
|