Hello,

it is possible to arm only one onreply_route. In the case you use two times t_on_reply(), the latest is used. To solve your case, the solution is to set some flags, and based on that to call different routes from onreply_route.

Cheers,
Daniel


On 12/20/05 14:08, Joachim Fabini wrote:
Hi,

Does OpenSER support sequentially processing the same reply by several onreply routes, i.e.

route { # general case - have all replies processed by # onreply_route[1]
   t_on_reply("1");

   if (mycondition)
   {
# special case - these replies should be processed # by onreply_route[1] _and_ by onreply_route[2]
      t_on_reply("2");
   }
   t_relay();
}

onreply_route[1] { # append_hf("P-MyExtraInfo: xyz\r\n"); }
onreply_route[2]
{
   # do some extra processing here
}

I did not find any info on this topic in the docs. Imho
the ability to use trigger several onreply_routes for
sequential processing can help extremly in keeping code clean and readable. Assume a proxy that is required, e.g., to insert a new header field into _any_ reply. In addition, some
other replies need some extra handling in the onreply
route. Without the capability to trigger multiple onreply-routes this leads to many conditionals in either the main route or in the reply route(s).
Thanks in advance,
--Joachim


_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to