Asterisk (1.8) realtime with a2billing callback

Hello again!

Now, after a few weeks of fiddling around, I finally have everything
working perfectly, except for a2billing callback.

Not sure if this is an asterisk issue for me or an a2billing issue.
Either way, I thought I’d ask here.

My a2b-callback-daemon is running, a2billing is picking up the callback (hanging up),
inserting the callback into the cc_callback_spool, but always ends up with ERROR when trying to call back.

I think maybe all of my contexts are wrong, as I only have ‘a2billing’ context througout my entire
asterisk/a2billing configuration.

Also get the same problems when using the Callback in the Customer Web UI. The callback gets inserted into cc_callback_spool, showing up in a2billing admin->callback add, but ERROR when it tries to call back.

I’m running ubuntu with asterisk 1.8 and a2billing 2.0.1.

What I’m TRYING to do, is to callback anyone who has the correct ‘complete pin number’ and have a CID starting with 0 and 9-10 digits, but at this stage I’d be happy just to get any callback at all.



switch => Realtime/@
exten => ACCESSNUMBER,1,Ringing
exten => ACCESSNUMBER,2,Goto(a2billing-all-callback,${EXTEN},1)
exten => ACCESSNUMBER,3,Hangup

exten => _X.,1,AGI(a2billing.php,5,callback)
exten => _X.,n,Hangup

exten => _X.,1,AGI(a2billing.php,5,cid-callback) ;last parameter is the callback area code
exten => _X.,n,Hangup

exten => _X.,1,AGI(a2billing.php,5,all-callback) ;last parameter is the callback area code
exten => _X.,n,Hangup

agi-conf5 :: (i’ve probably tried all different combinations in here, none with callback success)

answer_call no
cid_sanitize NO
cid_enable No
cid_askpincode_ifnot_callerid no

CALLBACK-GROUP (a2billing admin->global list->callback)::
context_callback a2billing
extensions 1000

When calling ‘ACCESSNUMBER’ this is what happens in the asterisk CLI:

[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 (‘94438-eqv8gkl’, ‘PENDING’, ‘localhost’, ‘0’, ‘SIP/siptrunk/68546’, ‘1000’, ‘a2billing’, ‘1’, ‘IDCONF=5,CALLED=68546,MODE=ALL,CBID=94438-eqv8gkl,TARIFF=1,LEG=’, ‘1’, ADDDATE( CURRENT_TIMESTAMP, INTERVAL 10 SECOND ), ‘68546’, ‘123456’, ‘20000’)]

It gets inserted into the cc_callback_spool, it shows up in a2billing admin->CALLBACK->ADD but status goes to ERROR every time.

“2013-03-17 16:12:25,317 - root - MainThread - INFO - [<callback_daemon.database.CallBack_Spool object at 0x3057650>]”
“2013-03-17 16:12:25,323 - root - MainThread - INFO - try_originate : SIP/siptrunk2/XXXXXXXXXXX : XXXXXXXXXXX : a2billing”
“2013-03-17 16:12:25,324 - root - MainThread - INFO - CallBack Status : Error”
“2013-03-17 16:12:25,328 - root - MainThread - INFO - [2013/03/17 16:12:25] Placed 6 calls”

Any suggestions are highly appreciated!

Thanks :smiley:

php: /usr/share/asterisk/agi-bin/a2billing.php[949]: Undefined variable: cia_res
php: /usr/share/asterisk/agi-bin/a2billing.php[958]: Undefined variable: caller_areacode

php: /usr/share/asterisk/agi-bin/a2billing.php[972]: Undefined variable: k
php: /usr/share/asterisk/agi-bin/a2billing.php[972]: Undefined index:

Any idea where this would come from?

All help appreciated :smile:

a2billing, which isn’t supported here.