User Tools

Site Tools


cookbooks:5.2.x:core

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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's branch routing block. It contains a set of actions to be taken for each branch of a SIP request. It is executed only by TM module after it was armed via t_on_branch("branch_route_index").
 +
 +Example of usage:
 +
 +<code c>
 +    request_route {
 +        lookup("location");
 +        t_on_branch("OUT");
 +        if(!t_relay()) {
 +            sl_send_reply("500", "relaying failed");
 +        }
 +    }
 +    branch_route[OUT] {
 +        if(uri=~"10\.10\.10\.10") {
 +            # discard branches that go to 10.10.10.10
 +            drop();
 +        }
 +    }
 +</code>
cookbooks/5.2.x/core.txt ยท Last modified: 2020/04/03 09:34 by henningw