Hi all,
I have debugged this scenario to call from DID to a number destination. But I don't know in the first time, my system use dnid with this number DID, but it catch the DTMF from telephone.
This is the code debug :
Code:
FF ID -> 1
-- <SIP/78.46.42.74-00000b46> [b]Playing 'prepaid-enter-dest'[/b] (language 'en')
a2billing.php|2: file:a2billing.php - line:533 - uniqueid:1294510042.2886 - RES sip_iax_pstndirect_call DTMF : 44912260700
a2billing.php|2: file:a2billing.php - line:551 - uniqueid:1294510042.2886 - TRUNK - dnid : 44912260700 (1)
a2billing.php|2: file:Class.A2Billing.php - line:803 - uniqueid:1294510042.2886 - use_dnid:1 && (!in_array:) && len_dnid:(11 || len_exten:10 ) && (try_num:0)
a2billing.php|2: file:Class.A2Billing.php - line:812 - uniqueid:1294510042.2886 - [USE_DNID DESTINATION ::> 0182883855]
a2billing.php|2: file:Class.A2Billing.php - line:870 - uniqueid:1294510042.2886 - [CALL 2 DID]
a2billing.php|2: file:Class.A2Billing.php - line:879 - uniqueid:1294510042.2886 - 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='0182883855' 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|2: file:Class.A2Billing.php - line:885 - uniqueid:1294510042.2886 - DESTINATION ::> 0182883855
a2billing.php|2: file:Class.A2Billing.php - line:892 - uniqueid:1294510042.2886 - RULES APPLY ON DESTINATION ::> 0182883855
a2billing.php|2: file:Class.A2Billing.php - line:3412 - uniqueid:1294510042.2886 - [SAVING DESTINATION FOR REDIAL: SQL: UPDATE cc_card SET redial = '0182883855' WHERE username='0974410186']:[result: 1]
a2billing.php|2: file:Class.RateEngine.php - line:98 - uniqueid:1294510042.2886 - [CC_asterisk_rate-engine: (1, 0182883855)]
a2billing.php|2: file:Class.RateEngine.php - line:120 - uniqueid:1294510042.2886 - [CC_asterisk_rate-engine - CALLERID : 621931939]
a2billing.php|2: file:Class.A2Billing.php - line:1006 - uniqueid:1294510042.2886 - 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)
-- Playing [b]'prepaid-dest-unreachable' [/b](escape_digits=#) (sample_offset 0)
a2billing.php|2: file:a2billing.php - line:568 - uniqueid:1294510042.2886 - ANSWER fct callingcard_ivr authorize:> -1
a2billing.php|2: file:a2billing.php - line:189 - uniqueid:1294510042.2886 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php|2: [CREDIT : 5.19200][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php|2: file:a2billing.php - line:392 - uniqueid:2294510042.29 - TARIFF ID -> 1
a2billing.php|2: file:Class.A2Billing.php - line:803 - uniqueid:2294510042.29 - use_dnid:0 && (!in_array:) && len_dnid:(10 || len_exten:10 ) && (try_num:1)
-- <SIP/78.46.42.74-00000b46> Playing [b]'prepaid-enter-dest'[/b] (language 'en')
a2billing.php|2: file:Class.A2Billing.php - line:815 - uniqueid:2294510042.29 - RES DTMF :
a2billing.php|2: file:Class.A2Billing.php - line:870 - uniqueid:2294510042.29 - [CALL 2 DID]
a2billing.php|2: file:Class.A2Billing.php - line:879 - uniqueid:2294510042.29 - 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='' 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|2: file:Class.A2Billing.php - line:885 - uniqueid:2294510042.29 - DESTINATION ::>
a2billing.php|2: file:Class.A2Billing.php - line:892 - uniqueid:2294510042.29 - RULES APPLY ON DESTINATION ::>
a2billing.php|2: file:a2billing.php - line:568 - uniqueid:2294510042.29 - ANSWER fct callingcard_ivr authorize:> -1
a2billing.php|2: file:a2billing.php - line:189 - uniqueid:2294510042.29 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php|2: [CREDIT : 5.19200][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php|2: file:a2billing.php - line:392 - uniqueid:3294510042.29 - TARIFF ID -> 1
a2billing.php|2: file:Class.A2Billing.php - line:803 - uniqueid:3294510042.29 - use_dnid:0 && (!in_array:) && len_dnid:(10 || len_exten:10 ) && (try_num:2)
-- <SIP/78.46.42.74-00000b46> Playing 'prepaid-enter-dest' (language 'en')
a2billing.php|2: file:Class.A2Billing.php - line:815 - uniqueid:3294510042.29 - RES DTMF : 44912260700
a2billing.php|2: file:Class.A2Billing.php - line:870 - uniqueid:3294510042.29 - [CALL 2 DID]
a2billing.php|2: file:Class.A2Billing.php - line:879 - uniqueid:3294510042.29 - 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='44912260700' 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|2: file:Class.A2Billing.php - line:885 - uniqueid:3294510042.29 - DESTINATION ::> 44912260700
a2billing.php|2: file:Class.A2Billing.php - line:892 - uniqueid:3294510042.29 - RULES APPLY ON DESTINATION ::> 44912260700
a2billing.php|2: file:Class.A2Billing.php - line:3412 - uniqueid:3294510042.29 - [SAVING DESTINATION FOR REDIAL: SQL: UPDATE cc_card SET redial = '44912260700' WHERE username='0974410186']:[result: 1]
a2billing.php|2: file:Class.RateEngine.php - line:98 - uniqueid:3294510042.29 - [CC_asterisk_rate-engine: (1, 44912260700)]
a2billing.php|2: file:Class.RateEngine.php - line:120 - uniqueid:3294510042.29 - [CC_asterisk_rate-engine - CALLERID : 621931939]
a2billing.php|2: file:Class.RateEngine.php - line:182 - uniqueid:3294510042.29 - [rate-engine: Count Total result 2]
a2billing.php|2: file:Class.RateEngine.php - line:267 - uniqueid:3294510042.29 - [CC_asterisk_rate-engine: Count Total result 1]
a2billing.php|2: file:Class.RateEngine.php - line:268 - uniqueid:3294510042.29 - [CC_asterisk_rate-engine: number_trunk 1]
a2billing.php|2: file:Class.A2Billing.php - line:1008 - uniqueid:3294510042.29 - OK - RESFINDRATE::> 1
a2billing.php|2: file:Class.RateEngine.php - line:282 - uniqueid:3294510042.29 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT (5.19200)]
a2billing.php|2: file:Class.RateEngine.php - line:288 - uniqueid:3294510042.29 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT: k=0 - res_calcultimeout:7788]
a2billing.php|2: file:Class.A2Billing.php - line:1020 - uniqueid:3294510042.29 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php|2: file:Class.A2Billing.php - line:1719 - uniqueid:3294510042.29 - TIMEOUT::> 7788 : minutes=129 - seconds=48
a2billing.php|2: file:a2billing.php - line:568 - uniqueid:3294510042.29 - ANSWER fct callingcard_ivr authorize:> 1
a2billing.php|2: file:Class.RateEngine.php - line:1234 - uniqueid:3294510042.29 - app_callingcard: Dialing 'SIP/Test-trunk/44912260700|60|HRrL(7788000:61000:30000)' with timeout of '7788'.
a2billing.php|2:
a2billing.php|2: file:Class.RateEngine.php - line:1253 - uniqueid:3294510042.29 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
a2billing.php|2: file:Class.RateEngine.php - line:1148 - uniqueid:3294510042.29 - [TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse+1 WHERE id_trunk='2']
-- AGI Script Executing Application: (DIAL) Options: (SIP/Test-trunk/44912260700|60|HRrL(7788000:61000:30000))
-- Limit Data for this call:
> timelimit = 7788000
> play_warning = 61000
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000
> start_sound =
> warning_sound = timeleft
> end_sound =
-- Called Test-trunk/44912260700
a2billing.php|2: file:Class.RateEngine.php - line:1262 - uniqueid:3294510042.29 - DIAL SIP/Test-trunk/44912260700|60|HRrL(7788000:61000:30000)
a2billing.php|2: file:Class.RateEngine.php - line:1148 - uniqueid:3294510042.29 - [TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse-1 WHERE id_trunk='2']
a2billing.php|2: file:Class.RateEngine.php - line:1415 - uniqueid:3294510042.29 - [USEDRATECARD=0]
a2billing.php|2: file:Class.RateEngine.php - line:953 - uniqueid:3294510042.29 - :[sessiontime:0 - id_cc_package_offer:-1 - package2apply:]
a2billing.php|2:
a2billing.php|2:
a2billing.php|2:
a2billing.php|2:
a2billing.php|2:
a2billing.php|2:
a2billing.php|2:
a2billing.php|2:
a2billing.php|2: file:Class.RateEngine.php - line:1036 - uniqueid:3294510042.29 - [CC_RATE_ENGINE_UPDATESYSTEM: usedratecard K=0 - (sessiontime=0 :: dialstatus=CANCEL :: buycost=0 :: cost= : signe_cc_call=-: signe=+)]
a2billing.php|2: file:Class.RateEngine.php - line:1098 - uniqueid:3294510042.29 - [CC_asterisk_stop : SQL: DONE : result=1]
a2billing.php|2: file:Class.RateEngine.php - line:1099 - uniqueid:3294510042.29 - [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 ('3294510042.29', 'SIP/78.46.42.74-00000b46', '64', '', SUBDATE(CURRENT_TIMESTAMP, INTERVAL 0 SECOND) , '0', '0', '44912260700', 4, now() , '-0', '1', '1', '19', '2', '621931939', '0', '0', NULL, '0182883855', '4491')]
a2billing.php|2: file:a2billing.php - line:584 - uniqueid:3294510042.29 - [a2billing account stop]
a2billing.php|2: file:Class.A2Billing.php - line:745 - uniqueid:3294510042.29 - [CARD STATUS UPDATE]
a2billing.php|2: file:Class.A2Billing.php - line:754 - uniqueid:3294510042.29 - [QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse-1, credit=credit+0.25 WHERE username='0974410186']
-- AGI Script a2billing.php completed, returning 0
I have configured the parameter agi_conf2 : use_dnid =No and in the file extension.conf :
Code:
[a2billing-did]
exten => 0182883855,1,Answer
exten => 0182883855,2,Wait(2)
exten => 0182883855,3,DeadAGI(a2billing.php|2)
exten => 0182883855,4,Wait(2)
exten => 0182883855,5,Hangup
I think that it has 2 value use_dnid = 1 (in the first time) and use_dnid = 0 (in the second time).
Can you help me to solve this problem ?
Thank in advance for all helps!
Ryan.