This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
cookbooks:5.2.x:core [2019/10/30 00:16] joelsdc |
cookbooks:5.2.x:core [2019/10/30 00:17] joelsdc |
||
---|---|---|---|
Line 3013: | Line 3013: | ||
The sub-route blocks allow to make the configuration file modular, simplifying the logic and helping to avoid duplication of actions. | The sub-route blocks allow to make the configuration file modular, simplifying the logic and helping to avoid duplication of actions. | ||
+ | |||
+ | ==== branch_route ==== | ||
+ | |||
+ | Request' | ||
+ | |||
+ | Example of usage: | ||
+ | |||
+ | <code c> | ||
+ | request_route { | ||
+ | lookup(" | ||
+ | t_on_branch(" | ||
+ | if(!t_relay()) { | ||
+ | sl_send_reply(" | ||
+ | } | ||
+ | } | ||
+ | branch_route[OUT] { | ||
+ | if(uri=~" | ||
+ | # discard branches that go to 10.10.10.10 | ||
+ | drop(); | ||
+ | } | ||
+ | } | ||
+ | </ |