Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Wed Apr 24, 2024 11:25 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: CLI callback not working (Broken pipe)
PostPosted: Wed Apr 29, 2009 1:10 pm 
Offline

Joined: Sat Jul 19, 2008 2:21 am
Posts: 38
Location: HK
Hi,

I am running Asterisk 1.4.24.1

with A2B 1.3.4

And the callback has stopped working today. I get this ast_carefulwrite: write() returned error:Broken pipe error and Asterisk Manager tries logging and returns this error and logs off.

Any advice on how to fix this ?





-- Executing [12345@default:1] DeadAGI("IAX2/12345-6600", "a2billing.php|2|cid-callback") in new stack
[Apr 29 20:55:37] WARNING[14086]: res_agi.c:2203 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|2|cid-callback: A2Billing AGI internal configuration:
a2billing.php|2|cid-callback: Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [debug] => 1
a2billing.php|2|cid-callback: [asterisk_version] => 1_4
a2billing.php|2|cid-callback: [answer_call] =>
a2billing.php|2|cid-callback: [play_audio] => 1
a2billing.php|2|cid-callback: [say_goodbye] => 1
a2billing.php|2|cid-callback: [play_menulanguage] =>
a2billing.php|2|cid-callback: [force_language] =>
a2billing.php|2|cid-callback: [intro_prompt] =>
a2billing.php|2|cid-callback: [min_credit_2call] => 1
a2billing.php|2|cid-callback: [min_duration_2bill] => 2
a2billing.php|2|cid-callback: [notenoughcredit_cardnumber] => 1
a2billing.php|2|cid-callback: [notenoughcredit_assign_newcardnumber_cid] =>
a2billing.php|2|cid-callback: [use_dnid] =>
a2billing.php|2|cid-callback: [no_auth_dnid] => Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [0] => 36789946
a2billing.php|2|cid-callback: [1] => 16477243493
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: [number_try] => 3
a2billing.php|2|cid-callback: [force_callplan_id] =>
a2billing.php|2|cid-callback: [say_balance_after_auth] =>
a2billing.php|2|cid-callback: [say_balance_after_call] =>
a2billing.php|2|cid-callback: [say_rateinitial] =>
a2billing.php|2|cid-callback: [say_timetocall] =>
a2billing.php|2|cid-callback: [auto_setcallerid] => 1
a2billing.php|2|cid-callback: [force_callerid] =>
a2billing.php|2|cid-callback: [cid_sanitize] => CID
a2billing.php|2|cid-callback: [cid_enable] => 1
a2billing.php|2|cid-callback: [cid_askpincode_ifnot_callerid] => 1
a2billing.php|2|cid-callback: [cid_auto_assign_card_to_cid] =>
a2billing.php|2|cid-callback: [cid_auto_create_card] =>
a2billing.php|2|cid-callback: [cid_auto_create_card_len] => 10
a2billing.php|2|cid-callback: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php|2|cid-callback: [cid_auto_create_card_credit] => 0
a2billing.php|2|cid-callback: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|2|cid-callback: [cid_auto_create_card_tariffgroup] => 6
a2billing.php|2|cid-callback: [callerid_authentication_over_cardnumber] =>
a2billing.php|2|cid-callback: [sip_iax_friends] =>
a2billing.php|2|cid-callback: [sip_iax_pstn_direct_call_prefix] => 555
a2billing.php|2|cid-callback: [sip_iax_pstn_direct_call] => 1
a2billing.php|2|cid-callback: [ivr_voucher] =>
a2billing.php|2|cid-callback: [ivr_voucher_prefix] => 8
a2billing.php|2|cid-callback: [jump_voucher_if_min_credit] =>
a2billing.php|2|cid-callback: [extracharge_did] => Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [0] =>
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: [extracharge_fee] => Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [0] =>
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: [extracharge_buyfee] => Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [0] =>
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: [international_prefixes] => Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [0] => 011
a2billing.php|2|cid-callback: [1] => 00
a2billing.php|2|cid-callback: [2] => 09
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: [dialcommand_param] => |60|HRgiRL(%timeout%:61000:30000)
a2billing.php|2|cid-callback: [dialcommand_param_sipiax_friend] => |60|HRgiL(3600000:61000:30000)
a2billing.php|2|cid-callback: [switchdialcommand] =>
a2billing.php|2|cid-callback: [failover_recursive_limit] => 2
a2billing.php|2|cid-callback: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|2|cid-callback: [send_reminder] => 1
a2billing.php|2|cid-callback: [record_call] =>
a2billing.php|2|cid-callback: [monitor_formatfile] => gsm
a2billing.php|2|cid-callback: [agi_force_currency] =>
a2billing.php|2|cid-callback: [currency_association] => Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [0] => usd:dollars
a2billing.php|2|cid-callback: [1] => mxn:pesos
a2billing.php|2|cid-callback: [2] => eur:euros
a2billing.php|2|cid-callback: [3] => all:credit
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|2|cid-callback: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|2|cid-callback: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php|2|cid-callback: [logger_enable] => 1
a2billing.php|2|cid-callback: [log_file] => /tmp/a2billing.log
a2billing.php|2|cid-callback: [currency_association_internal] => Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [usd] => dollars
a2billing.php|2|cid-callback: [mxn] => pesos
a2billing.php|2|cid-callback: [eur] => euros
a2billing.php|2|cid-callback: [all] => credit
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: [ivr_voucher_prefixe] => 8
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: file:a2billing.php - line:78 - IDCONFIG : 2
a2billing.php|2|cid-callback: file:a2billing.php - line:79 - MODE : cid-callback
a2billing.php|2|cid-callback: file:a2billing.php - line:91 - AGI Request:
a2billing.php|2|cid-callback: file:a2billing.php - line:92 - Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [agi_request] => a2billing.php
a2billing.php|2|cid-callback: [agi_channel] => IAX2/12345-6600
a2billing.php|2|cid-callback: [agi_language] => en
a2billing.php|2|cid-callback: [agi_type] => IAX2
a2billing.php|2|cid-callback: [agi_uniqueid] => 1241009737.5
a2billing.php|2|cid-callback: [agi_callerid] => 1678xxxxxxxx
a2billing.php|2|cid-callback: [agi_calleridname] => 1678xxxxxxxx
a2billing.php|2|cid-callback: [agi_callingpres] => 0
a2billing.php|2|cid-callback: [agi_callingani2] => 0
a2billing.php|2|cid-callback: [agi_callington] => 0
a2billing.php|2|cid-callback: [agi_callingtns] => 0
a2billing.php|2|cid-callback: [agi_dnid] => unknown
a2billing.php|2|cid-callback: [agi_rdnis] => unknown
a2billing.php|2|cid-callback: [agi_context] => default
a2billing.php|2|cid-callback: [agi_extension] => 12345
a2billing.php|2|cid-callback: [agi_priority] => 1
a2billing.php|2|cid-callback: [agi_enhanced] => 0.0
a2billing.php|2|cid-callback: [agi_accountcode] =>
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: file:Class.A2Billing.php - line:621 - get_agi_request_parameter = 1678xxxxxxxx ; IAX2/12345-6600 ; 1241009737.5 ; ; 12345
a2billing.php|2|cid-callback: file:a2billing.php - line:411 - [MODE : CALLERID-CALLBACK - 1678xxxxxxxx]
a2billing.php|2|cid-callback: file:a2billing.php - line:417 - [CLI CALLBACK TRIGGER RINGING]
a2billing.php|2|cid-callback: file:Class.A2Billing.php - line:1439 - [CID_ENABLE - CID_CONTROL - CID:1678xxxxxxxx]
a2billing.php|2|cid-callback: file:Class.A2Billing.php - line:1456 - 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='1678xxxxxxxx'
a2billing.php|2|cid-callback: RESULT : Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [0] => Array
a2billing.php|2|cid-callback: (
a2billing.php|2|cid-callback: [0] => 1678xxxxxxxx
a2billing.php|2|cid-callback: [cid] => 1678xxxxxxxx
a2billing.php|2|cid-callback: [1] => 2
a2billing.php|2|cid-callback: [id_cc_card] => 2
a2billing.php|2|cid-callback: [2] => t
a2billing.php|2|cid-callback: [activated] => t
a2billing.php|2|cid-callback: [3] => 71.69140
a2billing.php|2|cid-callback: [credit] => 71.69140
a2billing.php|2|cid-callback: [4] => 1
a2billing.php|2|cid-callback: [tariff] => 1
a2billing.php|2|cid-callback: [5] => t
a2billing.php|2|cid-callback: [6] => 0
a2billing.php|2|cid-callback: [inuse] => 0
a2billing.php|2|cid-callback: [7] => 1
a2billing.php|2|cid-callback: [simultaccess] => 1
a2billing.php|2|cid-callback: [8] => 1
a2billing.php|2|cid-callback: [typepaid] => 1
a2billing.php|2|cid-callback: [9] =>
a2billing.php|2|cid-callback: [creditlimit] =>
a2billing.php|2|cid-callback: [10] => en
a2billing.php|2|cid-callback: [language] => en
a2billing.php|2|cid-callback: [11] => 12xxxxxxxx
a2billing.php|2|cid-callback: [username] => 12xxxxxxxx
a2billing.php|2|cid-callback: [12] => 0
a2billing.php|2|cid-callback: [removeinterprefix] => 0
a2billing.php|2|cid-callback: [13] => 919809082007
a2billing.php|2|cid-callback: [redial] => 919809082007
a2billing.php|2|cid-callback: [14] => 0
a2billing.php|2|cid-callback: [enableexpire] => 0
a2billing.php|2|cid-callback: [15] => 1527642760
a2billing.php|2|cid-callback: [UNIX_TIMESTAMP(expirationdate)] => 1527642760
a2billing.php|2|cid-callback: [16] => 0
a2billing.php|2|cid-callback: [expiredays] => 0
a2billing.php|2|cid-callback: [17] => 1055
a2billing.php|2|cid-callback: [nbused] => 1055
a2billing.php|2|cid-callback: [18] => 1212151094
a2billing.php|2|cid-callback: [UNIX_TIMESTAMP(firstusedate)] => 1212151094
a2billing.php|2|cid-callback: [19] => 1212110015
a2billing.php|2|cid-callback: [UNIX_TIMESTAMP(cc_card.creationdate)] => 1212110015
a2billing.php|2|cid-callback: [20] => HKD
a2billing.php|2|cid-callback: [currency] => HKD
a2billing.php|2|cid-callback: [21] => Jones
a2billing.php|2|cid-callback: [lastname] => Jones
a2billing.php|2|cid-callback: [22] => Jones
a2billing.php|2|cid-callback: [firstname] => Jones
a2billing.php|2|cid-callback: [23] =>
a2billing.php|2|cid-callback: [email] =>
a2billing.php|2|cid-callback: [24] =>
a2billing.php|2|cid-callback: [uipass] =>
a2billing.php|2|cid-callback: [25] => -1
a2billing.php|2|cid-callback: [id_campaign] => -1
a2billing.php|2|cid-callback: [26] => 2
a2billing.php|2|cid-callback: [id] => 2
a2billing.php|2|cid-callback: [27] => 10002
a2billing.php|2|cid-callback: [useralias] => 10002
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: )
a2billing.php|2|cid-callback:
a2billing.php|2|cid-callback: file:Class.A2Billing.php - line:1714 - [SET CHANNEL(language) en]
a2billing.php|2|cid-callback: file:Class.A2Billing.php - line:654 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='12xxxxxxxx']
a2billing.php|2|cid-callback: file:a2billing.php - line:429 - [TRY : callingcard_ivr_authenticate]
a2billing.php|2|cid-callback: file:a2billing.php - line:440 - [destination: - 1678xxxxxxxx]
a2billing.php|2|cid-callback: file:a2billing.php - line:444 - [resfindrate: - 1]
a2billing.php|2|cid-callback: file:Class.A2Billing.php - line:654 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='12xxxxxxxx']
-- AGI Script a2billing.php completed, returning 0
-- Executing [12345@default:2] Hangup("IAX2/12345-6600", "") in new stack
== Spawn extension (default, 12345, 2) exited non-zero on 'IAX2/12345-6600'
-- Hungup 'IAX2/12345-6600'
== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'ascmyasterisk' logged on from 127.0.0.1
[Apr 29 20:56:31] ERROR[14093]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
== Manager 'ascmyasterisk' logged off from 127.0.0.1


Last edited by prad on Wed May 13, 2009 1:03 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: CLI callback not working
PostPosted: Tue May 12, 2009 5:21 am 
Offline

Joined: Sat Jul 19, 2008 2:21 am
Posts: 38
Location: HK
Hi,

I am unable to make the CLI callback working. I am getting an error Broken pipe and after the asterisk manager logs on it just throws the broken pipe error and call cannot be intiated. Please see the logs below.

I am using CentOS 5.2, Asterisk 1.4.24.1, A2Billing 1.3.4.

Can anyone please advice on how can i get it fixed.

Thanks



[May 12 13:06:00] WARNING[30615]: file.c:738 ast_readaudio_callback: Failed to write frame
-- Hungup 'IAX2/did-13881'
-- Accepting AUTHENTICATED call from 12.xxx.xxx.xxx:
> requested format = g729,
> requested prefs = (g729|ulaw|g726|ilbc|alaw|gsm|g723),
> actual format = g729,
> host prefs = (g729),
> priority = mine
-- Executing [1568@default:1] DeadAGI("IAX2/1568-1179", "a2billing.php|3|cid-callback") in new stack
[May 12 13:06:55] WARNING[30624]: res_agi.c:2203 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|3|cid-callback: A2Billing AGI internal configuration:
a2billing.php|3|cid-callback: Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [debug] => 1
a2billing.php|3|cid-callback: [asterisk_version] => 1_4
a2billing.php|3|cid-callback: [answer_call] =>
a2billing.php|3|cid-callback: [play_audio] => 1
a2billing.php|3|cid-callback: [say_goodbye] =>
a2billing.php|3|cid-callback: [play_menulanguage] =>
a2billing.php|3|cid-callback: [force_language] =>
a2billing.php|3|cid-callback: [intro_prompt] =>
a2billing.php|3|cid-callback: [min_credit_2call] => 1
a2billing.php|3|cid-callback: [min_duration_2bill] => 2
a2billing.php|3|cid-callback: [notenoughcredit_cardnumber] => 1
a2billing.php|3|cid-callback: [notenoughcredit_assign_newcardnumber_cid] =>
a2billing.php|3|cid-callback: [use_dnid] =>
a2billing.php|3|cid-callback: [no_auth_dnid] => Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [0] => 2400
a2billing.php|3|cid-callback: [1] => 2300
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: [number_try] => 3
a2billing.php|3|cid-callback: [force_callplan_id] =>
a2billing.php|3|cid-callback: [say_balance_after_auth] =>
a2billing.php|3|cid-callback: [say_balance_after_call] =>
a2billing.php|3|cid-callback: [say_rateinitial] =>
a2billing.php|3|cid-callback: [say_timetocall] =>
a2billing.php|3|cid-callback: [auto_setcallerid] =>
a2billing.php|3|cid-callback: [force_callerid] =>
a2billing.php|3|cid-callback: [cid_sanitize] =>
a2billing.php|3|cid-callback: [cid_enable] => 1
a2billing.php|3|cid-callback: [cid_askpincode_ifnot_callerid] => 1
a2billing.php|3|cid-callback: [cid_auto_assign_card_to_cid] =>
a2billing.php|3|cid-callback: [cid_auto_create_card] =>
a2billing.php|3|cid-callback: [cid_auto_create_card_len] => 10
a2billing.php|3|cid-callback: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php|3|cid-callback: [cid_auto_create_card_credit] => 0
a2billing.php|3|cid-callback: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|3|cid-callback: [cid_auto_create_card_tariffgroup] => 6
a2billing.php|3|cid-callback: [callerid_authentication_over_cardnumber] =>
a2billing.php|3|cid-callback: [sip_iax_friends] => 1
a2billing.php|3|cid-callback: [sip_iax_pstn_direct_call_prefix] => 999
a2billing.php|3|cid-callback: [sip_iax_pstn_direct_call] => 1
a2billing.php|3|cid-callback: [ivr_voucher] =>
a2billing.php|3|cid-callback: [ivr_voucher_prefix] => 8
a2billing.php|3|cid-callback: [jump_voucher_if_min_credit] =>
a2billing.php|3|cid-callback: [extracharge_did] => Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [0] =>
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: [extracharge_fee] => Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [0] =>
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: [extracharge_buyfee] => Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [0] =>
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: [international_prefixes] => Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [0] => 011
a2billing.php|3|cid-callback: [1] => 00
a2billing.php|3|cid-callback: [2] => 09
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: [dialcommand_param] => |60|HRgiL(%timeout%:61000:30000)
a2billing.php|3|cid-callback: [dialcommand_param_sipiax_friend] => |60|HRgiL(3600000:61000:30000)
a2billing.php|3|cid-callback: [switchdialcommand] =>
a2billing.php|3|cid-callback: [failover_recursive_limit] => 2
a2billing.php|3|cid-callback: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|3|cid-callback: [send_reminder] => 1
a2billing.php|3|cid-callback: [record_call] =>
a2billing.php|3|cid-callback: [monitor_formatfile] => gsm
a2billing.php|3|cid-callback: [agi_force_currency] =>
a2billing.php|3|cid-callback: [currency_association] => Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [0] => usd:dollars
a2billing.php|3|cid-callback: [1] => mxn:pesos
a2billing.php|3|cid-callback: [2] => eur:euros
a2billing.php|3|cid-callback: [3] => all:credit
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|3|cid-callback: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|3|cid-callback: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php|3|cid-callback: [logger_enable] => 1
a2billing.php|3|cid-callback: [log_file] => /tmp/a2billing.log
a2billing.php|3|cid-callback: [currency_association_internal] => Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [usd] => dollars
a2billing.php|3|cid-callback: [mxn] => pesos
a2billing.php|3|cid-callback: [eur] => euros
a2billing.php|3|cid-callback: [all] => credit
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: [ivr_voucher_prefixe] => 8
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: file:a2billing.php - line:78 - IDCONFIG : 3
a2billing.php|3|cid-callback: file:a2billing.php - line:79 - MODE : cid-callback
a2billing.php|3|cid-callback: file:a2billing.php - line:91 - AGI Request:
a2billing.php|3|cid-callback: file:a2billing.php - line:92 - Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [agi_request] => a2billing.php
a2billing.php|3|cid-callback: [agi_channel] => IAX2/1568-1179
a2billing.php|3|cid-callback: [agi_language] => en
a2billing.php|3|cid-callback: [agi_type] => IAX2
a2billing.php|3|cid-callback: [agi_uniqueid] => 1242104815.827
a2billing.php|3|cid-callback: [agi_callerid] => 1647xxxxxxxx
a2billing.php|3|cid-callback: [agi_calleridname] => 1647xxxxxxxx
a2billing.php|3|cid-callback: [agi_callingpres] => 0
a2billing.php|3|cid-callback: [agi_callingani2] => 0
a2billing.php|3|cid-callback: [agi_callington] => 0
a2billing.php|3|cid-callback: [agi_callingtns] => 0
a2billing.php|3|cid-callback: [agi_dnid] => unknown
a2billing.php|3|cid-callback: [agi_rdnis] => unknown
a2billing.php|3|cid-callback: [agi_context] => default
a2billing.php|3|cid-callback: [agi_extension] => 1568
a2billing.php|3|cid-callback: [agi_priority] => 1
a2billing.php|3|cid-callback: [agi_enhanced] => 0.0
a2billing.php|3|cid-callback: [agi_accountcode] =>
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: file:Class.A2Billing.php - line:621 - get_agi_request_parameter = 1647xxxxxxxx ; IAX2/1568-1179 ; 1242104815.827 ; ; 1568
a2billing.php|3|cid-callback: file:a2billing.php - line:411 - [MODE : CALLERID-CALLBACK - 1647xxxxxxxx]
a2billing.php|3|cid-callback: file:a2billing.php - line:417 - [CLI CALLBACK TRIGGER RINGING]
a2billing.php|3|cid-callback: file:Class.A2Billing.php - line:1439 - [CID_ENABLE - CID_CONTROL - CID:1647xxxxxxxx]
a2billing.php|3|cid-callback: file:Class.A2Billing.php - line:1456 - 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='1647xxxxxxxx'
a2billing.php|3|cid-callback: RESULT : Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [0] => Array
a2billing.php|3|cid-callback: (
a2billing.php|3|cid-callback: [0] => 1647xxxxxxxx
a2billing.php|3|cid-callback: [cid] => 1647xxxxxxxx
a2billing.php|3|cid-callback: [1] => 14
a2billing.php|3|cid-callback: [id_cc_card] => 14
a2billing.php|3|cid-callback: [2] => t
a2billing.php|3|cid-callback: [activated] => t
a2billing.php|3|cid-callback: [3] => 5.40000
a2billing.php|3|cid-callback: [credit] => 5.40000
a2billing.php|3|cid-callback: [4] => 1
a2billing.php|3|cid-callback: [tariff] => 1
a2billing.php|3|cid-callback: [5] => t
a2billing.php|3|cid-callback: [6] => 0
a2billing.php|3|cid-callback: [inuse] => 0
a2billing.php|3|cid-callback: [7] => 1
a2billing.php|3|cid-callback: [simultaccess] => 1
a2billing.php|3|cid-callback: [8] => 0
a2billing.php|3|cid-callback: [typepaid] => 0
a2billing.php|3|cid-callback: [9] =>
a2billing.php|3|cid-callback: [creditlimit] =>
a2billing.php|3|cid-callback: [10] => en
a2billing.php|3|cid-callback: [language] => en
a2billing.php|3|cid-callback: [11] => 1234567890
a2billing.php|3|cid-callback: [username] => 1234567890
a2billing.php|3|cid-callback: [12] => 0
a2billing.php|3|cid-callback: [removeinterprefix] => 0
a2billing.php|3|cid-callback: [13] => 1604xxxxxxx
a2billing.php|3|cid-callback: [redial] => 1604xxxxxxx
a2billing.php|3|cid-callback: [14] => 0
a2billing.php|3|cid-callback: [enableexpire] => 0
a2billing.php|3|cid-callback: [15] => 1534047094
a2billing.php|3|cid-callback: [UNIX_TIMESTAMP(expirationdate)] => 1534047094
a2billing.php|3|cid-callback: [16] => 0
a2billing.php|3|cid-callback: [expiredays] => 0
a2billing.php|3|cid-callback: [17] => 37
a2billing.php|3|cid-callback: [nbused] => 37
a2billing.php|3|cid-callback: [18] => 1218514904
a2billing.php|3|cid-callback: [UNIX_TIMESTAMP(firstusedate)] => 1218514904
a2billing.php|3|cid-callback: [19] => 1218514344
a2billing.php|3|cid-callback: [UNIX_TIMESTAMP(cc_card.creationdate)] => 1218514344
a2billing.php|3|cid-callback: [20] => HKD
a2billing.php|3|cid-callback: [currency] => HKD
a2billing.php|3|cid-callback: [21] => John
a2billing.php|3|cid-callback: [lastname] => John
a2billing.php|3|cid-callback: [22] => Gill
a2billing.php|3|cid-callback: [firstname] => Gill
a2billing.php|3|cid-callback: [23] => [email protected]
a2billing.php|3|cid-callback: [email] => [email protected]
a2billing.php|3|cid-callback: [24] => testxxxxxx
a2billing.php|3|cid-callback: [uipass] => testxxxxx
a2billing.php|3|cid-callback: [25] => -1
a2billing.php|3|cid-callback: [id_campaign] => -1
a2billing.php|3|cid-callback: [26] => 14
a2billing.php|3|cid-callback: [id] => 14
a2billing.php|3|cid-callback: [27] => 123456791231245
a2billing.php|3|cid-callback: [useralias] => 123456791231245
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: )
a2billing.php|3|cid-callback:
a2billing.php|3|cid-callback: file:Class.A2Billing.php - line:1714 - [SET CHANNEL(language) en]
a2billing.php|3|cid-callback: file:Class.A2Billing.php - line:654 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='1234567890']
a2billing.php|3|cid-callback: file:a2billing.php - line:429 - [TRY : callingcard_ivr_authenticate]
a2billing.php|3|cid-callback: file:a2billing.php - line:440 - [destination: - 1647xxxxxxxx]
a2billing.php|3|cid-callback: file:a2billing.php - line:444 - [resfindrate: - 1]
a2billing.php|3|cid-callback: file:Class.A2Billing.php - line:654 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='1234567890']
-- AGI Script a2billing.php completed, returning 0
-- Executing [1568@default:2] Hangup("IAX2/1568-1179", "") in new stack
== Spawn extension (default, 1568, 2) exited non-zero on 'IAX2/1568-1179'
-- Hungup 'IAX2/1568-1179'
== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'myasterisk' logged on from 127.0.0.1
[May 12 13:07:47] ERROR[30631]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
== Manager 'myasterisk' logged off from 127.0.0.1


Top
 Profile  
 
 Post subject: Re: Broken pipe
PostPosted: Tue May 12, 2009 5:00 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I merged your identical threads; please stop cross-posting.
What does 'agi debug' say?


Top
 Profile  
 
 Post subject: Re: Broken pipe
PostPosted: Wed May 13, 2009 1:02 am 
Offline

Joined: Sat Jul 19, 2008 2:21 am
Posts: 38
Location: HK
Sorry wouldnt cross post.

My agi log is as below. It doesnt give any clue to me.

Thanks for the help.



[12/05/2009 13:06:55]:[file:a2billing.php - line:78]:[CallerID:]:[CN:]:[IDCONFIG : 3]
[12/05/2009 13:06:55]:[file:a2billing.php - line:79]:[CallerID:]:[CN:]:[MODE : cid-callback]
[12/05/2009 13:06:55]:[file:Class.A2Billing.php - line:621]:[CallerID:1647xxxxxxxx]:[CN:]:[ get_agi_request_parameter = 1647xxxxxxxx ; IAX2/1568-1179 ; 1242104815.827 ; ; 1568]
[12/05/2009 13:06:55]:[file:a2billing.php - line:411]:[CallerID:1647xxxxxxxx]:[CN:]:[[MODE : CALLERID-CALLBACK - 1647xxxxxxxx]]
[12/05/2009 13:06:55]:[file:a2billing.php - line:417]:[CallerID:1647xxxxxxxx]:[CN:]:[[CLI CALLBACK TRIGGER RINGING]]
[12/05/2009 13:06:55]:[file:Class.A2Billing.php - line:1438]:[CallerID:1647xxxxxxxx]:[CN:]:[[CID_ENABLE - CID_CONTROL - CID:1647xxxxxxxx]]
[12/05/2009 13:06:55]:[file:Class.A2Billing.php - line:1439]:[CallerID:1647xxxxxxxx]:[CN:]:[[CID_ENABLE - CID_CONTROL - CID:1647xxxxxxxx]]
[12/05/2009 13:06:55]:[file:Class.A2Billing.php - line:1456]:[CallerID:1647xxxxxxxx]:[CN:]:[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='1647xxxxxxxx'
RESULT : Array
(
[0] => Array
(
[0] => 1647xxxxxxxx
[cid] => 1647xxxxxxxx
[1] => 14
[id_cc_card] => 14
[2] => t
[activated] => t
[3] => 5.40000
[credit] => 5.40000
[4] => 1
[tariff] => 1
[5] => t
[6] => 0
[inuse] => 0
[7] => 1
[simultaccess] => 1
[8] => 0
[typepaid] => 0
[9] =>
[creditlimit] =>
[10] => en
[language] => en
[11] => 1234567890
[username] => 1234567890
[12] => 0
[removeinterprefix] => 0
[13] => 1604xxxxxxx
[redial] => 1604xxxxxxx
[14] => 0
[enableexpire] => 0
[15] => 1534047094
[UNIX_TIMESTAMP(expirationdate)] => 1534047094
[16] => 0
[expiredays] => 0
[17] => 37
[nbused] => 37
[18] => 1218514904
[UNIX_TIMESTAMP(firstusedate)] => 1218514904
[19] => 1218514344
[UNIX_TIMESTAMP(cc_card.creationdate)] => 1218514344
[20] => HKD
[currency] => HKD
[21] => John
[lastname] => John
[22] => Gill
[firstname] => Gill
[23] => [email protected]
[email] => [email protected]
[24] => testxxx
[uipass] => testxxx
[25] => -1
[id_campaign] => -1
[26] => 14
[id] => 14
[27] => 123456678901234
[useralias] => 123456678901234
)

)
]
[12/05/2009 13:06:55]:[file:Class.A2Billing.php - line:1625]:[CallerID:1647xxxxxxxx]:[CN:]:[ - Account code - 1234567890]
[12/05/2009 13:06:55]:[file:Class.A2Billing.php - line:1714]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[SET CHANNEL(language) en]]
[12/05/2009 13:06:55]:[file:Class.A2Billing.php - line:1717]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[credit=5.40000 :: tariff=1 :: active=t :: isused=0 :: simultaccess=1 :: typepaid=0 :: creditlimit= :: language=en]]
[12/05/2009 13:06:55]:[file:Class.A2Billing.php - line:654]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='1234567890']]
[12/05/2009 13:06:55]:[file:a2billing.php - line:429]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[TRY : callingcard_ivr_authenticate]]
[12/05/2009 13:06:55]:[file:a2billing.php - line:440]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[destination: - 1647xxxxxxxx]]
[12/05/2009 13:06:55]:[file:Class.RateEngine.php - line:73]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[CC_asterisk_rate-engine: (1, 1647xxxxxxxx)]]
[12/05/2009 13:06:55]:[file:Class.RateEngine.php - line:122]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[CC_asterisk_rate-engine: CALLERID]
1647xxxxxxxx
]
[12/05/2009 13:06:55]:[file:Class.RateEngine.php - line:136]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[CALLERID_QUERY]
SELECT count(calleridprefix) FROM cc_tariffplan RIGHT JOIN cc_tariffgroup_plan ON cc_tariffgroup_plan.idtariffgroup=1 WHERE calleridprefix=SUBSTRING('1647xxxxxxxx',1,length(calleridprefix))
[RESULT]Array
(
[0] => Array
(
[0] => 0
[count(calleridprefix)] => 0
)

)

]
[12/05/2009 13:06:55]:[file:Class.RateEngine.php - line:184]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[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_plan.idtariffgroup=cc_tariffgroup.id
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 cc_tariffgroup.id=1 AND (dialprefix='1647xxxxxxxx' OR dialprefix='164728811949' OR dialprefix='16472881194' OR dialprefix='1647288119' OR dialprefix='164728811' OR dialprefix='16472881' OR dialprefix='1647288' OR dialprefix='164728' OR dialprefix='16472' OR dialprefix='1647' OR dialprefix='1' OR dialprefix='16' 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 <= 2226 AND endtime >=2226)
AND idtariffgroup='1'
AND ( dnidprefix=SUBSTRING('1647xxxxxxxx',1,length(dnidprefix)) OR (dnidprefix='all' AND 0 = 0))
AND ( calleridprefix=SUBSTRING('1647xxxxxxxx',1,length(calleridprefix)) OR (calleridprefix='all' AND 0 = 0))
ORDER BY LENGTH(dialprefix) DESC
]
[12/05/2009 13:06:55]:[file:Class.RateEngine.php - line:192]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[rate-engine: Count Total result 2]]
[12/05/2009 13:06:55]:[file:Class.RateEngine.php - line:267]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[CC_asterisk_rate-engine: Count Total result 1]]
[12/05/2009 13:06:55]:[file:Class.RateEngine.php - line:268]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[CC_asterisk_rate-engine: number_trunk 1]]
[12/05/2009 13:06:55]:[file:a2billing.php - line:444]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[resfindrate: - 1]]
[12/05/2009 13:06:55]:[file:Class.RateEngine.php - line:280]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[CC_RATE_ENGINE_ALL_CALCULTIMEOUT (5.40000)]]
[12/05/2009 13:06:55]:[file:Class.RateEngine.php - line:286]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[CC_RATE_ENGINE_ALL_CALCULTIMEOUT: k=0 - res_calcultimeout:780]]
[12/05/2009 13:06:55]:[file:a2billing.php - line:533]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[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 ('33953-bbpm8gi', 'PENDING', 'localhost', '0', 'SIP/siptraffic/000001647xxxxxxxx', '1000', 'a2billing-callback', '1', 'IDCONF=3|CALLED=1647xxxxxxxx|MODE=CID|CBID=33953-bbpm8gi|LEG=1234567890|RATEINITIAL=0.4|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 6 SECOND ), '1234567890', '1647xxxxxxxx', '40000')]]
[12/05/2009 13:06:55]:[file:Class.A2Billing.php - line:654]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='1234567890']]
[12/05/2009 13:06:55]:[CallerID:1647xxxxxxxx]:[CN:1234567890]:[[exit]]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group