Hi Joachim,
briefly, the flags are attached to the transaction - same flags are
visible for request and its replies (and forks). Once the transaction is
delete, the flags are also gone.
regards,
bogdan
Joachim Fabini wrote:
Hi,
Again a question regarding the OpenSER documentation,
specifically the usage of flags:
What is the context and visibility scope of flags in
openser? What is their lifetime?
Maybe some piece of code to clarify things:
route
{
if (method=="REGISTER")
{
setflag(10);
# do some processing
}
if ((method=="INVITE")||(method=="BYE"))
{
setflag(11);
}
# do some more processing
t_relay();
}
onreply_route()
{
if (isflagset(10))
{
# received a reply on register, process it
}
if (isflagset(11))
{
# reply on invite or bye
}
}
a) Can we expect the flags 10/11 to be identical for
route and onreply_route - i.e. in the example above,
are the flags in status "set" when processing the
onreply_route? I.e. isflagset(10) returns true if
we process the 200 OK in reply to a REGISTER?
b) Do we need to explicitely reset the flag or is it
automatically cleared? Specifically: If an INVITE
and the matching OK are processed, is it required
to reset the flag afterwards in onreply_route?
I.e., if after the 200OK to INVITE a 200 OK reply
to a SUBSCRIBE is processed by onreply_route and
we did _not_ reset the flag 11, does isflagset(11)
return true or false on the 200 OK for SUBSCRIBE?
Finally another question: must onreply_route be explicitely
triggered (like for onreply_route[1] using t_on_reply("1"))
or is the default onreply_route anyhow executed
automatically on any stateful reply?
Thanks in advance,
--Joachim
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users