0
我正在設計一個撥號方案,如下所示。一切正常,但超時擴展不起作用。
autofallthrough=no
在extension.conf文件中進行了註釋。超時擴展名不能用星號標記11
subContinueOrNot是從名爲'study4'的上下文中調用的子例程。 dialplan在播放文件'notCallPress2'後等待10秒鐘,然後返回空值。無效的擴展工作正常。但它不會超時延長。
[subContinueOrNot]
exten=>s,1,Playback(study4/okCallPress1)
exten=>s,n,Playback(study4/notCallPress2)
exten=>s,n,Set(PARAM=)
exten=>s,n,WaitExten(10)
exten=>s,n(ret),Return(${PARAM})
exten=>1,1,Set(PARAM=1)
exten=>1,n,Goto(s,ret)
exten=>2,1,Set(PARAM=2)
exten=>2,n,Goto(s,ret)
exten=>i,1,GoSub(subInvalid,s,1(${INVALID_EXTEN}))
exten=>i,n,Set(PARAM=${GOSUB_RETVAL})
exten=>i,n,Goto(s,ret)
exten=>t,1,GoSub(subTimeout,s,1())
exten=>t,n,Set(PARAM=timeOut)
exten=>t,n,Goto(s,ret)
exten=>h,1,Goto(study4,h,1,)
以下是asterisk控制檯上的輸出。
-- <SIP/101-0000000f> Playing 'study4/weAsk.slin' (language 'en')
-- Executing [[email protected]:10] Gosub("SIP/101-0000000f", "subContinueOrNot,s,1()") in new stack
-- Executing [[email protected]:1] Playback("SIP/101-0000000f", "study4/okCallPress1") in new stack
-- <SIP/101-0000000f> Playing 'study4/okCallPress1.slin' (language 'en')
-- Executing [[email protected]:2] Playback("SIP/101-0000000f", "study4/notCallPress2") in new stack
-- <SIP/101-0000000f> Playing 'study4/notCallPress2.slin' (language 'en')
-- Executing [[email protected]:3] Set("SIP/101-0000000f", "PARAM=") in new stack
-- Executing [[email protected]:4] WaitExten("SIP/101-0000000f", "10") in new stack
-- Timeout on SIP/101-0000000f, continuing...
-- Executing [[email protected]:5] Return("SIP/101-0000000f", "") in new stack
-- Executing [[email protected]:11] Set("SIP/101-0000000f", "RV=") in new stack
-- Executing [[email protected]:12] GotoIf("SIP/101-0000000f", "0?s,cont1:s,stop1") in new stack
-- Goto (study4,s,13)
-- Executing [[email protected]:13] Playback("SIP/101-0000000f", "study4/callAgain2") in new stack
-- <SIP/101-0000000f> Playing 'study4/callAgain2.slin' (language 'en')
-- Executing [[email protected]:14] Goto("SIP/101-0000000f", "s,hang") in new stack
-- Goto (study4,s,57)
-- Executing [[email protected]:57] Hangup("SIP/101-0000000f", "") in new stack
== Spawn extension (study4, s, 57) exited non-zero on 'SIP/101-0000000f'
-- Executing [[email protected]:1] Verbose("SIP/101-0000000f", "2,"Hanging Up now"") in new stack
== "Hanging Up now"