On 17.12.18 at 11:52 Joshua C. Colp wrote:
> On Sun, Dec 16, 2018, at 4:43 AM, Michael Maier wrote:
> 
> <snip>
> 
>>
>> Another question: is there any use case for 183 Session Progress w/o 
>> SDP? IOW: Is a 183 Session
>> Progress just a bug of the ISP? If so, problem could be solved by 
>> dropping each 183 package w/o SDP.
> 
> Nothing really comes to mind that would be accomplished by sending a 183 
> without SDP but there may be cases on the internet.
> 

As long as [1] aren't fixed, the attached patch could be used as workaround. 
This workaround drops 183 Session Progress w/o SDP.

The attached workaround assumes, that 183 Session Progress w/o SDP is followed 
by 180 Ringing. If there isn't any 180 Ringing following, this patch won't fix 
anything. In
the latter case, it would be necessary to generate inband ringing by asterisk 
or send 180 Ringing instead of the broken 183 Session Progress.

The workaround applies to 13.24.1.



Caller          Asterisk                                ISP
-----------------------------------------------------------------------------
Invite -------->
...
                        <-----------------------        183 Session Progress 
w/o SDP
                        <-----------------------        180 Ringing
<---------------180 Ringing
...



Another 183 Situation with *P-Early-Media* header
=================================================

Caller          Asterisk                        ISP
-----------------------------------------------------------------------------
Invite -------->
...
                    <--------------------------         183 Session Progress w 
SDP / P-Early-Media:sendonly
<-------------  183 Session Progress w SDP sendrecv
<-------------  RTP
--------------> RTP
                    <--------------------------         180 Session Progress 
w/o SDP / P-Early-Media:sendonly
                    <--------------------------         RTP (inband ringback)
...

=> the sendonly-value of P-Early-Media seems to be ignored. Asterisk doesn't 
apply the sendonly value of the P-Early-Media header of the 183 Session 
Progress package
received from the ISP to the 183 Session Progress sent to the caller.
But this is not a problem, as the ringback can still be transferred.


Regards,
Michael


[1] https://issues.asterisk.org/jira/browse/ASTERISK-28208, 
https://issues.asterisk.org/jira/browse/ASTERISK-27994
--- a/res/res_pjsip_session.c	2019-01-20 16:37:16.983000000 +0100
+++ b/res/res_pjsip_session.c	2019-01-21 02:34:06.235000000 +0100
@@ -2485,6 +2485,17 @@
 {
 	struct ast_sip_session_supplement *supplement;
 	struct pjsip_status_line status = rdata->msg_info.msg->line.status;
+	pjsip_rdata_sdp_info *sdp_info;
+
+	ast_debug(3, "Response is %d %.*s\n", status.code, (int) pj_strlen(&status.reason),
+			pj_strbuf(&status.reason));
+
+	/* Michael: ignore 183 Session Progress if there is no MEDIA in package */
+	if (status.code == 183 && (! (sdp_info = pjsip_rdata_get_sdp_info(rdata)) || sdp_info->sdp_err != PJ_SUCCESS || ! sdp_info->sdp)) {
+		ast_debug(3, "Ignore response %d %.*s because of missing SDP\n", status.code, (int) pj_strlen(&status.reason),
+				pj_strbuf(&status.reason));
+		return;
+	}
 
 	AST_LIST_TRAVERSE(&session->supplements, supplement, next) {
 		if (!(supplement->response_priority & response_priority)) {
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to