[OpenSER-Devel] Wrong body if "subst_body()" is used before/after "use_media_proxy()"

Iñaki Baz Castillo ibc at in.ilimit.es
Tue May 20 18:44:27 CEST 2008


Hi, I've a big problem. My carrier uses a softswitch (Nortel CS2K) that has a 
big:

SDP's generated by Nortel and sent to my OpenSer are RFC non compliant since 
the SDP lines are separated by LF (\n) instead of CRLF (\r\n) as it's 
mandatory. Nortel has applied a dirty patch that just adds CRLF to the final 
line of the SDP but no the others.

My Twinkle doesn't accept the call because it has an incorrect SDP (expected 
behaviour, sure) so I need to "fix" this SDP in OpenSer. For that I do:

  subst_body("/([^\r])\n/\1\r\n/g");

It works properly, but not in my case since I also use MediaProxy so I run:

  subst_body("/([^\r])\n/\1\r\n/g");
  use_media_proxy();     -> It set IP 88.99.0.10


The original SDP is this (just important lines):

  c=IN IP4 66.15.6.153\n
  t=0 0\n
  m=audio 42236 RTP/AVP 18 8 0 101\n


After OpenSer processing this is the new and "semi"-fixed SDP:

  c=IN IP4 88.99.0.103\r\n     <---- NOTE THE .103 instead of .10 !!!!!!
  t=0 0\r\n
  m=audio 9000 RTP/AVP 18 8 0 101\r\n


As you can see, the new IP is wrong, it should be 88.99.0.10.
If I don't do "subst_body" then the IP is correct.
Note also that modified "m" line (port 42236 -> 9000) is correct. It seems 
just a problem with the IP ("c" line).


A workaraound fot this? thanks a lot.


-- 
Iñaki Baz Castillo
ibc at in.ilimit.es



More information about the Devel mailing list