[Home]

Summary:ASTERISK-23972: [patch]sip.conf progressinband=never does not mean 'never'.
Reporter:Steve Davies (one47)Labels:
Date Opened:2014-07-01 03:55:43Date Closed:2014-07-17 16:06:43
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:11.10.1 Frequency of
Occurrence
Related
Issues:
causesASTERISK-24835 Early Media Not working with Chan SIP and Asterisk 13
Environment:Attachments:( 0) inband_never_prevent_early_media
( 1) inband_never_prevent_early_media2
Description:My understanding of progressinband=never on a SIP device is that it will prevent inband progress if at all possible. The is a simple case I have found where this setting is defeated.

If any one of the dialled target trunks sends a progress message (IAX progress / ISDN progress / SIP 183 Progress) Then this is passed unfiltered to the calling channel, This causes SIP_PROGRESS_SENT to be set, and progressinband is inferred, allowing unwanted early audio.

This is causing a problem with my WebRTC testing as a '183 progress' followed by '200 OK' in a SIP conversation is converted to a 'pranswer' followed by an 'answer' in WebRTC terms and most WebRTC implementations do not yet handle that properly.
Comments:By: Steve Davies (one47) 2014-07-01 04:18:36.284-0500

Because this is a potentially significant behaviour change, it is perhaps not safe for a change in version 11, but I propose:

1) In sip_write(), do not pass the media unless we have either progressed beyond INV_EARLY_MEDIA, or we are in INV_EARLY_MEDIA state, and early media is both set-up and wanted. I have tested this quite widely in 1.6.x, 1.8.x and 11.x versions, as it helps resolve double-ringing on some buggy handsets.

2a) In sip_indicate(), if we see AST_CONTROL_PROGRESS, but SIP_PROG_INBAND_NEVER is set, send a 180 Ringing instead to avoid enabling early media.
2b) Alternatively, do we send the 183 but with no SDP??? Is that legal? If we send this, do we set SIP_PROGRESS_SENT, or SIP_RINGING? Given that SIP_PROGRESS_SENT implies early media...

Thoughts?

By: Steve Davies (one47) 2014-07-01 04:42:05.867-0500

Sample patch that should do what I described - Preventing early audio if progressinband=never is set, except where the SIP device says to do early media itself, which we cannot fight.

By: Steve Davies (one47) 2014-07-01 05:19:13.392-0500

Fix typo in previous patch/diff

By: Rusty Newton (rnewton) 2014-07-01 19:03:39.366-0500

{quote}
Thoughts?
{quote}
[~one47] Go ahead and put the patch up on review board, following the [Code Review|https://wiki.asterisk.org/wiki/display/AST/Code+Review] process. Then folks can comment on the patch overall or line by line.

Thanks!

By: Rusty Newton (rnewton) 2014-07-01 19:04:11.413-0500

Be sure to edit this issue and link the Reviewboard review URL when you have it.