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
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@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
At 10:25 PM 3/19/2004, Klaus Darilion wrote:
Hi!
Is it possible to stop the routing completly from a sub-route?
no, that's one of things on our to-do list along with returning results from route (somehow the command names are very SIP centric, perhaps we could also introduce some synonyms such as call/return/exit).
btw: I would be nice to return values from route blocks if (route(1)) ...
Well -- if I read your email to end immediately, I would have saved some typing work ;)
-jiri