[OpenSER-Devel] [ openser-Bugs-1753368 ] Bug in options.so module and "rewriteuri()"

SourceForge.net noreply at sourceforge.net
Fri Jul 13 13:23:25 CEST 2007


Bugs item #1753368, was opened at 2007-07-13 11:54
Message generated for change (Comment added) made by ibc_sf
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:ping at openser.dominio.org 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:ping[@]+.*") {
      rewriteuri("sip:openser.domain.org");
  }
  if (! uri=~"sip:.*[@]+.*") {
      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:ping[@]+.*") {
      rewriteuri("sip:openser.domain.org");
      xlog("URI after rewriteuri() = $ru \r\n");
  }
  if (! uri=~"sip:.*[@]+.*") {
      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: Iñaki Baz (ibc_sf)
Date: 2007-07-13 12:23

Message:
Logged In: YES 
user_id=1844020
Originator: YES

Ok, I'll try it next week.
But before that, could you tell me if you think this bug maybe related to
options module or core?

----------------------------------------------------------------------

Comment By: Daniel-Constantin Mierla (miconda)
Date: 2007-07-13 12: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



More information about the Devel mailing list