[Users] Reply Route (t_on_reply)
Klaus Darilion
klaus.mailinglists at pernau.at
Tue Dec 20 17:07:38 CET 2005
Hi Joachim!
You can use a default reply route:
onreply_route {
# default onreply_route
...
}
AFAIK this will be exectued for every response.
regards
klaus
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
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>
More information about the sr-users
mailing list