Bugs item #1753368, was opened at 2007-07-13 11:54 Message generated for change (Tracker Item Submitted) made by Item Submitter 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 1.2.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: IƱaki Baz (ibc_sf) Assigned to: Nobody/Anonymous (nobody) 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1753368&group_id=139143 _______________________________________________ Devel mailing list Devel@openser.org http://openser.org/cgi-bin/mailman/listinfo/devel