[asterisk-users] No outbound with A2Billing

Luciano Moreira lmoreira at uirapuru.org
Thu Aug 24 09:31:13 MST 2006


List members,

When I dial to a PSTN number, the A2Billing script does all the tasks,
until it shutdown without make the dailout by sip trunk set.
Lasts outputs fro the a2billing.php debug are:
  a2billing.php|2: RESFINDRATE::> 0
  a2billing.php|2: UPDATE cc_card SET inuse=inuse-1 WHERE username='5033845534'

Sip trunk is registered and working. All setups in A2Billing db seams ok.

There is any a2billing guru to help me?

Below, is the complete script output.

Thank you in advance.

Luc Moreira
__
Logic Telecom
Fortaleza, Brasil
-------------------------------------------------------------------
    -- Accepting AUTHENTICATED call from 201.49.16.125:
       > requested format = g723,
       > requested prefs = (),
       > actual format = g729,
       > host prefs = (g729|g723|gsm|ulaw),
       > priority = mine
    -- Executing Answer("IAX2/1010-15", "") in new stack
    -- Executing Wait("IAX2/1010-15", "0") in new stack
    -- Executing DeadAGI("IAX2/1010-15", "a2billing.php|2") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
  a2billing.php|2: IDCONFIG : 2
  a2billing.php|2:
  a2billing.php|2: A2Billing AGI internal configuration:
  a2billing.php|2: Array
  a2billing.php|2: (
  a2billing.php|2:     [debug] => 3
  a2billing.php|2:     [answer_call] => 1
  a2billing.php|2:     [logger_enable] => 1
  a2billing.php|2:     [log_file] => /tmp/a2billing.log
  a2billing.php|2:     [say_goodbye] =>
  a2billing.php|2:     [play_menulanguage] =>
  a2billing.php|2:     [force_language] => br
  a2billing.php|2:     [len_cardnumber] => 10
  a2billing.php|2:     [len_aliasnumber] => 5
  a2billing.php|2:     [len_voucher] => 15
  a2billing.php|2:     [min_credit_2call] => 0
  a2billing.php|2:     [min_duration_2bill] => 20
  a2billing.php|2:     [notenoughcredit_cardnumber] => 1
  a2billing.php|2:     [notenoughcredit_assign_newcardnumber_cid] => 1
  a2billing.php|2:     [use_dnid] => 1
  a2billing.php|2:     [no_auth_dnid] => Array
  a2billing.php|2:         (
  a2billing.php|2:             [0] =>
  a2billing.php|2:         )
  a2billing.php|2:
  a2billing.php|2:     [number_try] => 1
  a2billing.php|2:     [say_balance_after_auth] =>
  a2billing.php|2:     [say_balance_after_call] =>
  a2billing.php|2:     [say_rateinitial] =>
  a2billing.php|2:     [say_timetocall] =>
  a2billing.php|2:     [auto_setcallerid] => 1
  a2billing.php|2:     [force_callerid] =>
  a2billing.php|2:     [cid_sanitize] =>
  a2billing.php|2:     [cid_enable] => 1
  a2billing.php|2:     [cid_askpincode_ifnot_callerid] => 1
  a2billing.php|2:     [cid_auto_create_card] => 1
  a2billing.php|2:     [cid_auto_assign_card_to_cid] => 1
  a2billing.php|2:     [cid_auto_create_card_typepaid] => POSTPAY
  a2billing.php|2:     [cid_auto_create_card_credit] => 0
  a2billing.php|2:     [cid_auto_create_card_credit_limit] => 100
  a2billing.php|2:     [cid_auto_create_card_tariffgroup] => 1
  a2billing.php|2:     [callerid_authentication_over_cardnumber] =>
  a2billing.php|2:     [sip_iax_friends] =>
  a2billing.php|2:     [sip_iax_pstn_direct_call_prefix] => 9
  a2billing.php|2:     [sip_iax_pstn_direct_call] =>
  a2billing.php|2:     [dialcommand_param] => |60|HL(%timeout%:61000:30000,Ttr)
  a2billing.php|2:     [dialcommand_param_sipiax_friend] => |60|HL(3600000:61000:30000,Ttr)
  a2billing.php|2:     [switchdialcommand] => 1
  a2billing.php|2:     [maxtime_tocall_negatif_free_route] => 3600
  a2billing.php|2:     [send_reminder] => 1
  a2billing.php|2:     [record_call] =>
  a2billing.php|2:     [monitor_formatfile] => gsm
  a2billing.php|2:     [base_currency] => usd
  a2billing.php|2:     [agi_force_currency] => usd
  a2billing.php|2:     [currency_association] => Array
  a2billing.php|2:         (
  a2billing.php|2:             [0] => usd:prepaid-dollar
  a2billing.php|2:             [1] => mxn:pesos
  a2billing.php|2:             [2] => eur:euro
  a2billing.php|2:             [3] => all:credit
  a2billing.php|2:             [4] => brl:credit
  a2billing.php|2:         )
  a2billing.php|2:
  a2billing.php|2:     [file_conf_enter_destination] => prepaid-enter-dest
  a2billing.php|2:     [file_conf_enter_menulang] => prepaid-menulang2
  a2billing.php|2:     [setlanguage_deprecate] => 1
  a2billing.php|2:     [currency_association_internal] => Array
  a2billing.php|2:         (
  a2billing.php|2:             [usd] => prepaid-dollar
  a2billing.php|2:             [mxn] => pesos
  a2billing.php|2:             [eur] => euro
  a2billing.php|2:             [all] => credit
  a2billing.php|2:             [brl] => credit
  a2billing.php|2:         )
  a2billing.php|2:
  a2billing.php|2: )
  a2billing.php|2:
  a2billing.php|2: AGI Request:
  a2billing.php|2: Array
  a2billing.php|2: (
  a2billing.php|2:     [agi_request] => a2billing.php
  a2billing.php|2:     [agi_channel] => IAX2/1010-15
  a2billing.php|2:     [agi_language] => br
  a2billing.php|2:     [agi_type] => IAX2
  a2billing.php|2:     [agi_uniqueid] => 1156436221.21
  a2billing.php|2:     [agi_callerid] => 1010
  a2billing.php|2:     [agi_calleridname] => Luc (IP-Phone)
  a2billing.php|2:     [agi_callingpres] => 1
  a2billing.php|2:     [agi_callingani2] => 0
  a2billing.php|2:     [agi_callington] => 0
  a2billing.php|2:     [agi_callingtns] => 0
  a2billing.php|2:     [agi_dnid] => unknown
  a2billing.php|2:     [agi_rdnis] => unknown
  a2billing.php|2:     [agi_context] => ramal-logic
  a2billing.php|2:     [agi_extension] => 08599562956
  a2billing.php|2:     [agi_priority] => 3
  a2billing.php|2:     [agi_enhanced] => 0.0
  a2billing.php|2:     [agi_accountcode] =>
  a2billing.php|2: )
  a2billing.php|2:
  a2billing.php|2: 1010 ; IAX2/1010-15 ; 1156436221.21 ;  ; 08599562956
  a2billing.php|2: FORCE LANGUAGE : br
    -- AGI Script Executing Application: (SetLanguage) Options: (br)
  a2billing.php|2: [CID_ENABLE - CID_CONTROL - CID:1010]
  a2billing.php|2: 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  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='1010'
  a2billing.php|2: Array
  a2billing.php|2: (
  a2billing.php|2:     [0] => Array
  a2billing.php|2:         (
  a2billing.php|2:             [0] => 1010
  a2billing.php|2:             [cid] => 1010
  a2billing.php|2:             [1] => 2
  a2billing.php|2:             [id_cc_card] => 2
  a2billing.php|2:             [2] => t
  a2billing.php|2:             [activated] => t
  a2billing.php|2:             [3] => 100.00000
  a2billing.php|2:             [credit] => 100.00000
  a2billing.php|2:             [4] => 1
  a2billing.php|2:             [tariff] => 1
  a2billing.php|2:             [5] => t
  a2billing.php|2:             [6] => 0
  a2billing.php|2:             [inuse] => 0
  a2billing.php|2:             [7] => 0
  a2billing.php|2:             [simultaccess] => 0
  a2billing.php|2:             [8] => 0
  a2billing.php|2:             [typepaid] => 0
  a2billing.php|2:             [9] =>
  a2billing.php|2:             [creditlimit] =>
  a2billing.php|2:             [10] => en
  a2billing.php|2:             [language] => en
  a2billing.php|2:             [11] => 5033845534
  a2billing.php|2:             [username] => 5033845534
  a2billing.php|2:             [12] => 1
  a2billing.php|2:             [removeinterprefix] => 1
  a2billing.php|2:             [13] =>
  a2billing.php|2:             [redial] =>
  a2billing.php|2:             [14] => 0
  a2billing.php|2:             [enableexpire] => 0
  a2billing.php|2:             [15] => 1471992785
  a2billing.php|2:             [UNIX_TIMESTAMP(expirationdate)] => 1471992785
  a2billing.php|2:             [16] => 0
  a2billing.php|2:             [expiredays] => 0
  a2billing.php|2:             [17] => 0
  a2billing.php|2:             [nbused] => 0
  a2billing.php|2:             [18] => 0
  a2billing.php|2:             [UNIX_TIMESTAMP(firstusedate)] => 0
  a2billing.php|2:             [19] => 1156373605
  a2billing.php|2:             [UNIX_TIMESTAMP(cc_card.creationdate)] => 1156373605
  a2billing.php|2:             [20] => USD
  a2billing.php|2:             [currency] => USD
  a2billing.php|2:         )
  a2billing.php|2:
  a2billing.php|2: )
  a2billing.php|2:
  a2billing.php|2: UPDATE cc_card SET inuse=inuse+1 WHERE username='5033845534'
  a2billing.php|2: [CHANNEL STATUS : 6 = Line is up]
  a2billing.php|2: [CREDIT STATUS : 100.00000]
  a2billing.php|2: [CREDIT MIN_CREDIT_2CALL : 0]
  a2billing.php|2: 1 &&  && 11&& 0
  a2billing.php|2: DESTINATION ::> 08599562956
  a2billing.php|2: APPLY_RULES DESTINATION ::> 08599562956
  a2billing.php|2: RESFINDRATE::> 0
  a2billing.php|2: UPDATE cc_card SET inuse=inuse-1 WHERE username='5033845534'
    -- AGI Script a2billing.php completed, returning 0
    -- Executing Macro("IAX2/1010-15", "hangupcall") in new stack
    -- Executing ResetCDR("IAX2/1010-15", "w") in new stack
    -- Executing NoCDR("IAX2/1010-15", "") in new stack
    -- Executing Wait("IAX2/1010-15", "1") in new stack
    -- Hungup 'IAX2/1010-15'
asterisk1*CLI>




More information about the asterisk-users mailing list