[Home]

Summary:ASTERISK-14412: [patch] Asterisk cannot handle SIP 183 "Session Progress" if no SDP is contained in it
Reporter:Florian Floimair (ffloimair)Labels:
Date Opened:2009-07-02 02:19:38Date Closed:2009-07-23 10:48:37
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
causesASTERISK-21673 Asterisk conversion of 183 without SDP to 180 breaks interoperability with Microsoft Lync
Environment:Attachments:( 0) 15442.patch
( 1) example.pcap
Description:We have a trunk to an Alcatel system running and they send "183 Session Progress" SIP messages without SDP. However Asterisk cannot handle these messages if they do not contain an SDP payload.

Alcatel refers to the SIP RFC3261 standard which states:
"The 183 (Session Progress) response is used to convey information
about the progress of the call that is not otherwise classified.  The
Reason-Phrase, header fields, or message body MAY be used to convey
more details about the call progress."

The emphasis lies on MAY in the last sentence, so to be compliant with the SIP standard Asterisk should be able to handle 183 messages without any SDP in the message body.

****** ADDITIONAL INFORMATION ******

In the code (Asterisk 1.4.25.1) in line 12518 to 12527 i found the following:

/* Ignore 183 Session progress without SDP */
if (find_sdp(req)) {
if (p->invitestate != INV_CANCELLED)
p->invitestate = INV_EARLY_MEDIA;
res = process_sdp(p, req);
if (!ast_test_flag(req, SIP_PKT_IGNORE) && p->owner) {
/* Queue a progress frame */
ast_queue_control(p->owner, AST_CONTROL_PROGRESS);
}
}

So it is obvious that 183 messages without SDP are not handled at all and simply ignored.
Comments:By: Thomas Karl (tkarl) 2009-07-09 12:53:02

I've also set up a SIP trunk to an Alcatel PBX one month ago and I have the same problem here. This is still an open point in this project so I found this issue here.
Alcatel doesn't want to implement SDP for this status message, because it is not required by the RFC.
Any help on this issue would be appreciated as I have the greatest difficulty in arguing that.
Thank you very much in advance.

By: Mark Michelson (mmichelson) 2009-07-10 14:58:39

All right. This seems like something that shouldn't be too difficult to get fixed. The problem is that we need to define what we should do instead of just ignoring the message.

To do that, I'll need to know what the Alcatel is attempting to convey by sending a 183 with no SDP. Is it using this code as an alternative to a 180 response?

Also, is this actually causing a crash? You filed this issue with the "crash" severity, but I can't see how this is causing a crash.

By: Thomas Karl (tkarl) 2009-07-10 15:08:41

Thank you very much for this first feedback.
In my project the Alcatel PBX provides a link to one public PSTN interface. When we call a mobile phone through this interface the want to indicate that the call should not be canceled within the standard 4 seconds (T2 timer? I'm really not a SIP expert…).
The asterisk does not crash in my case, but the call is canceled every time so it is not possible to reach any mobile phone.
I hope I explained it correctly. If you need more information I can try to get them from my Alcatel partner.



By: Mark Michelson (mmichelson) 2009-07-10 15:32:47

I think I see what's going on. I had a discussion about this sort of thing earlier today with some people.

So the 183 is being used as a "watchdog" in a way. It's not actually trying to convey the presence of early media. It just is a way of saying "I'm still alive, don't cancel the call."

Just so I can be sure of its usage, would you mind uploading a sip debug from Asterisk during one of these failed calls? Thanks!

By: Thomas Karl (tkarl) 2009-07-11 02:34:27

Unfortunately I cannot organize a debug log quickly because my project is in France and I'm in Austria and my customer will not give me remote access, but I've a Wireshark trace of such a failed call.

I will upload it on Monday, when I'm in my office again.

By: Thomas Karl (tkarl) 2009-07-13 00:50:29

I've now attached an example where Alcatel sends the 183 message without SDP.
10.144.21.42 is an Asterisk and 10.66.11.11 is the Alcatel PBX.
I hope with this information you can go on.
Thanks in advance.

By: Mark Michelson (mmichelson) 2009-07-13 09:05:23

Thanks for the quick feedback. I'll have a look and post a patch as soon as I have something to give.

By: Mark Michelson (mmichelson) 2009-07-13 09:18:19

Based on the .pcap file attached here, I'm going to assume that the Alcatel is using a 183 with no SDP with the same semantic meaning as a 180 Ringing response. I have attached a patch, 15442.patch, which treats the response this way. Please give it a try and let me know if it works correctly. Thanks!



By: Thomas Karl (tkarl) 2009-07-16 04:15:35

I will give it a try and will report the results.
Thank you very much.

By: Florian Floimair (ffloimair) 2009-07-20 07:35:31

Aah, great!

I came back from a two-week vacation today. Good to see that this issue is making progress.
I will have a look into this as well, but I'm positive about this.

I apologize for originally filing this as "crash". This is due to the fact that I have set the language to "german" for this issue-interface and it seems there was something not translated correctly. I have now switched back to english language so this cannot happen again.

By: Florian Floimair (ffloimair) 2009-07-23 02:28:36

That did the trick. Alcatel seems satisfied now.
I think you can close this issue, unless tkarl still has issues (which I doubt).

Thanks a lot!

By: Thomas Karl (tkarl) 2009-07-23 10:20:15

That worked for me too.
Thank you very much!

By: Digium Subversion (svnbot) 2009-07-23 10:43:57

Repository: asterisk
Revision: 208262

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r208262 | mmichelson | 2009-07-23 10:43:07 -0500 (Thu, 23 Jul 2009) | 8 lines

Properly handle 183 responses which do not contain an SDP.

(closes issue ASTERISK-14412)
Reported by: ffloimair
Patches:
     15442.patch uploaded by mmichelson (license 60)
Tested by: tkarl, ffloimair

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

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

By: Digium Subversion (svnbot) 2009-07-23 10:46:39

Repository: asterisk
Revision: 208263

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r208263 | mmichelson | 2009-07-23 10:46:39 -0500 (Thu, 23 Jul 2009) | 15 lines

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

........
 r208262 | mmichelson | 2009-07-23 10:43:07 -0500 (Thu, 23 Jul 2009) | 8 lines
 
 Properly handle 183 responses which do not contain an SDP.
 
 (closes issue ASTERISK-14412)
 Reported by: ffloimair
 Patches:
       15442.patch uploaded by mmichelson (license 60)
 Tested by: tkarl, ffloimair
........

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

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

By: Digium Subversion (svnbot) 2009-07-23 10:47:41

Repository: asterisk
Revision: 208264

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

------------------------------------------------------------------------
r208264 | mmichelson | 2009-07-23 10:47:41 -0500 (Thu, 23 Jul 2009) | 22 lines

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

................
 r208263 | mmichelson | 2009-07-23 10:46:34 -0500 (Thu, 23 Jul 2009) | 15 lines
 
 Merged revisions 208262 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r208262 | mmichelson | 2009-07-23 10:43:07 -0500 (Thu, 23 Jul 2009) | 8 lines
   
   Properly handle 183 responses which do not contain an SDP.
   
   (closes issue ASTERISK-14412)
   Reported by: ffloimair
   Patches:
         15442.patch uploaded by mmichelson (license 60)
   Tested by: tkarl, ffloimair
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-07-23 10:48:15

Repository: asterisk
Revision: 208265

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

------------------------------------------------------------------------
r208265 | mmichelson | 2009-07-23 10:48:15 -0500 (Thu, 23 Jul 2009) | 22 lines

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

................
 r208263 | mmichelson | 2009-07-23 10:46:34 -0500 (Thu, 23 Jul 2009) | 15 lines
 
 Merged revisions 208262 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r208262 | mmichelson | 2009-07-23 10:43:07 -0500 (Thu, 23 Jul 2009) | 8 lines
   
   Properly handle 183 responses which do not contain an SDP.
   
   (closes issue ASTERISK-14412)
   Reported by: ffloimair
   Patches:
         15442.patch uploaded by mmichelson (license 60)
   Tested by: tkarl, ffloimair
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-07-23 10:48:36

Repository: asterisk
Revision: 208266

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

------------------------------------------------------------------------
r208266 | mmichelson | 2009-07-23 10:48:36 -0500 (Thu, 23 Jul 2009) | 22 lines

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

................
 r208263 | mmichelson | 2009-07-23 10:46:34 -0500 (Thu, 23 Jul 2009) | 15 lines
 
 Merged revisions 208262 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r208262 | mmichelson | 2009-07-23 10:43:07 -0500 (Thu, 23 Jul 2009) | 8 lines
   
   Properly handle 183 responses which do not contain an SDP.
   
   (closes issue ASTERISK-14412)
   Reported by: ffloimair
   Patches:
         15442.patch uploaded by mmichelson (license 60)
   Tested by: tkarl, ffloimair
 ........
................

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

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

By: Dan Lukes (dan_lukes) 2011-12-08 06:02:36.738-0600

This patch breaks interoperability with other systems when 183 with SDP is followed by another 183 without SDP. For mode information see [ASTERISK-18987|https://issues.asterisk.org/jira/browse/ASTERISK-18987]