Quote:
What did you need to change exactly? Would you care to share your improvements back to the project? Obviously we can't support code we've never seen.
Sure, when it is 100% working with no bugs,
Quote:
recall having seen this situation once before, but it was a long time ago and the details escape me. Are you running A2B v1.3.3?
Yes i am using the latest Version.
Quote:
Are you sure A2B is placing the outbound leg?
Yes because it is the only code in the Context, and all of the sip peers are pointed to that context
Code:
[a2billing]
;exten => _X.,1,Answer
exten => _X.,1,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1)
;exten => _X.,n,AGI(a2billing.php|1)
exten => _X.,n,Wait(1)
exten => _X.,n,Hangup
here are the LOG for the scneario where I called an outbound number and hangup right away, did not even hear how log i can talk for, and the call went through.
Code:
-- Executing [19057878135@numberplan-custom-3:1] Wait("SIP/14166239005-006baba0", "1") in new stack
-- Executing [19057878135@numberplan-custom-3:2] DeadAGI("SIP/14166239005-006baba0", "a2billing.php|1") in new stack
[Aug 18 14:24:51] WARNING[9179]: res_agi.c:2116 deadagi_exec: Running DeadAGI on a live channel will cause problems, please use AGI
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|1: A2Billing AGI internal configuration:
a2billing.php|1: Array
a2billing.php|1: (
a2billing.php|1: [debug] => 3
a2billing.php|1: [asterisk_version] => 1_4
a2billing.php|1: [answer_call] =>
a2billing.php|1: [play_audio] => 1
a2billing.php|1: [say_goodbye] =>
a2billing.php|1: [play_menulanguage] =>
a2billing.php|1: [force_language] =>
a2billing.php|1: [intro_prompt] =>
a2billing.php|1: [min_credit_2call] => 0
a2billing.php|1: [min_duration_2bill] => 0
a2billing.php|1: [notenoughcredit_cardnumber] =>
a2billing.php|1: [notenoughcredit_assign_newcardnumber_cid] =>
a2billing.php|1: [use_dnid] => 1
a2billing.php|1: [no_auth_dnid] => Array
a2billing.php|1: (
a2billing.php|1: [0] => 2400
a2billing.php|1: [1] => 2300
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: [number_try] => 1
a2billing.php|1: [force_callplan_id] =>
a2billing.php|1: [say_balance_after_auth] =>
a2billing.php|1: [say_balance_before_call] =>
a2billing.php|1: [say_balance_after_call] => 1
a2billing.php|1: [say_rateinitial] =>
a2billing.php|1: [say_timetocall] => 1
a2billing.php|1: [auto_setcallerid] => 1
a2billing.php|1: [force_callerid] =>
a2billing.php|1: [cid_sanitize] => CID
a2billing.php|1: [cid_enable] => 1
a2billing.php|1: [cid_askpincode_ifnot_callerid] =>
a2billing.php|1: [cid_auto_assign_card_to_cid] =>
a2billing.php|1: [cid_auto_create_card] => 1
a2billing.php|1: [cid_auto_create_card_len] => 10
a2billing.php|1: [cid_auto_create_card_typepaid] => PREPAY
a2billing.php|1: [cid_auto_create_card_credit] => 0
a2billing.php|1: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|1: [cid_auto_create_card_tariffgroup] => 4
a2billing.php|1: [callerid_authentication_over_cardnumber] => 1
a2billing.php|1: [sip_iax_friends] => 1
a2billing.php|1: [sip_iax_pstn_direct_call_prefix] => 1416623
a2billing.php|1: [sip_iax_pstn_direct_call] => 1
a2billing.php|1: [ivr_voucher] =>
a2billing.php|1: [ivr_voucher_prefix] => 8
a2billing.php|1: [jump_voucher_if_min_credit] => 1
a2billing.php|1: [voucher_phone_number] => 110
a2billing.php|1: [min_credit] => 2.50
a2billing.php|1: [extracharge_did] => Array
a2billing.php|1: (
a2billing.php|1: [0] =>
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: [extracharge_fee] => Array
a2billing.php|1: (
a2billing.php|1: [0] =>
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: [extracharge_buyfee] => Array
a2billing.php|1: (
a2billing.php|1: [0] =>
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: [international_prefixes] => Array
a2billing.php|1: (
a2billing.php|1: [0] => 011
a2billing.php|1: [1] => 00
a2billing.php|1: [2] => 09
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: [dialcommand_param] => |60|HgiRL(%timeout%:61000:30000)
a2billing.php|1: [dialcommand_param_sipiax_friend] => |60|HRgirL(3600000:61000:30000)
a2billing.php|1: [switchdialcommand] =>
a2billing.php|1: [failover_recursive_limit] => 2
a2billing.php|1: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|1: [send_reminder] =>
a2billing.php|1: [record_call] =>
a2billing.php|1: [monitor_formatfile] => gsm
a2billing.php|1: [agi_force_currency] =>
a2billing.php|1: [currency_association] => Array
a2billing.php|1: (
a2billing.php|1: [0] => usd:dollars
a2billing.php|1: [1] => mxn:pesos
a2billing.php|1: [2] => eur:euros
a2billing.php|1: [3] => all:credit
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|1: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|1: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php|1: [logger_enable] => 1
a2billing.php|1: [log_file] => /tmp/a2billing.log
a2billing.php|1: [currency_association_internal] => Array
a2billing.php|1: (
a2billing.php|1: [usd] => dollars
a2billing.php|1: [mxn] => pesos
a2billing.php|1: [eur] => euros
a2billing.php|1: [all] => credit
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: [ivr_voucher_prefixe] => 8
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: file:a2billing.php - line:78 - IDCONFIG : 1
a2billing.php|1: file:a2billing.php - line:79 - MODE : standard
a2billing.php|1: file:a2billing.php - line:91 - AGI Request:
a2billing.php|1: file:a2billing.php - line:92 - Array
a2billing.php|1: (
a2billing.php|1: [agi_request] => a2billing.php
a2billing.php|1: [agi_channel] => SIP/14166239005-006baba0
a2billing.php|1: [agi_language] => en
a2billing.php|1: [agi_type] => SIP
a2billing.php|1: [agi_uniqueid] => 1219083890.465
a2billing.php|1: [agi_callerid] => 14166239005
a2billing.php|1: [agi_calleridname] => user 1
a2billing.php|1: [agi_callingpres] => 0
a2billing.php|1: [agi_callingani2] => 0
a2billing.php|1: [agi_callington] => 0
a2billing.php|1: [agi_callingtns] => 0
a2billing.php|1: [agi_dnid] => 19057878135
a2billing.php|1: [agi_rdnis] => unknown
a2billing.php|1: [agi_context] => numberplan-custom-3
a2billing.php|1: [agi_extension] => 19057878135
a2billing.php|1: [agi_priority] => 2
a2billing.php|1: [agi_enhanced] => 0.0
a2billing.php|1: [agi_accountcode] =>
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: file:Class.A2Billing.php - line:623 - get_agi_request_parameter = 14166239005 ; SIP/14166239005-006baba0 ; 1219083890.465 ; ; 19057878135
a2billing.php|1: file:a2billing.php - line:145 - [NO ANSWER CALL]
a2billing.php|1: file:Class.A2Billing.php - line:1476 - [CID_ENABLE - CID_CONTROL - CID:14166239005]
a2billing.php|1: file:Class.A2Billing.php - line:1493 - QUERY = SELECT cc_callerid.cid, cc_callerid.id_cc_card, cc_callerid.activated, cc_card.credit, cc_card.tariff, cc_card.activated, cc_card.inuse, cc_card.simultaccess, cc_card.typepaid, cc_card.creditlimit, cc_card.language, cc_card.username, removeinterprefix, cc_card.redial, enableexpire, UNIX_TIMESTAMP(expirationdate), expiredays, nbused, UNIX_TIMESTAMP(firstusedate), UNIX_TIMESTAMP(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_callerid LEFT JOIN cc_card ON cc_callerid.id_cc_card=cc_card.id LEFT JOIN cc_tariffgroup ON cc_card.tariff=cc_tariffgroup.id WHERE cc_callerid.cid='14166239005'
a2billing.php|1: RESULT : Array
a2billing.php|1: (
a2billing.php|1: [0] => Array
a2billing.php|1: (
a2billing.php|1: [0] => 14166239005
a2billing.php|1: [cid] => 14166239005
a2billing.php|1: [1] => 84
a2billing.php|1: [id_cc_card] => 84
a2billing.php|1: [2] => t
a2billing.php|1: [activated] => t
a2billing.php|1: [3] => 315.00000
a2billing.php|1: [credit] => 315.00000
a2billing.php|1: [4] => 4
a2billing.php|1: [tariff] => 4
a2billing.php|1: [5] => t
a2billing.php|1: [6] => 0
a2billing.php|1: [inuse] => 0
a2billing.php|1: [7] => 0
a2billing.php|1: [simultaccess] => 0
a2billing.php|1: [8] => 0
a2billing.php|1: [typepaid] => 0
a2billing.php|1: [9] => 1000
a2billing.php|1: [creditlimit] => 1000
a2billing.php|1: [10] => en
a2billing.php|1: [language] => en
a2billing.php|1: [11] => 14166239005
a2billing.php|1: [username] => 14166239005
a2billing.php|1: [12] => 0
a2billing.php|1: [removeinterprefix] => 0
a2billing.php|1: [13] =>
a2billing.php|1: [redial] =>
a2billing.php|1: [14] => 0
a2billing.php|1: [enableexpire] => 0
a2billing.php|1: [15] => 0
a2billing.php|1: [UNIX_TIMESTAMP(expirationdate)] => 0
a2billing.php|1: [16] => 0
a2billing.php|1: [expiredays] => 0
a2billing.php|1: [17] => 2
a2billing.php|1: [nbused] => 2
a2billing.php|1: [18] => 1218760077
a2billing.php|1: [UNIX_TIMESTAMP(firstusedate)] => 1218760077
a2billing.php|1: [19] => 1218751021
a2billing.php|1: [UNIX_TIMESTAMP(cc_card.creationdate)] => 1218751021
a2billing.php|1: [20] => USD
a2billing.php|1: [currency] => USD
a2billing.php|1: [21] => yahoo
a2billing.php|1: [lastname] => yahoo
a2billing.php|1: [22] => yahoo 2
a2billing.php|1: [firstname] => yahoo 2
a2billing.php|1: [23] =>
a2billing.php|1: [email] =>
a2billing.php|1: [24] => 6661102714
a2billing.php|1: [uipass] => 6661102714
a2billing.php|1: [25] => -1
a2billing.php|1: [id_campaign] => -1
a2billing.php|1: [26] => 84
a2billing.php|1: [id] => 84
a2billing.php|1: [27] => 14166239005
a2billing.php|1: [useralias] => 14166239005
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: )
a2billing.php|1: >
a2billing.php|1: file:Class.A2Billing.php - line:1755 - [SET CHANNEL(language) en]
a2billing.php|1: file:Class.A2Billing.php - line:648 - your inuse is 1
a2billing.php|1: file:Class.A2Billing.php - line:658 - your second inuse is 1
a2billing.php|1: file:Class.A2Billing.php - line:659 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='14166239005']
a2billing.php|1: file:Class.A2Billing.php - line:1437 - [AUTO SetCallerID]
a2billing.php|1: file:Class.A2Billing.php - line:1443 - [REQUESTED SetCallerID : 14166239005]
a2billing.php|1: file:Class.A2Billing.php - line:1454 - [EXEC SetCallerID : 14166239005]
a2billing.php|1: file:a2billing.php - line:172 - [CHANNEL STATUS : 4 = Line is ringing]
a2billing.php|1: file:a2billing.php - line:173 - [CREDIT : 315.00000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php|1: file:a2billing.php - line:286 - TRUNK - dnid : 19057878135 (1)
a2billing.php|1: file:Class.A2Billing.php - line:681 - 1 && && 11&& 0
a2billing.php|1: file:Class.A2Billing.php - line:706 - DESTINATION ::> 19057878135
a2billing.php|1: file:Class.A2Billing.php - line:708 - RULES APPLY ON DESTINATION ::> 19057878135
a2billing.php|1: file:Class.A2Billing.php - line:746 - OK - RESFINDRATE::> 1
a2billing.php|1: file:Class.A2Billing.php - line:768 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php|1: file:Class.A2Billing.php - line:786 - TIMEOUT::> 378000 : minutes=6300 - seconds=0
-- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
-- <SIP/14166239005-006baba0> Playing 'digits/6' (language 'en')
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
-- <SIP/14166239005-006baba0> Playing 'digits/thousand' (language 'en')
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
-- <SIP/14166239005-006baba0> Playing 'digits/3' (language 'en')
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
-- <SIP/14166239005-006baba0> Playing 'digits/hundred' (language 'en')
-- Playing 'prepaid-minutes' (escape_digits=#) (sample_offset 0)
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
a2billing.php|1: file:Class.RateEngine.php - line:1012 - app_callingcard: Dialing 'SIP/4166238759/19057878135|60|HgiRL(378000000:61000:30000)' with timeout of '378000'.
a2billing.php|1: >
a2billing.php|1: file:Class.RateEngine.php - line:1037 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
-- AGI Script Executing Application: (Dial) Options: (SIP/4166238759/19057878135|60|HgiRL(378000000:61000:30000))
-- Limit Data for this call:
> timelimit = 378000000
> play_warning = 61000
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000
> start_sound = (null)
> warning_sound = timeleft
> end_sound = (null)
-- Called 4166238759/19057878135
a2billing.php|1: file:Class.RateEngine.php - line:1143 - [USEDRATECARD=0]
a2billing.php|1: file:Class.RateEngine.php - line:888 - [INSERT INTO cc_call 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 ('1219083890.465', 'SIP/14166239005-006baba0', '14166239005', '', ]
a2billing.php|1: file:Class.RateEngine.php - line:893 - [CURRENT_TIMESTAMP - INTERVAL 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 ('1219083890.465', 'SIP/14166239005-006baba0', '14166239005', '', CURRENT_TIMESTAMP - INTERVAL 0 SECOND ]
a2billing.php|1: file:Class.RateEngine.php - line:900 - [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 ('1219083890.465', 'SIP/14166239005-006baba0', '14166239005', '', CURRENT_TIMESTAMP - INTERVAL 0 SECOND , '0', '19057878135', 'CANCEL', now(), '0.05', '-0', '', '', 'toronto gta', '4', '1', '6', '5', '14166239005', '0', '0', '0', '0')]
a2billing.php|1: file:Class.RateEngine.php - line:903 - [CC_asterisk_stop 1.1: SQL: DONE : result=1]
a2billing.php|1: file:Class.A2Billing.php - line:1185 - [CURRENCY : USD]
-- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
-- <SIP/14166239005-006baba0> Playing 'digits/3' (language 'en')
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
-- <SIP/14166239005-006baba0> Playing 'digits/hundred' (language 'en')
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
-- <SIP/14166239005-006baba0> Playing 'digits/15' (language 'en')
-- Playing 'dollars' (escape_digits=#) (sample_offset 0)
[Aug 18 14:24:53] WARNING[9179]: file.c:644 ast_readaudio_callback: Failed to write frame
a2billing.php|1: file:a2billing.php - line:320 - [a2billing account stop]
a2billing.php|1: file:Class.A2Billing.php - line:648 - your inuse is 0
a2billing.php|1: file:Class.A2Billing.php - line:658 - your second inuse is 0
a2billing.php|1: file:Class.A2Billing.php - line:659 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='14166239005']
-- AGI Script a2billing.php completed, returning -1
Really destroying SIP dialog 'YWM2MGU4OWY2OThiZTE0OWEyMjM4MzA5NTUxOGRjYzA.' Method: ACK
dsl-67-55-9-194*CLI>