why isnt' my speed-dial working properly? I have the following scenario:
From SIP-Friend:
Dial 15612071884 = properly dials number
Dial 1 (speed dial = 15612071884), prompts me to enter number to call
now dial 1 again ... and now it dials the speed-dial number.
Why doesn't it take it the first time ?? here's the CLI of me calling 1, and then it asks me for digits, again I press 1 and then it accepts it:
Verbosity is at least 3
-- Executing Answer("SIP/8800-0a260528", "") in new stack
-- Executing Wait("SIP/8800-0a260528", "1") in new stack
-- Executing DeadAGI("SIP/8800-0a260528", "a2billing.php") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php: line:58 - IDCONFIG : 1
a2billing.php:
a2billing.php: line:67 - MODE : standard
a2billing.php:
a2billing.php: A2Billing AGI internal configuration:
a2billing.php: Array
a2billing.php: (
a2billing.php: [debug] => 1
a2billing.php: [answer_call] => 1
a2billing.php: [logger_enable] => 1
a2billing.php: [log_file] => /tmp/a2billing.log
a2billing.php: [say_goodbye] =>
a2billing.php: [play_menulanguage] =>
a2billing.php: [force_language] =>
a2billing.php: [intro_prompt] =>
a2billing.php: [len_cardnumber] => 7
a2billing.php: [len_aliasnumber] => 7
a2billing.php: [len_voucher] => 7
a2billing.php: [min_credit_2call] => 0
a2billing.php: [min_duration_2bill] => 0
a2billing.php: [notenoughcredit_cardnumber] => 1
a2billing.php: [notenoughcredit_assign_newcardnumber_cid] => 1
a2billing.php: [use_dnid] => 1
a2billing.php: [no_auth_dnid] => Array
a2billing.php: (
a2billing.php: [0] => 2400
a2billing.php: [1] => 2300
a2billing.php: )
a2billing.php:
a2billing.php: [number_try] => 3
a2billing.php: [say_balance_after_auth] => 1
a2billing.php: [say_balance_after_call] =>
a2billing.php: [say_rateinitial] =>
a2billing.php: [say_timetocall] => 1
a2billing.php: [auto_setcallerid] => 1
a2billing.php: [force_callerid] => 15619671111
a2billing.php: [cid_sanitize] =>
a2billing.php: [cid_enable] =>
a2billing.php: [cid_askpincode_ifnot_callerid] => 1
a2billing.php: [cid_auto_create_card] =>
a2billing.php: [cid_auto_assign_card_to_cid] => 1
a2billing.php: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php: [cid_auto_create_card_credit] => 0
a2billing.php: [cid_auto_create_card_credit_limit] => 1000
a2billing.php: [cid_auto_create_card_tariffgroup] => 6
a2billing.php: [callerid_authentication_over_cardnumber] =>
a2billing.php: [sip_iax_friends] => 1
a2billing.php: [sip_iax_pstn_direct_call_prefix] => 8
a2billing.php: [sip_iax_pstn_direct_call] => 1
a2billing.php: [extracharge_did] => Array
a2billing.php: (
a2billing.php: [0] =>
a2billing.php: )
a2billing.php:
a2billing.php: [extracharge_fee] => Array
a2billing.php: (
a2billing.php: [0] =>
a2billing.php: )
a2billing.php:
a2billing.php: [dialcommand_param] => |60|HL(%timeout%:61000:30000)
a2billing.php: [dialcommand_param_sipiax_friend] => |30|HL(3600000:61000:30000)
a2billing.php: [switchdialcommand] =>
a2billing.php: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php: [send_reminder] => 1
a2billing.php: [record_call] =>
a2billing.php: [monitor_formatfile] => gsm
a2billing.php: [base_currency] => USD
a2billing.php: [agi_force_currency] =>
a2billing.php: [currency_association] => Array
a2billing.php: (
a2billing.php: [0] => usd:prepaid-dollar
a2billing.php: [1] => mxn:pesos
a2billing.php: [2] => eur:euro
a2billing.php: [3] => all:credit
a2billing.php: )
a2billing.php:
a2billing.php: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php: [currency_association_internal] => Array
a2billing.php: (
a2billing.php: [usd] => prepaid-dollar
a2billing.php: [mxn] => pesos
a2billing.php: [eur] => euro
a2billing.php: [all] => credit
a2billing.php: )
a2billing.php:
a2billing.php: )
a2billing.php:
a2billing.php: AGI Request:
a2billing.php: Array
a2billing.php: (
a2billing.php: [agi_request] => a2billing.php
a2billing.php: [agi_channel] => SIP/8800-0a260528
a2billing.php: [agi_language] => en
a2billing.php: [agi_type] => SIP
a2billing.php: [agi_uniqueid] => 1162956865.35
a2billing.php: [agi_callerid] => 8800
a2billing.php: [agi_calleridname] => unknown
a2billing.php: [agi_callingpres] => 0
a2billing.php: [agi_callingani2] => 0
a2billing.php: [agi_callington] => 0
a2billing.php: [agi_callingtns] => 0
a2billing.php: [agi_dnid] => 1
a2billing.php: [agi_rdnis] => unknown
a2billing.php: [agi_context] => a2billing
a2billing.php: [agi_extension] => 1
a2billing.php: [agi_priority] => 3
a2billing.php: [agi_enhanced] => 0.0
a2billing.php: [agi_accountcode] => 8800
a2billing.php: )
a2billing.php:
a2billing.php: line:490 get_agi_request_parameter = 8800 ; SIP/8800-0a260528 ; 1162956865.35 ; 8800 ; 1
a2billing.php: line:138 - [ANSWER CALL]
a2billing.php: line:1470 - 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 FROM cc_card LEFT JOIN cc_tariffgroup ON tariff=cc_tariffgroup.id WHERE username='8800'
a2billing.php: line:1473 - Array
a2billing.php: line:1760 - [A2Billing] SAY BALANCE (1)
a2billing.php:
-- Playing 'digits/90' (language 'en')
-- Playing 'digits/9' (language 'en')
-- Playing 'digits/90' (language 'en')
-- Playing 'digits/9' (language 'en')
a2billing.php: [EXEC SetCallerID : 15619671111]
a2billing.php: line:519 - UPDATE cc_card SET inuse=inuse+1 WHERE username='8800'
a2billing.php: line:166 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: line:170 - [CREDIT STATUS : 99.99500]
a2billing.php: line:171 - [CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: line:238 - RES sip_iax_pstndirect_call DTMF : -1
a2billing.php: line:252 - TRUNK - dnid : -1 (1)
a2billing.php: line:544 - 1 && && 2&& 0
-- Playing 'prepaid-enter-dest' (language 'en')
Here's where I press digit after that AGI asks me for destination
a2billing.php: line:551 - RES DTMF : 1
a2billing.php: line:559 - SELECT phone FROM cc_speeddial WHERE id_cc_card='18' AND speeddial='1'
a2billing.php: line:561 - Array
a2billing.php: line:563 - REDIAL : DESTINATION ::> 15612071884
a2billing.php: line:571 - DESTINATION ::> 15612071884
a2billing.php: line:573 - APPLY_RULES DESTINATION ::> 15612071884
a2billing.php: line:612 - OK - RESFINDRATE::> 1
a2billing.php: line:634 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php: line:651 - TIMEOUT::> 122400 : minutes=2040 - seconds=0
-- Playing 'digits/2' (language 'en')
-- Playing 'digits/thousand' (language 'en')
-- Playing 'digits/40' (language 'en')
a2billing.php: line:819 - app_callingcard: Dialing 'SIP/asterisk/0015612071884|60|HL(122400000:61000:30000)' with timeout of '122400'.
a2billing.php:
-- AGI Script Executing Application: (Dial) Options: (SIP/asterisk/0015612071884|60|HL(122400000:61000:30000))
-- Limit Data for this call:
-- - timelimit = 122400000
-- - play_warning = 61000
-- - play_to_caller= yes
-- - play_to_callee= no
-- - warning_freq = 30000
-- - start_sound = UNDEF
-- - warning_sound = timeleft
-- - end_sound = UNDEF
-- Called asterisk/0015612071884
-- SIP/asterisk-0a2919e8 is making progress passing it to SIP/8800-0a260528
-- SIP/asterisk-0a2919e8 answered SIP/8800-0a260528
a2billing.php: line:931 - -> dialstatus : ANSWER, answered time is 3
a2billing.php:
a2billing.php: line:706 - INSERT INTO cc_call (uniqueid,sessionid,username,nasipaddress,starttime,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost) VALUES ('1162956865.35', 'SIP/8800-0a260528', '8800', '', CURRENT_TIMESTAMP - INTERVAL 3 SECOND , '3', '15612071884', 'ANSWER', now(), '0.049', '+0.049', '', '', 'United States', '1', '1', '7975', '2', '8800', '0', '0.012', '0.012')
a2billing.php: line:729 - UPDATE cc_card SET credit= credit-0.049 , redial='15612071884' , lastuse=now(), nbused=nbused+1 WHERE username='8800'
a2billing.php: line:735 - UPDATE cc_trunk SET secondusedreal = secondusedreal + 3 WHERE id_trunk='2'
a2billing.php: line:739 - UPDATE cc_tariffplan SET secondusedreal = secondusedreal + 3 WHERE id='1'
a2billing.php: line:166 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: line:170 - [CREDIT STATUS : 99.946]
a2billing.php: line:171 - [CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: line:238 - RES sip_iax_pstndirect_call DTMF : -1
a2billing.php: line:252 - TRUNK - dnid : -1 (1)
a2billing.php: line:544 - 1 && && 2&& 1
-- Playing 'prepaid-enter-dest' (language 'en')
a2billing.php: line:551 - RES DTMF : -1
a2billing.php: line:571 - DESTINATION ::> -1
a2billing.php: line:573 - APPLY_RULES DESTINATION ::> -1
== Spawn extension (a2billing, 1, 3) exited non-zero on 'SIP/8800-0a260528'
-- Executing Answer("SIP/8800-0a260528", "") in new stack
== Spawn extension (a2billing, h, 1) exited non-zero on 'SIP/8800-0a260528'
Thanks for any help,
KK