[Devel] [ openser-Bugs-1534126 ] Strange behaviour regarding sl_send_reply and failure_route

SourceForge.net noreply at sourceforge.net
Fri Aug 4 09:26:43 CEST 2006


Bugs item #1534126, was opened at 2006-08-03 23:50
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1534126&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: core
Group: ver 1.0.x
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: reticent (unspin)
>Assigned to: Bogdan (bogdan_iancu)
Summary: Strange behaviour regarding sl_send_reply and failure_route

Initial Comment:
I'm encountering an issue using sl_send_reply in a
route referenced from route

failure_route snippet
---
    if ( t_check_status("486") )
    {
        route(15);
        drop();
    }
---

Inside which i call another route() block
---
route[15]
{
    sl_send_reply("404", "Well i tried, but they're
nowhere to be found");
}
---

After returning to the failure_route drop() is executed

What i'm seeing is that both the message i'm generating
with
sl_send_reply and the "486 Busy" are being sent on to
the client.  I was expecting the message created by
sl_send_reply to be sent and the original message to be
dropped


I've attached a really simple configuration that will
reproduce this issue.

This config is designed to handle incoming
registrations (so that you
can register a phone and then leave it off hook so that
it will respond
"486" to any incoming INVITE) and store the location
information in
memory. 
It will the handle incoming INVITE and execute a
lookup("location"); so
that the call may be routed to a registered user. 
A failure route is defined that looks for a status of
486, upon finding
this it will execute route(15) which simply calls
sl_send_reply and then
returns, at this point a drop() will be executed and
you will see both
the result of the sl_send_reply sent to the client AND
the "486 Busy".

This was found on an OpenSER 1.0 cvs checkout about 2
weeks ago

tavis

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

>Comment By: Bogdan (bogdan_iancu)
Date: 2006-08-04 10:26

Message:
Logged In: YES 
user_id=1275325

it's not a bug - the problem is the mixing of stateful and
stateless processing.
First of all you cannot drop a final reply in failure route
- drop will be equivalent to exit in this case; the
transaction engine has to close a transaction by sending a
*stateful* final reply; what you can do is the explicitly
send a different one from the script (via t_reply).
Second is the mixing of stateful (via failure route) and
stateless (via sl_send_reply) - the transaction engine is
not aware of any of the stateless replies you send from the
script, so it will send a stateful reply also.

So it's a script error.

Regards,
Bogdan

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1534126&group_id=139143



More information about the Devel mailing list