User Tools

Site Tools


cookbooks:devel: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:devel:core [2020/11/26 15:32] – [async_workers] micondacookbooks:devel:core [2020/11/26 15:38] – [event_route] miconda
Line 3451: Line 3451:
 } }
 </code> </code>
 +
 +  * **event_route[core:pre-routing]** - executed by core on receiving SIP traffic before running request_route or reply_route.
 +    * if drop is used, then the message is not processed further with request_route or reply_route in the same process. This can be useful together with sworker module which can delegate the processing to another worker.
 +
 +<code c>
 +async_workers_group="name=reg;workers=4"
 +...
 +event_route[core:pre-routing] {
 +    xinfo("pre-routing rules\n");
 +    if(is_method("REGISTER")) {
 +        # delegate processing of REGISTERs to a special group of workers
 +        if(sworker_task("reg")) {
 +            drop;
 +        }
 +    }
 +}
 +</code>
 +
 === Module Event Routes === === Module Event Routes ===
  
cookbooks/devel/core.txt · Last modified: 2022/04/11 15:10 by bkaufman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki