News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Problem with multiple media descriptions in SDP

Started by OZOi, August 27, 2011, 09:32:11 PM

Previous topic - Next topic

OZOi

Session Description Protocol is defined by RFC 4566. In section 5.14 it states:
Quote
A session description may contain a number of media descriptions. Each media description starts with an "m=" field and is terminated by either the next "m=" field or by the end of the session description.

It looks like OBi100 doesn't support it. If INVITE contains SDP with more than one media description line (line starting with 'm=..') OBi100 can't accept call and sends this error back to SIP server:
Quote
SIP/2.0 488 Not Acceptable Here

Is there any chance, that it will be fixed in next firmware release?

OBiSupport

Hi OZOi,

There might be other reasons to cause this 488 Not Acceptable problem. What service provide that you configure to your OBi device? Does it happen on all your calls?

We like to gather more information to conclude what possibly causes this call failure, please contact Obihai support at support@obihai.com, and state your 9-digit OBi number also in the email,

Thank you,

OZOi

Hi OBiSupport,

It's hard to troubleshoot a problem, if you deal with a service provider. And particularly in case, when OBi device doesn't produce any log to analyze and debug (could you guys please offer that in future releases?). The better way is to watch the problem with a local SIP server. For this purposes I used FreeSWITCH SIP server. In this case I could see its log, change the way it communicates with SIP devices and see how OBi may react on that.

Here is SDP, that causes the problem in OBi:

   v=0
   o=FreeSWITCH 1314717535 1314717536 IN IP4 XX.XX.XX.XX
   s=FreeSWITCH
   c=IN IP4 XX.XX.XX.XX
   t=0 0
   m=audio 28926 RTP/AVP 98 99 101 13
   a=rtpmap:98 iLBC/8000
   a=fmtp:98 mode=30
   a=rtpmap:99 iLBC/8000
   a=fmtp:99 mode=30
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=ptime:30
   m=audio 28926 RTP/AVP 100 102 9 0 8 3 101 13
   a=rtpmap:100 G7221/32000
   a=fmtp:100 bitrate=48000
   a=rtpmap:102 G7221/16000
   a=fmtp:102 bitrate=32000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=ptime:20

As you may see, SDP contains two media description ('m=..') lines. When OBi gets INVITE request with this SDP, it returns the error back:

   SIP/2.0 488 Not Acceptable Here


FreeSWITCH developers have suggested to set a global option ('sdp_m_per_ptime=false') for obsolete or unsupported devices, which suppresses multiple media description lines from SDP. I've applied that option and it helped. With this option SDP looks like this:

   v=0
   o=FreeSWITCH 1314739775 1314739776 IN IP4 XX.XX.XX.XX
   s=FreeSWITCH
   c=IN IP4 XX.XX.XX.XX
   t=0 0
   m=audio 18380 RTP/AVP 98 99 100 102 9 0 8 3 101 13
   a=rtpmap:98 iLBC/8000
   a=fmtp:98 mode=30
   a=rtpmap:99 iLBC/8000
   a=fmtp:99 mode=30
   a=rtpmap:100 G7221/32000
   a=fmtp:100 bitrate=48000
   a=rtpmap:102 G7221/16000
   a=fmtp:102 bitrate=32000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=ptime:30

and OBi immediately starts accepting incoming calls. BTW, here is SDP offered by OBi in return:

   v=0
   o=- 34427465 1 IN IP4 XX.XX.XX.XX
   s=-
   c=IN IP4 XX.XX.XX.XX
   t=0 0
   m=audio 16666 RTP/AVP 0 101
   a=rtpmap:0 PCMU/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-15
   a=sendrecv
   a=ptime:20
   a=xg726bitorder:big-endian


While the option has helped, I'd rather don't use it as it's a global setting, affecting all other devices, connected to the SIP server.

And one more thing. The call was rejected not at the time, when non-acceptable INVITE message was received by OBi, but after ringing and at the time, when I tried to answer the call. I guess, if OBi has a problem with acceptance of the doomed call, it may notify about that a way earlier (even before ringing the phone - the call isn't going to be accepted anyway).