Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 5:37 am
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: you don't have enough credit to make this call
PostPosted: Fri Sep 05, 2014 9:53 pm 
Offline

Joined: Tue Jul 27, 2010 8:38 pm
Posts: 15
Hello,

I hope that I can get some help here, because I really don't no what the hell is going on with A2Billing saying "you don't have enough credit to make this call"

I'm running Elastix 2.4.0 64bits and I configure A2Billing 1.9.4 (Cuprum) to work properly. I thought so...!
My problem is when making call through A2Billing, after I enter the destination number follow by the # key, A2Billing plays ""you don't have enough credit to make this call". After this I can try to enter the destination number again.

I try to find the solution here, but not many people seems to have this problem. Maybe someone here can help me troubleshooot this problem.

My Callplan, Ratecards and rates are setup right, because in the simulator there is no problems with the rate engine. I just create 1 single card to do some testing.

Here are some parameters that I'm using in agi-conf

Verbosity verbosity_level 4
Logging logging_level 4

Asterisk Version Global asterisk_version 1_11
(both in Global and agi-conf)

Dial Balance reservation dial_balance_reservation 0
Min Call Credit min_credit_2call 0
Min Bill Duration min_duration_2bill 2
Dial Command Params dialcommand_param |60|HRrL(%timeout%:61000:30000)

Looking into /var/log/a2billing/a2billing_agi.log I don't notice anything strange, but if there where something, I wouldn't see it, so please take a look by yourself.

Sorry for the log, I try to attached, but upload is failing.

I try to call the destination 0031207018042, my cardnumber is 4811283705, trunk is called voip-01-rebvoice. If I dialed destination number in Elastix through same trunk, call goes through.

===============

[05/09/2014 16:54:01]:[file:Class.A2Billing.php - line:604 - uniqueid:]:[CallerID:]:[CN:]:[A2Billing AGI internal configuration:]
[05/09/2014 16:54:01]:[file:Class.A2Billing.php - line:605 - uniqueid:]:[CallerID:]:[CN:]:[Array
(
[callerid_update] => 0
[dialcommand_param_call_2did] => |60|HiL(%timeout%:61000:30000)
[description] => agi-config
[asterisk_version] => 1_11
[answer_call] => 1
[play_audio] => 1
[say_goodbye] => 1
[play_menulanguage] => 0
[force_language] =>
[intro_prompt] =>
[min_credit_2call] => 0
[min_duration_2bill] => 2
[notenoughcredit_cardnumber] => 0
[notenoughcredit_assign_newcardnumber_cid] => 0
[use_dnid] => 0
[no_auth_dnid] => Array
(
[0] => 2400
[1] => 2300
)

[number_try] => 3
[force_callplan_id] =>
[say_balance_after_auth] => 1
[say_balance_after_call] => 0
[say_rateinitial] => 0
[say_timetocall] => 1
[auto_setcallerid] => 1
[force_callerid] =>
[cid_sanitize] => 0
[cid_enable] => 0
[cid_askpincode_ifnot_callerid] => 1
[failover_lc_prefix] => 0
[cid_auto_assign_card_to_cid] => 1
[callerid_authentication_over_cardnumber] => 0
[sip_iax_friends] => 0
[sip_iax_pstn_direct_call_prefix] => 555
[sip_iax_pstn_direct_call] => 0
[ivr_voucher] => 0
[ivr_voucher_prefix] => 8
[jump_voucher_if_min_credit] => 0
[dialcommand_param] => |60|HRrL(%timeout%:61000:30000)
[dialcommand_param_sipiax_friend] => |60|HiL(3600000:61000:30000)
[switchdialcommand] => 0
[failover_recursive_limit] => 2
[maxtime_tocall_negatif_free_route] => 5400
[send_reminder] => 0
[record_call] => 0
[monitor_formatfile] => gsm
[agi_force_currency] =>
[currency_association] => Array
(
[0] => usd:dollars
[1] => mxn:pesos
[2] => eur:euros
[3] => all:credit
)

[local_dialing_addcountryprefix] => 0
[max_call_call_2_did] => 3600
[file_conf_enter_destination] => prepaid-enter-dest
[conf_order_menulang] => en:fr:es
[callback_bill_1stleg_ifcall_notconnected] => 1
[international_prefixes] => Array
(
[0] =>
)

[extracharge_did] => Array
(
[0] =>
)

[extracharge_fee] => Array
(
[0] => 0
[1] => 0
)

[extracharge_buyfee] => Array
(
[0] => 0
[1] => 0
)

[maxtime_tounlimited_calls] => 5400
[maxtime_tofree_calls] => 5400
[callplan_deck_minute_threshold] =>
[disable_announcement_seconds] => 0
[verbosity_level] => 4
[logging_level] => 4
[dial_balance_reservation] => 0
[cid_auto_create_card] => 0
[cid_auto_create_card_len] => 10
[cid_auto_create_card_typepaid] => PREPAID
[cid_auto_create_card_credit] => 0
[cid_auto_create_card_credit_limit] => 0
[cid_auto_create_card_tariffgroup] => 1
[busy_timeout] => 1
[callback_reduce_balance] => 1
[ivr_enable_locking_option] => 0
[ivr_enable_account_information] => 0
[ivr_enable_ivr_speeddial] => 0
[play_rate_cents_if_lower_one] => 0
[callback_beep_to_enter_destination] => 0
[cid_prompt_callback_confirm_phonenumber] => 0
[logger_enable] => 1
[log_file] => /var/log/a2billing/a2billing.log
[dialcommand_param_call_2did ] => |30|HL(3600000:61000:30000)
[currency_association_internal] => Array
(
[usd] => dollars
[mxn] => pesos
[eur] => euros
[all] => credit
)

[file_conf_enter_menulang] => prepaid-menulang
[ivr_voucher_prefixe] => 8
[cheat_on_announcement_time] => 0
)
]
[05/09/2014 16:54:01]:[file:a2billing.php - line:106 - uniqueid:]:[CallerID:]:[CN:]:[IDCONFIG : 1]
[05/09/2014 16:54:01]:[file:a2billing.php - line:107 - uniqueid:]:[CallerID:]:[CN:]:[MODE : standard]
[05/09/2014 16:54:01]:[file:a2billing.php - line:124 - uniqueid:]:[CallerID:]:[CN:]:[AGI Request:
Array
(
[agi_request] => a2billing.php
[agi_channel] => SIP/100-00000007
[agi_language] => en
[agi_type] => SIP
[agi_uniqueid] => 1409950441.7
[agi_version] => 11.11.0
[agi_callerid] => 599100
[agi_calleridname] => Romano Ramdas
[agi_callingpres] => 0
[agi_callingani2] => 0
[agi_callington] => 0
[agi_callingtns] => 0
[agi_dnid] => 999999
[agi_rdnis] => unknown
[agi_context] => custom-freepbx-a2billing
[agi_extension] => 999999
[agi_priority] => 1
[agi_enhanced] => 0.0
[agi_accountcode] =>
[agi_threadid] => 47044550392128
[agi_arg_1] => 1
)
]
[05/09/2014 16:54:01]:[file:a2billing.php - line:126 - uniqueid:]:[CallerID:]:[CN:]:[[INFO : A2Billing - Version 1.9.4 (Cuprum)]]
[05/09/2014 16:54:01]:[file:Class.A2Billing.php - line:718 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:]:[ get_agi_request_parameter = 599100 ; SIP/100-00000007 ; 1409950441.7 ; ; 999999]
[05/09/2014 16:54:01]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:]:[Running time=0.0031118392944336 - QUERY=
SELECT id, currency, name, value FROM cc_currencies ORDER BY id
]
[05/09/2014 16:54:01]:[file:a2billing.php - line:162 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:]:[[ANSWER CALL]]
[05/09/2014 16:54:01]:[file:Class.A2Billing.php - line:2714 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:]:[ - Account code ::> ]
[05/09/2014 16:54:01]:[file:Class.A2Billing.php - line:2896 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:]:[Requesting DTMF, CARDNUMBER_LENGTH_MAX 15]
[05/09/2014 16:54:17]:[file:Class.A2Billing.php - line:2898 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:]:[RES DTMF : 4811283705]
[05/09/2014 16:54:17]:[file:Class.A2Billing.php - line:2902 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[CARDNUMBER ::> 4811283705]
[05/09/2014 16:54:17]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.0046801567077637 - QUERY=
SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix, 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, cc_card.id_campaign, cc_card.id, useralias, status, voicemail_permitted, voicemail_activated, cc_card.restriction, cc_country.countryprefix FROM cc_card LEFT JOIN cc_tariffgroup ON tariff=cc_tariffgroup.id LEFT JOIN cc_country ON cc_card.country=cc_country.countrycode WHERE username='4811283705'
]
[05/09/2014 16:54:17]:[file:Class.A2Billing.php - line:2927 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Array
(
[0] => Array
(
[0] => 10.00000
[credit] => 10.00000
[1] => 1
[tariff] => 1
[2] => f
[activated] => f
[3] => 0
[inuse] => 0
[4] => 0
[simultaccess] => 0
[5] => 0
[typepaid] => 0
[6] => 0
[creditlimit] => 0
[7] => en
[language] => en
[8] => 0
[removeinterprefix] => 0
[9] => 00317045002666
[redial] => 00317045002666
[10] => 0
[enableexpire] => 0
[11] => 1725567683
[UNIX_TIMESTAMP(expirationdate)] => 1725567683
[12] => 0
[expiredays] => 0
[13] => 0
[nbused] => 0
[14] => 0
[UNIX_TIMESTAMP(firstusedate)] => 0
[15] => 1409948580
[UNIX_TIMESTAMP(cc_card.creationdate)] => 1409948580
[16] => USD
[currency] => USD
[17] =>
[lastname] =>
[18] =>
[firstname] =>
[19] =>
[email] =>
[20] => 8623007423
[uipass] => 8623007423
[21] => 2
[id] => 2
[22] => -1
[id_campaign] => -1
[23] => 2
[24] => 292199202675277
[useralias] => 292199202675277
[25] => 1
[status] => 1
[26] => 0
[voicemail_permitted] => 0
[27] => 0
[voicemail_activated] => 0
[28] => 0
[restriction] => 0
[29] => 1
[countryprefix] => 1
)

)
]
[05/09/2014 16:54:17]:[file:Class.A2Billing.php - line:2996 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[SET CHANNEL(language) en]]
[05/09/2014 16:54:17]:[file:Class.A2Billing.php - line:750 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CARD STATUS UPDATE]]
[05/09/2014 16:54:17]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.0012907981872559 - QUERY=
UPDATE cc_card SET inuse=inuse+1, credit=credit-0 WHERE username='4811283705'
]
[05/09/2014 16:54:17]:[file:Class.A2Billing.php - line:759 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse+1, credit=credit-0 WHERE username='4811283705']]
[05/09/2014 16:54:17]:[file:Class.A2Billing.php - line:3092 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[A2Billing] SAY BALANCE : 10.00000
]
[05/09/2014 16:54:17]:[file:Class.A2Billing.php - line:1917 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CURRENCY : USD]]
[05/09/2014 16:54:17]:[file:Class.A2Billing.php - line:1924 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[BEFORE: 10 SPRINTF : 10.00]]
[05/09/2014 16:54:19]:[file:a2billing.php - line:178 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[TRY : callingcard_ivr_authenticate]]
[05/09/2014 16:54:19]:[file:Class.A2Billing.php - line:2385 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[AUTO SetCallerID]]
[05/09/2014 16:54:19]:[file:Class.A2Billing.php - line:2391 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[REQUESTED SetCallerID : 599100]]
[05/09/2014 16:54:19]:[file:Class.A2Billing.php - line:2403 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[EXEC SetCallerID : 599100]]
[05/09/2014 16:54:19]:[file:a2billing.php - line:193 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CHANNEL STATUS : 6 = Line is up]
[CREDIT : 10.00000][CREDIT MIN_CREDIT_2CALL : 0]]
[05/09/2014 16:54:19]:[file:a2billing.php - line:396 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[TARIFF ID -> 1]
[05/09/2014 16:54:19]:[file:Class.A2Billing.php - line:808 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[use_dnid:0 && (!in_array:) && len_dnid:(6 || len_exten:6 ) && (try_num:0)]
[05/09/2014 16:54:34]:[file:Class.A2Billing.php - line:825 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[RES DTMF : 0031207018042]
[05/09/2014 16:54:34]:[file:Class.A2Billing.php - line:881 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CALL 2 DID]]
[05/09/2014 16:54:34]:[file:Class.A2Billing.php - line:890 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[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='0031207018042' 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')]
[05/09/2014 16:54:34]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.0055639743804932 - QUERY=
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='0031207018042' 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')
]
[05/09/2014 16:54:34]:[file:Class.A2Billing.php - line:896 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[DESTINATION ::> 0031207018042]
[05/09/2014 16:54:34]:[file:Class.A2Billing.php - line:903 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[RULES APPLY ON DESTINATION ::> 0031207018042]
[05/09/2014 16:54:34]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.00074195861816406 - QUERY=
UPDATE cc_card SET redial = '0031207018042' WHERE username='4811283705'
]
[05/09/2014 16:54:34]:[file:Class.A2Billing.php - line:3544 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[SAVING DESTINATION FOR REDIAL: SQL: UPDATE cc_card SET redial = '0031207018042' WHERE username='4811283705']:[result: 1]]
[05/09/2014 16:54:34]:[file:Class.RateEngine.php - line:98 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CC_asterisk_rate-engine: (1, 0031207018042)]]
[05/09/2014 16:54:34]:[file:Class.RateEngine.php - line:120 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CC_asterisk_rate-engine - CALLERID : 599100]]
[05/09/2014 16:54:34]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.0045981407165527 - 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,
id_cc_package_offer, tp_trunk.status, rt_trunk.status, tp_trunk.inuse, rt_trunk.inuse,
tp_trunk.maxuse, rt_trunk.maxuse,tp_trunk.if_max_use, rt_trunk.if_max_use,cc_ratecard.rounding_calltime AS rounding_calltime,
cc_ratecard.rounding_threshold AS rounding_threshold, cc_ratecard.additional_block_charge AS additional_block_charge, cc_ratecard.additional_block_charge_time AS additional_block_charge_time,
cc_ratecard.additional_grace AS additional_grace, cc_ratecard.minimal_cost AS minimal_cost,disconnectcharge_after,announce_time_correction

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

WHERE cc_tariffgroup.id=1 AND ((dialprefix='0031207018042' OR dialprefix='003120701804' OR dialprefix='00312070180' OR dialprefix='0031207018' OR dialprefix='003120701' OR dialprefix='00312070' OR dialprefix='0031207' OR dialprefix='003120' OR dialprefix='00312' OR dialprefix='0031' OR dialprefix='003' OR dialprefix='00' OR dialprefix='0' OR dialprefix='defaultprefix') OR (dialprefix LIKE '&_%' ESCAPE '&' AND '0031207018042' REGEXP REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(CONCAT('^', dialprefix, '$'), 'X', '[0-9]'), 'Z', '[1-9]'), 'N', '[2-9]'), '.', '.+'), '_', '')))
AND startingdate<= CURRENT_TIMESTAMP AND (expirationdate > CURRENT_TIMESTAMP OR expirationdate IS NULL)
AND startdate<= CURRENT_TIMESTAMP AND (stopdate > CURRENT_TIMESTAMP OR stopdate IS NULL)
AND (starttime <= 6774 AND endtime >=6774)
AND idtariffgroup='1'
AND ( dnidprefix=SUBSTRING('999999',1,length(dnidprefix)) OR (dnidprefix='all' AND 0 = (SELECT COUNT(dnidprefix) FROM cc_tariffgroup_plan RIGHT JOIN cc_tariffplan ON cc_tariffgroup_plan.idtariffplan=cc_tariffplan.id WHERE dnidprefix=SUBSTRING('999999',1,length(dnidprefix)) AND idtariffgroup=1 ) ))
AND ( calleridprefix=SUBSTRING('599100',1,length(calleridprefix)) OR (calleridprefix='all' AND 0 = (SELECT count(calleridprefix) FROM cc_tariffgroup_plan RIGHT JOIN cc_tariffplan ON cc_tariffgroup_plan.idtariffplan=cc_tariffplan.id WHERE calleridprefix=SUBSTRING('599100',1,length(calleridprefix)) AND idtariffgroup=1 )))
ORDER BY LENGTH(dialprefix) DESC
]
[05/09/2014 16:54:34]:[file:Class.RateEngine.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[rate-engine: Count Total result 1]]
[05/09/2014 16:54:34]:[file:Class.RateEngine.php - line:270 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CC_asterisk_rate-engine: Count Total result 1]]
[05/09/2014 16:54:34]:[file:Class.RateEngine.php - line:271 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CC_asterisk_rate-engine: number_trunk 1]]
[05/09/2014 16:54:34]:[file:Class.A2Billing.php - line:1019 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[OK - RESFINDRATE::> 1]
[05/09/2014 16:54:34]:[file:Class.RateEngine.php - line:285 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CC_RATE_ENGINE_ALL_CALCULTIMEOUT (10.00000)]]
[05/09/2014 16:54:34]:[file:Class.RateEngine.php - line:291 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CC_RATE_ENGINE_ALL_CALCULTIMEOUT: k=0 - res_calcultimeout:6060]]
[05/09/2014 16:54:34]:[file:Class.A2Billing.php - line:1031 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[RES_ALL_CALCULTIMEOUT ::> 1]
[05/09/2014 16:54:34]:[file:Class.A2Billing.php - line:1847 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[TIMEOUT::> 6060 : minutes=0 - seconds=0]
[05/09/2014 16:54:38]:[file:a2billing.php - line:572 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[ANSWER fct callingcard_ivr authorize:> 1]
[05/09/2014 16:54:38]:[file:Class.RateEngine.php - line:1211 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[EXEC SETMUSICONHOLD 0]
[05/09/2014 16:54:38]:[file:Class.RateEngine.php - line:1245 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[app_callingcard: Dialing 'SIP/voip-01-rebvoice/0031207018042|60|HRrL(6060000:61000:30000)m' with timeout of '6060'.
]
[05/09/2014 16:54:38]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.00057697296142578 - QUERY=
SELECT cid FROM cc_outbound_cid_list WHERE activated = 1 AND outbound_cid_group = -1 ORDER BY RAND() LIMIT 1
]
[05/09/2014 16:54:38]:[file:Class.RateEngine.php - line:1265 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.]
[05/09/2014 16:54:38]:[file:Class.RateEngine.php - line:1157 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse+1 WHERE id_trunk='2']]
[05/09/2014 16:54:38]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.0003049373626709 - QUERY=
UPDATE cc_trunk SET inuse=inuse+1 WHERE id_trunk='2'
]
[05/09/2014 16:54:38]:[file:Class.RateEngine.php - line:1274 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[DIAL SIP/voip-01-rebvoice/0031207018042|60|HRrL(6060000:61000:30000)m]
[05/09/2014 16:54:38]:[file:Class.RateEngine.php - line:1157 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse-1 WHERE id_trunk='2']]
[05/09/2014 16:54:38]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.00063800811767578 - QUERY=
UPDATE cc_trunk SET inuse=inuse-1 WHERE id_trunk='2'
]
[05/09/2014 16:54:39]:[file:Class.RateEngine.php - line:959 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[:[sessiontime:0 - id_cc_package_offer: - package2apply:]

]
[05/09/2014 16:54:39]:[file:Class.RateEngine.php - line:1042 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CC_RATE_ENGINE_UPDATESYSTEM: usedratecard K= - (sessiontime=0 :: dialstatus=CHANUNAVAIL :: buycost=0 :: cost=0 : signe_cc_call=-: signe=+)]]
[05/09/2014 16:54:39]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.0072009563446045 - QUERY=
INSERT INTO cc_call (uniqueid, sessionid, card_id, nasipaddress, starttime, sessiontime, real_sessiontime, calledstation, terminatecauseid, stoptime, sessionbill, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buycost, id_card_package_offer, dnid, destination) VALUES ('1409950441.7', 'SIP/100-00000007', '2', '', SUBDATE(CURRENT_TIMESTAMP, INTERVAL 0 SECOND) , '0', '0', '0031207018042', 6, now() , '-0', NULL, NULL, NULL, '2', '599100', '0', '0', NULL, '999999', DEFAULT)
]
[05/09/2014 16:54:39]:[file:Class.RateEngine.php - line:1107 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CC_asterisk_stop : SQL: DONE : result=1]]
[05/09/2014 16:54:39]:[file:Class.RateEngine.php - line:1108 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CC_asterisk_stop : SQL: INSERT INTO cc_call (uniqueid, sessionid, card_id, nasipaddress, starttime, sessiontime, real_sessiontime, calledstation, terminatecauseid, stoptime, sessionbill, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buycost, id_card_package_offer, dnid, destination) VALUES ('1409950441.7', 'SIP/100-00000007', '2', '', SUBDATE(CURRENT_TIMESTAMP, INTERVAL 0 SECOND) , '0', '0', '0031207018042', 6, now() , '-0', NULL, NULL, NULL, '2', '599100', '0', '0', NULL, '999999', DEFAULT)]]
[05/09/2014 16:54:39]:[file:a2billing.php - line:588 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[a2billing account stop]]
[05/09/2014 16:54:39]:[file:a2billing.php - line:193 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CHANNEL STATUS : = Channel is down and available]
[CREDIT : 10.00000][CREDIT MIN_CREDIT_2CALL : 0]]
[05/09/2014 16:54:39]:[file:Class.A2Billing.php - line:750 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[CARD STATUS UPDATE]]
[05/09/2014 16:54:39]:[file:Class.Table.php - line:182 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[Running time=0.00040292739868164 - QUERY=
UPDATE cc_card SET inuse=inuse-1, credit=credit+0 WHERE username='4811283705'
]
[05/09/2014 16:54:39]:[file:Class.A2Billing.php - line:759 - uniqueid:1409950441.7]:[CallerID:599100]:[CN:4811283705]:[[QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse-1, credit=credit+0 WHERE username='4811283705']]
[05/09/2014 16:54:39]:[CallerID:599100]:[CN:4811283705]:[[STOP - EXIT]]

Please, what can be the problem???


Top
 Profile  
 
 Post subject: Re: you don't have enough credit to make this call
PostPosted: Sat Sep 06, 2014 12:05 pm 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
It looks like a call attempt is being made - DIAL SIP/voip-01-rebvoice/0031207018042

Are you saying you get a insufficient credit message when the dial attempt is made? If so I think the message is not coming from a2billing.

You should run a more recent version of a2billing if possible, or at the very least make sure the GUI is not accessible from the internet.


Top
 Profile  
 
 Post subject: Re: you don't have enough credit to make this call
PostPosted: Sat Sep 06, 2014 12:20 pm 
Offline

Joined: Tue Jul 27, 2010 8:38 pm
Posts: 15
Hallo bucasia,

I believe the message is from A2Billing, because the call never leave the server. Meaning that even Elastix/Asterisk is not taking the call to the trunk to call out.


Top
 Profile  
 
 Post subject: Re: you don't have enough credit to make this call
PostPosted: Sat Sep 06, 2014 12:43 pm 
Offline

Joined: Tue Jul 27, 2010 8:38 pm
Posts: 15
Okay,

The exact message is "Sorry, you don't have enough credit to call this number"

I spend some time to look at the differences from my log and others. What I notice is that in my log I can't find that A2Billing is calling.
I also look at the Elastix/Asterisk logs and notice that A2Billing is passing this to the trunk

SIP/voip-01-rebvoice/0031207018042,60,HRrL(5880000:61000:30000
== Everyone is busy/congested at this time (1:0/0/1)

I read that this has to do with which version of asterisk is enter in the agi-conf1 and global settings.

I change them to 1_6, because both 1_11 or 1_8 wasn't working.

What I find is very strange is that if I dial the destination number now, I still get to hear "Sorry, you don't have enough credit to call this number", :cry:

but the call goes through and I cal reach the person on the other end. :laugh:

Does anyone have some cluess for me to solve this strange message???


Top
 Profile  
 
 Post subject: Re: you don't have enough credit to make this call
PostPosted: Sun Sep 07, 2014 9:43 am 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
I don't think I've seen it where you get the message but the call still completes. It sounds like it's doing something different now so I would do more logging and see if you can figure out what a2billing thinks is happening.


Top
 Profile  
 
 Post subject: Re: you don't have enough credit to make this call
PostPosted: Sun Sep 07, 2014 7:57 pm 
Offline

Joined: Tue Jul 27, 2010 8:38 pm
Posts: 15
Here is the log off asterisk. I calling from test extension 100, with Outbound CID 599100, to 999999 (Custum trunk A2Billing) and the destination number is my mobile number. See the Bold line in log.

-- Executing [999999@from-internal:1] Macro("SIP/100-00000002", "user-callerid,SKIPTTL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/100-00000002", "AMPUSER=100") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/100-00000002", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/100-00000002", "1?Set(REALCALLERIDNUM=100)") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/100-00000002", "AMPUSER=100") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/100-00000002", "AMPUSERCIDNAME=Romano on HGPBX-VPN") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/100-00000002", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/100-00000002", "AMPUSERCID=100") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/100-00000002", "CALLERID(all)="Romano on HGPBX-VPN" <100>") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/100-00000002", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/100-00000002", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] Set("SIP/100-00000002", "CALLERID(number)=100") in new stack
-- Executing [s@macro-user-callerid:20] Set("SIP/100-00000002", "CALLERID(name)=Romano on HGPBX-VPN") in new stack
-- Executing [s@macro-user-callerid:21] NoOp("SIP/100-00000002", "Using CallerID "Romano on HGPBX-VPN" <100>") in new stack
-- Executing [999999@from-internal:2] NoOp("SIP/100-00000002", "Calling Out Route: 00-A2Billing") in new stack
-- Executing [999999@from-internal:3] Set("SIP/100-00000002", "MOHCLASS=default") in new stack
-- Executing [999999@from-internal:4] Set("SIP/100-00000002", "_NODEST=") in new stack
-- Executing [999999@from-internal:5] Macro("SIP/100-00000002", "record-enable,100,OUT,") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/100-00000002", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] ExecIf("SIP/100-00000002", "0?MacroExit()") in new stack
-- Executing [s@macro-record-enable:5] GotoIf("SIP/100-00000002", "0?Group:OUT") in new stack
-- Goto (macro-record-enable,s,15)
-- Executing [s@macro-record-enable:15] GotoIf("SIP/100-00000002", "0?IN") in new stack
-- Executing [s@macro-record-enable:16] ExecIf("SIP/100-00000002", "1?MacroExit()") in new stack
-- Executing [999999@from-internal:6] Macro("SIP/100-00000002", "dialout-trunk,3,999999,") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/100-00000002", "DIAL_TRUNK=3") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/100-00000002", "0?sub-pincheck,s,1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/100-00000002", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/100-00000002", "DIAL_NUMBER=999999") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/100-00000002", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/100-00000002", "OUTBOUND_GROUP=OUT_3") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/100-00000002", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/100-00000002", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/100-00000002", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/100-00000002", "outbound-callerid,3") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/100-00000002", "0?Set(CALLERPRES()=)") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/100-00000002", "0?Set(REALCALLERIDNUM=100)") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/100-00000002", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/100-00000002", "USEROUTCID="Romano Ramdas"<599100>") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/100-00000002", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/100-00000002", "TRUNKOUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/100-00000002", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/100-00000002", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/100-00000002", "1?Set(CALLERID(all)="Romano Ramdas"<599100>)") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/100-00000002", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/100-00000002", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/100-00000002", "0?sub-flp-3,s,1") in new stack
-- Executing [s@macro-dialout-trunk:13] Set("SIP/100-00000002", "OUTNUM=999999") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/100-00000002", "custom=AMP") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/100-00000002", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/100-00000002", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] GotoIf("SIP/100-00000002", "1?custom-freepbx-a2billing,999999,1:2") in new stack
-- Goto (custom-freepbx-a2billing,999999,1)
== Channel 'SIP/100-00000002' jumping out of macro 'dialout-trunk-predial-hook'
== Channel 'SIP/100-00000002' jumping out of macro 'dialout-trunk'
-- Executing [999999@custom-freepbx-a2billing:1] DeadAGI("SIP/100-00000002", "a2billing.php,1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php,1: file:Class.A2Billing.php - line:604 - uniqueid: - A2Billing AGI internal configuration:
a2billing.php,1: file:Class.A2Billing.php - line:605 - uniqueid: - Array
a2billing.php,1: (
a2billing.php,1: [callerid_update] => 0
a2billing.php,1: [dialcommand_param_call_2did] => |60|HiL(%timeout%:61000:30000)
a2billing.php,1: [description] => agi-config
a2billing.php,1: [asterisk_version] => 1_6
a2billing.php,1: [answer_call] => 1
a2billing.php,1: [play_audio] => 1
a2billing.php,1: [say_goodbye] => 0
a2billing.php,1: [play_menulanguage] => 0
a2billing.php,1: [force_language] =>
a2billing.php,1: [intro_prompt] =>
a2billing.php,1: [min_credit_2call] => 0
a2billing.php,1: [min_duration_2bill] => 0
a2billing.php,1: [notenoughcredit_cardnumber] => 0
a2billing.php,1: [notenoughcredit_assign_newcardnumber_cid] => 0
a2billing.php,1: [use_dnid] => 0
a2billing.php,1: [no_auth_dnid] => Array
a2billing.php,1: (
a2billing.php,1: [0] => 2400
a2billing.php,1: [1] => 2300
a2billing.php,1: )
a2billing.php,1:
a2billing.php,1: [number_try] => 3
a2billing.php,1: [force_callplan_id] =>
a2billing.php,1: [say_balance_after_auth] => 1
a2billing.php,1: [say_balance_after_call] => 0
a2billing.php,1: [say_rateinitial] => 0
a2billing.php,1: [say_timetocall] => 1
a2billing.php,1: [auto_setcallerid] => 1
a2billing.php,1: [force_callerid] =>
a2billing.php,1: [cid_sanitize] => 0
a2billing.php,1: [cid_enable] => 0
a2billing.php,1: [cid_askpincode_ifnot_callerid] => 1
a2billing.php,1: [failover_lc_prefix] => 0
a2billing.php,1: [cid_auto_assign_card_to_cid] => 1
a2billing.php,1: [callerid_authentication_over_cardnumber] => 0
a2billing.php,1: [sip_iax_friends] => 0
a2billing.php,1: [sip_iax_pstn_direct_call_prefix] => 555
a2billing.php,1: [sip_iax_pstn_direct_call] => 0
a2billing.php,1: [ivr_voucher] => 0
a2billing.php,1: [ivr_voucher_prefix] => 8
a2billing.php,1: [jump_voucher_if_min_credit] => 0
a2billing.php,1: [dialcommand_param] => |60|HRrL(%timeout%:61000:30000)
a2billing.php,1: [dialcommand_param_sipiax_friend] => |60|HiL(3600000:61000:30000)
a2billing.php,1: [switchdialcommand] => 0
a2billing.php,1: [failover_recursive_limit] => 2
a2billing.php,1: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php,1: [send_reminder] => 0
a2billing.php,1: [record_call] => 0
a2billing.php,1: [monitor_formatfile] => gsm
a2billing.php,1: [agi_force_currency] =>
a2billing.php,1: [currency_association] => Array
a2billing.php,1: (
a2billing.php,1: [0] => usd:dollars
a2billing.php,1: [1] => mxn:pesos
a2billing.php,1: [2] => eur:euros
a2billing.php,1: [3] => all:credit
a2billing.php,1: )
a2billing.php,1:
a2billing.php,1: [local_dialing_addcountryprefix] => 0
a2billing.php,1: [max_call_call_2_did] => 3600
a2billing.php,1: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php,1: [conf_order_menulang] => en:fr:es
a2billing.php,1: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php,1: [international_prefixes] => Array
a2billing.php,1: (
a2billing.php,1: [0] => 011
a2billing.php,1: [1] => 00
a2billing.php,1: [2] => 09
a2billing.php,1: [3] => 1
a2billing.php,1: )
a2billing.php,1:
a2billing.php,1: [extracharge_did] => Array
a2billing.php,1: (
a2billing.php,1: [0] => 1800
a2billing.php,1: [1] => 1900
a2billing.php,1: )
a2billing.php,1:
a2billing.php,1: [extracharge_fee] => Array
a2billing.php,1: (
a2billing.php,1: [0] => 0
a2billing.php,1: [1] => 0
a2billing.php,1: )
a2billing.php,1:
a2billing.php,1: [extracharge_buyfee] => Array
a2billing.php,1: (
a2billing.php,1: [0] => 0
a2billing.php,1: [1] => 0
a2billing.php,1: )
a2billing.php,1:
a2billing.php,1: [maxtime_tounlimited_calls] => 5400
a2billing.php,1: [maxtime_tofree_calls] => 5400
a2billing.php,1: [callplan_deck_minute_threshold] =>
a2billing.php,1: [disable_announcement_seconds] => 0
a2billing.php,1: [verbosity_level] => 4
a2billing.php,1: [logging_level] => 4
a2billing.php,1: [dial_balance_reservation] => 0.25
a2billing.php,1: [cid_auto_create_card] => 0
a2billing.php,1: [cid_auto_create_card_len] => 10
a2billing.php,1: [cid_auto_create_card_typepaid] => PREPAID
a2billing.php,1: [cid_auto_create_card_credit] => 0
a2billing.php,1: [cid_auto_create_card_credit_limit] => 0
a2billing.php,1: [cid_auto_create_card_tariffgroup] => 1
a2billing.php,1: [busy_timeout] => 1
a2billing.php,1: [callback_reduce_balance] => 1
a2billing.php,1: [ivr_enable_locking_option] => 0
a2billing.php,1: [ivr_enable_account_information] => 0
a2billing.php,1: [ivr_enable_ivr_speeddial] => 0
a2billing.php,1: [play_rate_cents_if_lower_one] => 0
a2billing.php,1: [callback_beep_to_enter_destination] => 0
a2billing.php,1: [cid_prompt_callback_confirm_phonenumber] => 0
a2billing.php,1: [logger_enable] => 1
a2billing.php,1: [log_file] => /var/log/a2billing/a2billing.log
a2billing.php,1: [dialcommand_param_call_2did ] => |30|HL(3600000:61000:30000)
a2billing.php,1: [currency_association_internal] => Array
a2billing.php,1: (
a2billing.php,1: [usd] => dollars
a2billing.php,1: [mxn] => pesos
a2billing.php,1: [eur] => euros
a2billing.php,1: [all] => credit
a2billing.php,1: )
a2billing.php,1:
a2billing.php,1: [file_conf_enter_menulang] => prepaid-menulang
a2billing.php,1: [ivr_voucher_prefixe] => 8
a2billing.php,1: [cheat_on_announcement_time] => 0
a2billing.php,1: )
a2billing.php,1:
a2billing.php,1: file:a2billing.php - line:106 - uniqueid: - IDCONFIG : 1
a2billing.php,1: file:a2billing.php - line:107 - uniqueid: - MODE : standard
a2billing.php,1: file:a2billing.php - line:124 - uniqueid: - AGI Request:
a2billing.php,1: Array
a2billing.php,1: (
a2billing.php,1: [agi_request] => a2billing.php
a2billing.php,1: [agi_channel] => SIP/100-00000002
a2billing.php,1: [agi_language] => en
a2billing.php,1: [agi_type] => SIP
a2billing.php,1: [agi_uniqueid] => 1410119411.2
a2billing.php,1: [agi_version] => 11.11.0
a2billing.php,1: [agi_callerid] => 599100
a2billing.php,1: [agi_calleridname] => Romano Ramdas
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] => 999999
a2billing.php,1: [agi_rdnis] => unknown
a2billing.php,1: [agi_context] => custom-freepbx-a2billing
a2billing.php,1: [agi_extension] => 999999
a2billing.php,1: [agi_priority] => 1
a2billing.php,1: [agi_enhanced] => 0.0
a2billing.php,1: [agi_accountcode] => 4811283705
a2billing.php,1: [agi_threadid] => 47643570530624
a2billing.php,1: [agi_arg_1] => 1
a2billing.php,1: )
a2billing.php,1:
a2billing.php,1: file:a2billing.php - line:126 - uniqueid: - [INFO : A2Billing - Version 1.9.4 (Cuprum)]
a2billing.php,1: file:Class.A2Billing.php - line:718 - uniqueid:1410119411.2 - get_agi_request_parameter = 599100 ; SIP/100-00000002 ; 1410119411.2 ; 4811283705 ; 999999
a2billing.php,1: file:a2billing.php - line:162 - uniqueid:1410119411.2 - [ANSWER CALL]
a2billing.php,1: file:Class.A2Billing.php - line:2714 - uniqueid:1410119411.2 - - Account code ::> 4811283705
a2billing.php,1: file:Class.A2Billing.php - line:2731 - uniqueid:1410119411.2 - - Retrieve account info SQL ::> SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix, 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, status, voicemail_permitted, voicemail_activated, cc_card.restriction, cc_country.countryprefix FROM cc_card LEFT JOIN cc_tariffgroup ON tariff=cc_tariffgroup.id LEFT JOIN cc_country ON cc_card.country=cc_country.countrycode WHERE username='4811283705'
a2billing.php,1: file:Class.A2Billing.php - line:2800 - uniqueid:1410119411.2 - [SET CHANNEL(language) en]
a2billing.php,1: file:Class.A2Billing.php - line:2804 - uniqueid:1410119411.2 - [credit=9.45540 :: tariff=1 :: status=1 :: isused=0 :: simultaccess=0 :: typepaid=0 :: creditlimit=0 :: language=en]
a2billing.php,1: file:Class.A2Billing.php - line:750 - uniqueid:1410119411.2 - [CARD STATUS UPDATE]
a2billing.php,1: file:Class.A2Billing.php - line:759 - uniqueid:1410119411.2 - [QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse+1, credit=credit-0.25 WHERE username='4811283705']
a2billing.php,1: file:Class.A2Billing.php - line:3092 - uniqueid:1410119411.2 - [A2Billing] SAY BALANCE : 9.45540
a2billing.php,1:
a2billing.php,1: file:Class.A2Billing.php - line:1917 - uniqueid:1410119411.2 - [CURRENCY : USD]
a2billing.php,1: file:Class.A2Billing.php - line:1924 - uniqueid:1410119411.2 - [BEFORE: 9.4554 SPRINTF : 9.46]
-- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
-- <SIP/100-00000002> Playing 'digits/9.gsm' (language 'en')
-- Playing 'dollars' (escape_digits=#) (sample_offset 0)
-- Playing 'vm-and' (escape_digits=#) (sample_offset 0)
-- <SIP/100-00000002> Playing 'digits/40.gsm' (language 'en')
-- <SIP/100-00000002> Playing 'digits/6.gsm' (language 'en')
-- Playing 'prepaid-cents' (escape_digits=#) (sample_offset 0)
a2billing.php,1: file:a2billing.php - line:178 - uniqueid:1410119411.2 - [TRY : callingcard_ivr_authenticate]
a2billing.php,1: file:Class.A2Billing.php - line:2385 - uniqueid:1410119411.2 - [AUTO SetCallerID]
a2billing.php,1: file:Class.A2Billing.php - line:2391 - uniqueid:1410119411.2 - [REQUESTED SetCallerID : 599100]
a2billing.php,1: file:Class.A2Billing.php - line:2403 - uniqueid:1410119411.2 - [EXEC SetCallerID : 599100]
a2billing.php,1: file:a2billing.php - line:193 - uniqueid:1410119411.2 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php,1: [CREDIT : 9.45540][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php,1: file:a2billing.php - line:396 - uniqueid:1410119411.2 - TARIFF ID -> 1
a2billing.php,1: file:Class.A2Billing.php - line:808 - uniqueid:1410119411.2 - use_dnid:0 && (!in_array:) && len_dnid:(6 || len_exten:6 ) && (try_num:0)
-- <SIP/100-00000002> Playing 'prepaid-enter-dest.gsm' (language 'en')
a2billing.php,1: file:Class.A2Billing.php - line:825 - uniqueid:1410119411.2 - RES DTMF : 0031647833289
a2billing.php,1: file:Class.A2Billing.php - line:881 - uniqueid:1410119411.2 - [CALL 2 DID]
a2billing.php,1: file:Class.A2Billing.php - line:890 - uniqueid:1410119411.2 - 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='0031647833289' 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')
a2billing.php,1: file:Class.A2Billing.php - line:896 - uniqueid:1410119411.2 - DESTINATION ::> 0031647833289
a2billing.php,1: file:Class.A2Billing.php - line:903 - uniqueid:1410119411.2 - RULES APPLY ON DESTINATION ::> 0031647833289
a2billing.php,1: file:Class.A2Billing.php - line:3544 - uniqueid:1410119411.2 - [SAVING DESTINATION FOR REDIAL: SQL: UPDATE cc_card SET redial = '0031647833289' WHERE username='4811283705']:[result: 1]
a2billing.php,1: file:Class.RateEngine.php - line:98 - uniqueid:1410119411.2 - [CC_asterisk_rate-engine: (1, 0031647833289)]
a2billing.php,1: file:Class.RateEngine.php - line:120 - uniqueid:1410119411.2 - [CC_asterisk_rate-engine - CALLERID : 599100]
a2billing.php,1: file:Class.RateEngine.php - line:182 - uniqueid:1410119411.2 - [rate-engine: Count Total result 2]
a2billing.php,1: file:Class.RateEngine.php - line:270 - uniqueid:1410119411.2 - [CC_asterisk_rate-engine: Count Total result 1]
a2billing.php,1: file:Class.RateEngine.php - line:271 - uniqueid:1410119411.2 - [CC_asterisk_rate-engine: number_trunk 1]
a2billing.php,1: file:Class.A2Billing.php - line:1019 - uniqueid:1410119411.2 - OK - RESFINDRATE::> 1
a2billing.php,1: file:Class.RateEngine.php - line:285 - uniqueid:1410119411.2 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT (9.45540)]
a2billing.php,1: file:Class.RateEngine.php - line:291 - uniqueid:1410119411.2 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT: k=0 - res_calcultimeout:2820]
a2billing.php,1: file:Class.A2Billing.php - line:1031 - uniqueid:1410119411.2 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php,1: file:Class.A2Billing.php - line:1847 - uniqueid:1410119411.2 - TIMEOUT::> 2820 : minutes=0 - seconds=0
-- Playing 'prepaid-no-enough-credit' (escape_digits=#) (sample_offset 0)
a2billing.php,1: file:a2billing.php - line:572 - uniqueid:1410119411.2 - ANSWER fct callingcard_ivr authorize:> 1
a2billing.php,1: file:Class.RateEngine.php - line:1245 - uniqueid:1410119411.2 - app_callingcard: Dialing 'SIP/voip-01-rebvoice/0031647833289|60|HRrL(2820000:61000:30000)' with timeout of '2820'.
a2billing.php,1:
a2billing.php,1: file:Class.RateEngine.php - line:1265 - uniqueid:1410119411.2 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
a2billing.php,1: file:Class.RateEngine.php - line:1157 - uniqueid:1410119411.2 - [TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse+1 WHERE id_trunk='2']
-- AGI Script Executing Application: (DIAL) Options: (SIP/voip-01-rebvoice/0031647833289,60,HRrL(2820000:61000:30000))
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called SIP/voip-01-rebvoice/0031647833289
-- SIP/voip-01-rebvoice-00000003 is making progress passing it to SIP/100-00000002
a2billing.php,1: file:Class.RateEngine.php - line:1274 - uniqueid:1410119411.2 - DIAL SIP/voip-01-rebvoice/0031647833289|60|HRrL(2820000:61000:30000)
a2billing.php,1: file:Class.RateEngine.php - line:1157 - uniqueid:1410119411.2 - [TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse-1 WHERE id_trunk='2']
a2billing.php,1: file:Class.RateEngine.php - line:1426 - uniqueid:1410119411.2 - [USEDRATECARD=0]
a2billing.php,1: file:Class.RateEngine.php - line:959 - uniqueid:1410119411.2 - :[sessiontime:0 - id_cc_package_offer:-1 - package2apply:]
a2billing.php,1:
a2billing.php,1:
a2billing.php,1: file:Class.RateEngine.php - line:1042 - uniqueid:1410119411.2 - [CC_RATE_ENGINE_UPDATESYSTEM: usedratecard K=0 - (sessiontime=0 :: dialstatus=CANCEL :: buycost=0 :: cost= : signe_cc_call=-: signe=+)]
a2billing.php,1: file:Class.RateEngine.php - line:1107 - uniqueid:1410119411.2 - [CC_asterisk_stop : SQL: DONE : result=1]
a2billing.php,1: file:Class.RateEngine.php - line:1108 - uniqueid:1410119411.2 - [CC_asterisk_stop : SQL: INSERT INTO cc_call (uniqueid, sessionid, card_id, nasipaddress, starttime, sessiontime, real_sessiontime, calledstation, terminatecauseid, stoptime, sessionbill, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buycost, id_card_package_offer, dnid, destination) VALUES ('1410119411.2', 'SIP/100-00000002', '2', '', SUBDATE(CURRENT_TIMESTAMP, INTERVAL 0 SECOND) , '0', '0', '0031647833289', 4, now() , '-0', '1', '1', '210', '2', '599100', '0', '0', NULL, '999999', '316')]
a2billing.php,1: file:a2billing.php - line:588 - uniqueid:1410119411.2 - [a2billing account stop]
a2billing.php,1: file:a2billing.php - line:193 - uniqueid:1410119411.2 - [CHANNEL STATUS : = Channel is down and available]
a2billing.php,1: [CREDIT : 9.45540][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php,1: file:Class.A2Billing.php - line:750 - uniqueid:1410119411.2 - [CARD STATUS UPDATE]
a2billing.php,1: file:Class.A2Billing.php - line:759 - uniqueid:1410119411.2 - [QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse-1, credit=credit+0.25 WHERE username='4811283705']
-- <SIP/100-00000002>AGI Script a2billing.php completed, returning 4
== Spawn extension (custom-freepbx-a2billing, 999999, 1) exited non-zero on 'SIP/100-00000002'


Top
 Profile  
 
 Post subject: Re: you don't have enough credit to make this call
PostPosted: Sun Sep 07, 2014 8:24 pm 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
Quote:
a2billing.php,1: file:Class.A2Billing.php - line:1847 - uniqueid:1410119411.2 - TIMEOUT::> 2820 : minutes=0 - seconds=0
-- Playing 'prepaid-no-enough-credit' (escape_digits=#) (sample_offset 0)


Unfortunately I don't have a copy of 1.9.4 to have a look at, but here's the code from mine. It could be a little different from yours.

This is from Class.A2Billing.php as you see mentioned in the log above where it's playing the message

Code:
   public function fct_say_time_2_call($agi, $timeout, $rate = 0)
    {
        // set destination and timeout
        // say 'you have x minutes and x seconds'
        $minutes = intval($timeout / 60);
        $seconds = $timeout % 60;

        $this->debug(DEBUG, $agi, __FILE__, __LINE__, "TIMEOUT::> " . $this->timeout . " : minutes=$minutes - seconds=$seconds");
        if (!($minutes > 0) && !($seconds > 10)) {
            $prompt = "prepaid-no-enough-credit";
            $agi->stream_file($prompt, '#');
            return -1;
        }


You see this bit on your logs -

TIMEOUT::> 2820 : minutes=0 - seconds=0

It's saying 2820 seconds is 0 minutes and 0 seconds I think? That's not correct. And that's why you get the error message (you can see the code is checking the value of minutes/seconds)

I'm unsure why your a2billing is not doing that calculation correctly to turn the timeout to mins/secs.

I'd suggest upgrading is possible.


Top
 Profile  
 
 Post subject: Re: you don't have enough credit to make this call
PostPosted: Mon Sep 08, 2014 12:10 am 
Offline

Joined: Tue Jul 27, 2010 8:38 pm
Posts: 15
Could you tell me where this file Class.A2Billing.php is located??


Top
 Profile  
 
 Post subject: Re: you don't have enough credit to make this call
PostPosted: Mon Sep 08, 2014 7:28 am 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
I'm unsure offhand with Elastix but you could ...

yum -y install mlocate
updatedb
locate Class.A2Billing.php


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 
Auto Dialer Software


All times are UTC


Who is online

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