Hi
I have reviewed most of the post and am still unable to resolve my problem.
I would like to get callback feature of a2billing to work
asterisk 1.4
a2billing 1.3.1
freepbx 2.4
the callback daemon is running
I created a custom context in extensions_custom.conf
[custom-a2billing-cid-callback]
exten => s,1,AGI(a2billing.php|1|cid-callback) ;last parameter is the callback area code
exten => s,n,Hangup
I created a SIP extension 1000 with context 'custom-a2billing-cid-callback'
in a2billing.conf if copy contect [callback] , and paste to bottom of file then change to [custom-a2billing-cid-callback]
call plans are setup ... able to use calling card feature
Problem ... call comes in to DID , information registers and disconnects however no callback is placed.
Additional Info:
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|1|cid-callback: A2Billing AGI internal configuration:
a2billing.php|1|cid-callback: Array
a2billing.php|1|cid-callback: (
a2billing.php|1|cid-callback: [debug] => 1
a2billing.php|1|cid-callback: [asterisk_version] => 1_4
a2billing.php|1|cid-callback: [answer_call] => 1
a2billing.php|1|cid-callback: [play_audio] => 1
a2billing.php|1|cid-callback: [say_goodbye] =>
a2billing.php|1|cid-callback: [play_menulanguage] =>
a2billing.php|1|cid-callback: [force_language] =>
a2billing.php|1|cid-callback: [intro_prompt] =>
a2billing.php|1|cid-callback: [min_credit_2call] => 0
a2billing.php|1|cid-callback: [min_duration_2bill] => 0
a2billing.php|1|cid-callback: [notenoughcredit_cardnumber] => 1
a2billing.php|1|cid-callback: [notenoughcredit_assign_newcardnumber_cid] => 1
a2billing.php|1|cid-callback: [use_dnid] =>
a2billing.php|1|cid-callback: [no_auth_dnid] => Array
a2billing.php|1|cid-callback: (
a2billing.php|1|cid-callback: [0] => 2400
a2billing.php|1|cid-callback: [1] => 2300
a2billing.php|1|cid-callback: )
a2billing.php|1|cid-callback:
a2billing.php|1|cid-callback: [number_try] => 3
a2billing.php|1|cid-callback: [force_callplan_id] =>
a2billing.php|1|cid-callback: [say_balance_after_auth] => 1
a2billing.php|1|cid-callback: [say_balance_after_call] =>
a2billing.php|1|cid-callback: [say_rateinitial] =>
a2billing.php|1|cid-callback: [say_timetocall] => 1
a2billing.php|1|cid-callback: [auto_setcallerid] => 1
a2billing.php|1|cid-callback: [force_callerid] =>
a2billing.php|1|cid-callback: [cid_sanitize] =>
a2billing.php|1|cid-callback: [cid_enable] => 1
a2billing.php|1|cid-callback: [cid_askpincode_ifnot_callerid] => 1
a2billing.php|1|cid-callback: [cid_auto_assign_card_to_cid] => 1
a2billing.php|1|cid-callback: [cid_auto_create_card] =>
a2billing.php|1|cid-callback: [cid_auto_create_card_len] => 10
a2billing.php|1|cid-callback: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php|1|cid-callback: [cid_auto_create_card_credit] => 0
a2billing.php|1|cid-callback: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|1|cid-callback: [cid_auto_create_card_tariffgroup] => 6
a2billing.php|1|cid-callback: [callerid_authentication_over_cardnumber] =>
a2billing.php|1|cid-callback: [sip_iax_friends] =>
a2billing.php|1|cid-callback: [sip_iax_pstn_direct_call_prefix] => 555
a2billing.php|1|cid-callback: [sip_iax_pstn_direct_call] =>
a2billing.php|1|cid-callback: [ivr_voucher] =>
a2billing.php|1|cid-callback: [ivr_voucher_prefix] => 8
a2billing.php|1|cid-callback: [jump_voucher_if_min_credit] =>
a2billing.php|1|cid-callback: [extracharge_did] => Array
a2billing.php|1|cid-callback: (
a2billing.php|1|cid-callback: [0] =>
a2billing.php|1|cid-callback: )
a2billing.php|1|cid-callback:
a2billing.php|1|cid-callback: [extracharge_fee] => Array
a2billing.php|1|cid-callback: (
a2billing.php|1|cid-callback: [0] =>
a2billing.php|1|cid-callback: )
a2billing.php|1|cid-callback:
a2billing.php|1|cid-callback: [international_prefixes] => Array
a2billing.php|1|cid-callback: (
a2billing.php|1|cid-callback: [0] => 011
a2billing.php|1|cid-callback: [1] => 00
a2billing.php|1|cid-callback: [2] => 09
a2billing.php|1|cid-callback: [3] => 1
a2billing.php|1|cid-callback: )
a2billing.php|1|cid-callback:
a2billing.php|1|cid-callback: [dialcommand_param] => |60|HRgrL(%timeout%:61000:30000)
a2billing.php|1|cid-callback: [dialcommand_param_sipiax_friend] => |60|HRgrL(3600000:61000:30000)
a2billing.php|1|cid-callback: [switchdialcommand] =>
a2billing.php|1|cid-callback: [failover_recursive_limit] => 2
a2billing.php|1|cid-callback: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|1|cid-callback: [send_reminder] =>
a2billing.php|1|cid-callback: [record_call] =>
a2billing.php|1|cid-callback: [monitor_formatfile] => gsm
a2billing.php|1|cid-callback: [agi_force_currency] =>
a2billing.php|1|cid-callback: [currency_association] => Array
a2billing.php|1|cid-callback: (
a2billing.php|1|cid-callback: [0] => usd:dollars
a2billing.php|1|cid-callback: [1] => mxn:pesos
a2billing.php|1|cid-callback: [2] => eur:euros
a2billing.php|1|cid-callback: [3] => all:credit
a2billing.php|1|cid-callback: )
a2billing.php|1|cid-callback:
a2billing.php|1|cid-callback: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|1|cid-callback: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|1|cid-callback: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php|1|cid-callback: [logger_enable] => 1
a2billing.php|1|cid-callback: [log_file] => /tmp/a2billing.log
a2billing.php|1|cid-callback: [currency_association_internal] => Array
a2billing.php|1|cid-callback: (
a2billing.php|1|cid-callback: [usd] => dollars
a2billing.php|1|cid-callback: [mxn] => pesos
a2billing.php|1|cid-callback: [eur] => euros
a2billing.php|1|cid-callback: [all] => credit
a2billing.php|1|cid-callback: )
a2billing.php|1|cid-callback:
a2billing.php|1|cid-callback: [ivr_voucher_prefixe] => 8
a2billing.php|1|cid-callback: )
a2billing.php|1|cid-callback:
a2billing.php|1|cid-callback: file:a2billing.php - line:76 - IDCONFIG : 1
a2billing.php|1|cid-callback: file:a2billing.php - line:77 - MODE : cid-callback
a2billing.php|1|cid-callback: file:a2billing.php - line:89 - AGI Request:
a2billing.php|1|cid-callback: file:a2billing.php - line:90 - Array
a2billing.php|1|cid-callback: (
a2billing.php|1|cid-callback: [agi_request] => a2billing.php
a2billing.php|1|cid-callback: [agi_channel] => IAX2/1176575871-6
a2billing.php|1|cid-callback: [agi_language] => en
a2billing.php|1|cid-callback: [agi_type] => IAX2
a2billing.php|1|cid-callback: [agi_uniqueid] => 1205283522.199
a2billing.php|1|cid-callback: [agi_callerid] => 4167478391
a2billing.php|1|cid-callback: [agi_calleridname] => MCKENZIE O
a2billing.php|1|cid-callback: [agi_callingpres] => 0
a2billing.php|1|cid-callback: [agi_callingani2] => 0
a2billing.php|1|cid-callback: [agi_callington] => 0
a2billing.php|1|cid-callback: [agi_callingtns] => 0
a2billing.php|1|cid-callback: [agi_dnid] => unknown
a2billing.php|1|cid-callback: [agi_rdnis] => unknown
a2billing.php|1|cid-callback: [agi_context] => custom-a2billing-cid-callback
a2billing.php|1|cid-callback: [agi_extension] => s
a2billing.php|1|cid-callback: [agi_priority] => 1
a2billing.php|1|cid-callback: [agi_enhanced] => 0.0
a2billing.php|1|cid-callback: [agi_accountcode] =>
a2billing.php|1|cid-callback: )
a2billing.php|1|cid-callback:
a2billing.php|1|cid-callback: file:Class.A2Billing.php - line:616 - get_agi_request_parameter = 4167478391 ; IAX2/1176575871-6 ; 1205283522.199 ; ; s
a2billing.php|1|cid-callback: file:a2billing.php - line:407 - [MODE : CALLERID-CALLBACK - 4167478391]
a2billing.php|1|cid-callback: file:a2billing.php - line:410 - [HANGUP CLI CALLBACK TRIGGER]
== Spawn extension (custom-a2billing-cid-callback, s, 1) exited non-zero on 'IAX2/1176575871-6'
-- Hungup 'IAX2/1176575871-6'
*******************
a2billing log
........
[11/03/2008 20:58:46]:[file:Class.RateEngine.php - line:182]:[CallerID:4167478391]:[CN:10768553218]:[[RATE ENGINE QUERY]
SELECT tariffgroupname, lcrtype, idtariffgroup, cc_tariffgroup_plan.idtariffplan, tariffname, destination,
cc_ratecard.id, dialprefix, destination, buyrate, buyrateinitblock, buyrateincrement, rateinitial, initblock, billingblock,
connectcharge, disconnectcharge, stepchargea, chargea, timechargea, billingblocka, stepchargeb, chargeb,
timechargeb, billingblockb, stepchargec, chargec, timechargec, billingblockc,
cc_tariffplan.id_trunk AS tp_id_trunk, tp_trunk.trunkprefix AS tp_trunk, tp_trunk.providertech AS tp_providertech,
tp_trunk.providerip AS tp_providerip, tp_trunk.removeprefix AS tp_removeprefix,
cc_ratecard.id_trunk AS rc_id_trunk, rt_trunk.trunkprefix AS rc_trunkprefix, rt_trunk.providertech AS rc_providertech,
rt_trunk.providerip AS rc_providerip, rt_trunk.removeprefix AS rc_removeprefix,
musiconhold,
tp_trunk.failover_trunk AS tp_failover_trunk,
rt_trunk.failover_trunk AS rt_failover_trunk,
tp_trunk.addparameter AS tp_addparameter_trunk,
rt_trunk.addparameter AS rt_addparameter_trunk,
id_outbound_cidgroup,
freetimetocall_package_offer, freetimetocall, packagetype, billingtype, startday, id_cc_package_offer
FROM cc_tariffgroup
RIGHT JOIN cc_tariffgroup_plan ON cc_tariffgroup.id=1
INNER JOIN cc_tariffplan ON (cc_tariffplan.id=cc_tariffgroup_plan.idtariffplan )
LEFT JOIN cc_ratecard ON cc_ratecard.idtariffplan=cc_tariffplan.id
LEFT JOIN cc_trunk AS rt_trunk ON cc_ratecard.id_trunk=rt_trunk.id_trunk
LEFT JOIN cc_trunk AS tp_trunk ON cc_tariffplan.id_trunk=tp_trunk.id_trunk
LEFT JOIN cc_package_offer ON cc_package_offer.id=cc_tariffgroup.id_cc_package_offer
WHERE (dialprefix=SUBSTRING('4167478391',1,length(dialprefix)) OR dialprefix='defaultprefix')
AND startingdate<= CURRENT_TIMESTAMP AND (expirationdate > CURRENT_TIMESTAMP OR expirationdate IS NULL OR LENGTH(expirationdate)<5)
AND startdate<= CURRENT_TIMESTAMP AND (stopdate > CURRENT_TIMESTAMP OR stopdate IS NULL OR LENGTH(stopdate)<5)
AND (starttime <= 2698 AND endtime >=2698)
AND idtariffgroup='1'
AND ( dnidprefix=SUBSTRING('4167478391',1,length(dnidprefix)) OR (dnidprefix='all' AND 0 = 0))
AND ( calleridprefix=SUBSTRING('4167478391',1,length(calleridprefix)) OR (calleridprefix='all' AND 0 = 0))
ORDER BY LENGTH(dialprefix) DESC
]
[11/03/2008 20:58:46]:[file:Class.RateEngine.php - line:192]:[CallerID:4167478391]:[CN:10768553218]:[[rate-engine: Count Total result 2]]
[11/03/2008 20:58:46]:[file:Class.RateEngine.php - line:281]:[CallerID:4167478391]:[CN:10768553218]:[[CC_asterisk_rate-engine: Count Total result 1]]
[11/03/2008 20:58:46]:[file:Class.RateEngine.php - line:282]:[CallerID:4167478391]:[CN:10768553218]:[[CC_asterisk_rate-engine: number_trunk 1]]
[11/03/2008 20:58:46]:[file:a2billing.php - line:439]:[CallerID:4167478391]:[CN:10768553218]:[[resfindrate: - 1]]
[11/03/2008 20:58:46]:[file:Class.RateEngine.php - line:295]:[CallerID:4167478391]:[CN:10768553218]:[[CC_RATE_ENGINE_ALL_CALCULTIMEOUT (20.00000)]]
[11/03/2008 20:58:46]:[file:Class.RateEngine.php - line:301]:[CallerID:4167478391]:[CN:10768553218]:[[CC_RATE_ENGINE_ALL_CALCULTIMEOUT: k=0 - res_calcultimeout:60000]]
[11/03/2008 20:58:46]:[file:a2billing.php - line:528]:[CallerID:4167478391]:[CN:10768553218]:[[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 ('87825-nxibc5i', 'PENDING', 'localhost', '0', 'IAX2/6477235190/4167478391', '1000', 'a2billing-callback', '1', 'CALLED=4167478391|MODE=CID|CBID=87825-nxibc5i|LEG=10768553218|RATEINITIAL=0.02|INITBLOCK=60|BILLINGBLOCK=60|
CONNECTCHARGE=0|DISCONNECTCHARGE=0|STEPCHARGEA=0|TIMECHARGEA=0|STEPCHARGEB=0|TIMECHARGEB=0|STEPCHARGEC=0|
TIMECHARGEC=0', '1', ADDDATE( CURRENT_TIMESTAMP, INTERVAL 10 SECOND ), '10768553218', '4167478391', '30000')]]
[11/03/2008 20:58:46]:[file:Class.A2Billing.php - line:649]:[CallerID:4167478391]:[CN:10768553218]:[[CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='10768553218']]
[11/03/2008 20:58:46]:[CallerID:4167478391]:[CN:10768553218]:[[exit]]
Any help would be appreciated.
Thanks
|