A2billing/Elastix 2.2 accountcode problem

Status
Not open for further replies.

michael_pt

Joined
Aug 12, 2010
Messages
10
Reaction score
0
Hi,

I recently upgraded to Elastix 2.2 and found that a2billing is not getting the account codes that I configured in each extension.
I'm using the Outbound Route -> Custom Trunk (Local/$OUTNUM$@a2billing/n) configuration with A2billing, and the result is this:

a2billing.php,1: [agi_request] => a2billing.php
a2billing.php,1: [agi_channel] => Local/00XXXXXXXXXXXX@a2billing-7a99;2
a2billing.php,1: [agi_language] => en
a2billing.php,1: [agi_type] => Local
a2billing.php,1: [agi_uniqueid] => 1329851252.140
a2billing.php,1: [agi_version] => 1.8.7.0
a2billing.php,1: [agi_callerid] => XXXXXXXXX
a2billing.php,1: [agi_calleridname] => unknown
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] => unknown
a2billing.php,1: [agi_rdnis] => unknown
a2billing.php,1: [agi_context] => a2billing
a2billing.php,1: [agi_extension] => 00XXXXXXXXXXXX
a2billing.php,1: [agi_priority] => 2
a2billing.php,1: [agi_enhanced] => 0.0
a2billing.php,1: [agi_accountcode] => No Account Code
a2billing.php,1: [agi_threadid] => 92289936
a2billing.php,1: [agi_arg_1] => 1
a2billing.php,1: )

As you can see the account code is empty....

But is also empty here:

a2billing.php,1: file:Class.A2Billing.php - line:718 - uniqueid:1329913651.269 - get_agi_request_parameter = 220104071 ; Local/00XXXXXXXXXXXX@a2billing-6ef1;2 ; 1329913651.269 ; No Account Code ; 00XXXXXXXXXXXX

But the odd part is that the account code is present in CDR database.

inside asteriskcdrdb database, i can see the account code on every call!!!

Any light on this matter?

Elastix version :

elastix-a2billing 1.9.4
elastix-pbx 2.2.0

Any light on this matter?

Michael Marques
 
... i really believe that this is something that should be taken in consideration since a2billing is something that is packed with Elastix... and is not fully functional... please someone ???
 
Unbelievable.... is it possible that no one is having the same problem????
I'm testing elastix 2.3 and getting the same result!!!

This is supposed to work people!!!!
 
I have used a2billing on elastix 2.0.3 and elastix 2.2, I haven't had any issue.
I have used it through SIP friends and through dialplan: inbound route which prompts for card number and then destination.

How are you using it?
 
I also get the prompt for the card number... and that's exactly the problem, it wasn't supposed to be that way since i'm giving the account code(card number) in my extension! I have a system running fine using elastix 2.0.3 (asterisk 1.6).


I did further research and this is the probable cause of the problem..


https://issues.asterisk.org/jira/browse/ASTERISK-19384

Please tell me how to patch asterisk... I understand that recompiling it is a pain in the $#"#, wouldn't it be easier to just patch it and create a new RPM (palosanto side)?
 
Hi Michael,

I got problem too, can not make outgoing call by SIP Technology or DAHDI Technology.

I found the problem at this Log :
a2billing.php,1: file:Class.A2Billing.php - line:1014 - uniqueid:1334593668.15 - ERROR ::> RateEngine didnt succeed to match the dialed number over the ratecard (Please check : id the ratecard is well create ; if the removeInter_Prefix is set according to your prefix in the ratecard ; if you hooked the ratecard to the Call Plan)
sophos*CLI>
 -- Playing 'prepaid-dest-unreachable' (escape_digits=#)


Here are Elastix and A2Billing Log :
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2012.04.16 23:27:39 =~=~=~=~=~=~=~=~=~=~=~=
sophos*CLI> sophos*CLI> sophos*CLI>
 == Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5

sophos*CLI>
 -- Executing [91007@from-internal:1] Macro("SIP/101-00000007", "user-callerid,SKIPTTL,") in new stack

sophos*CLI>
 -- Executing [s@macro-user-callerid:1] Set("SIP/101-00000007", "AMPUSER=101") in new stack

sophos*CLI>
 -- Executing [s@macro-user-callerid:2] GotoIf("SIP/101-00000007", "0?report") in new stack

sophos*CLI>
 -- Executing [s@macro-user-callerid:3] ExecIf("SIP/101-00000007", "1?Set(REALCALLERIDNUM=101)") in new stack

sophos*CLI>
 -- Executing [s@macro-user-callerid:4] Set("SIP/101-00000007", "AMPUSER=101") in new stack

sophos*CLI>
 -- Executing [s@macro-user-callerid:5] Set("SIP/101-00000007", "AMPUSERCIDNAME=101") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/101-00000007", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/101-00000007", "AMPUSERCID=101") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/101-00000007", "CALLERID(all)="101" <101>") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/101-00000007", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/101-00000007", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] Set("SIP/101-00000007", "CALLERID(number)=101") in new stack
-- Executing [s@macro-user-callerid:20] Set("SIP/101-00000007", "CALLERID(name)=101") in new stack
-- Executing [s@macro-user-callerid:21] NoOp("SIP/101-00000007", "Using CallerID "101" <101>") in new stack
-- Executing [91007@from-internal:2] NoOp("SIP/101-00000007", "Calling Out Route: route-keluar") in new stack
-- Executing [91007@from-internal:3] Set("SIP/101-00000007", "MOHCLASS=default") in new stack

sophos*CLI>
 -- Executing [91007@from-internal:4] Set("SIP/101-00000007", "_NODEST=") in new stack
-- Executing [91007@from-internal:5] Macro("SIP/101-00000007", "record-enable,101,OUT,") in new stack

sophos*CLI>
 -- Executing [s@macro-record-enable:1] GotoIf("SIP/101-00000007", "1?check") in new stack

sophos*CLI>
 -- Goto (macro-record-enable,s,4)

sophos*CLI>
 -- Executing [s@macro-record-enable:4] ExecIf("SIP/101-00000007", "0?MacroExit()") in new stack

sophos*CLI>
 -- Executing [s@macro-record-enable:5] GotoIf("SIP/101-00000007", "0?Group:OUT") in new stack

sophos*CLI>
 -- Goto (macro-record-enable,s,15)

sophos*CLI>
 -- Executing [s@macro-record-enable:15] GotoIf("SIP/101-00000007", "0?IN") in new stack

sophos*CLI>
 -- Executing [s@macro-record-enable:16] ExecIf("SIP/101-00000007", "1?MacroExit()") in new stack

sophos*CLI>
 -- Executing [91007@from-internal:6] Macro("SIP/101-00000007", "dialout-trunk,3,1007,") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:1] Set("SIP/101-00000007", "DIAL_TRUNK=3") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/101-00000007", "0?sub-pincheck,s,1") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/101-00000007", "0?disabletrunk,1") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:4] Set("SIP/101-00000007", "DIAL_NUMBER=1007") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:5] Set("SIP/101-00000007", "DIAL_TRUNK_OPTIONS=tr") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:6] Set("SIP/101-00000007", "OUTBOUND_GROUP=OUT_3") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/101-00000007", "1?nomax") in new stack

sophos*CLI>
 -- Goto (macro-dialout-trunk,s,9)

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/101-00000007", "0?skipoutcid") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:10] Set("SIP/101-00000007", "DIAL_TRUNK_OPTIONS=") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:11] Macro("SIP/101-00000007", "outbound-callerid,3") in new stack

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/101-00000007", "0?Set(CALLERPRES()=)") in new stack

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/101-00000007", "0?Set(REALCALLERIDNUM=101)") in new stack

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/101-00000007", "1?normcid") in new stack

sophos*CLI>
 -- Goto (macro-outbound-callerid,s,6)

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:6] Set("SIP/101-00000007", "USEROUTCID=") in new stack

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:7] Set("SIP/101-00000007", "EMERGENCYCID=") in new stack

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:8] Set("SIP/101-00000007", "TRUNKOUTCID=") in new stack

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/101-00000007", "1?trunkcid") in new stack

sophos*CLI>
 -- Goto (macro-outbound-callerid,s,12)

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/101-00000007", "0?Set(CALLERID(all)=)") in new stack

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/101-00000007", "0?Set(CALLERID(all)=)") in new stack

sophos*CLI>
 -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/101-00000007", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/101-00000007", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/101-00000007", "0?sub-flp-3,s,1") in new stack
-- Executing [s@macro-dialout-trunk:13] Set("SIP/101-00000007", "OUTNUM=1007") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/101-00000007", "custom=AMP") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/101-00000007", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/101-00000007", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/101-00000007", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/101-00000007", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/101-00000007", "1?customtrunk") in new stack
-- Goto (macro-dialout-trunk,s,22)
-- Executing [s@macro-dialout-trunk:22] Set("SIP/101-00000007", "pre_num=AMP:Local/") in new stack
-- Executing [s@macro-dialout-trunk:23] Set("SIP/101-00000007", "the_num=OUTNUM") in new stack
-- Executing [s@macro-dialout-trunk:24] Set("SIP/101-00000007", "post_num=@a2billing/n") in new stack

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:25] GotoIf("SIP/101-00000007", "1?outnum:skipoutnum") in new stack
-- Goto (macro-dialout-trunk,s,26)

sophos*CLI>
 -- Executing [s@macro-dialout-trunk:26] Set("SIP/101-00000007", "the_num=1007") in new stack
-- Executing [s@macro-dialout-trunk:27] Dial("SIP/101-00000007", "Local/1007@a2billing/n,300,") in new stack

sophos*CLI>
 -- Called Local/1007@a2billing/n
-- Executing [1007@a2billing:1] DeadAGI("Local/1007@a2billing-ab5b;2", "a2billing.php,1") in new stack

sophos*CLI>
 -- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:601 - uniqueid: - A2Billing AGI internal configuration:

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:602 - uniqueid: - Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [callerid_update] => 0

sophos*CLI>
 a2billing.php,1: [dialcommand_param_call_2did] => ,60,HiL(%timeout%:61000:30000)

sophos*CLI>
 a2billing.php,1: [description] => agi-config

sophos*CLI>
 a2billing.php,1: [asterisk_version] => 1_6

sophos*CLI>
 a2billing.php,1: [answer_call] => 1

sophos*CLI>
 a2billing.php,1: [play_audio] => 1

sophos*CLI>
 a2billing.php,1: [say_goodbye] => 0

sophos*CLI>
 a2billing.php,1: [play_menulanguage] => 0

sophos*CLI>
 a2billing.php,1: [force_language] =>

sophos*CLI>
 a2billing.php,1: [intro_prompt] =>

sophos*CLI>
 a2billing.php,1: [min_credit_2call] => 0

sophos*CLI>
 a2billing.php,1: [min_duration_2bill] => 0

sophos*CLI>
 a2billing.php,1: [notenoughcredit_cardnumber] => 0

sophos*CLI>
 a2billing.php,1: [notenoughcredit_assign_newcardnumber_cid] => 0

sophos*CLI>
 a2billing.php,1: [use_dnid] => 0

sophos*CLI>
 a2billing.php,1: [no_auth_dnid] => Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [0] => 2400

sophos*CLI>
 a2billing.php,1: [1] => 2300

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: [number_try] => 3

sophos*CLI>
 a2billing.php,1: [force_callplan_id] =>

sophos*CLI>
 a2billing.php,1: [say_balance_after_auth] => 0

sophos*CLI>
 a2billing.php,1: [say_balance_after_call] => 0

sophos*CLI>
 a2billing.php,1: [say_rateinitial] => 0

sophos*CLI>
 a2billing.php,1: [say_timetocall] => 1

sophos*CLI>
 a2billing.php,1: [auto_setcallerid] => 1

sophos*CLI>
 a2billing.php,1: [force_callerid] =>

sophos*CLI>
 a2billing.php,1: [cid_sanitize] => 0

sophos*CLI>
 a2billing.php,1: [cid_enable] => 0

sophos*CLI>
 a2billing.php,1: [cid_askpincode_ifnot_callerid] => 1

sophos*CLI>
 a2billing.php,1: [failover_lc_prefix] => 0

sophos*CLI>
 a2billing.php,1: [cid_auto_assign_card_to_cid] => 1

sophos*CLI>
 a2billing.php,1: [callerid_authentication_over_cardnumber] => 0

sophos*CLI>
 a2billing.php,1: [sip_iax_friends] => 0

sophos*CLI>
 a2billing.php,1: [sip_iax_pstn_direct_call_prefix] => 555

sophos*CLI>
 a2billing.php,1: [sip_iax_pstn_direct_call] => 0

sophos*CLI>
 a2billing.php,1: [ivr_voucher] => 0

sophos*CLI>
 a2billing.php,1: [ivr_voucher_prefix] => 8

sophos*CLI>
 a2billing.php,1: [jump_voucher_if_min_credit] => 0

sophos*CLI>
 a2billing.php,1: [dialcommand_param] => ,60,HRrL(%timeout%:61000:30000)

sophos*CLI>
 a2billing.php,1: [dialcommand_param_sipiax_friend] => ,60,HiL(3600000:61000:30000)

sophos*CLI>
 a2billing.php,1: [switchdialcommand] => 0

sophos*CLI>
 a2billing.php,1: [failover_recursive_limit] => 2

sophos*CLI>
 a2billing.php,1: [maxtime_tocall_negatif_free_route] => 5400

sophos*CLI>
 a2billing.php,1: [send_reminder] => 0

sophos*CLI>
 a2billing.php,1: [record_call] => 0

sophos*CLI>
 a2billing.php,1: [monitor_formatfile] => gsm

sophos*CLI>
 a2billing.php,1: [agi_force_currency] =>

sophos*CLI>
 a2billing.php,1: [currency_association] => Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [0] => usd:dollars

sophos*CLI>
 a2billing.php,1: [1] => mxn:pesos

sophos*CLI>
 a2billing.php,1: [2] => eur:euros

sophos*CLI>
 a2billing.php,1: [3] => all:credit

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: [local_dialing_addcountryprefix] => 0

sophos*CLI>
 a2billing.php,1: [max_call_call_2_did] => 3600

sophos*CLI>
 a2billing.php,1: [file_conf_enter_destination] => prepaid-enter-dest

sophos*CLI>
 a2billing.php,1: [conf_order_menulang] => en:fr:es

sophos*CLI>
 a2billing.php,1: [callback_bill_1stleg_ifcall_notconnected] => 1

sophos*CLI>
 a2billing.php,1: [international_prefixes] => Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [0] => 011

sophos*CLI>
 a2billing.php,1: [1] => 00

sophos*CLI>
 a2billing.php,1: [2] => 09

sophos*CLI>
 a2billing.php,1: [3] => 1

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: [extracharge_did] => Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [0] => 1800

sophos*CLI>
 a2billing.php,1: [1] => 1900

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: [extracharge_fee] => Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [0] => 0

sophos*CLI>
 a2billing.php,1: [1] => 0

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: [extracharge_buyfee] => Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [0] => 0

sophos*CLI>
 a2billing.php,1: [1] => 0

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: [maxtime_tounlimited_calls] => 5400

sophos*CLI>
 a2billing.php,1: [maxtime_tofree_calls] => 5400

sophos*CLI>
 a2billing.php,1: [callplan_deck_minute_threshold] =>

sophos*CLI>
 a2billing.php,1: [disable_announcement_seconds] => 0

sophos*CLI>
 a2billing.php,1: [verbosity_level] => 4

sophos*CLI>
 a2billing.php,1: [logging_level] => 4

sophos*CLI>
 a2billing.php,1: [dial_balance_reservation] => 0.25

sophos*CLI>
 a2billing.php,1: [cid_auto_create_card] => 0

sophos*CLI>
 a2billing.php,1: [cid_auto_create_card_len] => 10

sophos*CLI>
 a2billing.php,1: [cid_auto_create_card_typepaid] => PREPAID

sophos*CLI>
 a2billing.php,1: [cid_auto_create_card_credit] => 0

sophos*CLI>
 a2billing.php,1: [cid_auto_create_card_credit_limit] => 0

sophos*CLI>
 a2billing.php,1: [cid_auto_create_card_tariffgroup] => 1

sophos*CLI>
 a2billing.php,1: [busy_timeout] => 1

sophos*CLI>
 a2billing.php,1: [callback_reduce_balance] => 1

sophos*CLI>
 a2billing.php,1: [ivr_enable_locking_option] => 0

sophos*CLI>
 a2billing.php,1: [ivr_enable_account_information] => 0

sophos*CLI>
 a2billing.php,1: [ivr_enable_ivr_speeddial] => 0

sophos*CLI>
 a2billing.php,1: [play_rate_cents_if_lower_one] => 0

sophos*CLI>
 a2billing.php,1: [callback_beep_to_enter_destination] => 0

sophos*CLI>
 a2billing.php,1: [logger_enable] => 1

sophos*CLI>
 a2billing.php,1: [log_file] => /var/log/a2billing/a2billing.log

sophos*CLI>
 a2billing.php,1: [dialcommand_param_call_2did ] => |30|HL(3600000:61000:30000)

sophos*CLI>
 a2billing.php,1: [currency_association_internal] => Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [usd] => dollars

sophos*CLI>
 a2billing.php,1: [mxn] => pesos

sophos*CLI>
 a2billing.php,1: [eur] => euros

sophos*CLI>
 a2billing.php,1: [all] => credit

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: [file_conf_enter_menulang] => prepaid-menulang

sophos*CLI>
 a2billing.php,1: [ivr_voucher_prefixe] => 8

sophos*CLI>
 a2billing.php,1: [cheat_on_announcement_time] => 0

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:106 - uniqueid: - IDCONFIG : 1

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:107 - uniqueid: - MODE : standard

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:124 - uniqueid: - AGI Request:

sophos*CLI>
 a2billing.php,1: Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [agi_request] => a2billing.php

sophos*CLI>
 a2billing.php,1: [agi_channel] => Local/1007@a2billing-ab5b;2

sophos*CLI>
 a2billing.php,1: [agi_language] => en

sophos*CLI>
 a2billing.php,1: [agi_type] => Local

sophos*CLI>
 a2billing.php,1: [agi_uniqueid] => 1334593668.15

sophos*CLI>
 a2billing.php,1: [agi_version] => 1.8.7.0

sophos*CLI>
 a2billing.php,1: [agi_callerid] => 101

sophos*CLI>
 a2billing.php,1: [agi_calleridname] => 101

sophos*CLI>
 a2billing.php,1: [agi_callingpres] => 0

sophos*CLI>
 a2billing.php,1: [agi_callingani2] => 0

sophos*CLI>
 a2billing.php,1: [agi_callington] => 0

sophos*CLI>
 a2billing.php,1: [agi_callingtns] => 0

sophos*CLI>
 a2billing.php,1: [agi_dnid] => unknown

sophos*CLI>
 a2billing.php,1: [agi_rdnis] => unknown

sophos*CLI>
 a2billing.php,1: [agi_context] => a2billing

sophos*CLI>
 a2billing.php,1: [agi_extension] => 1007

sophos*CLI>
 a2billing.php,1: [agi_priority] => 1

sophos*CLI>
 a2billing.php,1: [agi_enhanced] => 0.0

sophos*CLI>
 a2billing.php,1: [agi_accountcode] =>

sophos*CLI>
 a2billing.php,1: [agi_threadid] => -1224983664

sophos*CLI>
 a2billing.php,1: [agi_arg_1] => 1

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:126 - uniqueid: - [INFO : A2Billing - Version 1.8.1 (Corylus)]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:715 - uniqueid:1334593668.15 - get_agi_request_parameter = 101 ; Local/1007@a2billing-ab5b;2 ; 1334593668.15 ; ; 1007

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:162 - uniqueid:1334593668.15 - [ANSWER CALL]

sophos*CLI>
 -- Local/1007@a2billing-ab5b;1 answered SIP/101-00000007

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:2591 - uniqueid:1334593668.15 - - Account code ::>

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:2773 - uniqueid:1334593668.15 - Requesting DTMF, CARDNUMBER_LENGTH_MAX 15

sophos*CLI>
 -- <Local/1007@a2billing-ab5b;2> Playing 'prepaid-enter-pin-number.gsm' (language 'en')

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:2775 - uniqueid:1334593668.15 - RES DTMF : 2563785627

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:2779 - uniqueid:1334593668.15 - CARDNUMBER ::> 2563785627

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:2804 - uniqueid:1334593668.15 - Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [0] => Array

sophos*CLI>
 a2billing.php,1: (

sophos*CLI>
 a2billing.php,1: [0] => 777777.00000

sophos*CLI>
 a2billing.php,1: [credit] => 777777.00000

sophos*CLI>
 a2billing.php,1: [1] => 1

sophos*CLI>
 a2billing.php,1: [tariff] => 1

sophos*CLI>
 a2billing.php,1: [2] => f

sophos*CLI>
 a2billing.php,1: [activated] => f

sophos*CLI>
 a2billing.php,1: [3] => 0

sophos*CLI>
 a2billing.php,1: [inuse] => 0

sophos*CLI>
 a2billing.php,1: [4] => 1

sophos*CLI>
 a2billing.php,1: [simultaccess] => 1

sophos*CLI>
 a2billing.php,1: [5] => 0

sophos*CLI>
 a2billing.php,1: [typepaid] => 0

sophos*CLI>
 a2billing.php,1: [6] =>

sophos*CLI>
 a2billing.php,1: [creditlimit] =>

sophos*CLI>
 a2billing.php,1: [7] => en

sophos*CLI>
 a2billing.php,1: [language] => en

sophos*CLI>
 a2billing.php,1: [8] => 0

sophos*CLI>
 a2billing.php,1: [removeinterprefix] => 0

sophos*CLI>
 a2billing.php,1: [9] => 62945467777

sophos*CLI>
 a2billing.php,1: [redial] => 62945467777

sophos*CLI>
 a2billing.php,1: [10] => 0

sophos*CLI>
 a2billing.php,1: [enableexpire] => 0

sophos*CLI>
 a2billing.php,1: [11] => 1650124939

sophos*CLI>
 a2billing.php,1: [UNIX_TIMESTAMP(expirationdate)] => 1650124939

sophos*CLI>
 a2billing.php,1: [12] => 360

sophos*CLI>
 a2billing.php,1: [expiredays] => 360

sophos*CLI>
 a2billing.php,1: [13] => 0

sophos*CLI>
 a2billing.php,1: [nbused] => 0

sophos*CLI>
 a2billing.php,1: [14] => 0

sophos*CLI>
 a2billing.php,1: [UNIX_TIMESTAMP(firstusedate)] => 0

sophos*CLI>
 a2billing.php,1: [15] => 1334592324

sophos*CLI>
 a2billing.php,1: [UNIX_TIMESTAMP(cc_card.creationdate)] => 1334592324

sophos*CLI>
 a2billing.php,1: [16] => USD

sophos*CLI>
 a2billing.php,1: [currency] => USD

sophos*CLI>
 a2billing.php,1: [17] => 102

sophos*CLI>
 a2billing.php,1: [lastname] => 102

sophos*CLI>
 a2billing.php,1: [18] =>

sophos*CLI>
 a2billing.php,1: [firstname] =>

sophos*CLI>
 a2billing.php,1: [19] =>

sophos*CLI>
 a2billing.php,1: =>

sophos*CLI>
 a2billing.php,1: [20] => 7615140279

sophos*CLI>
 a2billing.php,1: [uipass] => 7615140279

sophos*CLI>
 a2billing.php,1: [21] => 1

sophos*CLI>
 a2billing.php,1: [id] => 1

sophos*CLI>
 a2billing.php,1: [22] => -1

sophos*CLI>
 a2billing.php,1: [id_campaign] => -1

sophos*CLI>
 a2billing.php,1: [23] => 1

sophos*CLI>
 a2billing.php,1: [24] => 876209529587710

sophos*CLI>
 a2billing.php,1: [useralias] => 876209529587710

sophos*CLI>
 a2billing.php,1: [25] => 1

sophos*CLI>
 a2billing.php,1: [status] => 1

sophos*CLI>
 a2billing.php,1: [26] => 0

sophos*CLI>
 a2billing.php,1: [voicemail_permitted] => 0

sophos*CLI>
 a2billing.php,1: [27] => 0

sophos*CLI>
 a2billing.php,1: [voicemail_activated] => 0

sophos*CLI>
 a2billing.php,1: [28] => 0

sophos*CLI>
 a2billing.php,1: [restriction] => 0

sophos*CLI>
 a2billing.php,1: [29] => 1

sophos*CLI>
 a2billing.php,1: [countryprefix] => 1

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: )

sophos*CLI>
 a2billing.php,1:

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:2873 - uniqueid:1334593668.15 - [SET CHANNEL(language) en]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:747 - uniqueid:1334593668.15 - [CARD STATUS UPDATE]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:756 - uniqueid:1334593668.15 - [QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse+1, credit=credit-0.25 WHERE username='2563785627']

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:178 - uniqueid:1334593668.15 - [TRY : callingcard_ivr_authenticate]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:2264 - uniqueid:1334593668.15 - [AUTO SetCallerID]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:2270 - uniqueid:1334593668.15 - [REQUESTED SetCallerID : 101]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:2282 - uniqueid:1334593668.15 - [EXEC SetCallerID : 101]

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:193 - uniqueid:1334593668.15 - [CHANNEL STATUS : 6 = Line is up]

sophos*CLI>
 a2billing.php,1: [CREDIT : 777777.00000][CREDIT MIN_CREDIT_2CALL : 0]

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:396 - uniqueid:1334593668.15 - TARIFF ID -> 1

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:805 - uniqueid:1334593668.15 - use_dnid:0 && (!in_array:) && len_dnid:(7 || len_exten:4 ) && (try_num:0)

sophos*CLI>
 -- <Local/1007@a2billing-ab5b;2> Playing 'prepaid-enter-dest.gsm' (language 'en')

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:822 - uniqueid:1334593668.15 - RES DTMF : 629477499

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:878 - uniqueid:1334593668.15 - [CALL 2 DID]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:887 - uniqueid:1334593668.15 - SELECT cc_did.id, iduser FROM cc_did, cc_card WHERE cc_card.status=1 and cc_card.id=iduser and cc_did.activated=1 and did='629477499' AND cc_did.startingdate<= CURRENT_TIMESTAMP AND (cc_did.expirationdate > CURRENT_TIMESTAMP OR cc_did.expirationdate IS NULL OR cc_did.expirationdate = '0000-00-00 00:00:00')

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:893 - uniqueid:1334593668.15 - DESTINATION ::> 629477499

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:900 - uniqueid:1334593668.15 - RULES APPLY ON DESTINATION ::> 629477499

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:3421 - uniqueid:1334593668.15 - [SAVING DESTINATION FOR REDIAL: SQL: UPDATE cc_card SET redial = '629477499' WHERE username='2563785627']:[result: 1]

sophos*CLI>
 a2billing.php,1: file:Class.RateEngine.php - line:98 - uniqueid:1334593668.15 - [CC_asterisk_rate-engine: (1, 629477499)]

sophos*CLI>
 a2billing.php,1: file:Class.RateEngine.php - line:120 - uniqueid:1334593668.15 - [CC_asterisk_rate-engine - CALLERID : 101]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:1014 - uniqueid:1334593668.15 - ERROR ::> RateEngine didnt succeed to match the dialed number over the ratecard (Please check : id the ratecard is well create ; if the removeInter_Prefix is set according to your prefix in the ratecard ; if you hooked the ratecard to the Call Plan)

sophos*CLI>
 -- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:572 - uniqueid:1334593668.15 - ANSWER fct callingcard_ivr authorize:> -1

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:193 - uniqueid:1334593668.15 - [CHANNEL STATUS : 6 = Line is up]

sophos*CLI>
 a2billing.php,1: [CREDIT : 777777.00000][CREDIT MIN_CREDIT_2CALL : 0]

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:396 - uniqueid:2334593668.15 - TARIFF ID -> 1

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:805 - uniqueid:2334593668.15 - use_dnid:0 && (!in_array:) && len_dnid:(7 || len_exten:4 ) && (try_num:1)

sophos*CLI>
 -- <Local/1007@a2billing-ab5b;2> Playing 'prepaid-enter-dest.gsm' (language 'en')

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:822 - uniqueid:2334593668.15 - RES DTMF : 100745637

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:878 - uniqueid:2334593668.15 - [CALL 2 DID]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:887 - uniqueid:2334593668.15 - SELECT cc_did.id, iduser FROM cc_did, cc_card WHERE cc_card.status=1 and cc_card.id=iduser and cc_did.activated=1 and did='100745637' AND cc_did.startingdate<= CURRENT_TIMESTAMP AND (cc_did.expirationdate > CURRENT_TIMESTAMP OR cc_did.expirationdate IS NULL OR cc_did.expirationdate = '0000-00-00 00:00:00')

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:893 - uniqueid:2334593668.15 - DESTINATION ::> 100745637

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:900 - uniqueid:2334593668.15 - RULES APPLY ON DESTINATION ::> 100745637

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:3421 - uniqueid:2334593668.15 - [SAVING DESTINATION FOR REDIAL: SQL: UPDATE cc_card SET redial = '100745637' WHERE username='2563785627']:[result: 1]

sophos*CLI>
 a2billing.php,1: file:Class.RateEngine.php - line:98 - uniqueid:2334593668.15 - [CC_asterisk_rate-engine: (1, 100745637)]

sophos*CLI>
 a2billing.php,1: file:Class.RateEngine.php - line:120 - uniqueid:2334593668.15 - [CC_asterisk_rate-engine - CALLERID : 101]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:1014 - uniqueid:2334593668.15 - ERROR ::> RateEngine didnt succeed to match the dialed number over the ratecard (Please check : id the ratecard is well create ; if the removeInter_Prefix is set according to your prefix in the ratecard ; if you hooked the ratecard to the Call Plan)

sophos*CLI>
 -- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)

sophos*CLI>
 -- Executing [h@macro-dialout-trunk:1] Macro("SIP/101-00000007", "hangupcall,") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/101-00000007", "1?endmixmoncheck") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] NoOp("SIP/101-00000007", "End of MIXMON check") in new stack
-- Executing [s@macro-hangupcall:10] GotoIf("SIP/101-00000007", "1?nomeetmemon") in new stack
-- Goto (macro-hangupcall,s,15)
-- Executing [s@macro-hangupcall:15] NoOp("SIP/101-00000007", "MEETME_RECORDINGFILE=") in new stack
-- Executing [s@macro-hangupcall:16] GotoIf("SIP/101-00000007", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,18)
-- Executing [s@macro-hangupcall:18] NoOp("SIP/101-00000007", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s@macro-hangupcall:19] GotoIf("SIP/101-00000007", "1?noautomon2") in new stack
-- Goto (macro-hangupcall,s,25)
-- Executing [s@macro-hangupcall:25] NoOp("SIP/101-00000007", "MONITOR_FILENAME=") in new stack
-- Executing [s@macro-hangupcall:26] GotoIf("SIP/101-00000007", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,29)
-- Executing [s@macro-hangupcall:29] GotoIf("SIP/101-00000007", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,32)
-- Executing [s@macro-hangupcall:32] GotoIf("SIP/101-00000007", "1?theend") in new stack
-- Goto (macro-hangupcall,s,34)
-- Executing [s@macro-hangupcall:34] Hangup("SIP/101-00000007", "") in new stack
== Spawn extension (macro-hangupcall, s, 34) exited non-zero on 'SIP/101-00000007' in macro 'hangupcall'
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on 'SIP/101-00000007'

sophos*CLI>
 == Spawn extension (macro-dialout-trunk, s, 27) exited non-zero on 'SIP/101-00000007' in macro 'dialout-trunk'

sophos*CLI>
 == Spawn extension (from-internal, 91007, 6) exited non-zero on 'SIP/101-00000007'

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:572 - uniqueid:2334593668.15 - ANSWER fct callingcard_ivr authorize:> -1

sophos*CLI>
 a2billing.php,1: file:a2billing.php - line:193 - uniqueid:2334593668.15 - [CHANNEL STATUS : = Channel is down and available]

sophos*CLI>
 a2billing.php,1: [CREDIT : 777777.00000][CREDIT MIN_CREDIT_2CALL : 0]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:747 - uniqueid:2334593668.15 - [CARD STATUS UPDATE]

sophos*CLI>
 a2billing.php,1: file:Class.A2Billing.php - line:756 - uniqueid:2334593668.15 - [QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse-1, credit=credit+0.25 WHERE username='2563785627']

sophos*CLI>
 -- <Local/1007@a2billing-ab5b;2>AGI Script a2billing.php completed, returning 4

sophos*CLI>
 == Spawn extension (a2billing, 1007, 1) exited non-zero on 'Local/1007@a2billing-ab5b;2'

sophos*CLI>
 
I have the same problem !

I want to pass calls through A2B, I have configured the accountcode to the extension, but A2B is not receiving it.
 
Here is the solution:

Add the following extensions to /etc/asterisk/extensions_custom.conf.

[macro-dialout-trunk-predial-hook]
exten => s,1,GotoIf($["${OUT_${DIAL_TRUNK}:4:4}" = "A2B/"]?custom-freepbx-a2billing,${OUTNUM},1:2)
exten => s,2,MacroExit

[custom-freepbx-a2billing]
exten => _X.,1,DeadAGI(a2billing.php,${OUT_${DIAL_TRUNK}:8})
exten => _X.,n,Hangup()

[a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,deadAGI(a2billing.php,1)
exten => _X.,n,Hangup

[a2billing-callback]
exten => _X.,1,deadAGI(a2billing.php,1,callback)
exten => _X.,n,Hangup

[a2billing-cid-callback]
exten => _X.,1,deadAGI(a2billing.php,1,cid-callback,34) ;last parameter is the callback area code
exten => _X.,n,Hangup

[a2billing-all-callback]
exten => _X.,1,deadAGI(a2billing.php,1,all-callback,34) ;last parameter is the callback area code
exten => _X.,n,Hangup

[a2billing-did]
exten => _X.,1,deadAGI(a2billing.php,1,did)
exten => _X.,2,Hangup

[a2billing-voucher]
exten => _X.,1,deadAGI(a2billing.php,1,voucher)
exten => _X.,n,Hangup

[custom-a2billing-did]
exten => _X.,1,deadAGI(a2billing.php,1,did)
exten => _X.,2,Hangup

[custom-a2billing]
exten => _X.,1,deadAGI(a2billing.php,1)
exten => _X.,n,Hangup

Go into FreePBX GUI>Setup>Trunks>Add Custom Trunk give it a name and add the following dial string:

A2B/1


This is the trunk that is used to send calls out via A2Billing. Simply select this trunk in outbound routes. The /1 refers to which agi-conf is going to be used in /etc/a2billing.conf.

Add custom destinations to FreePBX via FreePBX GUI>Tools>Custom Destinations

Custom Destination: custom-a2billing,${EXTEN},1
Destination Quick Pick: (pick destination)
Description: A2Billing - Callthrough

Custom Destination: custom-a2billing-did,${EXTEN},1
Destination Quick Pick: (pick destination)
Description: A2Billing - DID

Start or restart FreePBX
amportal restart
 
Status
Not open for further replies.

Members Online Now

Forum statistics

Threads
111,859
Messages
589,434
Members
164,699
Latest member
CLTedu