[asterisk-users] SIP Disconnects from Network - Asterisk Does not hangup

Kirill 'Big K' Katsnelson kkm at adaptiveai.com
Mon Feb 22 18:47:36 CST 2010


On 100222 1313, JT wrote:
> When a SIP device dials another SIP device...Asterisk connects the calls and
> displays the channel information.
> If one of those SIP devices hangs up, Asterisk receives the hangup notice
> and disconnects the call/channel.
> 
> 
> However - what does Asterisk do when the network cable is unplugged from one
> of the SIP devices...?!

Jared already mentioned SIP session timers, which are supported starting 
with 1.6. Here's my experience. While I am running 1.6, the software 
stack that is used for agent softphone (PJSIP) does not support the 
session timers. If the softphone crashes in a call, the call would get 
stuck exactly as you describe.

I am working around this problem by setting rtp timeouts in sip.conf:

[general]
rtptimeout=10
rtpholdtimeout=300

This means that if RTP flow stops while the agent is in the call, the 
call will be disconnected in 10 seconds. If the call was put on hold by 
the agent, it will be disconnected in 300 seconds. Your timeouts may vary.

The caveat here is that it is perfectly normal NOT to transmit any RTP 
data in case of long silence. This is why the SIP timers were introduced 
in the first place: there is no correct way to detect when the client is 
going away, as no activity is a good session state.

I am able to get away with the small timeout because I set the PJSIP 
client to always transmit RTP, by turning off voice activity detection 
feature (VAD). If you want to support that feature, set rtptimeout as 
high as for how long you allow absolute silence on the line without 
disconnecting it.

I do not know if these settings are available in 1.2 though.

  -kkm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5506 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20100222/3f806adb/attachment.bin 


More information about the asterisk-users mailing list