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 revisionPrevious revision
Next revisionBoth sides next revision
cookbooks:5.2.x:core [2019/10/29 23:16] joelsdccookbooks:5.2.x:core [2019/10/29 23: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 07:34 by henningw

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki