Script to route the call by otg from the calling parameters

This script is to take the value from uri_param of From header
Use this value as an otg value to match the configured routes table.
Found the matched Routes and prioritize them

To use these filters:

Added New Route Columns → In Routes → Create New Route Column:
otg:
Type attributes: string, Default: blank

Add the following lines to the main script (default main script :simple_routing.rb)

require ‘route_by_otg’ unless defined?(RoutebyOTG)

include RoutebyOTG

before_filter :method => :route_by_otg
Note: Place the above before_filter line at the top of all filters.

The filter script

Attachments

Script to route the call by otg from the calling parameters Attachment
route_by_otg.zip Delete