Late routing Module

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Configuration)
 
(7 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
A very common usage is in forking the call to several numbers since when building the fork only the numbers are known - not their currently registered location. Other common use is the handling of some [[ENUM Routing|ENUM]] routes pointing back to PSTN.  
 
A very common usage is in forking the call to several numbers since when building the fork only the numbers are known - not their currently registered location. Other common use is the handling of some [[ENUM Routing|ENUM]] routes pointing back to PSTN.  
  
===How it works===
+
===How it Works===
  
The late routing module allows making a late routing decision in Yate's message flow. Routing is possible in the '''call.execute''' message, setting a module for the outbound call leg.
+
The late routing module allows making a late routing decision in Yate's message flow. Routing is possible in the '''[[call.execute]]''' message, setting a module for the outbound call leg.
  
 
The module works by intercepting specific [[call.execute]] messages (based on the callto parameter) and redispatching the message as [[call.route]]. If the routing succeeds the callto parameter is replaced with the result of routing and the message is allowed to continue processing. Any parameters added or modified during routing will reach the outbound channel as expected.
 
The module works by intercepting specific [[call.execute]] messages (based on the callto parameter) and redispatching the message as [[call.route]]. If the routing succeeds the callto parameter is replaced with the result of routing and the message is allowed to continue processing. Any parameters added or modified during routing will reach the outbound channel as expected.
Line 13: Line 13:
  
 
* No prerouting stage takes place. Prerouting is assumed to have already happened.
 
* No prerouting stage takes place. Prerouting is assumed to have already happened.
* Avoid routing loops. Take extra care to avoid routing loops when multiple servers are involved since forwarding loop avoidance information may be impossible for the interconnect protocol.  
+
* Avoid routing loops. Take extra care to avoid routing loops when multiple servers are involved since forwarding loop avoidance information may be impossible for the interconnect protocol.
  
 
===Configuration===
 
===Configuration===
Line 32: Line 32:
 
  ;  The "pstn" and "voice" types must be enabled in the ENUM module
 
  ;  The "pstn" and "voice" types must be enabled in the ENUM module
 
  ;types=lateroute,route,pstn,voice
 
  ;types=lateroute,route,pstn,voice
+
 
+
 
  ; regexp: string: Regular expression describing callto match rules
 
  ; regexp: string: Regular expression describing callto match rules
 
  ;  OBSOLETE - do not use, for backwards compatibility only
 
  ;  OBSOLETE - do not use, for backwards compatibility only
Line 42: Line 41:
 
  ;called=\0
 
  ;called=\0
  
===Usage examples===
+
===Usage example===
  
 
* [[Example of forking a call using lateroute]] - using lateroute from regexroute.conf
 
* [[Example of forking a call using lateroute]] - using lateroute from regexroute.conf
 +
  
 
'''See also'''
 
'''See also'''
 +
 
* [[Regular expressions]]
 
* [[Regular expressions]]
 
* [[Register]]
 
* [[Register]]
 +
* [[Routing]]
 +
 +
[[Category:Routing]] [[Category:Lateroute]]

Latest revision as of 09:22, 23 May 2014

This module can be used whenever you need to route the calls to one or several numbers or aliases whose addresses are not known in advance - like the phones or clients registered to Yate.

A very common usage is in forking the call to several numbers since when building the fork only the numbers are known - not their currently registered location. Other common use is the handling of some ENUM routes pointing back to PSTN.

Contents

[edit] How it Works

The late routing module allows making a late routing decision in Yate's message flow. Routing is possible in the call.execute message, setting a module for the outbound call leg.

The module works by intercepting specific call.execute messages (based on the callto parameter) and redispatching the message as call.route. If the routing succeeds the callto parameter is replaced with the result of routing and the message is allowed to continue processing. Any parameters added or modified during routing will reach the outbound channel as expected.

[edit] Notes

  • No prerouting stage takes place. Prerouting is assumed to have already happened.
  • Avoid routing loops. Take extra care to avoid routing loops when multiple servers are involved since forwarding loop avoidance information may be impossible for the interconnect protocol.

[edit] Configuration

File lateroute.conf

[general]
; Global settings of the late routing module

; enabled: boolean: Enable late routing module operation
;enabled=true if the list of types is not empty

; priority: int: Priority of call.execute handler
;priority=75

; types: list: Comma separated list of target types to be late routed
;  For each target of the form type/NNN a route request for NNN will be made
;  The "pstn" and "voice" types must be enabled in the ENUM module
;types=lateroute,route,pstn,voice
 
; regexp: string: Regular expression describing callto match rules
;  OBSOLETE - do not use, for backwards compatibility only
;regexp=

; called: string: Template for creating calling number from regexp match
;  OBSOLETE - do not use, for backwards compatibility only
;called=\0

[edit] Usage example


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers