如果 Asterisk 中没有指定 Hangup() ,通道如何终止?
How is channel terminated if Hangup() is not specified in Asterisk?
考虑 asterisk/extensions.conf 中的以下示例:
exten => 1,1,AGI(my)
exten => 2,1,Answer()
same => n,Playback(tt-weasels)
same => n,Hangup()
是否需要在AGI()之后指定Hangup()?
如果改用这个extensions.conf,情况会有什么变化? (与之前不同的只是用了Answer()
)
exten => 1,1,Answer()
same => n,AGI(my)
exten => 2,1,Answer()
same => n,Playback(tt-weasels)
same => n,Hangup()
为了完整起见,这里是 agi 脚本:
#!/bin/sh
read; while [ "$REPLY" ]; do read; done
some-command
echo SET VARIABLE AGISTATUS SUCCESS; read
来自 extensions.conf.sample
; If autofallthrough is set, then if an extension runs out of
; things to do, it will terminate the call with BUSY, CONGESTION
; or HANGUP depending on Asterisk's best guess. This is the default.
;
; If autofallthrough is not set, then if an extension runs out of
; things to do, Asterisk will wait for a new extension to be dialed
; (this is the original behavior of Asterisk 1.0 and earlier).
;
;autofallthrough=no
考虑 asterisk/extensions.conf 中的以下示例:
exten => 1,1,AGI(my)
exten => 2,1,Answer()
same => n,Playback(tt-weasels)
same => n,Hangup()
是否需要在AGI()之后指定Hangup()?
如果改用这个extensions.conf,情况会有什么变化? (与之前不同的只是用了Answer()
)
exten => 1,1,Answer()
same => n,AGI(my)
exten => 2,1,Answer()
same => n,Playback(tt-weasels)
same => n,Hangup()
为了完整起见,这里是 agi 脚本:
#!/bin/sh
read; while [ "$REPLY" ]; do read; done
some-command
echo SET VARIABLE AGISTATUS SUCCESS; read
来自 extensions.conf.sample
; If autofallthrough is set, then if an extension runs out of
; things to do, it will terminate the call with BUSY, CONGESTION
; or HANGUP depending on Asterisk's best guess. This is the default.
;
; If autofallthrough is not set, then if an extension runs out of
; things to do, Asterisk will wait for a new extension to be dialed
; (this is the original behavior of Asterisk 1.0 and earlier).
;
;autofallthrough=no