[Users] Reply Route (t_on_reply)

Joachim Fabini Joachim.Fabini at tuwien.ac.at
Tue Dec 20 13:08:46 CET 2005


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





More information about the sr-users mailing list