Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sun Apr 28, 2024 3:46 am
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: On cero credit, A2B is not asking to enter a voucher
PostPosted: Mon Dec 03, 2007 10:40 pm 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
Hello Forum, and thanks in advance!

When I place a call from an unknown caller ID, A2B fails to authenticate the customer (That's exactly what I want for this profile), then it asks for PIN number, and after entering the Cardnumber, it goes and checks the credit of the card (so far so good), but when it pulls the information from the database, and the credit is 0, I receive the message "Sorry you have cero credits" and it doesn't asks to enter a voucher to add credit to the account with it.

Here is my a2billing.conf

Code:
[agi-conf4]

debug = 1
asterisk_version = 1_2
answer_call = YES
play_audio = YES
say_goodbye = NO
play_menulanguage = NO
force_language =
intro_prompt =
min_credit_2call = 0.1
min_duration_2bill = 0
notenoughcredit_cardnumber = YES
notenoughcredit_assign_newcardnumber_cid = YES
use_dnid = NO
no_auth_dnid = 2400,2300
number_try = 3
force_callplan_id  =
say_balance_after_auth = YES
say_balance_after_call = NO
say_rateinitial = NO
say_timetocall = YES
auto_setcallerid = YES
force_callerid =
cid_sanitize = NO
cid_enable = NO
cid_askpincode_ifnot_callerid = YES
cid_auto_assign_card_to_cid = YES
cid_auto_create_card = NO
cid_auto_create_card_len = 10
cid_auto_create_card_typepaid = POSTPAY
cid_auto_create_card_credit = 0
cid_auto_create_card_credit_limit = 1000
cid_auto_create_card_tariffgroup = 6
callerid_authentication_over_cardnumber = NO
sip_iax_friends = NO
sip_iax_pstn_direct_call_prefix = 555
sip_iax_pstn_direct_call = NO
ivr_voucher = YES
ivr_voucher_prefix = 8
jump_voucher_if_min_credit = YES
extracharge_did =
extracharge_fee =
dialcommand_param = "|60|HRrL(%timeout%:61000:30000)"
dialcommand_param_sipiax_friend = "|60|HL(3600000:61000:30000)"
switchdialcommand = NO
failover_recursive_limit = 2
maxtime_tocall_negatif_free_route = 5400
send_reminder = YES
record_call = NO
monitor_formatfile = gsm
agi_force_currency =
currency_association = usd:dollars,mxn:pesos,eur:euros,all:credit
file_conf_enter_destination = prepaid-enter-dest
file_conf_enter_menulang = prepaid-menulang2
callback_bill_1stleg_ifcall_notconnected = YES




Here is an output from asterisk consol

Code:

pbx001*CLI>
    -- Accepting AUTHENTICATED call from 216.137.100.250:
       > requested format = gsm,
       > requested prefs = (),
       > actual format = gsm,
       > host prefs = (ulaw|gsm),
       > priority = mine
    -- Executing DeadAGI("IAX2/test-2", "a2billing.php|4") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
  a2billing.php|4: A2Billing AGI internal configuration:
  a2billing.php|4: Array
  a2billing.php|4: (
  a2billing.php|4:     [debug] => 3
  a2billing.php|4:     [asterisk_version] => 1_2
  a2billing.php|4:     [answer_call] => 1
  a2billing.php|4:     [play_audio] => 1
  a2billing.php|4:     [say_goodbye] =>
  a2billing.php|4:     [play_menulanguage] =>
  a2billing.php|4:     [force_language] =>
  a2billing.php|4:     [intro_prompt] =>
  a2billing.php|4:     [min_credit_2call] => 0.1
  a2billing.php|4:     [min_duration_2bill] => 0
  a2billing.php|4:     [notenoughcredit_cardnumber] => 1
  a2billing.php|4:     [notenoughcredit_assign_newcardnumber_cid] => 1
  a2billing.php|4:     [use_dnid] =>
  a2billing.php|4:     [no_auth_dnid] => Array
  a2billing.php|4:         (
  a2billing.php|4:             [0] => 2400
  a2billing.php|4:             [1] => 2300
  a2billing.php|4:         )
  a2billing.php|4:
  a2billing.php|4:     [number_try] => 3
  a2billing.php|4:     [force_callplan_id] =>
  a2billing.php|4:     [say_balance_after_auth] => 1
  a2billing.php|4:     [say_balance_after_call] =>
  a2billing.php|4:     [say_rateinitial] =>
  a2billing.php|4:     [say_timetocall] => 1
  a2billing.php|4:     [auto_setcallerid] => 1
  a2billing.php|4:     [force_callerid] =>
  a2billing.php|4:     [cid_sanitize] =>
  a2billing.php|4:     [cid_enable] =>
  a2billing.php|4:     [cid_askpincode_ifnot_callerid] => 1
  a2billing.php|4:     [cid_auto_assign_card_to_cid] => 1
  a2billing.php|4:     [cid_auto_create_card] =>
  a2billing.php|4:     [cid_auto_create_card_len] => 10
  a2billing.php|4:     [cid_auto_create_card_typepaid] => POSTPAY
  a2billing.php|4:     [cid_auto_create_card_credit] => 0
  a2billing.php|4:     [cid_auto_create_card_credit_limit] => 1000
  a2billing.php|4:     [cid_auto_create_card_tariffgroup] => 6
  a2billing.php|4:     [callerid_authentication_over_cardnumber] =>
  a2billing.php|4:     [sip_iax_friends] =>
  a2billing.php|4:     [sip_iax_pstn_direct_call_prefix] => 555
  a2billing.php|4:     [sip_iax_pstn_direct_call] =>
  a2billing.php|4:     [ivr_voucher] => 1
  a2billing.php|4:     [ivr_voucher_prefix] => 8
  a2billing.php|4:     [jump_voucher_if_min_credit] => 1
  a2billing.php|4:     [extracharge_did] => Array
  a2billing.php|4:         (
  a2billing.php|4:             [0] =>
  a2billing.php|4:         )
  a2billing.php|4:
  a2billing.php|4:     [extracharge_fee] => Array
  a2billing.php|4:         (
  a2billing.php|4:             [0] =>
  a2billing.php|4:         )
  a2billing.php|4:
  a2billing.php|4:     [dialcommand_param] => |60|HRrL(%timeout%:61000:30000)
  a2billing.php|4:     [dialcommand_param_sipiax_friend] => |60|HL(3600000:61000:30000)
  a2billing.php|4:     [switchdialcommand] =>
  a2billing.php|4:     [failover_recursive_limit] => 2
  a2billing.php|4:     [maxtime_tocall_negatif_free_route] => 5400
  a2billing.php|4:     [send_reminder] => 1
  a2billing.php|4:     [record_call] =>
  a2billing.php|4:     [monitor_formatfile] => gsm
  a2billing.php|4:     [agi_force_currency] =>
  a2billing.php|4:     [currency_association] => Array
  a2billing.php|4:         (
  a2billing.php|4:             [0] => usd:dollars
  a2billing.php|4:             [1] => mxn:pesos
  a2billing.php|4:             [2] => eur:euros
  a2billing.php|4:             [3] => all:credit
  a2billing.php|4:         )
  a2billing.php|4:
  a2billing.php|4:     [file_conf_enter_destination] => prepaid-enter-dest
  a2billing.php|4:     [file_conf_enter_menulang] => prepaid-menulang2
  a2billing.php|4:     [callback_bill_1stleg_ifcall_notconnected] => 1
  a2billing.php|4:     [logger_enable] => 1
  a2billing.php|4:     [log_file] => /tmp/a2billing.log
  a2billing.php|4:     [currency_association_internal] => Array
  a2billing.php|4:         (
  a2billing.php|4:             [usd] => dollars
  a2billing.php|4:             [mxn] => pesos
  a2billing.php|4:             [eur] => euros
  a2billing.php|4:             [all] => credit
  a2billing.php|4:         )
  a2billing.php|4:
  a2billing.php|4:     [ivr_voucher_prefixe] => 8
  a2billing.php|4: )
  a2billing.php|4:
  a2billing.php|4: file:a2billing.php - line:75 - IDCONFIG : 4
  a2billing.php|4: file:a2billing.php - line:76 - MODE : standard
  a2billing.php|4: file:a2billing.php - line:88 - AGI Request:
  a2billing.php|4: file:a2billing.php - line:89 - Array
  a2billing.php|4: (
  a2billing.php|4:     [agi_request] => a2billing.php
  a2billing.php|4:     [agi_channel] => IAX2/test-2
  a2billing.php|4:     [agi_language] => en
  a2billing.php|4:     [agi_type] => IAX2
  a2billing.php|4:     [agi_uniqueid] => 1196720794.391
  a2billing.php|4:     [agi_callerid] => xxx
  a2billing.php|4:     [agi_calleridname] => Test User
  a2billing.php|4:     [agi_callingpres] => 1
  a2billing.php|4:     [agi_callingani2] => 0
  a2billing.php|4:     [agi_callington] => 0
  a2billing.php|4:     [agi_callingtns] => 0
  a2billing.php|4:     [agi_dnid] => 100
  a2billing.php|4:     [agi_rdnis] => unknown
  a2billing.php|4:     [agi_context] => access_numbers
  a2billing.php|4:     [agi_extension] => 100
  a2billing.php|4:     [agi_priority] => 1
  a2billing.php|4:     [agi_enhanced] => 0.0
  a2billing.php|4:     [agi_accountcode] => TESTACCOUNT
  a2billing.php|4: )
  a2billing.php|4:
  a2billing.php|4: file:Class.A2Billing.php - line:601 -  get_agi_request_parameter = xxx ; IAX2/test-2 ; 1196720794.391 ; TESTACCOUNT ; 100
  a2billing.php|4: file:a2billing.php - line:138 - [ANSWER CALL]
  a2billing.php|4: file:Class.A2Billing.php - line:1668 - SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix, redial, enabl'
  a2billing.php|4: file:Class.A2Billing.php - line:1675 - PREPAID-AUTH-FAIL
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
  a2billing.php|4: file:a2billing.php - line:316 - [AUTHENTICATION FAILED (cia_res:-2)]
  a2billing.php|4: file:a2billing.php - line:965 - [CALLBACK 1ST LEG]:[INFO FOR THE 1ST LEG - callback_username=
  a2billing.php|4: file:Class.A2Billing.php - line:1797 - Requesting DTMF, CARDNUMBER_LENGTH_MAX 15
    -- Playing 'prepaid-enter-pin-number' (language 'en')
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
  a2billing.php|4: file:Class.A2Billing.php - line:1799 - RES DTMF : 7251
  a2billing.php|4: file:Class.A2Billing.php - line:1803 - CARDNUMBER ::> 7251
  a2billing.php|4: file:Class.A2Billing.php - line:1826 - QUERY = SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix, redia'
  a2billing.php|4: Array
  a2billing.php|4: (
  a2billing.php|4:     [0] => Array
  a2billing.php|4:         (
  a2billing.php|4:             [0] => 0.00000
  a2billing.php|4:             [credit] => 0.00000
  a2billing.php|4:             [1] => 1
  a2billing.php|4:             [tariff] => 1
  a2billing.php|4:             [2] => t
  a2billing.php|4:             [activated] => t
  a2billing.php|4:             [3] => 0
  a2billing.php|4:             [inuse] => 0
  a2billing.php|4:             [4] => 0
  a2billing.php|4:             [simultaccess] => 0
  a2billing.php|4:             [5] => 0
  a2billing.php|4:             [typepaid] => 0
  a2billing.php|4:             [6] =>
  a2billing.php|4:             [creditlimit] =>
  a2billing.php|4:             [7] => en
  a2billing.php|4:             [language] => en
  a2billing.php|4:             [8] => 0
  a2billing.php|4:             [removeinterprefix] => 0
  a2billing.php|4:             [9] =>
  a2billing.php|4:             [redial] =>
  a2billing.php|4:             [10] => 1
  a2billing.php|4:             [enableexpire] => 1
  a2billing.php|4:             [11] => 1512317045
  a2billing.php|4:             [UNIX_TIMESTAMP(expirationdate)] => 1512317045
  a2billing.php|4:             [12] => 60
  a2billing.php|4:             [expiredays] => 60
  a2billing.php|4:             [13] => 0
  a2billing.php|4:             [nbused] => 0
  a2billing.php|4:             [14] => 0
  a2billing.php|4:             [UNIX_TIMESTAMP(firstusedate)] => 0
  a2billing.php|4:             [15] => 1196697845
  a2billing.php|4:             [UNIX_TIMESTAMP(cc_card.creationdate)] => 1196697845
  a2billing.php|4:             [16] => USD
  a2billing.php|4:             [currency] => USD
  a2billing.php|4:             [17] => testuser
  a2billing.php|4:             [lastname] => testuser
  a2billing.php|4:             [18] => test
  a2billing.php|4:             [firstname] => test
  a2billing.php|4:             [19] => [email protected]
  a2billing.php|4:             [email] => [email protected]
  a2billing.php|4:             [20] => 2312245492
  a2billing.php|4:             [uipass] => 2312245492
  a2billing.php|4:             [21] => 14
  a2billing.php|4:             [id] => 14
  a2billing.php|4:             [22] => -1
  a2billing.php|4:             [id_campaign] => -1
  a2billing.php|4:             [23] => 14
  a2billing.php|4:             [24] => 8042
  a2billing.php|4:             [useralias] => 8042
  a2billing.php|4:         )
  a2billing.php|4:
  a2billing.php|4: )
  a2billing.php|4:
  a2billing.php|4: file:Class.A2Billing.php - line:1898 - [SET LANGUAGE() en]
  a2billing.php|4: file:Class.A2Billing.php - line:1954 - [ERROR CHECK CARD : prepaid-zero-balance (cardnumber:7251)]
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
pbx001*CLI>
  a2billing.php|4: file:a2billing.php - line:997 - [CALLBACK 1ST LEG]:[ERROR - AUTHENTICATION USERNAME]
    -- AGI Script a2billing.php completed, returning 0
    -- Hungup 'IAX2/test-2'




As you may see configuration parameters

ivr_voucher = YES
ivr_voucher_prefix = 8
jump_voucher_if_min_credit = YES

Are activated, but I don't know if I'm using them properly, this is what I have in my extensions.conf

Code:
[a2billing_conf4]
exten => _X.,1,DeadAGI(a2billing.php|4)
exten => _X.,2,Hangup


If I call a2billing.php with voucher mode, (a2billing.php|4|voucher), A2B asks right the way for a voucher number, but obviously it does not add the credit to the correct cardnumber, becasue it doesn't know it yet!

Please help me see the light, thanks ones more!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 13, 2007 2:56 am 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
Problem solved!!!!

Finally I found the error, it wasn't anything to do with A2B, actually the problem has that I setup the calleridnum in iax.conf as "xxx" insted of what ever {numerical} value.

And that fixed the problem!

Where is the a2b config I used

Code:
[agi-conf4]

debug = 3
asterisk_version = 1_2
answer_call = YES
play_audio = NO
say_goodbye = NO
play_menulanguage = NO
force_language =
intro_prompt =
min_credit_2call = 0
min_duration_2bill = 0
notenoughcredit_cardnumber = YES
notenoughcredit_assign_newcardnumber_cid = YES
use_dnid = NO
no_auth_dnid = 2400,2300
number_try = 3
force_callplan_id  =
say_balance_after_auth = YES
say_balance_after_call = NO
say_rateinitial = NO
say_timetocall = YES
auto_setcallerid = YES
force_callerid =
cid_sanitize = NO
cid_enable = YES
cid_askpincode_ifnot_callerid = YES
cid_auto_assign_card_to_cid = YES
cid_auto_create_card = NO
cid_auto_create_card_len = 10
cid_auto_create_card_typepaid = POSTPAY
cid_auto_create_card_credit = 0
cid_auto_create_card_credit_limit = 1000
cid_auto_create_card_tariffgroup = 6
callerid_authentication_over_cardnumber = NO
sip_iax_friends = NO
sip_iax_pstn_direct_call_prefix = 555
sip_iax_pstn_direct_call = NO
ivr_voucher = YES
ivr_voucher_prefix = 8
jump_voucher_if_min_credit = YES
extracharge_did =
extracharge_fee =
dialcommand_param = "|60|HRgrL(%timeout%:61000:30000)"
dialcommand_param_sipiax_friend = "|60|HRgrL(3600000:61000:30000)"
switchdialcommand = NO
failover_recursive_limit = 2
maxtime_tocall_negatif_free_route = 5400
send_reminder = YES
record_call = NO
monitor_formatfile = gsm
agi_force_currency =
currency_association = usd:dollars,mxn:pesos,eur:euros,all:credit
file_conf_enter_destination = prepaid-enter-dest
file_conf_enter_menulang = prepaid-menulang2
callback_bill_1stleg_ifcall_notconnected = YES


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 46 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