I set 2 SIP extension 101 & 102 , and set canreinvite=no
when 101/102 call each other, Asterisk will stay in media path.
If i disable the internet of 101, Asterisk will detect that extension 101 is unreachable, but Asterisk will not hangup 102, so 102 will stay in media path until 102 hangup itself.
How can i configue the Asterisk to hangup the call when caller or callee is unreachable ???
how about setting a Dial timeout and follow that with a Hangup() command ?
if youāre unsure, post what you have here.
Dear baconbuttie
Dial(type/identifier, timeout, options, URL)
timeout option is used to wait for a Answer.
If the internet of callee is disabled after callee answered the call, timeout option is useless.
and I donāt want to use L(x[:y][:z]) to Limit the call in seconds.
Would you have any method to solve this problem??
thanks ^^
so when you say ādisable the internetā you mean disconnect the network connection to the host ? why would you do that ?
does Asterisk never hangup ? or is the timeout too long for your liking ? i canāt (be bothered to) test it here right now. and who stays on the phone when it becomes obvious youāve been cutoff ?
edit okay, i tried it by end-taskāing an idefisk session to a remote server ā¦ Asterisk detected the loss within about 30 seconds and hung up.
I disconnect the network connection of host, because i want to know asterisk will hang up the callee or not when caller abnormally disconnect the network connection.
extensions.conf :
exten=> _1XX,1,Dial(${EXTEN}|30)
exten=> _1XX,2,Hangup
sip.conf :
[101]
type=friend
username=101
secret=101
nat=yes
host=dynamic
canreinvite=no
I have try to disconnect the network connection of caller after callee pick up, Asterisk detected the loss(caller) within about 30 seconds, but does not hang up callee.
Test Enviroment :
OS : Fedora core 4
UAC : X-lite
Asterisk : 1.2.9
Would you mind tell me how to conigure asterisk to detected and hang up ?
thanks very much ^^