JT
2010-Feb-22 21:13 UTC
[asterisk-users] SIP Disconnects from Network - Asterisk Does not hangup
Good day all! I have an issue which has plagued me for quite sometime now...and as I close in on its cause, I have reached a point where additional info would be greatly helpful! 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 Smith
2010-Feb-22 22:24 UTC
[asterisk-users] SIP Disconnects from Network - Asterisk Does not hangup
On Mon, 2010-02-22 at 16:13 -0500, JT wrote:> Is this something that is fixed in an update? (Currently running 1.2)Yes... modern versions of Asterisk support SIP session timers. (If I remember correctly, Asterisk 1.2 could tear down a call based on lack of RTP data, but I never found it worked well enough in my tests to warrant its use.) -- Jared Smith Digium, Inc.
Kirill 'Big K' Katsnelson
2010-Feb-23 00:47 UTC
[asterisk-users] SIP Disconnects from Network - Asterisk Does not hangup
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