Re: [asterisk-users] Outbound call: caller gets no ringback on session progress
On 17.12.18 at 11:52 Joshua C. Colp wrote: > On Sun, Dec 16, 2018, at 4:43 AM, Michael Maier wrote: > > > >> >> 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 AsteriskISP - Invite > ... <---183 Session Progress w/o SDP <---180 Ringing <---180 Ringing ... Another 183 Situation with *P-Early-Media* header = Caller AsteriskISP - 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.98300 +0100 +++ b/res/res_pjsip_session.c 2019-01-21 02:34:06.23500 +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(), + pj_strbuf()); + + /* 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(), +pj_strbuf()); + return; + } AST_LIST_TRAVERSE(>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
Re: [asterisk-users] Outbound call: caller gets no ringback on session progress
On Sun, Dec 16, 2018, at 4:43 AM, Michael Maier wrote: > > 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. -- Joshua C. Colp Digium - A Sangoma Company | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org -- _ -- 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
Re: [asterisk-users] Outbound call: caller gets no ringback on session progress
On 12.12.18 at 19:43 Joshua C. Colp wrote: > On Wed, Dec 12, 2018, at 12:31 PM, Michael Maier wrote: > > > >> >> The problem: The extension doesn't create a ringback locally, because >> it most probably expects it to >> be sent by the callee - but the callee doesn't send anything (not >> surprising, because there has been >> no SDP). >> >> Or should Asterisk create the ringback (Asterisk doesn't send any RTP >> package)? Or should the phone >> create the ringback itself because there is a 180 Ringing (even if it >> contains SDP)? >> >> I'm wondering: Why does Asterisk create a 183 to the extension >> containing SDP if the callee didn't >> provide any SDP? >> >> >> So many questions ... . Could somebody please shine some light on it? >> What's going wrong here? > > The core doesn't communicate whether progress includes media or not, so the > PJSIP channel driver (and even chan_sip) assumes media is there. 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. Thanks, Michael -- _ -- 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
Re: [asterisk-users] Outbound call: caller gets no ringback on session progress
On 12.12.18 at 19:43 Joshua C. Colp wrote: > On Wed, Dec 12, 2018, at 12:31 PM, Michael Maier wrote: > > > >> >> The problem: The extension doesn't create a ringback locally, because >> it most probably expects it to >> be sent by the callee - but the callee doesn't send anything (not >> surprising, because there has been >> no SDP). >> >> Or should Asterisk create the ringback (Asterisk doesn't send any RTP >> package)? Or should the phone >> create the ringback itself because there is a 180 Ringing (even if it >> contains SDP)? >> >> I'm wondering: Why does Asterisk create a 183 to the extension >> containing SDP if the callee didn't >> provide any SDP? >> >> >> So many questions ... . Could somebody please shine some light on it? >> What's going wrong here? > > The core doesn't communicate whether progress includes media or not, so the > PJSIP channel driver (and even chan_sip) assumes media is there. What should > happen in chan_pjsip is that it would send inband ringing and not a 180 > Ringing with SDP, but that is not currently implemented and I don't think > this particularly interaction has come up before to cause it to be > implemented. I'd therefore suggest raising an issue[1] with the SIP trace. https://issues.asterisk.org/jira/browse/ASTERISK-28208 Thanks, Michael -- _ -- 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
Re: [asterisk-users] Outbound call: caller gets no ringback on session progress
On Wed, Dec 12, 2018, at 12:31 PM, Michael Maier wrote: > > The problem: The extension doesn't create a ringback locally, because > it most probably expects it to > be sent by the callee - but the callee doesn't send anything (not > surprising, because there has been > no SDP). > > Or should Asterisk create the ringback (Asterisk doesn't send any RTP > package)? Or should the phone > create the ringback itself because there is a 180 Ringing (even if it > contains SDP)? > > I'm wondering: Why does Asterisk create a 183 to the extension > containing SDP if the callee didn't > provide any SDP? > > > So many questions ... . Could somebody please shine some light on it? > What's going wrong here? The core doesn't communicate whether progress includes media or not, so the PJSIP channel driver (and even chan_sip) assumes media is there. What should happen in chan_pjsip is that it would send inband ringing and not a 180 Ringing with SDP, but that is not currently implemented and I don't think this particularly interaction has come up before to cause it to be implemented. I'd therefore suggest raising an issue[1] with the SIP trace. [1] https://issues.asterisk.org/jira -- Joshua C. Colp Digium - A Sangoma Company | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org -- _ -- 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
[asterisk-users] Outbound call: caller gets no ringback on session progress
Hello! An extension registered at asterisk 13.23 initiates an external call (pjsip). After the Invite, the callee (-> ISP) sends a 100 Trying 183 Session Progress (*without* SDP) Asterisk now sends to the extension: 183 Session Progress (*with* SDP) 183 Session Progress (*with* SDP) (really two times) The callee meanwhile sends 180 Ringing (*without* SDP) which is "forwarded" by Asterisk to the extension with 180 Ringing (*with* SDP) The problem: The extension doesn't create a ringback locally, because it most probably expects it to be sent by the callee - but the callee doesn't send anything (not surprising, because there has been no SDP). Or should Asterisk create the ringback (Asterisk doesn't send any RTP package)? Or should the phone create the ringback itself because there is a 180 Ringing (even if it contains SDP)? I'm wondering: Why does Asterisk create a 183 to the extension containing SDP if the callee didn't provide any SDP? So many questions ... . Could somebody please shine some light on it? What's going wrong here? Thanks, Michael -- _ -- 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