[Home]

Summary:ASTERISK-27994: PJSIP: Early media ringback not indicated after Progress()
Reporter:Gregory Massel (gmza)Labels:pjsip
Date Opened:2018-07-29 14:53:32Date Closed:2019-06-03 08:54:57
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:13.22.0 Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-28208 chan_pjsip: 183 without SDP followed by 180 does not result in media
Environment:Ubuntu 16.04 LTS, Asterisk 13.22.0, pjproject bundled 2.7.2Attachments:( 0) inband_progress_no.pcap
( 1) inband_progress_no.png
( 2) inband_progress_yes.pcap
( 3) inband_progress_yes.png
Description:chan_pjsip doesn't handle early media correctly in all instances.

Specifically, two issues:
1. When the endpoint is configured with "inband_progress = no" (default), chan_pjsip will act as chan_sip used to with progressinband=never, i.e. Even if a Progress() application is run, it will still NOT indicate ringing inband.

e.g. Something like:
exten => s,1,Progress()
same => n,Playtones(!400*33/40,!0/40,!400*33/40,!0/40,!400*33/40,!0/500)
same => n,Wait(0.25)
same => n,StopPlayTones
same => n,Dial(PJSIP/endpoint)

If the dialled endpoint indicates ringing, the calling endpoint hears dead silence (after the initial tones). This is incorrect. The channel driver must provide inband ringing (despite inband_progress=no setting) because the Progress() application has been run and the media stream opened.

chan_sip handles this correctly (if progressinband=no is set); chan_pjsip doesn't.

2. When the endpoint is configured with "inband_progress = yes" and the same dialplan is used, pjsip will issue TWO 183 messages to the calling endpoint, one when the Progress application is run and then a second when it receives a 180 from the dialled endpoint. This is also incorrect because, once an intial 183 has been sent and the media stream is open, no further 183 message should be sent.
Comments:By: Asterisk Team (asteriskteam) 2018-07-29 14:53:33.567-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Gregory Massel (gmza) 2018-07-29 14:59:58.750-0500

sip traces and pcaps

By: Alex Hermann (gaaf) 2019-01-04 09:49:55.420-0600

I don't think inband ringing should ever be generated when inband_progress=no. In this case Asterisk should only forward RTP, not generate it, so it complies with the best practices of RFC3960. I think that is the current behavior of this setting.

I think Asterisk could really use an option to generate inband ringing to the caller after receiving a 180 from the callee as long as the callee doesn't send any RTP itself. As soon as the callee start sending RTP, Asterisk should forward that instead. This would make Asterisk implement the RFC3960 best practices on behalf of broken callers that don't generate ringback tones themselves.


By: Friendly Automation (friendly-automation) 2019-06-03 08:54:58.768-0500

Change 11385 merged by Friendly Automation:
pjsip: replace 180 by 183 if SDP negotiation has completed

[https://gerrit.asterisk.org/c/asterisk/+/11385|https://gerrit.asterisk.org/c/asterisk/+/11385]

By: Friendly Automation (friendly-automation) 2019-06-03 08:58:57.464-0500

Change 11379 merged by Friendly Automation:
pjsip: replace 180 by 183 if SDP negotiation has completed

[https://gerrit.asterisk.org/c/asterisk/+/11379|https://gerrit.asterisk.org/c/asterisk/+/11379]

By: Friendly Automation (friendly-automation) 2019-06-03 09:38:52.209-0500

Change 11386 merged by George Joseph:
pjsip: replace 180 by 183 if SDP negotiation has completed

[https://gerrit.asterisk.org/c/asterisk/+/11386|https://gerrit.asterisk.org/c/asterisk/+/11386]