Looks to me a bug or I am doing something wrong. I have setup a rate for a route high enough from the user's balance. The call is still being dialed after announcing prepaid-no-enough-credit.
Code:
./a2billing.php -v
A2Billing - Version 1.9.4 (Cuprum)
Code:
[Jun 12 09:31:14] -- <SIP/3418800878-0000008c> Playing 'prepaid-enter-dest.gsm' (language 'en')
[Jun 12 09:31:17] a2bill.php,1: file:Class.A2Billing.php - line:791 - uniqueid:1307871074.140 - RES DTMF : 92300
[Jun 12 09:31:17] a2bill.php,1: file:Class.A2Billing.php - line:828 - uniqueid:1307871074.140 - [CALL 2 DID]
[Jun 12 09:31:17] a2bill.php,1: file:Class.A2Billing.php - line:837 - uniqueid:1307871074.140 - 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='92300' 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')
[Jun 12 09:31:17] a2bill.php,1: file:Class.A2Billing.php - line:843 - uniqueid:1307871074.140 - DESTINATION ::> 92300
[Jun 12 09:31:17] a2bill.php,1: file:Class.A2Billing.php - line:850 - uniqueid:1307871074.140 - RULES APPLY ON DESTINATION ::> 92300
[Jun 12 09:31:17] a2bill.php,1: file:Class.A2Billing.php - line:3408 - uniqueid:1307871074.140 - [SAVING DESTINATION FOR REDIAL: SQL: UPDATE cc_card SET redial = '92300' WHERE username='2425050481']:[result: 1]
[Jun 12 09:31:17] a2bill.php,1: file:Class.RateEngine.php - line:98 - uniqueid:1307871074.140 - [CC_asterisk_rate-engine: (1, 92300)]
[Jun 12 09:31:17] a2bill.php,1: file:Class.RateEngine.php - line:120 - uniqueid:1307871074.140 - [CC_asterisk_rate-engine - CALLERID : 3418800878]
[Jun 12 09:31:17] a2bill.php,1: file:Class.RateEngine.php - line:182 - uniqueid:1307871074.140 - [rate-engine: Count Total result 1]
[Jun 12 09:31:17] a2bill.php,1: file:Class.RateEngine.php - line:270 - uniqueid:1307871074.140 - [CC_asterisk_rate-engine: Count Total result 1]
[Jun 12 09:31:17] a2bill.php,1: file:Class.RateEngine.php - line:271 - uniqueid:1307871074.140 - [CC_asterisk_rate-engine: number_trunk 1]
[Jun 12 09:31:17] a2bill.php,1: file:Class.A2Billing.php - line:876 - uniqueid:1307871074.140 - OK - RESFINDRATE::> 1
[Jun 12 09:31:17] a2bill.php,1: file:Class.RateEngine.php - line:285 - uniqueid:1307871074.140 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT (0.10000)]
[Jun 12 09:31:17] a2bill.php,1: file:Class.RateEngine.php - line:291 - uniqueid:1307871074.140 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT: k=0 - res_calcultimeout:2]
[Jun 12 09:31:17] a2bill.php,1: file:Class.A2Billing.php - line:887 - uniqueid:1307871074.140 - RES_ALL_CALCULTIMEOUT ::> 1
[Jun 12 09:31:17] a2bill.php,1: file:Class.A2Billing.php - line:1709 - uniqueid:1307871074.140 - TIMEOUT::> 2 : minutes=0 - seconds=2
[Jun 12 09:31:17] -- Playing 'prepaid-no-enough-credit' (escape_digits=#) (sample_offset 0)
[Jun 12 09:31:21] a2bill.php,1: file:a2billing.php - line:540 - uniqueid:1307871074.140 - ANSWER fct callingcard_ivr authorize:> 1
[Jun 12 09:31:21] a2bill.php,1: file:Class.RateEngine.php - line:1245 - uniqueid:1307871074.140 - app_callingcard: Dialing 'SIP/188.138.113.115/92300,60,RL(2000:61000:30000)' with timeout of '2'.
[Jun 12 09:31:21] a2bill.php,1:
[Jun 12 09:31:21] a2bill.php,1: file:Class.RateEngine.php - line:1265 - uniqueid:1307871074.140 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
[Jun 12 09:31:21] a2bill.php,1: file:Class.RateEngine.php - line:1157 - uniqueid:1307871074.140 - [TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse+1 WHERE id_trunk='2']
[Jun 12 09:31:21] -- AGI Script Executing Application: (DIAL) Options: (SIP/xxx.xxx.xxx.xxx/92300,60,RL(2000:61000:30000))
Is this true or I am missing something?