Bug #4001

osmo-mgw: Make sure non-sdp MGCP text is handled case-insensitive

Added by pespin over 1 year ago. Updated over 1 year ago.

Target version:
Start date:
Due date:
% Done:


Spec Reference:


MGCP RFC 3435 ( states almost all text has to be handled in a case-insensitive way, except SDP parts:

Commands and responses SHALL be encoded in accordance with the grammar, which, per RFC 2234, is case-insensitive except for the SDP part.

And even more explicitly in 3.2 section:

Unless otherwise noted or dictated by other referenced standards (e.g., SDP), each component in the command header is case insensitive.  This goes for verbs as well as parameters and values, and hence all comparisons MUST treat upper and lower case as well as combinations of these as being equal.

However, grepping for "casecmp" (str{n}casecmp) in osmo-mgw shows almost no use:

$ ag casecmp
287:    if (strcasecmp(codec_name, codec->subtype_name) == 0)

While grepping for str{n}cmp shows a lot more use. That means we need o switch to str{n}casecmp in some of them.


#1 Updated by pespin over 1 year ago

Pushed this one to gerrit to fix the issue for X-Osmux: mgw, mgcp-li: Handle X-Osmux param name as case insensitive

other params/verbs/etc. still need to be fixed too.

#2 Updated by pespin over 1 year ago

Similar fix provided in osmo-bsc_nat from openbsc.git: mgcp: Handle CI ad X-Osmux param name as case insensitive

#3 Updated by pespin over 1 year ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 90

Provided several patches for osmo-mgw with all case-sensitive parts I found that apply (no SDP):

91b971fd mgw: Allow receiving uppercase noanswer keyword
e4aaa176 mgw: Allow receiving lowercase X-Osmo-Ign Callid field
cd671a87 mgw: Allow receiving lowercase MGCP header keyword
c117155a mgw: Make check of duplicated LCO fields case insensitive
a1d5df1c mgw: Support receiving lowercase LCO codec
26dd0b49 mgw: Support receiving uppercase connection mode
2902f8e0 mgcp-cli: Support uppercase header parameters
938d3ae4 mgw: Support uppercase header parameters
0dfd31be mgw: Support uppercase LCO options

Once merged, we can close the ticket.

#4 Updated by pespin over 1 year ago

  • Status changed from Feedback to Resolved
  • % Done changed from 90 to 100

Merged, closing.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)