[Serusers] stop route processing in sub-routes

Matt Hess mhess at livewirenet.com
Fri Mar 19 22:29:54 CET 2004


I did this once with a set flag..
if in the subroute all the checks pass then I set a flag to say it's ok..
then after that route is called I check to see if the flag is set.. if 
not then break..


Klaus Darilion wrote:

> Hi!
>
> Is it possible to stop the routing completly from a sub-route?
>
> "break" only leaves the current route block, but I want to stop the 
> whole processing. For example, I want to put the sanity checks into a 
> separate route block like shown below.
>
>
> route[0] {
>     #sanity checks
>     route(1);
>     ...
> }
>
> route[1]{
>     if (!mf_process_maxfwd_header("10")) {
>         sl_send_reply("483","Too Many Hops");
>             log(1, "too many hops, ->break\n");
>         break;
>     };
> }
>
> How can I stop the route processing from within route[1]?
>
> btw: I would be nice to return values from route blocks
>     if (route(1)) ...
>
>
> regards,
> klaus
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>




More information about the sr-users mailing list