[reSIProcate] Problems with parsing parameters in sip header

Markus Eriksson markus.eriksson at aastra.com
Thu May 22 08:19:14 CDT 2008


Hi,

I have a problem with parsing a sip message that have a parameter that have a pre-defined type. I believe parameters are not globally unique, and if a parameter has a pre-defined type, and it tries to parse a parameter of a different type it will throw an exception.

I have had this problem previously, and then solved it by catching the exception and trying again with an UnknownParameter. This completes the parsing and the parameter can be accessed by ExtensionParameter("xxx") instead of p_xxx.
This has worked fine until I received a message with a From-header containing a uri-parameter that has previously been defined as QuotedDataParameter. QuotedDataParameter does not throw an exception when it is missing the quotes, instead it tries to fix the broken parameter by adding quotes, which in this context is invalid. This cause my previous work-around to fail.

When I then send a response the broken parameter is still there and the sip parser on the other side fail to validate the incoming message.

Here are parts of the messages as example:
incoming INVITE:
From: <sip:502 at roadrunner2;gruu;opaque=app:conf:audio-video:id:CFCB5BB76C4F6F4387E0E593884E3BB0>;epid=A6ED5A245E;tag=92aa593186

outgoing 200 OK:
From: <sip:502 at roadrunner2;opaque="app:conf:audio-video:id:CFCB5BB76C4F6F4387E0E593884E3BB0";gruu>;tag=92aa593186;epid=A6ED5A245E

As you can see the opaque parameter has been changed and is not a valid uri-parameter anymore.

Any ideas on how to solve this problem?

/Markus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20080522/cd3dd012/attachment.htm>


More information about the resiprocate-devel mailing list