Configuring regexp and callto parameters in cluster route module
From Yate Documentation
(Difference between revisions)
(→Configuration parameters in cluster module) |
(→Configuration for routing the call) |
||
Line 35: | Line 35: | ||
* [[Clustering| Clustering Module]] | * [[Clustering| Clustering Module]] | ||
* [[Routing]] | * [[Routing]] | ||
+ | |||
+ | [[Category:Routing]] [[Category:Cluster]] [[Category:regexroute]] |
Latest revision as of 17:02, 31 October 2013
This is an example on how to use cluster module to route the calls by setting parameters like regexp and callto.
Parameter regexp which is a regular expression that describes the node name match rule.
Parameter callto is used to forward the call to the target node.
[edit] Configuration parameters in cluster module
In clustering.conf file:
[general] regexp=^[[:alnum:].-]\+$ callto=sip/sip:cluster/${called}@\0.dom.ain
In the above configuration suppose that:
- We are node node1
- A call comes in for number 87654321
- Routing returns cluster/node2/sip/sip:321@192.168.0.2;user=phone
The prefix equals cluster/ but the node is not local. The node name node2 is found matching against the regexp so the callto is evaluated by replacing parameters and matched strings.
- The call is delivered to sip:cluster/321@node2.dom.ain
- On node2 the call can be routed using a regular expression as you can see below.
[edit] Configuration for routing the call
In regexroute.conf file:
[default] ^cluster/=${sip_x-callto};billid=${sip_x-billid}
See also