[Kamailio-Devel] [ openser-Feature Requests-2159383 ] 'reply' function involving 'sl_reply' and 't_reply'
SourceForge.net
noreply at sourceforge.net
Sat Oct 11 16:10:03 CEST 2008
Feature Requests item #2159383, was opened at 2008-10-11 15:47
Message generated for change (Comment added) made by ibc_sf
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=2159383&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: Iaki Baz (ibc_sf)
Assigned to: Nobody/Anonymous (nobody)
Summary: 'reply' function involving 'sl_reply' and 't_reply'
Initial Comment:
Hi, IMHO is not very friendly being dealing with 'sl_reply' or 't_reply' depending on if the transaction has been already created.
Sometimes it's not clear which one to use (for example if we are processing on_reply_route and so).
I know that both "t_reply" and "sl_reply" belong to different modules (tm and sl) but it could be nice a new function just called "reply" that would call the appropiate function t_reply or sl_reply depending on the existance of the transaction.
This is:
if xxxxx {
reply("403", "Forbidden");
}
on_failure_route[1] {
if xxxxx {
reply("500", "Bad gateway");
}
Is it feasible?
----------------------------------------------------------------------
>Comment By: Iaki Baz (ibc_sf)
Date: 2008-10-11 16:10
Message:
Well, the fact is that "t_reply" can be used just when the transaction has
been already created, this is, after calling "t_newtrans()", in
"on_failure_route" (so "t_Realy" was called before and created the
transaction). And "sl_reply" can be used just when the transaction doesn't
exist for the current request.
In fact you get a logical error if you try to use "sl_reply" when the
transsaction already exist or "t_reply" when the transaction doesn't
exist.
So, in conclusion, there is no possibility of choosing wich one to use.
If the transaction already exists you must use "t_reply", and if not, you
must use "sl_reply". So why not a common function called "reply()" that
would call the appropiate function depending on if the transaction exists?
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-10-11 16:01
Message:
i'm not convinced yet that this is needed. in my script i forward all
requests statefully so i know that when reply comes, i need to process it
statefully. are you saying that you forward some requests stafully and
some statelessly? perhaps you can give another example.
-- juha
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=2159383&group_id=139143
More information about the Devel
mailing list