[Home]

Summary:ASTERISK-13671: BYE to 408 Request Timeout
Reporter:Chris Maciejewski (chris-mac)Labels:
Date Opened:2009-03-01 06:59:49.000-0600Date Closed:2009-07-24 13:32:57
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 408.log
( 1) 408-flow.html
( 2) extensions.conf
( 3) sip.conf
Description:Noticed * is generating BYE request to "408 Request Timeout" response.
I don't think this is correct, as 4xx,5xx and 6xx responses to INVITE should
be only acknowledged with ACK (RFC3261 - 13.2.2.3).

Proxy                                 Asterisk
|<-----------------------(sdp) INVITE F8<|
|>F9 100 Giving a try ------------------>|
|>F13 408 Request Timeout -------------->|
|<------------------------------ ACK F14<|
|<------------------------------ BYE F15<|  <= THIS SHOULD NOT BE HERE
|>F18 404 Not here --------------------->|

Please see 408-flow.html attached for detailed call flow.

How to reproduce:
1. You will need a SIP proxy (eg. OpenSER)
2. Edit sip.conf attached and modify <ASTERISK_IP>, <PROXY_IP>, <DEAD_HOST>
3. Start * with sip.conf and extensions.conf attached.
4. Dial into * with any SIP phone

Comments:By: Ryan Bullock (rrb3942) 2009-03-18 13:47:07

I am noticing the same behavior in Asterisk 1.4.23.1 as well.

By: Shivaprakash Dasihally Mallikarjunaiah (shivaprakash) 2009-03-30 08:21:17

I am noticing the same behaviour for 487 response also
Asterisk sends ACK for 487 and immediately sends BYE

Accoring to RFC, an UAS may send BYE to terminate an early dialog also. But here, as only 100 Trying is received, and as it doesnt create an early dialog, it seems to be a bug

Adding
 sip_alreadygone(p);  in chan_sip.c
in the function handle_response() under the case 408 and 487 solves the problem.

By: Digium Subversion (svnbot) 2009-07-24 13:26:56

Repository: asterisk
Revision: 208587

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r208587 | mmichelson | 2009-07-24 13:26:56 -0500 (Fri, 24 Jul 2009) | 10 lines

Only send a BYE when hanging up a channel that is up.

For cases where Asterisk sends an INVITE and receives a non 2XX final
response, Asterisk would follow the INVITE transaction by immediately
sending a BYE, which was unnecessary.

(closes issue ASTERISK-13671)
Reported by: chris-mac


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=208587

By: Digium Subversion (svnbot) 2009-07-24 13:31:10

Repository: asterisk
Revision: 208588

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r208588 | mmichelson | 2009-07-24 13:31:10 -0500 (Fri, 24 Jul 2009) | 16 lines

Merged revisions 208587 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r208587 | mmichelson | 2009-07-24 13:26:50 -0500 (Fri, 24 Jul 2009) | 10 lines
 
 Only send a BYE when hanging up a channel that is up.
 
 For cases where Asterisk sends an INVITE and receives a non 2XX final
 response, Asterisk would follow the INVITE transaction by immediately
 sending a BYE, which was unnecessary.
 
 (closes issue ASTERISK-13671)
 Reported by: chris-mac
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=208588

By: Digium Subversion (svnbot) 2009-07-24 13:31:41

Repository: asterisk
Revision: 208589

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_sip.c

------------------------------------------------------------------------
r208589 | mmichelson | 2009-07-24 13:31:41 -0500 (Fri, 24 Jul 2009) | 23 lines

Merged revisions 208588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r208588 | mmichelson | 2009-07-24 13:31:04 -0500 (Fri, 24 Jul 2009) | 16 lines
 
 Merged revisions 208587 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r208587 | mmichelson | 2009-07-24 13:26:50 -0500 (Fri, 24 Jul 2009) | 10 lines
   
   Only send a BYE when hanging up a channel that is up.
   
   For cases where Asterisk sends an INVITE and receives a non 2XX final
   response, Asterisk would follow the INVITE transaction by immediately
   sending a BYE, which was unnecessary.
   
   (closes issue ASTERISK-13671)
   Reported by: chris-mac
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=208589

By: Digium Subversion (svnbot) 2009-07-24 13:32:32

Repository: asterisk
Revision: 208590

_U  branches/1.6.1/
U   branches/1.6.1/channels/chan_sip.c

------------------------------------------------------------------------
r208590 | mmichelson | 2009-07-24 13:32:32 -0500 (Fri, 24 Jul 2009) | 23 lines

Merged revisions 208588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r208588 | mmichelson | 2009-07-24 13:31:04 -0500 (Fri, 24 Jul 2009) | 16 lines
 
 Merged revisions 208587 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r208587 | mmichelson | 2009-07-24 13:26:50 -0500 (Fri, 24 Jul 2009) | 10 lines
   
   Only send a BYE when hanging up a channel that is up.
   
   For cases where Asterisk sends an INVITE and receives a non 2XX final
   response, Asterisk would follow the INVITE transaction by immediately
   sending a BYE, which was unnecessary.
   
   (closes issue ASTERISK-13671)
   Reported by: chris-mac
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=208590

By: Digium Subversion (svnbot) 2009-07-24 13:32:57

Repository: asterisk
Revision: 208591

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r208591 | mmichelson | 2009-07-24 13:32:56 -0500 (Fri, 24 Jul 2009) | 23 lines

Merged revisions 208588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r208588 | mmichelson | 2009-07-24 13:31:04 -0500 (Fri, 24 Jul 2009) | 16 lines
 
 Merged revisions 208587 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r208587 | mmichelson | 2009-07-24 13:26:50 -0500 (Fri, 24 Jul 2009) | 10 lines
   
   Only send a BYE when hanging up a channel that is up.
   
   For cases where Asterisk sends an INVITE and receives a non 2XX final
   response, Asterisk would follow the INVITE transaction by immediately
   sending a BYE, which was unnecessary.
   
   (closes issue ASTERISK-13671)
   Reported by: chris-mac
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=208591