I have Asterisk v.1.6 & A2Billing v1.3.2
I make Call with X-lite into the H323 trunck with dialcommand_param="|60|HRgrL(%timeout%:610000:3000)" and see what h323 server has not received destination Number.
Code:
a2billing.php: A2Billing AGI internal configuration:
a2billing.php: Array
a2billing.php: (
a2billing.php: [debug] => 1
a2billing.php: [asterisk_version] => 1_6
a2billing.php: [answer_call] => 1
a2billing.php: [play_audio] => 1
a2billing.php: [say_goodbye] =>
a2billing.php: [play_menulanguage] =>
a2billing.php: [force_language] =>
a2billing.php: [intro_prompt] =>
a2billing.php: [min_credit_2call] => 0
a2billing.php: [min_duration_2bill] => 0
a2billing.php: [notenoughcredit_cardnumber] => 1
a2billing.php: [notenoughcredit_assign_newcardnumber_cid] => 1
a2billing.php: [use_dnid] => 1
a2billing.php: [no_auth_dnid] => Array
a2billing.php: (
a2billing.php: [0] => 2400
a2billing.php: [1] => 2300
a2billing.php: )
a2billing.php:
a2billing.php: [number_try] => 3
a2billing.php: [force_callplan_id] =>
a2billing.php: [say_balance_after_auth] => 1
a2billing.php: [say_balance_after_call] =>
a2billing.php: [say_rateinitial] =>
a2billing.php: [say_timetocall] => 1
a2billing.php: [auto_setcallerid] => 1
a2billing.php: [force_callerid] =>
a2billing.php: [cid_sanitize] => DID
a2billing.php: [cid_enable] =>
a2billing.php: [cid_askpincode_ifnot_callerid] => 1
a2billing.php: [cid_auto_assign_card_to_cid] => 1
a2billing.php: [cid_auto_create_card] =>
a2billing.php: [cid_auto_create_card_len] => 10
a2billing.php: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php: [cid_auto_create_card_credit] => 0
a2billing.php: [cid_auto_create_card_credit_limit] => 1000
a2billing.php: [cid_auto_create_card_tariffgroup] => 6
a2billing.php: [callerid_authentication_over_cardnumber] =>
a2billing.php: [sip_iax_friends] =>
a2billing.php: [sip_iax_pstn_direct_call_prefix] => 555
a2billing.php: [sip_iax_pstn_direct_call] =>
a2billing.php: [ivr_voucher] =>
a2billing.php: [ivr_voucher_prefix] => 8
a2billing.php: [jump_voucher_if_min_credit] =>
a2billing.php: [extracharge_did] => Array
a2billing.php: (
a2billing.php: [0] =>
a2billing.php: )
a2billing.php:
a2billing.php: [extracharge_fee] => Array
a2billing.php: (
a2billing.php: [0] =>
a2billing.php: )
a2billing.php:
a2billing.php: [international_prefixes] => Array
a2billing.php: (
a2billing.php: [0] => 011
a2billing.php: [1] => 00
a2billing.php: [2] => 09
a2billing.php: )
a2billing.php:
a2billing.php: [dialcommand_param] => |60|HRgrL(%timeout%:61000:30000)
a2billing.php: [#dialcommand_param] =>
a2billing.php: [#dialcommand_param_sipiax_friend] => |60|HRgirL(3600000:61000:30000)
a2billing.php: [switchdialcommand] =>
a2billing.php: [failover_recursive_limit] => 2
a2billing.php: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php: [send_reminder] =>
a2billing.php: [record_call] =>
a2billing.php: [monitor_formatfile] => gsm
a2billing.php: [agi_force_currency] =>
a2billing.php: [currency_association] => Array
a2billing.php: (
a2billing.php: [0] => usd:dollars
a2billing.php: [1] => mxn:pesos
a2billing.php: [2] => eur:euros
a2billing.php: [3] => all:credit
a2billing.php: )
a2billing.php:
a2billing.php: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php: [logger_enable] => 1
a2billing.php: [log_file] => /tmp/a2billing.log
a2billing.php: [dialcommand_param_sipiax_friend] => |30|HL(3600000:61000:30000)
a2billing.php: [currency_association_internal] => Array
a2billing.php: (
a2billing.php: [usd] => dollars
a2billing.php: [mxn] => pesos
a2billing.php: [eur] => euros
a2billing.php: [all] => credit
a2billing.php: )
a2billing.php:
a2billing.php: [ivr_voucher_prefixe] => 8
a2billing.php: )
a2billing.php:
a2billing.php: file:a2billing.php - line:76 - IDCONFIG : 1
a2billing.php: file:a2billing.php - line:77 - MODE : standard
a2billing.php: file:a2billing.php - line:89 - AGI Request:
a2billing.php: file:a2billing.php - line:90 - Array
a2billing.php: (
a2billing.php: [agi_request] => a2billing.php
a2billing.php: [agi_channel] => SIP/1175891473-09b4fe50
a2billing.php: [agi_language] => en
a2billing.php: [agi_type] => SIP
a2billing.php: [agi_uniqueid] => 1205666916.0
a2billing.php: [agi_version] => 1.6.0-beta5
a2billing.php: [agi_callerid] => 374350351829487
a2billing.php: [agi_calleridname] => fedor
a2billing.php: [agi_callingpres] => 0
a2billing.php: [agi_callingani2] => 0
a2billing.php: [agi_callington] => 0
a2billing.php: [agi_callingtns] => 0
a2billing.php: [agi_dnid] => 79161734636
a2billing.php: [agi_rdnis] => unknown
a2billing.php: [agi_context] => a2billing
a2billing.php: [agi_extension] => 79161734636
a2billing.php: [agi_priority] => 3
a2billing.php: [agi_enhanced] => 0.0
a2billing.php: [agi_accountcode] => 1175891473
a2billing.php: [agi_threadid] => 122530704
a2billing.php: )
a2billing.php:
a2billing.php: file:Class.A2Billing.php - line:616 - get_agi_request_parameter = 374350351829487 ; SIP/1175891473-09b4fe50 ; 1205666916.0 ; 1175891473 ; 79161734636
a2billing.php: file:a2billing.php - line:139 - [ANSWER CALL]
a2billing.php: file:Class.A2Billing.php - line:1640 - SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix, redial, enableexpire, date_part('epoch',expirationdate), expiredays, nbused, date_part('epoch',firstusedate), date_part('epoch',cc_card.creationdate), cc_card.currency, cc_card.lastname, cc_card.firstname, cc_card.email, cc_card.uipass, cc_card.id_campaign, cc_card.id, useralias FROM cc_card LEFT JOIN cc_tariffgroup ON tariff=cc_tariffgroup.id WHERE username='1175891473'
a2billing.php: file:Class.A2Billing.php - line:1714 - [SET CHANNEL(language) en]
a2billing.php: file:Class.A2Billing.php - line:649 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='1175891473']
a2billing.php: file:Class.A2Billing.php - line:1950 - [A2Billing] SAY BALANCE : 99.9847
a2billing.php: file:Class.A2Billing.php - line:1399 - [AUTO SetCallerID]
a2billing.php: file:Class.A2Billing.php - line:1405 - [REQUESTED SetCallerID : 374350351829487]
a2billing.php: file:Class.A2Billing.php - line:1416 - [EXEC SetCallerID : 374350351829487]
a2billing.php: file:a2billing.php - line:170 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:171 - [CREDIT : 99.9847][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:671 - 1 && && 11&& 0
a2billing.php: file:Class.A2Billing.php - line:696 - DESTINATION ::> 79161734636
a2billing.php: file:Class.A2Billing.php - line:698 - RULES APPLY ON DESTINATION ::> 79161734636
a2billing.php: file:Class.A2Billing.php - line:736 - OK - RESFINDRATE::> 1
a2billing.php: file:Class.A2Billing.php - line:758 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php: file:Class.A2Billing.php - line:775 - TIMEOUT::> 149977 : minutes=2499 - seconds=37
a2billing.php: file:Class.RateEngine.php - line:1026 - app_callingcard: Dialing 'H323/X.X.X.X/79161734636|60|HRgrL(149977000:61000:30000)' with timeout of '149977'.
a2billing.php:
a2billing.php: file:Class.RateEngine.php - line:1051 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
-- AGI Script Executing Application: (Dial) Options: (H323/X.X.X.X/79161734636|60|HRgrL(149977000:61000:30000))
-- Requested transfer capability: 0x00 - SPEECH
-- Called X.X.X.X/79161734636|60|HRgrL(149977000:61000:30000)
== Everyone is busy/congested at this time (1:0/0/1)
a2billing.php: file:Class.RateEngine.php - line:1162 - [USEDRATECARD - FAIL =0]
-- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)
a2billing.php: file:Class.RateEngine.php - line:914 - [CC_asterisk_stop QUERY = INSERT INTO cc_call (uniqueid,sessionid,username,nasipaddress,starttime,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('1205666916.0', 'SIP/1175891473-09b4fe50', '1175891473', '', CURRENT_TIMESTAMP - interval '0 seconds' , '0', '79161734636', 'CHANUNAVAIL', now(), '0.04', '-0', '', '', 'ru', '2', '1', '2', '3', '374350351829487', '0', '0', '0', '0')]
a2billing.php: file:Class.RateEngine.php - line:917 - [CC_asterisk_stop 1.1: SQL: DONE : result=1]
a2billing.php: file:a2billing.php - line:310 - [a2billing account stop]
a2billing.php: file:a2billing.php - line:170 - [CHANNEL STATUS : = Channel is down and available]
a2billing.php: file:a2billing.php - line:171 - [CREDIT : 99.9847][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:649 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='1175891473']
If Make I Call with dialcommand_param= Call is good and I have speak with destination.
Code:
a2billing.php: A2Billing AGI internal configuration:
a2billing.php: Array
a2billing.php: (
a2billing.php: [debug] => 1
a2billing.php: [asterisk_version] => 1_6
a2billing.php: [answer_call] => 1
a2billing.php: [play_audio] => 1
a2billing.php: [say_goodbye] =>
a2billing.php: [play_menulanguage] =>
a2billing.php: [force_language] =>
a2billing.php: [intro_prompt] =>
a2billing.php: [min_credit_2call] => 0
a2billing.php: [min_duration_2bill] => 0
a2billing.php: [notenoughcredit_cardnumber] => 1
a2billing.php: [notenoughcredit_assign_newcardnumber_cid] => 1
a2billing.php: [use_dnid] => 1
a2billing.php: [no_auth_dnid] => Array
a2billing.php: (
a2billing.php: [0] => 2400
a2billing.php: [1] => 2300
a2billing.php: )
a2billing.php:
a2billing.php: [number_try] => 3
a2billing.php: [force_callplan_id] =>
a2billing.php: [say_balance_after_auth] => 1
a2billing.php: [say_balance_after_call] =>
a2billing.php: [say_rateinitial] =>
a2billing.php: [say_timetocall] => 1
a2billing.php: [auto_setcallerid] => 1
a2billing.php: [force_callerid] =>
a2billing.php: [cid_sanitize] => DID
a2billing.php: [cid_enable] =>
a2billing.php: [cid_askpincode_ifnot_callerid] => 1
a2billing.php: [cid_auto_assign_card_to_cid] => 1
a2billing.php: [cid_auto_create_card] =>
a2billing.php: [cid_auto_create_card_len] => 10
a2billing.php: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php: [cid_auto_create_card_credit] => 0
a2billing.php: [cid_auto_create_card_credit_limit] => 1000
a2billing.php: [cid_auto_create_card_tariffgroup] => 6
a2billing.php: [callerid_authentication_over_cardnumber] =>
a2billing.php: [sip_iax_friends] =>
a2billing.php: [sip_iax_pstn_direct_call_prefix] => 555
a2billing.php: [sip_iax_pstn_direct_call] =>
a2billing.php: [ivr_voucher] =>
a2billing.php: [ivr_voucher_prefix] => 8
a2billing.php: [jump_voucher_if_min_credit] =>
a2billing.php: [extracharge_did] => Array
a2billing.php: (
a2billing.php: [0] =>
a2billing.php: )
a2billing.php:
a2billing.php: [extracharge_fee] => Array
a2billing.php: (
a2billing.php: [0] =>
a2billing.php: )
a2billing.php:
a2billing.php: [international_prefixes] => Array
a2billing.php: (
a2billing.php: [0] => 011
a2billing.php: [1] => 00
a2billing.php: [2] => 09
a2billing.php: )
a2billing.php:
a2billing.php: [#dialcommand_param] => |60|HRgrL(%timeout%:61000:30000)
a2billing.php: [dialcommand_param] =>
a2billing.php: [#dialcommand_param_sipiax_friend] => |60|HRgirL(3600000:61000:30000)
a2billing.php: [switchdialcommand] =>
a2billing.php: [failover_recursive_limit] => 2
a2billing.php: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php: [send_reminder] =>
a2billing.php: [record_call] =>
a2billing.php: [monitor_formatfile] => gsm
a2billing.php: [agi_force_currency] =>
a2billing.php: [currency_association] => Array
a2billing.php: (
a2billing.php: [0] => usd:dollars
a2billing.php: [1] => mxn:pesos
a2billing.php: [2] => eur:euros
a2billing.php: [3] => all:credit
a2billing.php: )
a2billing.php:
a2billing.php: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php: [logger_enable] => 1
a2billing.php: [log_file] => /tmp/a2billing.log
a2billing.php: [dialcommand_param_sipiax_friend] => |30|HL(3600000:61000:30000)
a2billing.php: [currency_association_internal] => Array
a2billing.php: (
a2billing.php: [usd] => dollars
a2billing.php: [mxn] => pesos
a2billing.php: [eur] => euros
a2billing.php: [all] => credit
a2billing.php: )
a2billing.php:
a2billing.php: [ivr_voucher_prefixe] => 8
a2billing.php: )
a2billing.php:
a2billing.php: file:a2billing.php - line:76 - IDCONFIG : 1
a2billing.php: file:a2billing.php - line:77 - MODE : standard
a2billing.php: file:a2billing.php - line:89 - AGI Request:
a2billing.php: file:a2billing.php - line:90 - Array
a2billing.php: (
a2billing.php: [agi_request] => a2billing.php
a2billing.php: [agi_channel] => SIP/1175891473-08cbe450
a2billing.php: [agi_language] => en
a2billing.php: [agi_type] => SIP
a2billing.php: [agi_uniqueid] => 1205667265.0
a2billing.php: [agi_version] => 1.6.0-beta5
a2billing.php: [agi_callerid] => 374350351829487
a2billing.php: [agi_calleridname] => fedor
a2billing.php: [agi_callingpres] => 0
a2billing.php: [agi_callingani2] => 0
a2billing.php: [agi_callington] => 0
a2billing.php: [agi_callingtns] => 0
a2billing.php: [agi_dnid] => 79161734636
a2billing.php: [agi_rdnis] => unknown
a2billing.php: [agi_context] => a2billing
a2billing.php: [agi_extension] => 79161734636
a2billing.php: [agi_priority] => 3
a2billing.php: [agi_enhanced] => 0.0
a2billing.php: [agi_accountcode] => 1175891473
a2billing.php: [agi_threadid] => 52362128
a2billing.php: )
a2billing.php:
a2billing.php: file:Class.A2Billing.php - line:616 - get_agi_request_parameter = 374350351829487 ; SIP/1175891473-08cbe450 ; 1205667265.0 ; 1175891473 ; 79161734636
a2billing.php: file:a2billing.php - line:139 - [ANSWER CALL]
a2billing.php: file:Class.A2Billing.php - line:1640 - SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix, redial, enableexpire, date_part('epoch',expirationdate), expiredays, nbused, date_part('epoch',firstusedate), date_part('epoch',cc_card.creationdate), cc_card.currency, cc_card.lastname, cc_card.firstname, cc_card.email, cc_card.uipass, cc_card.id_campaign, cc_card.id, useralias FROM cc_card LEFT JOIN cc_tariffgroup ON tariff=cc_tariffgroup.id WHERE username='1175891473'
a2billing.php: file:Class.A2Billing.php - line:1714 - [SET CHANNEL(language) en]
a2billing.php: file:Class.A2Billing.php - line:649 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='1175891473']
a2billing.php: file:Class.A2Billing.php - line:1950 - [A2Billing] SAY BALANCE : 99.9847
a2billing.php:
a2billing.php: file:Class.A2Billing.php - line:1399 - [AUTO SetCallerID]
a2billing.php: file:Class.A2Billing.php - line:1405 - [REQUESTED SetCallerID : 374350351829487]
a2billing.php: file:Class.A2Billing.php - line:1416 - [EXEC SetCallerID : 374350351829487]
a2billing.php: file:a2billing.php - line:170 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:171 - [CREDIT : 99.9847][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:671 - 1 && && 11&& 0
a2billing.php: file:Class.A2Billing.php - line:696 - DESTINATION ::> 79161734636
a2billing.php: file:Class.A2Billing.php - line:698 - RULES APPLY ON DESTINATION ::> 79161734636
a2billing.php: file:Class.A2Billing.php - line:736 - OK - RESFINDRATE::> 1
a2billing.php: file:Class.A2Billing.php - line:758 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php: file:Class.A2Billing.php - line:775 - TIMEOUT::> 149977 : minutes=2499 - seconds=37
a2billing.php: file:Class.RateEngine.php - line:1026 - app_callingcard: Dialing 'H323/X.X.X.X/79161734636' with timeout of '149977'.
a2billing.php:
a2billing.php: file:Class.RateEngine.php - line:1051 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
-- AGI Script Executing Application: (Dial) Options: (H323/X.X.X.X/79161734636)
-- Requested transfer capability: 0x00 - SPEECH
-- Called X.X.X.X/79161734636
-- H323/X.X.X.X-1 is making progress passing it to SIP/1175891473-08cbe450
-- H323/X.X.X.X-1 is making progress passing it to SIP/1175891473-08cbe450
-- H323/X.X.X.X-1 is making progress passing it to SIP/1175891473-08cbe450
-- H323/X.X.X.X-1 is ringing
-- H323/X.X.X.X-1 is making progress passing it to SIP/1175891473-08cbe450
-- H323/X.X.X.X-1 answered SIP/1175891473-08cbe450
a2billing.php: file:Class.RateEngine.php - line:1153 - -> dialstatus : ANSWER, answered time is 6
a2billing.php:
a2billing.php: file:Class.RateEngine.php - line:1157 - [USEDRATECARD=0]
a2billing.php: file:Class.RateEngine.php - line:835 - ft2c_package_offer : 1 ; ; 0
a2billing.php: file:Class.RateEngine.php - line:914 - [CC_asterisk_stop QUERY = INSERT INTO cc_call (uniqueid,sessionid,username,nasipaddress,starttime,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('1205667265.0', 'SIP/1175891473-08cbe450', '1175891473', '', CURRENT_TIMESTAMP - interval '6 seconds' , '6', '79161734636', 'ANSWER', now(), '0.04', '+0.004', '', '', 'ru', '2', '1', '2', '3', '374350351829487', '0', '0', '0', '0')]
a2billing.php: file:Class.RateEngine.php - line:917 - [CC_asterisk_stop 1.1: SQL: DONE : result=1]
a2billing.php: file:Class.RateEngine.php - line:935 - [CC_asterisk_stop 1.2: SQL: UPDATE cc_card SET credit= credit-0.004 , redial='79161734636' , lastuse=now(), nbused=nbused+1 WHERE username='1175891473']
a2billing.php: file:Class.RateEngine.php - line:940 - UPDATE cc_trunk SET secondusedreal = secondusedreal + 6 WHERE id_trunk='3'
a2billing.php: file:Class.RateEngine.php - line:944 - UPDATE cc_tariffplan SET secondusedreal = secondusedreal + 6 WHERE id='1'
a2billing.php: file:a2billing.php - line:310 - [a2billing account stop]
a2billing.php: file:a2billing.php - line:170 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:171 - [CREDIT : 99.9807][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:671 - 0 && && 11&& 1
-- <SIP/1175891473-08cbe450> Playing 'prepaid-enter-dest.slin' (language 'en')
a2billing.php: file:Class.A2Billing.php - line:678 - RES DTMF : -1
a2billing.php: file:Class.A2Billing.php - line:696 - DESTINATION ::> -1
a2billing.php: file:Class.A2Billing.php - line:698 - RULES APPLY ON DESTINATION ::> -1
a2billing.php: file:a2billing.php - line:170 - [CHANNEL STATUS : = Channel is down and available]
a2billing.php: file:a2billing.php - line:171 - [CREDIT : 99.9807][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:649 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='1175891473']
-- <SIP/1175891473-08cbe450>AGI Script a2billing.php completed, returning -1