Bugs item #1753368, was opened at 2007-07-13 13:54
Message generated for change (Comment added) made by miconda
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1753368&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
>Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: IƱaki Baz (ibc_sf)
>Assigned to: Daniel-Constantin Mierla (miconda)
Summary: Bug in options.so module and "rewriteuri()"
Initial Comment:
Some softphones send a periodical SIP OPTIONS to mantain the keepalive behind
NAT. They send:
OPTIONS sip:[EMAIL PROTECTED] SIP/2.0
I want OpenSer to response with 200 OK using the options.so module, but for
that I need to set uri and leave it as:
sip:openser.domain.org (without username).
This is necessary for the options_reply().
So I try it:
----------------------------------------------
if (uri=~"sip:[EMAIL PROTECTED]") {
rewriteuri("sip:openser.domain.org");
}
if (! uri=~"sip:[EMAIL PROTECTED]") {
options_reply();
}
----------------------------------------------
But it doesn't work and I receive this error:
options_reply(): ruri contains username
so I receive a 404 Not Found for the OPTIONS request.
But the VERY estrange thing is that the above code WORKS if I just add a "xlog"
command showing the new URI ($ru) after "rewriteuri()" and before
"options_reply()":
----------------------------------------------
if (uri=~"sip:[EMAIL PROTECTED]") {
rewriteuri("sip:openser.domain.org");
xlog("URI after rewriteuri() = $ru \r\n");
}
if (! uri=~"sip:[EMAIL PROTECTED]") {
options_reply();
}
----------------------------------------------
In that case I get:
URI after rewriteuri() = openser.domain.org
and I get a 200 OK for the OPTIONS request.
It seems that "options_reply()" needs a "refresh" by reading the new URI, for
example with xlog and $ru. Of course, it shouldn't be neccesary.
Maybe this bug is not related to options module, I'm not sure about it.
Thanks.
----------------------------------------------------------------------
>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2007-07-13 14:12
Message:
Logged In: YES
user_id=1246013
Originator: NO
Can you get latest SVN trunk, and test? I did some fix, and if works, I
will backport to 1.2.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1753368&group_id=139143
_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel