<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://docs.telcobridges.com/mediawiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://docs.telcobridges.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Routing_script_tutorial%3Aroute_order_Tutorial</id>
		<title>Routing script tutorial:route order Tutorial - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://docs.telcobridges.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Routing_script_tutorial%3Aroute_order_Tutorial"/>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;action=history"/>
		<updated>2026-05-31T19:48:21Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.1</generator>

	<entry>
		<id>https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=8190&amp;oldid=prev</id>
		<title>Abrassard at 16:28, 6 December 2010</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=8190&amp;oldid=prev"/>
				<updated>2010-12-06T16:28:58Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 16:28, 6 December 2010&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; route.each do |key, value|&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; route.each do |key, value|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; case key.to_s&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; case key.to_s&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; when &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nap&lt;/del&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; when &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;remapped_nap&lt;/ins&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; @local_name = value&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; @local_name = value&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; when &amp;quot;priority&amp;quot; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; when &amp;quot;priority&amp;quot; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:8184:newid:8190 --&gt;
&lt;/table&gt;</summary>
		<author><name>Abrassard</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=8184&amp;oldid=prev</id>
		<title>Abrassard: /* :route_field_name script example */</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=8184&amp;oldid=prev"/>
				<updated>2010-12-06T14:35:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;:route_field_name script example&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:35, 6 December 2010&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 66:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; puts &amp;quot;Nap name:#{@local_name}, priority:#{@local_priority}&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; puts &amp;quot;Nap name:#{@local_name}, priority:#{@local_priority}&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; return &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;false&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; return &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;true&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; @@routing.route call, nap_list&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; @@routing.route call, nap_list&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==== :route_field_name script output ====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==== :route_field_name script output ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:2756:newid:8184 --&gt;
&lt;/table&gt;</summary>
		<author><name>Abrassard</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=2756&amp;oldid=prev</id>
		<title>Cbilodeau: format example</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=2756&amp;oldid=prev"/>
				<updated>2009-09-29T12:43:12Z</updated>
		
		<summary type="html">&lt;p&gt;format example&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:43, 29 September 2009&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; Calling&amp;#160; &amp;#160; &amp;#160; Called&amp;#160; &amp;#160; &amp;#160; NAP&amp;#160; &amp;#160; &amp;#160; Remapped NAP&amp;#160; &amp;#160; &amp;#160;  Priority&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; Calling&amp;#160; &amp;#160; &amp;#160; Called&amp;#160; &amp;#160; &amp;#160; NAP&amp;#160; &amp;#160; &amp;#160; Remapped NAP&amp;#160; &amp;#160; &amp;#160;  Priority&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; 5550000&amp;#160; &amp;#160;  2220000&amp;#160; &amp;#160;  sip_p1&amp;#160; &amp;#160;  isdn &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160;  &lt;/del&gt;4&amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; 5550000&amp;#160; &amp;#160;  2220000&amp;#160; &amp;#160;  sip_p1&amp;#160; &amp;#160;  isdn &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  &lt;/ins&gt;4&amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; 5550000&amp;#160; &amp;#160;  1110000&amp;#160; &amp;#160;  sip_p3&amp;#160; &amp;#160;  sip &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160;  &lt;/del&gt;3&amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; 5550000&amp;#160; &amp;#160;  1110000&amp;#160; &amp;#160;  sip_p3&amp;#160; &amp;#160;  sip &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;/ins&gt;3&amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; 5550000&amp;#160; &amp;#160;  3330000&amp;#160; &amp;#160;  sip_p2&amp;#160; &amp;#160;  isdn_1 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160;  &lt;/del&gt;2&amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; 5550000&amp;#160; &amp;#160;  3330000&amp;#160; &amp;#160;  sip_p2&amp;#160; &amp;#160;  isdn_1 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  &lt;/ins&gt;2&amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:559:newid:2756 --&gt;
&lt;/table&gt;</summary>
		<author><name>Cbilodeau</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=559&amp;oldid=prev</id>
		<title>10.0.0.157 at 14:54, 20 May 2009</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=559&amp;oldid=prev"/>
				<updated>2009-05-20T14:54:52Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:54, 20 May 2009&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 223:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 223:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; OUT: Nap name:sip_p3, priority:3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; OUT: Nap name:sip_p3, priority:3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; OUT:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; OUT:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;----&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Back to [[Routing_script_tutorial|Routing Script Tutorial]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:558:newid:559 --&gt;
&lt;/table&gt;</summary>
		<author><name>10.0.0.157</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=558&amp;oldid=prev</id>
		<title>10.0.0.157: Creation</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/mediawiki/index.php?title=Routing_script_tutorial:route_order_Tutorial&amp;diff=558&amp;oldid=prev"/>
				<updated>2009-05-20T14:36:26Z</updated>
		
		<summary type="html">&lt;p&gt;Creation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== route_order tutorial ==&lt;br /&gt;
'route_order' is a method implemented in the base_routing and is use to order routes. This tutorial will explain how to use the parameter for the 'route_order' method. &lt;br /&gt;
&lt;br /&gt;
=== route_order examples ===&lt;br /&gt;
----&lt;br /&gt;
Things to know about these examples:&lt;br /&gt;
* The :show_route_order method print in the output window the order of the naps.&lt;br /&gt;
* A new field called 'priority' needs to be add to the routes.&lt;br /&gt;
* This script will not find any route match, therefore dropping the call.&lt;br /&gt;
&lt;br /&gt;
==== route_order setup ====&lt;br /&gt;
&lt;br /&gt;
Routes to order:&lt;br /&gt;
&lt;br /&gt;
  Calling      Called      NAP      Remapped NAP       Priority  &lt;br /&gt;
  5550000     2220000     sip_p1     isdn          4     &lt;br /&gt;
  5550000     1110000     sip_p3     sip          3     &lt;br /&gt;
  5550000     3330000     sip_p2     isdn_1          2     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nap list:&lt;br /&gt;
&lt;br /&gt;
  Name     &lt;br /&gt;
  sip_p1     &lt;br /&gt;
  sip_p3     &lt;br /&gt;
  sip_p2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The call and naps input in the test script window:&lt;br /&gt;
&lt;br /&gt;
  @call_params = {:calling =&amp;gt; '5550000', :called =&amp;gt; '5550002', :nap =&amp;gt; 'sip_p3'}&lt;br /&gt;
  @nap_list = [&lt;br /&gt;
    {:name =&amp;gt; 'sip_p3'},&lt;br /&gt;
    {:name =&amp;gt; 'sip_p2'},&lt;br /&gt;
    {:name =&amp;gt; 'sip_p1'}&lt;br /&gt;
  ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== :route_field_name parameter ===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== :route_field_name script example ====&lt;br /&gt;
&lt;br /&gt;
Here how it can be order using the ':route_field_name' argument. The example script will order the routes by priority.&lt;br /&gt;
&lt;br /&gt;
  require 'base_routing'&lt;br /&gt;
  &lt;br /&gt;
  class SimpleOrdering &amp;lt; BaseRouting&lt;br /&gt;
    route_order :route_field_name =&amp;gt; :priority&lt;br /&gt;
    route_match :method =&amp;gt; :show_route_order&lt;br /&gt;
  &lt;br /&gt;
    def show_route_order( route, call, nap_list )&lt;br /&gt;
      @local_name = &amp;quot;N/A&amp;quot;&lt;br /&gt;
      @local_priority =  &amp;quot;N/A&amp;quot;&lt;br /&gt;
      route.each do |key, value|&lt;br /&gt;
        case key.to_s&lt;br /&gt;
        when &amp;quot;nap&amp;quot;&lt;br /&gt;
          @local_name = value&lt;br /&gt;
        when &amp;quot;priority&amp;quot; &lt;br /&gt;
          @local_priority = value&lt;br /&gt;
        else&lt;br /&gt;
          #puts &amp;quot;key = #{key}, value = #{value}&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
      end&lt;br /&gt;
      puts &amp;quot;Nap name:#{@local_name}, priority:#{@local_priority}&amp;quot;&lt;br /&gt;
      &lt;br /&gt;
      return false&lt;br /&gt;
    end&lt;br /&gt;
  &lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  @@routing = SimpleOrdering.new&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  def init_routes( routes )&lt;br /&gt;
    @@routing.init routes&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  def route( call, nap_list )&lt;br /&gt;
    puts &amp;quot;This script should put all the route priority order starting with the lowest.&amp;quot;&lt;br /&gt;
    @@routing.route call, nap_list&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== :route_field_name script output ====&lt;br /&gt;
&lt;br /&gt;
This script will not find any route match, therefore dropping the call, but it will print in the output the route ordered according to their priority. The output should look like this (if tried in the test script window).&lt;br /&gt;
&lt;br /&gt;
  OUT: This script should put all the route priority order starting with the lowest.&lt;br /&gt;
  OUT:&lt;br /&gt;
  OUT: Nap name:sip_p2, priority:2&lt;br /&gt;
  OUT:&lt;br /&gt;
  OUT: Nap name:sip_p3, priority:3&lt;br /&gt;
  OUT:&lt;br /&gt;
  OUT: Nap name:sip_p1, priority:4&lt;br /&gt;
  OUT:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== :method parameter ===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== :method script example ====&lt;br /&gt;
&lt;br /&gt;
Here how it can be order using the ':method' argument. The example script will order the routes alphabetically by nap. The example script will order the routes alphabetically by nap just like the 'proc' example.&lt;br /&gt;
&lt;br /&gt;
  require 'base_routing'&lt;br /&gt;
  &lt;br /&gt;
  class SimpleMethodOrdering &amp;lt; BaseRouting&lt;br /&gt;
    route_order :method =&amp;gt; :nap_alphabetical_order&lt;br /&gt;
    route_match :method =&amp;gt; :show_route_order&lt;br /&gt;
  &lt;br /&gt;
    def nap_alphabetical_order( routes, nap_list )&lt;br /&gt;
        @tmp_routes = routes.sort {|x,y| x[:nap] &amp;lt;=&amp;gt; y[:nap] }&lt;br /&gt;
    end&lt;br /&gt;
  &lt;br /&gt;
    def show_route_order( route, call, nap_list )&lt;br /&gt;
      @local_name = &amp;quot;N/A&amp;quot;&lt;br /&gt;
      @local_priority =  &amp;quot;N/A&amp;quot;&lt;br /&gt;
      route.each do |key, value|&lt;br /&gt;
        case key.to_s&lt;br /&gt;
        when &amp;quot;nap&amp;quot;&lt;br /&gt;
          @local_name = value&lt;br /&gt;
        when &amp;quot;priority&amp;quot; &lt;br /&gt;
          @local_priority = value&lt;br /&gt;
        else&lt;br /&gt;
          #puts &amp;quot;key = #{key}, value = #{value}&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
      end&lt;br /&gt;
      puts &amp;quot;Nap name:#{@local_name}, priority:#{@local_priority}&amp;quot;&lt;br /&gt;
      &lt;br /&gt;
      return false&lt;br /&gt;
    end&lt;br /&gt;
  &lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  @@routing = SimpleMethodOrdering .new&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  def init_routes( routes )&lt;br /&gt;
    @@routing.init routes&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  def route( call, nap_list )&lt;br /&gt;
    puts &amp;quot;This script should put all the route priority order starting with the lowest.&amp;quot;&lt;br /&gt;
    @@routing.route call, nap_list&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== :method script output ====&lt;br /&gt;
&lt;br /&gt;
This script will not find any route match, therefore dropping the call, but it will print in the output the route ordered alphabetically by nap. The output should look like this (if tried in the test script window).&lt;br /&gt;
&lt;br /&gt;
  OUT: This script should put all the route priority order starting with the lowest.&lt;br /&gt;
  OUT:&lt;br /&gt;
  OUT: Nap name:sip_p1, priority:4&lt;br /&gt;
  OUT:&lt;br /&gt;
  OUT: Nap name:sip_p2, priority:2&lt;br /&gt;
  OUT:&lt;br /&gt;
  OUT: Nap name:sip_p3, priority:3&lt;br /&gt;
  OUT:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== :proc parameter ===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== :proc script example ====&lt;br /&gt;
Here how it can be order using the ':proc' argument. The example script will order the routes alphabetically by nap just like the 'method' example&lt;br /&gt;
&lt;br /&gt;
  require 'base_routing'&lt;br /&gt;
  &lt;br /&gt;
  class SimpleProcOrdering &amp;lt; BaseRouting&lt;br /&gt;
    route_order :proc =&amp;gt; Proc.new { |routes, nap_list|&lt;br /&gt;
        @tmp_routes = routes.sort {|x,y| x[:nap] &amp;lt;=&amp;gt; y[:nap] }&lt;br /&gt;
    }&lt;br /&gt;
    route_match :method =&amp;gt; :show_route_order&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
    def show_route_order( route, call, nap_list )&lt;br /&gt;
      @local_name = &amp;quot;N/A&amp;quot;&lt;br /&gt;
      @local_priority =  &amp;quot;N/A&amp;quot;&lt;br /&gt;
      route.each do |key, value|&lt;br /&gt;
        case key.to_s&lt;br /&gt;
        when &amp;quot;nap&amp;quot;&lt;br /&gt;
          @local_name = value&lt;br /&gt;
        when &amp;quot;priority&amp;quot; &lt;br /&gt;
          @local_priority = value&lt;br /&gt;
        else&lt;br /&gt;
          #puts &amp;quot;key = #{key}, value = #{value}&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
      end&lt;br /&gt;
      puts &amp;quot;Nap name:#{@local_name}, priority:#{@local_priority}&amp;quot;&lt;br /&gt;
      &lt;br /&gt;
      return false&lt;br /&gt;
    end&lt;br /&gt;
  &lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  @@routing = SimpleProcOrdering .new&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  def init_routes( routes )&lt;br /&gt;
    @@routing.init routes&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  def route( call, nap_list )&lt;br /&gt;
    puts &amp;quot;This script should put all the route priority order starting with the lowest.&amp;quot;&lt;br /&gt;
    @@routing.route call, nap_list&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== :proc script output ====&lt;br /&gt;
This script will not find any route match, therefore dropping the call, but it will print in the output the route ordered alphabetically by nap. The output should look like this (if tried in the test script window).&lt;br /&gt;
&lt;br /&gt;
  OUT: This script should put all the route priority order starting with the lowest.&lt;br /&gt;
  OUT:&lt;br /&gt;
  OUT: Nap name:sip_p1, priority:4&lt;br /&gt;
  OUT:&lt;br /&gt;
  OUT: Nap name:sip_p2, priority:2&lt;br /&gt;
  OUT:&lt;br /&gt;
  OUT: Nap name:sip_p3, priority:3&lt;br /&gt;
  OUT:&lt;/div&gt;</summary>
		<author><name>10.0.0.157</name></author>	</entry>

	</feed>