简体   繁体   中英

Asterisk - setup hangup after seconds dialplan otpion S(sec)

When you dial 876, asterisk pbx start a call, send some dtmf code but doesn't close the call after 2 seconds. The call need to be closed by the user.

[myplan]
exten => _876,1,NoOp(Now should call 207,3 seconds for answer timeout, send DTMF, close the call)
exten => _876,n,Dial(SIP/207,3,D(ww#2334#),S(2))
exten => _876,n,Hangup()

From the manual:

S(x) Hangs up the call x seconds after the called party has answered the call.

Asterisk 16.13.0 

What am I missing?

I think # mean "wait 1 second" so overal time is over 2 second. So "S" should work after D ends.

Try following:

[myplan]
exten => _876,1,NoOp(Now should call 207,3 seconds for answer timeout, send DTMF, close the call)
exten => _876,n,Set(TIMEOUT(absolute)=2)
exten => _876,n,Dial(SIP/207,3,D(ww#2334#)S(2))
exten => _876,n,Hangup()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM