Summary:ASTERISK-05071: progressinband fix
Reporter:adomjan (adomjan)Labels:
Date Opened:2005-09-13 08:32:34Date Closed:2008-01-15 15:48:26.000-0600
Versions:Frequency of
Environment:Attachments:( 0) progressinband2.patch
( 1) progressinband3.patch
Description:This patch fixes 2 bugs:
- progressinband config parse bug
- if progressinband=yes don't send 180 Ringing before 183 Session Progress when asterisk generates ringtone
Comments:By: adomjan (adomjan) 2005-09-13 08:50:55

I read more on google I'm not sure which is the right behavior about 180 and 183
When asterisk gets progress indication from pri does not send 180 ringing to sip peers. According the RFC 3312 have to send 183 Session Progress and 180 Ringing after the 183. I found a cisco documentation which writes only 183...


By: Kevin P. Fleming (kpfleming) 2005-09-13 20:47:49

The 'parsing' issue you are referring to is not valid, since NEVER is the default we don't need to explicitly set the value to that.

As far as the 180/183 processing is concerned... the current situation has been arrived at after a great deal of interoperability testing and dealing with phones and gateways that do things in different ways. Unless you can point to a specific problem experienced by a device because of the way we are doing it now, we are not going to change our behavior.

By: adomjan (adomjan) 2005-09-14 02:49:46

Just set progressinband=yes
in sip conf and check it with sip show settings...

 Progress inband:        No

so without this patch you will never set it to yes!

By: adomjan (adomjan) 2005-09-14 02:58:38

if (strcasecmp(v->value, "never")) /* it's true if not never eg yes, no...*/
                       ast_set_flag(flags, SIP_PROG_INBAND_NO);
               else if (ast_true(v->value)) /* we jump here, if never.. */
                       ast_set_flag(flags, SIP_PROG_INBAND_YES); /* so never execute it*/

if the never is te default the correct fix is:

if (strcasecmp(v->value, "never")&&!ast_true(v->value))
      ast_set_flag(flags, SIP_PROG_INBAND_NO);
else if (ast_true(v->value))
      ast_set_flag(flags, SIP_PROG_INBAND_YES);

By the way how can you test the 180/183 if you never can set the SIP_PROG_INBAND_YES? :)
I meet this situation when I set SIP_PROG_INBAND_YES and I call another sip phone.
If I call pstn asterisk sends only 183 to the sip phone.
I'm testing a thomson cable modem sip mta. If the mta get 180 it's starting generate ringing tone, and after 183 mix it with the session progress.
According the rfc have to send 183,180 so I'm not sure the 180,183 is ok...

By: darkskiez (darkskiez) 2005-09-14 14:10:53

Just to muddy the water, I'm not in a position to test this patch at the
moment, but I've had to disable in-band progress on my cisco 79x0's with SIP firmware 7.5, they play the inband audio but add their own ringing over the top of it, which is annoying. I suspect this patch may help.

By: Kevin P. Fleming (kpfleming) 2005-09-14 18:47:34

Doh! You are clearly correct, I misread both the existing code and your patch :-)

I've put a fix into CVS HEAD that is simpler than your patch but should accomplish the same thing.

By: Digium Subversion (svnbot) 2008-01-15 15:48:26.000-0600

Repository: asterisk
Revision: 6604

U   trunk/channels/chan_sip.c

r6604 | kpfleming | 2008-01-15 15:48:25 -0600 (Tue, 15 Jan 2008) | 2 lines

correct 'progressinband' parsing (issue ASTERISK-5071, different fix)