<?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/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jean-Francois+Gosselin</id>
		<title>TBwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://docs.telcobridges.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jean-Francois+Gosselin"/>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Special:Contributions/Jean-Francois_Gosselin"/>
		<updated>2026-04-16T01:56:40Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.18.1</generator>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-11-14T00:48:12Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: enum_called_remap.rb is now updating call parameters, no more routes parameters as expected for a before_filter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When ENUM Query completes, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using enum_called_remap.rb before filter script allows handling of ENUM query requests/responses. The match and replace regular expression from ENUM query responses are applied to params[:call][:called] to get &amp;quot;new called&amp;quot;. This script allows update of the call parameters according to &amp;quot;new called&amp;quot; value. Refer to enum_called_remap.rb before filter script to get instructions on how to integrate this script into the main routing script (i.e. simple_routing_sbc.rb):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  require 'enum_called_remap' unless defined?(EnumCalledRemap)&lt;br /&gt;
  ...&lt;br /&gt;
  include EnumCalledRemap&lt;br /&gt;
  ...&lt;br /&gt;
  before_filter :method =&amp;gt; :enum_called_remap&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resolve ENUM Query down to type A records ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri from responses and get matching outgoing NAP, NAP proxy IP and port through a sequence of DNS queries (i.e. NAPTR, SRV down to type A records). This behavior could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When ENUM and DNS Queries complete, the routing script is called again with the results. The params[:enum_query] and params[:dns_query] objects will be filled with the ENUM Query and the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add dynamic routes ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also add dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is mandatary to send DNS query to add dynamic routes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.37 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration includes a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS Query ==&lt;br /&gt;
Similarly to ENUM query, starting with release 3.1, it is possible to issue DNS Query requests to DNS servers from routing scripts. This could be used to skip the ENUM Query part when the called uri is already known but still need to get the matching outgoing NAP, NAP proxy IP and port. To do so, the params[:dns_query] object must be filled with the required DNS Query attributes params[:dns_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :dns_query_required.&lt;br /&gt;
&lt;br /&gt;
When DNS Query completes, the routing script is called again with the result. The params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add dynamic routes ===&lt;br /&gt;
&lt;br /&gt;
Similarly to ENUM Query, the DNS query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.37 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-10-22T20:06:10Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: Updated base_routing.rb script base version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When ENUM Query completes, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using enum_called_remap.rb before filter script allows handling of ENUM query requests/responses. The match and replace regular expression from ENUM query responses are applied to params[:call][:called] to get &amp;quot;new called&amp;quot;. This script selects routes which regular expression from enum_called custom column matches &amp;quot;new called&amp;quot; and updates the route &amp;quot;remapped_called&amp;quot; field according to &amp;quot;new called&amp;quot;. Refer to enum_called_remap.rb before filter script to get instructions on how to integrate this script into the main routing script (i.e. simple_routing_sbc.rb):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  require 'enum_called_remap' unless defined?(EnumCalledRemap)&lt;br /&gt;
  ...&lt;br /&gt;
  include EnumCalledRemap&lt;br /&gt;
  ...&lt;br /&gt;
  before_filter :method =&amp;gt; :enum_called_remap&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resolve ENUM Query down to type A records ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri from responses and get matching outgoing NAP, NAP proxy IP and port through a sequence of DNS queries (i.e. NAPTR, SRV down to type A records). This behavior could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When ENUM and DNS Queries complete, the routing script is called again with the results. The params[:enum_query] and params[:dns_query] objects will be filled with the ENUM Query and the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add dynamic routes ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also add dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is mandatary to send DNS query to add dynamic routes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.37 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration includes a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS Query ==&lt;br /&gt;
Similarly to ENUM query, starting with release 3.1, it is possible to issue DNS Query requests to DNS servers from routing scripts. This could be used to skip the ENUM Query part when the called uri is already known but still need to get the matching outgoing NAP, NAP proxy IP and port. To do so, the params[:dns_query] object must be filled with the required DNS Query attributes params[:dns_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :dns_query_required.&lt;br /&gt;
&lt;br /&gt;
When DNS Query completes, the routing script is called again with the result. The params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add dynamic routes ===&lt;br /&gt;
&lt;br /&gt;
Similarly to ENUM Query, the DNS query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.37 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-10-22T20:05:41Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: Updated base_routing.rb script base version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When ENUM Query completes, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using enum_called_remap.rb before filter script allows handling of ENUM query requests/responses. The match and replace regular expression from ENUM query responses are applied to params[:call][:called] to get &amp;quot;new called&amp;quot;. This script selects routes which regular expression from enum_called custom column matches &amp;quot;new called&amp;quot; and updates the route &amp;quot;remapped_called&amp;quot; field according to &amp;quot;new called&amp;quot;. Refer to enum_called_remap.rb before filter script to get instructions on how to integrate this script into the main routing script (i.e. simple_routing_sbc.rb):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  require 'enum_called_remap' unless defined?(EnumCalledRemap)&lt;br /&gt;
  ...&lt;br /&gt;
  include EnumCalledRemap&lt;br /&gt;
  ...&lt;br /&gt;
  before_filter :method =&amp;gt; :enum_called_remap&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resolve ENUM Query down to type A records ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri from responses and get matching outgoing NAP, NAP proxy IP and port through a sequence of DNS queries (i.e. NAPTR, SRV down to type A records). This behavior could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When ENUM and DNS Queries complete, the routing script is called again with the results. The params[:enum_query] and params[:dns_query] objects will be filled with the ENUM Query and the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add dynamic routes ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also add dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is mandatary to send DNS query to add dynamic routes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.37 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration includes a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS Query ==&lt;br /&gt;
Similarly to ENUM query, starting with release 3.1, it is possible to issue DNS Query requests to DNS servers from routing scripts. This could be used to skip the ENUM Query part when the called uri is already known but still need to get the matching outgoing NAP, NAP proxy IP and port. To do so, the params[:dns_query] object must be filled with the required DNS Query attributes params[:dns_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :dns_query_required.&lt;br /&gt;
&lt;br /&gt;
When DNS Query completes, the routing script is called again with the result. The params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add dynamic routes ===&lt;br /&gt;
&lt;br /&gt;
Similarly to ENUM Query, the DNS query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-10-21T18:30:22Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: Added subsection in DNS Query section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When ENUM Query completes, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using enum_called_remap.rb before filter script allows handling of ENUM query requests/responses. The match and replace regular expression from ENUM query responses are applied to params[:call][:called] to get &amp;quot;new called&amp;quot;. This script selects routes which regular expression from enum_called custom column matches &amp;quot;new called&amp;quot; and updates the route &amp;quot;remapped_called&amp;quot; field according to &amp;quot;new called&amp;quot;. Refer to enum_called_remap.rb before filter script to get instructions on how to integrate this script into the main routing script (i.e. simple_routing_sbc.rb):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  require 'enum_called_remap' unless defined?(EnumCalledRemap)&lt;br /&gt;
  ...&lt;br /&gt;
  include EnumCalledRemap&lt;br /&gt;
  ...&lt;br /&gt;
  before_filter :method =&amp;gt; :enum_called_remap&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resolve ENUM Query down to type A records ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri from responses and get matching outgoing NAP, NAP proxy IP and port through a sequence of DNS queries (i.e. NAPTR, SRV down to type A records). This behavior could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When ENUM and DNS Queries complete, the routing script is called again with the results. The params[:enum_query] and params[:dns_query] objects will be filled with the ENUM Query and the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add dynamic routes ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also add dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is mandatary to send DNS query to add dynamic routes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration includes a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS Query ==&lt;br /&gt;
Similarly to ENUM query, starting with release 3.1, it is possible to issue DNS Query requests to DNS servers from routing scripts. This could be used to skip the ENUM Query part when the called uri is already known but still need to get the matching outgoing NAP, NAP proxy IP and port. To do so, the params[:dns_query] object must be filled with the required DNS Query attributes params[:dns_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :dns_query_required.&lt;br /&gt;
&lt;br /&gt;
When DNS Query completes, the routing script is called again with the result. The params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add dynamic routes ===&lt;br /&gt;
&lt;br /&gt;
Similarly to ENUM Query, the DNS query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-10-21T18:26:27Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: Added subsections in ENUM Query section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When ENUM Query completes, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using enum_called_remap.rb before filter script allows handling of ENUM query requests/responses. The match and replace regular expression from ENUM query responses are applied to params[:call][:called] to get &amp;quot;new called&amp;quot;. This script selects routes which regular expression from enum_called custom column matches &amp;quot;new called&amp;quot; and updates the route &amp;quot;remapped_called&amp;quot; field according to &amp;quot;new called&amp;quot;. Refer to enum_called_remap.rb before filter script to get instructions on how to integrate this script into the main routing script (i.e. simple_routing_sbc.rb):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  require 'enum_called_remap' unless defined?(EnumCalledRemap)&lt;br /&gt;
  ...&lt;br /&gt;
  include EnumCalledRemap&lt;br /&gt;
  ...&lt;br /&gt;
  before_filter :method =&amp;gt; :enum_called_remap&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resolve ENUM Query down to type A records ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri from responses and get matching outgoing NAP, NAP proxy IP and port through a sequence of DNS queries (i.e. NAPTR, SRV down to type A records). This behavior could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When ENUM and DNS Queries complete, the routing script is called again with the results. The params[:enum_query] and params[:dns_query] objects will be filled with the ENUM Query and the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add dynamic routes ===&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also add dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is mandatary to send DNS query to add dynamic routes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration includes a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS Query ==&lt;br /&gt;
Similarly to ENUM query, starting with release 3.1, it is possible to issue DNS Query requests to DNS servers from routing scripts. This could be used to skip the ENUM Query part when the called uri is already known but still need to get the matching outgoing NAP, NAP proxy IP and port. To do so, the params[:dns_query] object must be filled with the required DNS Query attributes params[:dns_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :dns_query_required.&lt;br /&gt;
&lt;br /&gt;
When DNS Query completes, the routing script is called again with the result. The params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly to ENUM Query, the DNS query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-10-21T18:08:27Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: Added note about dependency between add_dynamic_routes and dns_query&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When ENUM Query completes, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using enum_called_remap.rb before filter script allows handling of ENUM query requests/responses. The match and replace regular expression from ENUM query responses are applied to params[:call][:called] to get &amp;quot;new called&amp;quot;. This script selects routes which regular expression from enum_called custom column matches &amp;quot;new called&amp;quot; and updates the route &amp;quot;remapped_called&amp;quot; field according to &amp;quot;new called&amp;quot;. Refer to enum_called_remap.rb before filter script to get instructions on how to integrate this script into the main routing script (i.e. simple_routing_sbc.rb):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  require 'enum_called_remap' unless defined?(EnumCalledRemap)&lt;br /&gt;
  ...&lt;br /&gt;
  include EnumCalledRemap&lt;br /&gt;
  ...&lt;br /&gt;
  before_filter :method =&amp;gt; :enum_called_remap&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri from responses and get matching outgoing NAP, NAP proxy IP and port through a sequence of DNS queries (i.e. NAPTR, SRV down to A record). This behavior could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When ENUM and DNS Queries complete, the routing script is called again with the results. The params[:enum_query] object will be filled with the ENUM Query attributes from the response and the params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is not possible to get dynamic routes without requesting to send DNS queries.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration includes a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS Query ==&lt;br /&gt;
Similarly to ENUM query, starting with release 3.1, it is possible to issue DNS Query requests to DNS servers from routing scripts. This could be used to skip the ENUM Query part when the called uri is already known but still need to get the matching outgoing NAP, NAP proxy IP and port. To do so, the params[:dns_query] object must be filled with the required DNS Query attributes params[:dns_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :dns_query_required.&lt;br /&gt;
&lt;br /&gt;
When DNS Query completes, the routing script is called again with the result. The params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly to ENUM Query, the DNS query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-10-21T17:55:38Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: Some little adjustment to DNS query section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When ENUM Query completes, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using enum_called_remap.rb before filter script allows handling of ENUM query requests/responses. The match and replace regular expression from ENUM query responses are applied to params[:call][:called] to get &amp;quot;new called&amp;quot;. This script selects routes which regular expression from enum_called custom column matches &amp;quot;new called&amp;quot; and updates the route &amp;quot;remapped_called&amp;quot; field according to &amp;quot;new called&amp;quot;. Refer to enum_called_remap.rb before filter script to get instruction on how to integrate this script into the main routing script (i.e. simple_routing_sbc.rb):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  require 'enum_called_remap' unless defined?(EnumCalledRemap)&lt;br /&gt;
  ...&lt;br /&gt;
  include EnumCalledRemap&lt;br /&gt;
  ...&lt;br /&gt;
  before_filter :method =&amp;gt; :enum_called_remap&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri from responses and get matching outgoing NAP, NAP proxy IP and port through a sequence of DNS queries (i.e. NAPTR, SRV down to A record). This behavior could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When ENUM and DNS Queries complete, the routing script is called again with the results. The params[:enum_query] object will be filled with the ENUM Query attributes from the response and the params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration includes a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS Query ==&lt;br /&gt;
Similarly to ENUM query, starting with release 3.1, it is possible to issue DNS Query requests to DNS servers from routing scripts. This could be used to skip the ENUM Query part when the called uri is already known but still need to get the matching outgoing NAP, NAP proxy IP and port. To do so, the params[:dns_query] object must be filled with the required DNS Query attributes params[:dns_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :dns_query_required.&lt;br /&gt;
&lt;br /&gt;
When DNS Query completes, the routing script is called again with the result. The params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly to ENUM Query, the DNS query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-10-21T17:49:56Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* ENUM Query */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When ENUM Query completes, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using enum_called_remap.rb before filter script allows handling of ENUM query requests/responses. The match and replace regular expression from ENUM query responses are applied to params[:call][:called] to get &amp;quot;new called&amp;quot;. This script selects routes which regular expression from enum_called custom column matches &amp;quot;new called&amp;quot; and updates the route &amp;quot;remapped_called&amp;quot; field according to &amp;quot;new called&amp;quot;. Refer to enum_called_remap.rb before filter script to get instruction on how to integrate this script into the main routing script (i.e. simple_routing_sbc.rb):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  require 'enum_called_remap' unless defined?(EnumCalledRemap)&lt;br /&gt;
  ...&lt;br /&gt;
  include EnumCalledRemap&lt;br /&gt;
  ...&lt;br /&gt;
  before_filter :method =&amp;gt; :enum_called_remap&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri from responses and get matching outgoing NAP, NAP proxy IP and port through a sequence of DNS queries (i.e. NAPTR, SRV down to A record). This behavior could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When ENUM and DNS Queries complete, the routing script is called again with the results. The params[:enum_query] object will be filled with the ENUM Query attributes from the response and the params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration includes a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses. The routes &amp;quot;remapped_nap&amp;quot; takes NAP value from DNS query responses.&lt;br /&gt;
&lt;br /&gt;
It is required to modify main routing script (i.e. simple_routing_sbc.rb) to forward IP/port values from params[:routes] to params[:call] like we are doing for NAP. See following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  # This will select the outgoing NAP for this call according to the &amp;quot;remapped_nap&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy ip address for this call according to the &amp;quot;remapped_nap_proxy_ip&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_ip, :route_field_name =&amp;gt; :remapped_nap_proxy_ip&lt;br /&gt;
  &lt;br /&gt;
  # This will select the outgoing NAP proxy port for this call according to the &amp;quot;remapped_nap_proxy_port&amp;quot; route parameter&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap_proxy_port, :route_field_name =&amp;gt; :remapped_nap_proxy_port&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS Query ==&lt;br /&gt;
Similarly to ENUM query, starting with release 3.1, it is possible to issue DNS Query requests to DNS servers from routing scripts. This could be used to skip the ENUM Query part when the called uri is already known but still need to get the matching outgoing NAP, NAP proxy IP and port. To do so, the params[:dns_query] object must be filled with the required DNS Query attributes params[:dns_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :dns_query_required.&lt;br /&gt;
&lt;br /&gt;
When the DNS Query is completed, the routing script is called again with the result. The params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly to ENUM Query, the DNS query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-10-21T14:45:21Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: Add DNS Query section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When the ENUM Query is completed, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri responses and get the matching outgoing NAP, NAP proxy IP and port through DNS queries (i.e. NAPTR, SRV down to A record). This could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the ENUM and DNS Queries are completed, the routing script is called again with the results. The params[:enum_query] object will be filled with the ENUM Query attributes from the response and the params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses.&lt;br /&gt;
&lt;br /&gt;
== DNS Query ==&lt;br /&gt;
Similarly to ENUM query, starting with release 3.1, it is possible to issue DNS Query requests to DNS servers from routing scripts. This could be used to skip the ENUM Query part when the called uri is already known but still need to get the matching outgoing NAP, NAP proxy IP and port. To do so, the params[:dns_query] object must be filled with the required DNS Query attributes params[:dns_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :dns_query_required.&lt;br /&gt;
&lt;br /&gt;
When the DNS Query is completed, the routing script is called again with the result. The params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;,&lt;br /&gt;
      :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly to ENUM Query, the DNS query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query responses.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-10-21T14:17:54Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* ENUM Query */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            *Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Since version 3.0.57, Referred-By is now a SIP custom parameter&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When the ENUM Query is completed, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also resolve uri responses and get the matching outgoing NAP, NAP proxy IP and port through DNS queries (i.e. NAPTR, SRV down to A record). This could be requested using &amp;quot;dns_query&amp;quot; parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the ENUM and DNS Queries are completed, the routing script is called again with the results. The params[:enum_query] object will be filled with the ENUM Query attributes from the response and the params[:dns_query] object will be filled with the DNS Query attributes from the responses. The DNS query responses are available through params[:dns_query][:responses_list] call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:dns_query][:responses_list]&lt;br /&gt;
    [{:nap=&amp;gt;&amp;quot;NAP_UDP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.191&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8080&amp;quot;, :transport=&amp;gt;&amp;quot;UDP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :priority=&amp;gt;&amp;quot;0&amp;quot;, :weight=&amp;gt;&amp;quot;5&amp;quot;},&lt;br /&gt;
     {:nap=&amp;gt;&amp;quot;NAP_TCP&amp;quot;, :nap_proxy_ip=&amp;gt;&amp;quot;10.3.14.192&amp;quot;, :nap_proxy_port=&amp;gt;&amp;quot;8081&amp;quot;, :transport=&amp;gt;&amp;quot;TCP&amp;quot;, :order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;2&amp;quot;, :priority=&amp;gt;&amp;quot;1&amp;quot;, :weight=&amp;gt;&amp;quot;10&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ENUM query could also create dynamic routes base on DNS query responses. This could be requested using the &amp;quot;add_dynamic_routes&amp;quot; call parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:dns_query] = true&lt;br /&gt;
  params[:enum_query][:add_dynamic_routes] = true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;base_routing.rb&amp;quot; script version should be greater then 1.36 in order to allow dynamic routes creation base on DNS query response.&lt;br /&gt;
&lt;br /&gt;
When requesting to add_dynamic_routes, the dns_query responses are used to create routes. Make sure that your configuration include a route with remapped_nap = &amp;quot;Registered or DNS users&amp;quot;. A route will be created for each DNS query responses.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-07-23T13:32:43Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Available parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :supp_private_address_parameters ]''' (SIP supplementary/second &amp;quot;P-Asserted-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When the ENUM Query is completed, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@exampler-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-07-23T13:31:32Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Script parameters protocol mapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default supplementary/second P-Asserted-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supp_private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Asserted-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in supplementary/second P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When the ENUM Query is completed, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of hash responses for each NAPTR records. &lt;br /&gt;
&lt;br /&gt;
NAPTR records contain:&lt;br /&gt;
* '':uri''&lt;br /&gt;
* '':order''&lt;br /&gt;
* '':preference''&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  params[:enum_query][:responses_list]&lt;br /&gt;
    [{:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;10&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@example-2.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;100&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03222.*$!sip:123456782@example-3.com!&amp;quot;}, &lt;br /&gt;
     {:order=&amp;gt;&amp;quot;200&amp;quot;, :preference=&amp;gt;&amp;quot;1&amp;quot;, :uri=&amp;gt;&amp;quot;!^03111.*$!sip:123456782@exampler-1.com!&amp;quot;}]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2020-05-27T13:45:58Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Authorization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____ISDN_____&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''__R2_CAS__'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''______________SS7___________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''_____________SIP_____________&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Enable SIP Custom Headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address signals.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_nao&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - nature of address indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_npi&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - numbering plan indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_presentation&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - address presentation restricted indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| acli_screening&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| 'Additional Calling Party Information' IE - screening indicator.&lt;br /&gt;
A new ISUP parameter is defined under national option to carry the actual calling party number of the ported subscriber (N2) in the IAM message across the Network.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.143.2&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (2 or 0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (4 or 0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (3 or 0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (1 or 0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (5 or 0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (7 or 0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (8 or 0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (6 or 0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (114 or 0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (117 or 0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (119 or 0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (113 or 0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (115 or 0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (116 or 0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_number (118 or 0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (115 or 0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (116 or 0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (117 or 0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== ENUM Query ==&lt;br /&gt;
Starting with release 3.1, it is possible to issue ENUM Query requests to DNS servers from routing scripts. To do so, the params[:enum_query] object must be filled with the required ENUM Query attributes params[:enum_query][:fqdn] and [[#Refuse|an exception must be raised]] with reason :enum_query_required.&lt;br /&gt;
&lt;br /&gt;
When the ENUM Query is completed, the routing script is called again with the result. The params[:enum_query] object will be filled with the ENUM Query attributes from the response. The params[:enum_query][:result] field will also contain a string indicating the result of the ENUM Query:&lt;br /&gt;
&lt;br /&gt;
* ''ok'': The ENUM Query was successful.&lt;br /&gt;
* ''timeout'': The ENUM Query was not answered.&lt;br /&gt;
&lt;br /&gt;
The params[:enum_query][:responses_list] field will contain a list of responses indicating the result of the ENUM Query. Each response of the list will contain the resolved ''uri'' and also the ''order'' and ''preference'' of this response.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Parameter:_SCCP_Action_Type</id>
		<title>Parameter: SCCP Action Type</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Parameter:_SCCP_Action_Type"/>
				<updated>2020-04-20T16:03:04Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Action Type parameter is used to set a behavior for an SCCP GTT Address Map. Values for this parameter are chosen from a drop-down list. The Action Type parameter can take on the following values:&lt;br /&gt;
&lt;br /&gt;
'''BOLD:''' Recommended Action types &lt;br /&gt;
&lt;br /&gt;
''ITALIC:'' Obscure Action Types&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Desciption !! Start/End Digit&lt;br /&gt;
|-&lt;br /&gt;
| '''FIX'''|| Use a fixed range of digits to perform GTT. For example, use first 3 digits.|| For example, having a start-end digit range of 1-4, '1450' would looked up in the [[SCCP Address Map]] table for the called address '14506558993'.&lt;br /&gt;
|-&lt;br /&gt;
| '''CONST'''|| Always translate the incoming GT to a fixed address (Wildcard) || Not used, must be set to 1-1&lt;br /&gt;
|-&lt;br /&gt;
| ''VARIABLE_ASCENDING''|| Use variable number of digits GTT in ascending order. || For example, use digits 4 to 6 in a variable fashion to perform GTT. In this case, variable means match the fourth digit, and if no match, then match the fourth and fifth digits, and so on.&lt;br /&gt;
|-&lt;br /&gt;
| ''VARIABLE_DESCENDING'' || Use variable number of digits GTT in descending order. || For example, use digits 4 to 6 in a variable fashion to perform GTT. In this case, variable means match the sixth digit, and if no match, then match the fifth and sixth digits, and so on.&lt;br /&gt;
|-&lt;br /&gt;
| ''RANGE'' || Matches a range GT addresses from a fixed range of digits. || For example, use first 6 digits to match a range of GT addresses from 514600 to 514699&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Parameter:_SCCP_Action_Type</id>
		<title>Parameter: SCCP Action Type</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Parameter:_SCCP_Action_Type"/>
				<updated>2020-04-20T15:57:57Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Action Type parameter is used to set a behavior for an SCCP GTT Address Map. Values for this parameter are chosen from a drop-down list. The Action Type parameter can take on the following values:&lt;br /&gt;
&lt;br /&gt;
'''BOLD:''' Recommended Action types &lt;br /&gt;
&lt;br /&gt;
''ITALIC:'' Obscure Action Types&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Desciption !! Start/End Digit&lt;br /&gt;
|-&lt;br /&gt;
| '''FIX'''|| Use a fixed range of digits to perform GTT. For example, use first 3 digits.|| For example, having a start-end digit range of 1-4, '1450' would looked up in the [[SCCP Address Map]] table for the called address '14506558993'.&lt;br /&gt;
|-&lt;br /&gt;
| '''CONST'''|| Always translate the incoming GT to a fixed address (Wildcard) || Not used, must be set to 1-1&lt;br /&gt;
|-&lt;br /&gt;
| ''VARIABLE_ASCENDING''|| Use variable number of digits GTT in ascending order. || For example, use digits 4 to 6 in a variable fashion to perform GTT. In this case, variable means match the fourth digit, and if no match, then match the fourth and fifth digits, and so on.&lt;br /&gt;
|-&lt;br /&gt;
| ''VARIABLE_DESCENDING'' || Use variable number of digits GTT in descending order. || For example, use digits 4 to 6 in a variable fashion to perform GTT. In this case, variable means match the sixth digit, and if no match, then match the fifth and sixth digits, and so on.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2019-07-25T15:30:12Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Available parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''ISDN&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Forward custom headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_numbe (0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :preferred_id_parameters ]''' (SIP &amp;quot;P-Preferred-Identity&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2019-07-25T15:01:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Script parameters protocol mapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''ISDN&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_display_name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - display name&lt;br /&gt;
&lt;br /&gt;
| For example : The 'Cullen Jennings' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Forward custom headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_numbe (0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2019-07-25T14:58:15Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Script parameters protocol mapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''ISDN&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - userinfo &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Forward custom headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_numbe (0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2019-07-25T14:55:56Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Script parameters protocol mapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''ISDN&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default P-Preferred-Identity header forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Forward custom headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_numbe (0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide</id>
		<title>Routing script tutorial:Mini Development Guide</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Routing_script_tutorial:Mini_Development_Guide"/>
				<updated>2019-07-25T14:53:23Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Script parameters protocol mapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Call object  ==&lt;br /&gt;
&lt;br /&gt;
=== Get  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to get the call parameters. The possible parameters are described in the section &amp;quot;Call parameters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  called_number = caf_call.get&amp;amp;nbsp;:called&lt;br /&gt;
&lt;br /&gt;
=== List_params  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash. &lt;br /&gt;
&lt;br /&gt;
  caf_call.list_params.each {|param| call[param] = caf_call.get param }&lt;br /&gt;
&lt;br /&gt;
=== Accept  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to accept a call.  It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg.  If more than one outgoing route is &amp;quot;accepted&amp;quot;, the gateway will try them one by one in the same order that they were accepted.   If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.  &lt;br /&gt;
&lt;br /&gt;
This method takes 2 arguments, the call parameters (hash) and the route parameters (hash).  Note that calling this method does NOT stop the flow of the script.&lt;br /&gt;
&lt;br /&gt;
Apply route remapping rules &lt;br /&gt;
&lt;br /&gt;
  caf_call.accept out_call, route&lt;br /&gt;
&lt;br /&gt;
=== Refuse  ===&lt;br /&gt;
&lt;br /&gt;
This function is used to set the reason code for the incoming call leg refusal.  However, this function does NOT stop the flow of the script. &lt;br /&gt;
&lt;br /&gt;
  caf_call.refuse&amp;amp;nbsp;:reason =&amp;amp;gt;&amp;amp;nbsp;:temporary_failure&lt;br /&gt;
&lt;br /&gt;
To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception.  Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().&lt;br /&gt;
&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
The supported refusal cause values for both refuse() and raise() are described in the section &amp;quot;[[Routing_script_tutorial:Mini_Development_Guide#Reason_values|Reason values]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Script parameters protocol mapping  ===&lt;br /&gt;
&lt;br /&gt;
The following call parameters are available in the call object. For example:&lt;br /&gt;
&lt;br /&gt;
  called_number = call[:called]&lt;br /&gt;
&lt;br /&gt;
For information on how to use and remap call parameters, see [[Toolpack:_How_to_Use_RegEx_in_Remapped_Called_and_Calling_Number_Mask | How to use regex in Remapped Called and Calling Number Mask]]&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;width: 921px; height: 805px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Script parameter name''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''ISDN&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP&amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Comment&amp;lt;br&amp;gt;'''&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Toolpack version&amp;lt;br&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| leg_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Leg ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Session ID&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_session_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Original Session ID (before call transfer or redirections)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| ANI (Group B)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address signals (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The 'telcobridges.com' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - port &amp;lt;br&amp;gt; &lt;br /&gt;
|  For example : The '6060' in From: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - nature of address indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used (when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - numbering plan indicator (*)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| * In ANSI SS7 LNP networks, the IE 'generic address parameter' is used&amp;amp;nbsp;(when present) instead&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information&amp;lt;br&amp;gt; &lt;br /&gt;
Q931: 'Facility CNAM' IE when presentation is allowed for DMS/NI2 variants&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763 &lt;br /&gt;
ITU97: 'Display information' IE - display information &lt;br /&gt;
ANSI95: 'Generic name' IE - display information &lt;br /&gt;
| SIP:From - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_display_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Display' IE - Display information (present and/or first byte)&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Display information' IE - present or not&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - display-name (displays 'anonymous' or not) &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - privacy&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_screening&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Remote-party-id - screen&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_category&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Call party category (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Calling party's category' IE - calling party's category&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - cpc &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - cpc&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber &lt;br /&gt;
(Generic Number / NDS)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Number digits &amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - Number digits&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'support 2 calling number IE' in the profile.  This variable has priority over 'private_address' in the outgoing direction.&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_noa&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Presentation indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_subscriber_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 2nd 'Calling party number' IE - Screening indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: Generic number IE with type 'additional calling party number' - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Facility CNAM' IE when presentation is restricted for DMS/NI2 variants&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_display_type &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Indicate presence or not of the private calling information&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - userinfo &lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - user-info&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'fluffy' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - host (domain or IP) &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| private_address_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-asserted-identity - port&lt;br /&gt;
&lt;br /&gt;
SIP:Remote-party-id - port&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Asserted-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - host (domain or IP)&lt;br /&gt;
&lt;br /&gt;
| For example : The 'telcobridges.com' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| preferred_id_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:P-Preferred-Identity - port&lt;br /&gt;
&lt;br /&gt;
| For example : The '6060' in P-Preferred-Identity: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| DNIS (Group A)&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - user-info and host&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_host &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - host &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The 'telcobridges.com' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_sip_port &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - port number &amp;lt;br&amp;gt; &lt;br /&gt;
| For example : The '6060' in To: &amp;quot;Cullen Jennings&amp;quot; &amp;lt;sip:fluffy@telcobridges.com:6060&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party number' IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Called party number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| charge_number_npi&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Charge number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default redirecting number and original called number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number'&amp;amp;nbsp;1st IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirecting number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp;(2nd header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 1st IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirecting reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| redirecting_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - redirection counter&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (2nd header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number &lt;br /&gt;
(OCN) &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Number digits &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion&amp;amp;nbsp; (1st header) - display-name&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Type of number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Numbering plan identification&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_presentation &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Presentation indicator &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection number' IE - address presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-privacy&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_reason &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Redirecting number' 2nd IE - Reason for redirection&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Redirection information' IE - original redirection reason&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-reason&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| original_called_number_counter &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Diversion (1st header) - diversion-counter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npdi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - with qualifier=Ported number is present&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - npdi=yes is present&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - address signals with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:RequestURI - to user part when rn is present&amp;lt;br&amp;gt; &lt;br /&gt;
| rn is stored in the called number&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - nature of address indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ported_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Generic number' IE - numbering plan indicator with qualifier=Ported number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Only valid if SIP/SS7 supports LNP&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| oli&lt;br /&gt;
(Originating line information) &amp;lt;br&amp;gt; &lt;br /&gt;
| 5ESS Codeset 6 OLI - Value&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| ANSI: 'Originating line information' IE - OLI&amp;lt;br&amp;gt; &lt;br /&gt;
| &lt;br /&gt;
SIP:From - oli &lt;br /&gt;
&lt;br /&gt;
SIP:P-asserted-identity - oli&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Complete Request URI string&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| request_uri_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default URI&amp;amp;nbsp;forwarding behavior from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_header&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Any header&amp;lt;br&amp;gt; &lt;br /&gt;
| Requires option 'Forward custom headers' in Profiles-&amp;gt;SIP &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7.63&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nap&lt;br /&gt;
(Network Access Point) &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg NAP name (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| type_of_network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Type of network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification &amp;lt;br&amp;gt; &lt;br /&gt;
| SIP: Request-Line - cic&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| network_identification_plan&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Transit network selection' IE - Network identification plan &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default location number forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - address signals&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_noa &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - nature of address indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_npi &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - numbering plan indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_presentation&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - presentation restricted indicator&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| location_number_screening &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Location number' IE - screening&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| A script needs to set this to true if it wants to overwrite MLPP information in the outgoing leg.  Otherwise, profile relay 'outgoing mode' applies automatically.&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_look_for_busy &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - look ahead for busy&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_precedence_level &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - precedence level&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:Resource-Priority - q735&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_network_identity &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - network identity&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| mlpp_service_domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'MLPP precedence' IE - MLPP service domain&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| isub_forward_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Overwrite default ISUB forwarding behavior from incoming to outgoing leg &amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0.138&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub parameter&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| called_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Called party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:To - isub-encoding parameter&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub &amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Calling party subaddress' IE - subaddress information&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub&amp;lt;br&amp;gt; &lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| calling_isub_type&amp;lt;br&amp;gt; &lt;br /&gt;
| Q931: 'Callinf party subaddress' IE - type of subaddress&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Q763: 'Access transport' IE&amp;lt;br&amp;gt; &lt;br /&gt;
| SIP:From - isub-encoding&amp;lt;br&amp;gt;&lt;br /&gt;
| &amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default forward call indicator (FCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite FCI bits A, D, F, I and M with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_fci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_fci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_fci_default which corresponding bit in ss7_fci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_default &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Default backward call indicator (BCI) value.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will overwrite BCI bits AB, I, K, M and N with appropriate values according to call conditions&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_bci_force_mask &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Mask to select bits from ss7_bci_default that must be forced.&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Bits from ss7_bci_default which corresponding bit in ss7_bci_force_mask is set will be forced, and no more controlled by Toolpack&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| Enable line service and timeslot selection to create the outgoing leg. tdm_ls_name and tdm_timeslot_nb must be defined along with tdm_ls_name_forward_enabled&amp;lt;br&amp;gt;&lt;br /&gt;
| 3.0&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_ls_name&lt;br /&gt;
(Line Service or T1/E1 trunk) &amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg line service name&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this line service name to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| tdm_timeslot_nb&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg timeslot number&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| if tdm_ls_name_forward_enabled is set, try to use this timeslot number to create outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rtp_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SDP IP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.7&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ss7_cot_enabled &amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Requests SS7 in-call continuity test for this outgoing SS7 call&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Toolpack will request a continuity test on the timeslot before making the outgoing call. If COT fails, the call will be dropped (then another route may be attempted)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg Reverse charging indication IE present&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| If set in routing script, will add Reverse charging indication IE in outgoing leg (also use reverse_charging_indication_forward_enabled)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| reverse_charging_indication_forward_enabled&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt;&lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Enable forwarding of reverse charging indication from incoming to outgoing leg&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.12&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_call_id&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg SIP Call-Id&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.9.112 / 3.0.131&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_local_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg local SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_addr&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP IP address&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sip_remote_port&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| N/A&amp;lt;br&amp;gt; &lt;br /&gt;
| Incoming leg remote SIP port&amp;lt;br&amp;gt; &lt;br /&gt;
| (read-only)&amp;lt;br&amp;gt;&lt;br /&gt;
| 2.8.13&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Noa values  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number (0x4)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number (0x3)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_specific (0x5)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_national_format (0x7)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_routing_international_format (0x8)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;abbreviated_number (0x6)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;subscriber_number_operator_requested (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_operator_requested (0x72)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_operator_requested (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_operator_requested (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_number_present_cut_through_call_to_carrier (0x75)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;test_line_test_code (0x77)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_subscriber_number (0x71)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_national_number (0x73)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;non_unique_international_number (0x74)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_950_numbe (0x76)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;special_number (0x73)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;national_number_with_transit_network_selection (0x74)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;international_number_with_transit_network_selection (0x75)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 0x70&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:called_noa] = 112&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Npi values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown_number&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;isdn&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telephony&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;telex&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;national&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display Type values  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is unspecified. &lt;br /&gt;
*&amp;lt;tt&amp;gt;calling_party_name&amp;lt;/tt&amp;gt; =&amp;amp;gt; Type is 0xB1.&lt;br /&gt;
&lt;br /&gt;
Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 0xB1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display_type] = 177&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Display value  ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;call_params[:calling_display] = &amp;quot;Roger Fluffy&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Presentation values for Calling number, Calling Subscriber (Generic Number), Redirecting Number, Original Called Number (OCN) and Location Number ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_available (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;addr_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;name_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Calling Party Category  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
In case it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mapping from routing script to SS7/CAS R2/SIP&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Routing Script string &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SS7 raw value &amp;lt;br&amp;gt;''' &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''R2 CAS scripts'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''Default Rx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''default Tx CAS'''&amp;lt;br&amp;gt; &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | '''SIP &amp;quot;cpc=&amp;quot;  &amp;lt;br&amp;gt;''' &lt;br /&gt;
|-&lt;br /&gt;
| subscriber&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER &amp;lt;br&amp;gt; &lt;br /&gt;
| 1 and 7&amp;lt;br&amp;gt; &lt;br /&gt;
| 7&amp;lt;br&amp;gt; &lt;br /&gt;
| ordinary&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| subscriber_with_priority&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xb&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_SUBSCRIBER_WITH_PRIORITY &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 and 9 &amp;lt;br&amp;gt; &lt;br /&gt;
| 2 &amp;lt;br&amp;gt; &lt;br /&gt;
| priority&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_french&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x1&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_FRENCH &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_english&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x2&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_ENGLISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_german&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x3&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_GERMAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_russian&amp;lt;br&amp;gt; &lt;br /&gt;
| 0x4&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_RUSSIAN (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| operator_spanish &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x5&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_OPERATOR_SPANISH (5)&amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt; &lt;br /&gt;
| 5 &amp;lt;br&amp;gt;&lt;br /&gt;
| operator&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| data&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xc&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_DATA &amp;lt;br&amp;gt; &lt;br /&gt;
| 6 and 8&amp;lt;br&amp;gt; &lt;br /&gt;
| 6 &amp;lt;br&amp;gt; &lt;br /&gt;
| datacall&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
| 0xd&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_TEST &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| 3 &amp;lt;br&amp;gt; &lt;br /&gt;
| test&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| payphone &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xf&amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_PAYPHONE &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| payphone&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unknown &amp;lt;br&amp;gt; &lt;br /&gt;
| 0x0 &amp;lt;br&amp;gt; &lt;br /&gt;
| CATEGORY_UNKNOWN&amp;lt;br&amp;gt; &lt;br /&gt;
| 4, 11 to 15&amp;lt;br&amp;gt; &lt;br /&gt;
| 7 &amp;lt;br&amp;gt; &lt;br /&gt;
| unknown&amp;lt;br&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| unspecified &amp;lt;br&amp;gt; &lt;br /&gt;
| 0xa &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| none &amp;lt;br&amp;gt; &lt;br /&gt;
| invalid &amp;lt;br&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
[[CAS_R2_scripting#Category_meanings|Link to calling party categories used in CAS R2 scripts]]&lt;br /&gt;
&lt;br /&gt;
=== Screening values for Calling number, Calling Subscriber (Generic Number), and Location Number  ===&lt;br /&gt;
The text below represents the value normally used by routing script.&amp;lt;br&amp;gt;&lt;br /&gt;
Incase it's required to use a value that's not defined in the text values below, a integer can be provided and will be used &amp;quot;as-is&amp;quot; in the signaling message.&amp;lt;br&amp;gt;&lt;br /&gt;
Example numeric values for the SS7 protocol are shown in parenthesis.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;unspecified&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no (0x0)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;pass (0x1)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;fail (0x2)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;network_provided (0x3)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting indicator values  ===&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;no_redirection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_all_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_rerouted_restricted&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;call_diverted_restricted&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;spare&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redirecting number, Original Called Number and Diversion Reason ===&lt;br /&gt;
&lt;br /&gt;
ISDN: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;dte_out_of_order&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;forwarding_by_called_dte&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SS7: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;busy      (SIP: user-busy)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;no_reply  (SIP: no-answer)&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;unconditional&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;deflection_immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;mobile_not_reachable&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OLI (originating line information) values  ===&lt;br /&gt;
&lt;br /&gt;
The OLI parameter is a string that represents an integer value from 0 to 255. &lt;br /&gt;
&lt;br /&gt;
=== Information Transfer Capability values  ===&lt;br /&gt;
&lt;br /&gt;
information_transfer_capability: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;restricted_digital&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;digital_with_tones&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;speech&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;3_1_khz_audio&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;video&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== redirecting_number_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of redirecting number (SIP: diversion header) to the outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &lt;br /&gt;
*0/false: Redirecting number (and original called number) is not forwarded to outgoing call leg&lt;br /&gt;
*1/true: Redirecting number (and original called number) is forwarded to outgoing call leg&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at the input of the routing script depends on the &amp;quot;Forward redirecting number&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
Note: To &amp;quot;insert&amp;quot; a new redirecting number value on the outgoing leg, redirecting_number_forward_enabled must also be set to true.&lt;br /&gt;
&lt;br /&gt;
=== request_uri  ===&lt;br /&gt;
&lt;br /&gt;
Enables access to the Request-Line URI.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, if the Request-Line is: &lt;br /&gt;
&amp;lt;pre&amp;gt;Request-Line: INVITE sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then the retrieved request_uri will be &amp;quot;sip:4175162082@172.22.45.13:5060;user=phone;transport=udp SIP/2.0&amp;quot;. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the routing scripts, to retrieve only the called number, this script can be used:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    if call_params[:request_uri] &amp;amp;amp;&amp;amp;amp; call_params[:request_uri] =~ /sip:(.*)@.*/&lt;br /&gt;
       call_params[:called] = $1&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
==== request_uri_forward_enabled ====&lt;br /&gt;
&lt;br /&gt;
This call parameter controls forwarding or discarding of request uri to outgoing call leg.The request uri is the information in the &amp;quot;Request-Line:&amp;quot; of the SIP INVITE message.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 0/false: Request uri is not forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* 1/true: Request uri is forwarded to outgoing call leg &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default value for this parameters is false. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== sip_scheme  ====&lt;br /&gt;
(Available in Toolpack 3.1+)&lt;br /&gt;
This call parameters indicates the scheme (generally &amp;quot;sip&amp;quot; or &amp;quot;sips&amp;quot;) of the incoming call.&lt;br /&gt;
&lt;br /&gt;
This also allows to control the scheme used for the outgoing call (regardless if request_uri_forward_enabled is used or not)&lt;br /&gt;
&lt;br /&gt;
Note: sips scheme must only be used on TLS NAPs (will cause call routing failure if NAP has only UDP or TCP transport types).&lt;br /&gt;
&lt;br /&gt;
=== sip_header values  ===&lt;br /&gt;
Contains custom sip headers from the inbound call leg. Any custom sip header can be added to an outgoing call leg:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
&lt;br /&gt;
The  SIP header is in string format.&lt;br /&gt;
&lt;br /&gt;
'''string format:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;call[ :sip_header ] = &amp;quot;P-my-custom-header:value1 \nP-my-custom-header2:value2 \nP-my-custom-header3:value3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Note: \n above are actual newline characters, not '\' followed by 'n')&lt;br /&gt;
&lt;br /&gt;
* PCAP sample: [[File:TB_Custom_SIP_Headers.pcap]]&lt;br /&gt;
&lt;br /&gt;
List of sip headers that will not appear in call[:sip_header] since they are already processed by the SIP stack:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Accept               Error-Info             Remote-Party-ID      &lt;br /&gt;
Accept-Contact       Event                  Replaces                        &lt;br /&gt;
Accept-Encoding      Expires                Reply-To               &lt;br /&gt;
Accept-Language      From                   Request-Disposition    &lt;br /&gt;
Alert-Info           In-Reply-To            Subject          &lt;br /&gt;
Allow                Max-Forwards           Subscription-State  &lt;br /&gt;
Allow-Events         MIME-version           Supported           &lt;br /&gt;
Also                 Min-Expires            Timestamp           &lt;br /&gt;
Anonymity            Min-SE                 To             &lt;br /&gt;
Authorization        Organization           Unsupported  &lt;br /&gt;
Authentication-Info  Path                   User-Agent  &lt;br /&gt;
Call-ID              Priority               Via  &lt;br /&gt;
Call-Info            Privacy                Warning  &lt;br /&gt;
Contact              Proxy-Authenticate     WWW-Authenticate  &lt;br /&gt;
Content-Disposition  Proxy-Authorization    Require  &lt;br /&gt;
Content-Encoding     Proxy-Require          Response-Key  &lt;br /&gt;
Content-Language     P-Media-Authorization  Retry-After  &lt;br /&gt;
Content-Length       P-Preferred-Identity   RPID-Privacy  &lt;br /&gt;
Content-Type         P-Asserted-Identity    Route  &lt;br /&gt;
CSeq                 RAck                   RSeq  &lt;br /&gt;
RAck                 Reason                 Security-Client  &lt;br /&gt;
Reason               Record-Route           Security-Server  &lt;br /&gt;
Date                 Refer-To               Security-Verify&lt;br /&gt;
Diversion            Referred-By            Server&lt;br /&gt;
Encryption           Reject-Contact         Service-Route             &lt;br /&gt;
                                            Session-Expires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sip header parameters  ===&lt;br /&gt;
The routing script can read (and modify) some SIP header parameters (user parameters, URI parameters or header parameters) from some SIP headers (To, From, P-Asserted-Identity, Remote-Party-ID, Contact).&lt;br /&gt;
&lt;br /&gt;
==== Available parameters ====&lt;br /&gt;
* '''call[ :calling_parameters ]''' (SIP &amp;quot;From&amp;quot; header)&lt;br /&gt;
* '''call[ :called_parameters ]''' (SIP &amp;quot;To&amp;quot; header)&lt;br /&gt;
* '''call[ :private_address_parameters ]''' (SIP &amp;quot;P-Asserted-Identity&amp;quot; or &amp;quot;Remote-Party-ID&amp;quot; header)&lt;br /&gt;
* '''call[ :contact_parameters ]''' (SIP &amp;quot;Contact&amp;quot; header)&lt;br /&gt;
&lt;br /&gt;
These parameters (if present) contain a hash with 3 keys: user_param, uri_param and header_param.&lt;br /&gt;
Each of this key points to a string that contains all the parameters found in the corresponding SIP header.&lt;br /&gt;
* '''User parameters''' (parameters between the user name/number and the host). Example  &amp;lt;sip:alice;'''param=value'''@somewhere.com&amp;gt;&lt;br /&gt;
* '''URI parameters''' (parameters at the end of the URI). Example  &amp;lt;sip:alice@somewhere.com;'''param=value'''&amp;gt;&lt;br /&gt;
* '''Header parameters''' (outside the URI). Example  &amp;lt;sip:alice@somewhere.com&amp;gt;;'''param=value'''&lt;br /&gt;
Example to print all parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ].inspect -&amp;gt; '{ :user_param =&amp;gt; &amp;quot;name1=value1;name2=value2&amp;quot;, :uri_param =&amp;gt; &amp;quot;name=value&amp;quot;, :header_param =&amp;gt; &amp;quot;name=value;example_param_without_value&amp;quot; }'&lt;br /&gt;
Example to modify (replace) the URI parameters of SIP &amp;quot;To&amp;quot; header:&lt;br /&gt;
  call[ :called_parameters ][ :uri_param ] = &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
'''Note:''' Some parameters are reported as their own call attribute (oli, isub, cpc, transport) so they have the same representation for all protocols (SS7, IDSN, SIP). They won't appear present in the generic SIP header parameters structures above.&lt;br /&gt;
&lt;br /&gt;
==== Forwarding from inbound to outbound call ====&lt;br /&gt;
&lt;br /&gt;
==== Legacy behavior ====&lt;br /&gt;
(For base_routing version 1.32 or older)&lt;br /&gt;
By default, the parameters are not forwarded in a SIP to SIP call flow. The parameters '''will be forwarded''' when:&lt;br /&gt;
* accessed (read) from either the inbound or outbound call parameters&lt;br /&gt;
* written in either the inbound or outbound call parameters&lt;br /&gt;
&lt;br /&gt;
==== Current behavior ====&lt;br /&gt;
(For Toolpack 3.0.118+, with base_routing version 1.33+)&lt;br /&gt;
SIP headers host and parameters are forwarded by default.&lt;br /&gt;
&lt;br /&gt;
A route attribute &amp;quot;forward_sip_domain&amp;quot; (along with filter script &amp;quot;forward_sip_domain.rb&amp;quot;) will control, per route, if SIP headers host+parameters must be forwarded.&lt;br /&gt;
&lt;br /&gt;
==== Example usage ====&lt;br /&gt;
Example to print the user parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if call[:calling_parameters]&lt;br /&gt;
    puts &amp;quot;user parameters = #{call[:calling_parameters][:user_param].inspect}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example SIP &amp;quot;From&amp;quot; header:&lt;br /&gt;
  From:&amp;lt;sip:123456782;test1=val1;test2=val2@something.com;test3=val3;test4=val4&amp;gt;;test5=val5;test6=val6&lt;br /&gt;
And the resulting content in the routing script:&lt;br /&gt;
  call[:calling_parameters].inspect -&amp;gt; {:user_param=&amp;gt;&amp;quot;test1=val1;test2=val2&amp;quot;, :uri_param=&amp;gt;&amp;quot;test3=val3;test4=val4&amp;quot;, :header_param=&amp;gt;&amp;quot;test5=val5;test6=val6&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Example to overwrite inbound leg calling parameters with new parameters for the outbound leg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
call [:calling_parameters] = { &lt;br /&gt;
  :user_param =&amp;gt; &amp;quot;user_param7=7;user_param8=8&amp;quot;,&lt;br /&gt;
  :uri_param =&amp;gt; &amp;quot;uri_param9=value9&amp;quot;,&lt;br /&gt;
  :header_param =&amp;gt; &amp;quot;header_paramA=A&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to add user=phone and keep all other uri parameters.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  call[:calling_parameters] ||= {} # Create a hash if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] ||= &amp;quot;&amp;quot; # Create a string if not already present&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;;&amp;quot; if call[:calling_parameters][:uri_param] != &amp;quot;&amp;quot;&lt;br /&gt;
  call[:calling_parameters][:uri_param] += &amp;quot;user=phone&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MLPP Precedence values  ===&lt;br /&gt;
&lt;br /&gt;
mlpp_look_for_busy: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;path_reserved&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;not_allowed&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_precedence_level: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;flash_override&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;flash&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;immediate&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;routine&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_network_identity:&lt;br /&gt;
&lt;br /&gt;
3 digits value from 0 to 999&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mlpp_service_domain:&lt;br /&gt;
&lt;br /&gt;
24 bits value from 0 to 16777215&lt;br /&gt;
&lt;br /&gt;
=== ISUB subaddress information values  ===&lt;br /&gt;
&lt;br /&gt;
called_isub_type: &lt;br /&gt;
calling_isub_type: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_ia5&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;nsap_bcd&amp;lt;/tt&amp;gt; &lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
called_isub: &lt;br /&gt;
calling_isub: &lt;br /&gt;
&lt;br /&gt;
Digits for the subaddress information.&lt;br /&gt;
&lt;br /&gt;
=== Network Identification Plan  ===&lt;br /&gt;
&lt;br /&gt;
network_identification_plan: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;Unknown&amp;lt;/tt&amp;gt; (value 0)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic&amp;lt;/tt&amp;gt; (3 digits carrier identification code plus circuit code, value 1, SS7 or ISDN)&lt;br /&gt;
*&amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; (User, value 2, ISDN only)&lt;br /&gt;
*&amp;lt;tt&amp;gt;cic4&amp;lt;/tt&amp;gt; (4 digits carrier identification code plus circuit code, value 2, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;dnic&amp;lt;/tt&amp;gt; (public Data Network ID, value 3, SS7 only) &lt;br /&gt;
*&amp;lt;tt&amp;gt;mnic&amp;lt;/tt&amp;gt; (public land mobile network, value 6, SS7 only)&lt;br /&gt;
&lt;br /&gt;
=== Registered Users Information ===&lt;br /&gt;
Routing script can access information about registered users (when either the calling or called user is a known registered user).&lt;br /&gt;
When these fields are empty, it means that the calling/called (SIP from/to) does not correspond to a known registered user (routing script may still decide to route the call based on static routes).&lt;br /&gt;
&lt;br /&gt;
Information for the called user:&lt;br /&gt;
  params[:registered_user]&lt;br /&gt;
Information for the calling user:&lt;br /&gt;
  params[:calling_registered_user]&lt;br /&gt;
&lt;br /&gt;
These parameters are a hash of key/values that provide information about the contact.&lt;br /&gt;
  {&lt;br /&gt;
    :contact_list=&amp;gt;&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        :contact=&amp;gt;&amp;quot;&amp;lt;sip:user_name_or_number@hostname:7070;transport=UDP&amp;gt;&amp;quot;,    -&amp;gt; Full contact&lt;br /&gt;
        :expires=&amp;gt;&amp;quot;60&amp;quot;,                   -&amp;gt; Contact expiry time (seconds)&lt;br /&gt;
        :host=&amp;gt;&amp;quot;hostname&amp;quot;,                -&amp;gt; host name from the contact header&lt;br /&gt;
        :name=&amp;gt;&amp;quot;user_name_or_number&amp;quot;,     -&amp;gt; user name from the contact header&lt;br /&gt;
        :nap_in=&amp;gt;&amp;quot;NAP_NAME&amp;quot;,              -&amp;gt; NAP that the contact has registered from&lt;br /&gt;
        :port=&amp;gt;&amp;quot;7070&amp;quot;,                    -&amp;gt; Port from the contact header&lt;br /&gt;
        :transport=&amp;gt;&amp;quot;UDP&amp;quot;                 -&amp;gt; Transport type from the contact header&lt;br /&gt;
        :q_value=&amp;gt;&amp;quot;0.00&amp;quot;,                 -&amp;gt; Q-value for the contact (for contact ordering)&lt;br /&gt;
        :src_host=&amp;gt;&amp;quot;10.0.0.10&amp;quot;,           -&amp;gt; Actual source IP address that the contact has registered from&lt;br /&gt;
        :src_port=&amp;gt;&amp;quot;7070&amp;quot;,                -&amp;gt; Actual source port that the contact has registered from&lt;br /&gt;
        :src_transport=&amp;gt;&amp;quot;UDP&amp;quot;,            -&amp;gt; Actual protocol that the contact has been registering with&lt;br /&gt;
       }&lt;br /&gt;
     ]&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Route parameters  ==&lt;br /&gt;
&lt;br /&gt;
All route may have these parameters: &lt;br /&gt;
&lt;br /&gt;
*calling &lt;br /&gt;
*called &lt;br /&gt;
*nap &lt;br /&gt;
*remapped_calling &lt;br /&gt;
*remapped_called &lt;br /&gt;
*remapped_nap &lt;br /&gt;
*remapped_destination_leg_profile (called remapped_profile prior to Toolpack 2.9)&lt;br /&gt;
*remapped_source_leg_profile (called remapped_incoming_profile prior to Toolpack 2.9)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  route[:remapped_nap]&lt;br /&gt;
&lt;br /&gt;
Additionally it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
For example:&lt;br /&gt;
*priority&lt;br /&gt;
*weight&lt;br /&gt;
&lt;br /&gt;
== Routing calls toward registered users ==&lt;br /&gt;
Static routes normally chose an outbound NAP to forward the call to.&lt;br /&gt;
&lt;br /&gt;
But it's also possible to create routes which outbound NAP is dynamically chosen by matching a registered user (when using [[Sip_registration_forwarding|SIP registration forwarding]]).&lt;br /&gt;
&lt;br /&gt;
More information can be found [[Sip_registration_forwarding#SIP_Calls_routing|here]] about the way to control the [[Sip_registration_forwarding#SIP_Calls_routing|priority of &amp;quot;dynamic&amp;quot; vs &amp;quot;static&amp;quot; routes]].&lt;br /&gt;
&lt;br /&gt;
More information can be found [[#Registered_Users_Information|here]] about using routing scripts to access registered users information during call routing.&lt;br /&gt;
&lt;br /&gt;
== Playing prompts announcements or tones  ==&lt;br /&gt;
&lt;br /&gt;
New feature in release 2.6, all bridges may have these parameters. These can be used to play IVR prompts (audio files) in different states of the call flow.&lt;br /&gt;
&lt;br /&gt;
*'''announcement_tone''' (played before outgoing call is routed)&lt;br /&gt;
*'''ring_tone''' (played after when waiting for outgoing call to answer)&lt;br /&gt;
*'''busy_tone''' (played if outgoing call failed)&lt;br /&gt;
*'''disconnect_tone''' (played after the call has reached it's maximum duration)&lt;br /&gt;
&lt;br /&gt;
Example to play an announcement to incoming call (before routing outgoing call, regardless if a matching route is found or not):&lt;br /&gt;
  bridge[:announcement_tone ] = &amp;quot;my_announcement.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play a ring-tone while the outgoing call is ringing:&lt;br /&gt;
  bridge[:ring_tone] = &amp;quot;my_ring_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when outgoing call fails (no route, or outgoing call is refused):&lt;br /&gt;
  bridge[:busy_tone] = &amp;quot;my_busy_tone.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example to play an audio file when call has reached the maximum allowed duration:&lt;br /&gt;
  bridge[:disconnect_tone] = &amp;quot;your_account_balance_is_empty.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Announcement file path format and options ===&lt;br /&gt;
&lt;br /&gt;
All file plabyacks (:announcement_tone,&amp;amp;nbsp;:busy_tone,&amp;amp;nbsp;:ring_tone,&amp;amp;nbsp;:disconnect_tone) inside bridge parameters use this format. &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;file1.wav:repeat:start_off:end_off,file2.wav:repeat:start_off:end_off,file3.wav:repeat:start_off:end_off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Optional parameters:&lt;br /&gt;
* repeat: number of times to play the file (0 and 1 have the same result)&lt;br /&gt;
* start_off: Start offset in milliseconds&lt;br /&gt;
* end_off: End offset in milliseconds&lt;br /&gt;
&lt;br /&gt;
Http and other path formats are described here: [[Customer_application_framework:play_audio_files#Play_path_format|Path format]]&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
The following example will play file1.wav once, and then play file2.wav in loop: &lt;br /&gt;
  &amp;quot;file1.wav,file2.wav:-1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following example will play file1.wav from start offset of 1 second to end offset of 3 seconds, then twice file2.wav from second 5 to second 10.&lt;br /&gt;
  &amp;quot;file1.wav:0:1000:3000,file2.wav:2:5000:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
==== Example 3 ====&lt;br /&gt;
The following example will play file1.wav once, ending at offset of 30 seconds.&lt;br /&gt;
  &amp;quot;file1.wav:0:0:30000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== announcement_tone  ===&lt;br /&gt;
&lt;br /&gt;
  params[:bridge][:announcement_tone] = &amp;quot;announcement.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call before any outgoing call is placed. The outgoing call occurs when the file finished playing.&lt;br /&gt;
&lt;br /&gt;
==== announcement_tone options ====&lt;br /&gt;
===== announcement_tone_answer =====&lt;br /&gt;
  params[:bridge][:announcement_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the announcement. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
===== announcement_code_detect =====&lt;br /&gt;
This option allows that the tone detection is enabled during the announcement play.&lt;br /&gt;
&lt;br /&gt;
Collected digits can be inserted into the CDR logs (radius attribute &amp;quot;Telcob-CollectedDigits&amp;quot;, or text CDR variable @{CollectedDigits}).&lt;br /&gt;
&lt;br /&gt;
Collected digits can also be sent back to routing script, which is called again with the same call attributes, except that the called number is replaced by the collected digits.&lt;br /&gt;
&lt;br /&gt;
Code detect has multiple options, as shown in the following code:&lt;br /&gt;
  code_detect = {&lt;br /&gt;
    :type                   =&amp;gt; :DTMF,   # :DTMF or :MFR1 tone detection.&lt;br /&gt;
                                        # Default is MFR1.&lt;br /&gt;
    :prefix                 =&amp;gt; &amp;quot;&amp;quot;,      # Prefix (digits) that is removed from collected digits.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix                 =&amp;gt; &amp;quot;&amp;quot;,      # Suffix (digits) that is removed from collected digits&lt;br /&gt;
                                        # and causes routing script to be immediately called.&lt;br /&gt;
                                        # Default is empty.&lt;br /&gt;
    :suffix_removal         =&amp;gt; false,   # Controls the removal of the suffix from the collected digit string that's reported to routing script.&lt;br /&gt;
                                        # Default is false&lt;br /&gt;
    :timeout                =&amp;gt; 0,       # Inter-digit timeout (ms) after which collected digits are passed to the routing script.&lt;br /&gt;
                                        # Use 0 for &amp;quot;no timeout&amp;quot;.&lt;br /&gt;
                                        # Default is 1000ms&lt;br /&gt;
    :barge_in_interruption  =&amp;gt; true,    # When enabled, playing announcement is stopped as soon as first digit is collected.&lt;br /&gt;
                                        # Default is true.&lt;br /&gt;
    :proceed_on_play_done   =&amp;gt; false,   # When true:  Outgoing call is made after announcement finishes playing.&lt;br /&gt;
                                        #             Routing script is not called again.&lt;br /&gt;
                                        # When false: Outgoing call is never made.&lt;br /&gt;
                                        #             Digits are collected until timeout or suffix match,&lt;br /&gt;
                                        #             then routing script is called again.&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook            =&amp;gt; false,   # Specific for CAS-R1 calls. Makes CAS bits switch to &amp;quot;on-hook&amp;quot; when announcement finished playing&lt;br /&gt;
                                        # (but the call is not &amp;quot;terminated&amp;quot; from Toolpack point of view)&lt;br /&gt;
                                        # Default is false.&lt;br /&gt;
    :cas_on_hook_delay      =&amp;gt; 0,       # Duration of cas bits &amp;quot;on-hook&amp;quot; state.&lt;br /&gt;
                                        # Only effective if cas_on_hook is set to true.&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot;.&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
    :repeat_delay           =&amp;gt; 0,       # Delay between repetition of the announcement. The announcement will repeat&lt;br /&gt;
                                        # itself every &amp;quot;repeat_delay&amp;quot; until a code is detected (suffix match or timetout).&lt;br /&gt;
                                        # Value of 0 stands for &amp;quot;infinite delay&amp;quot; (no repeating).&lt;br /&gt;
                                        # Default is 0.&lt;br /&gt;
  }&lt;br /&gt;
'''Example 1''': Collect DTMF digits, and call routing script again with collected digits upon timeout or suffix match.&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :suffix =&amp;gt; &amp;quot;#&amp;quot;, :timeout =&amp;gt; 5000 }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
'''Example 2''': Collect digits during the announcement (for CDR logs), then proceed (make outgoing call) after announcement finishes playing&lt;br /&gt;
  code_detect = { :type =&amp;gt; :DTMF, :timeout =&amp;gt; 0, :barge_in_interruption =&amp;gt; false, :proceed_on_play_done =&amp;gt; true }&lt;br /&gt;
  params[:bridge][:announcement_code_detect] = code_detect&lt;br /&gt;
&lt;br /&gt;
==== Controlling what happens after announcement ====&lt;br /&gt;
The routing script can control what happens with the call after the announcement finishes playing:&lt;br /&gt;
* An outgoing call is made&lt;br /&gt;
* Incoming call is hung-up&lt;br /&gt;
* Do nothing (wait for the incoming call to hang-up)&lt;br /&gt;
===== An outgoing call is made =====&lt;br /&gt;
This happens when the script has returned matching routes (and did not raise RoutingException)&lt;br /&gt;
&lt;br /&gt;
===== Incoming call is hung-up =====&lt;br /&gt;
This happens when the script returns no routes (in which case base_routing will raise RoutingException with cause :no_route).&lt;br /&gt;
&lt;br /&gt;
It also happens when the script explicitly raises RoutingException.&lt;br /&gt;
&lt;br /&gt;
The incoming call will be terminated with the specified cause.&lt;br /&gt;
For example&lt;br /&gt;
    raise RoutingException, :temporary_failure&lt;br /&gt;
(See &amp;quot;Reason values&amp;quot; section in this page for list of available causes)&lt;br /&gt;
&lt;br /&gt;
===== Do nothing (wait for the incoming call to hang-up) =====&lt;br /&gt;
If a filter raises RoutingException with code :ok, then the incoming call will not be terminated at the end of the announcement play.&lt;br /&gt;
Announcement digit collection will remain active if appropriate.&lt;br /&gt;
For example:&lt;br /&gt;
    raise RoutingException, :ok&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ring_tone  ===&lt;br /&gt;
  params[:bridge][:ring_tone] = &amp;quot;ringing.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call while waiting for the outgoing call to be answered.&lt;br /&gt;
&lt;br /&gt;
Ring tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:ring_tone] will override the profile's ring tone behavior).&lt;br /&gt;
&lt;br /&gt;
==== ring_tone options ====&lt;br /&gt;
===== ring_tone_state =====&lt;br /&gt;
  params[:bridge][:ring_tone_state] = :alerted&lt;br /&gt;
&lt;br /&gt;
Call state from which ring tone is being played. Available values are:&lt;br /&gt;
* '''immediately''':  Ring tone starts playing immediately on the incoming leg&lt;br /&gt;
* '''accepted''':     Ring tone starts playing as soon as outgoing call is accepted&lt;br /&gt;
* '''callprogress''': Ring tone starts playing as soon as &amp;quot;call progress&amp;quot; is received on the outgoing call&lt;br /&gt;
* '''alerted''' (default):      Ring tone starts playing only once outgoing call is alerted (but won't play if alert indicates early media from outgoing call)&lt;br /&gt;
&lt;br /&gt;
This option also apply when params[:bridge][:ring_tone] is not used, because it also apply to ring tone playback configured in the Web Portal, from the incoming call's profile.&lt;br /&gt;
&lt;br /&gt;
=== busy_tone  ===&lt;br /&gt;
  Toolpack 2.8 and above:&lt;br /&gt;
    params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Note: Obsolete name (toolpack 2.7.153 and earlier, but still supported in recent releases):&lt;br /&gt;
    params[:bridge][:call_progress_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when outgoing call fails (never answered).&lt;br /&gt;
&lt;br /&gt;
Note that announcement_tone, if used, is played before the outgoing call attempt is made, and thus before the busy_tone.&lt;br /&gt;
&lt;br /&gt;
Busy tone playback can also be configured in the Web Portal, from the incoming call's profile (under &amp;quot;Tones and Call Progress Options&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Routing script has precedence over profile (a routing script that fills params[:bridge][:busy_tone] will override the profile's busy tone behavior).&lt;br /&gt;
&lt;br /&gt;
Special value '''&amp;quot;none&amp;quot;''' can be used by routing script to force playing nothing (as empty string would default to profile's behavior)&lt;br /&gt;
&lt;br /&gt;
==== busy_tone options ====&lt;br /&gt;
===== busy_tone_answer =====&lt;br /&gt;
  params[:bridge][:busy_tone_answer] = &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Forces an answer of the call before playing the busy tone. Default if argument not provided is &amp;quot;no&amp;quot;, in which case call is only alerted with in-band media.&lt;br /&gt;
&lt;br /&gt;
=== disconnect_tone  ===&lt;br /&gt;
  params[:bridge][:disconnect_tone] = &amp;quot;max_duration.wav&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Audio file played on the incoming call when call duration (:max_call_duration) is reached. Then the leg will be terminated with specified reason (:call_duration_reason).&lt;br /&gt;
&lt;br /&gt;
==== disconnect_tone options ====&lt;br /&gt;
===== max_call_duration  =====&lt;br /&gt;
  params[:bridge][:max_call_duration] = &amp;quot;60000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Maximum call duration in millisecond. This timer is started when entering answer state.&lt;br /&gt;
&lt;br /&gt;
===== call_duration_reason  =====&lt;br /&gt;
  params[:bridge][:call_duration_reason] =&amp;amp;nbsp;:resource_unavailable &lt;br /&gt;
&lt;br /&gt;
Drop both legs with this reason when call duration (:max_call_duration) is reached.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts through Web Portal ===&lt;br /&gt;
Audio prompts can be uploaded or deleted from the TMedia unit through the Web Portal:&lt;br /&gt;
[[Toolpack:Configuring_Audio_Prompts_A|Managing audio prompts]]&lt;br /&gt;
&lt;br /&gt;
Prompts management must be done using the Web Portal of the primary server (in systems with redundant TMedia units or redundant host servers).&lt;br /&gt;
The file will automatically get replicated to the secondary server.&lt;br /&gt;
&lt;br /&gt;
=== Managing audio prompts manually ===&lt;br /&gt;
Any file on the TMedia host file system can be played. This means it's possible to manage prompts through ssh/scp.&lt;br /&gt;
&lt;br /&gt;
==== The default (replicated) prompts folder ====&lt;br /&gt;
By default, when playing a prompt, Toolpack will look in the default prompts folder:&lt;br /&gt;
 /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
The root of this &amp;quot;prompts&amp;quot; directory is automatically replicated to secondary unit of redundant setups (1+1, N+1, redundant hosts). Sub-folders won't be replicated.&lt;br /&gt;
&lt;br /&gt;
Any prompt play request without explicit file path will map to this folder. For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/pkg/prompts/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Relative file paths ====&lt;br /&gt;
Any file path that begins with &amp;quot;file://&amp;quot; is considered relative to the tbstreamserver application's working directory:&lt;br /&gt;
 /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/&lt;br /&gt;
(Where &amp;quot;2.8&amp;quot; may be replaced by the current major version of your system)&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file://my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /lib/tb/toolpack/setup/12358/2.8/apps/tbstreamserver/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
==== Absolute file paths ====&lt;br /&gt;
Absolute paths can also be provided.&lt;br /&gt;
For example:&lt;br /&gt;
  params[:bridge][:busy_tone] = &amp;quot;file:///root/my_folder/no_route.wav&amp;quot; &lt;br /&gt;
This will correspond to file /root/my_folder/no_route.wav&lt;br /&gt;
&lt;br /&gt;
== Recording call legs  ==&lt;br /&gt;
Introduced in release 2.6.44, it's now possible to use routing scripts to ask for recording incoming and/or outgoing call legs.&lt;br /&gt;
&lt;br /&gt;
See example filter script &amp;quot;call_recording&amp;quot; (created by default in Web Portal routing scripts starting with 2.6.44) for an example.&lt;br /&gt;
&lt;br /&gt;
=== Recording the incoming call leg  ===&lt;br /&gt;
To record the incoming call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter:&lt;br /&gt;
&lt;br /&gt;
  bridge[ :record_incoming ]  = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Recording the outgoing call leg  ===&lt;br /&gt;
To record the outgoing call leg, the routing script (in a &amp;quot;after filter&amp;quot; for example) has to set the following parameter, per route (the decision to record or not, or the file name to record to, can be set per matching route):&lt;br /&gt;
&lt;br /&gt;
  # Need to clone the routes in order to have the right to modify them&lt;br /&gt;
  routes = clone_routes params[:routes]&lt;br /&gt;
  routes.each do |route|&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  # Store modified routes back to the parameters for this outgoing call&lt;br /&gt;
  params[:routes] = routes&lt;br /&gt;
&lt;br /&gt;
=== Record the outgoing call leg within incoming leg's recorded file (mixing)  ===&lt;br /&gt;
  [...]&lt;br /&gt;
    route[ :record_outgoing ]  = &amp;quot;@{MixWithIncoming}&amp;quot;&lt;br /&gt;
  [...]&lt;br /&gt;
&lt;br /&gt;
=== Choosing file path to record to  ===&lt;br /&gt;
The value assigned to &amp;quot;:record_incoming&amp;quot; or &amp;quot;:record_outgoing&amp;quot; is the path to record the file to.&lt;br /&gt;
&lt;br /&gt;
The paths can be absolute, or relative. When relative, they are relative to the &amp;quot;tbstreamserver&amp;quot; application working directory, for example:&lt;br /&gt;
  /lib/tb/toolpack/setup/12358/2.7/apps/tbstreamserver/&lt;br /&gt;
&lt;br /&gt;
* Empty file name will default to a name that contains various information about the call:&lt;br /&gt;
** ''LinkId'':     Id common between all legs of this call bridge&lt;br /&gt;
** ''LegId'':      Unique Id for this leg&lt;br /&gt;
** ''Nap'':        Current NAP name this call leg is from&lt;br /&gt;
** ''Direction'':  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
** ''Calling'':    The calling number of this call leg&lt;br /&gt;
** ''Called'':     The called number of this call leg&lt;br /&gt;
** ''Protocol'':   The signaling protocol of this call leg (SS7, ISDN, CAS, SIP)&lt;br /&gt;
** ''Media info'': Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
* To record outgoing call leg in the same audio file as incoming call leg (mixing), use the following:&lt;br /&gt;
** @{MixWithIncoming}: Record outgoing legs in same file as incoming legs&lt;br /&gt;
* Variables can be used to insert in the recording path information that's not already available from routing scripts:&lt;br /&gt;
** @{CURRENT_PKG}: Version of current package&lt;br /&gt;
*** Example: 2.6.45&lt;br /&gt;
** @{DATE format}: Prints the date, where 'format' is expressed as described for the 'strftime' function&lt;br /&gt;
*** Example: @{DATE %Y-%m-%d} =&amp;gt; 2013-01-28&lt;br /&gt;
** @{DefaultName}: Replaced by the default file name for recording, which contains:&lt;br /&gt;
*** LinkId:     Id common between all legs of this call bridge&lt;br /&gt;
*** LegId:      Unique Id for this leg&lt;br /&gt;
*** Nap:        Current NAP name this call leg is from&lt;br /&gt;
*** Direction:  &amp;quot;IN&amp;quot; or &amp;quot;OUT&amp;quot; (depends if call leg is incoming or outgoing leg)&lt;br /&gt;
*** Calling:    Calling number&lt;br /&gt;
*** Called:     Called number&lt;br /&gt;
*** Protocol:   Protocol type of this call (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
*** Media info: Codec + IP/Port for SIP calls, Trunk/Timeslot for TDM calls&lt;br /&gt;
*** Example: &amp;quot;73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{DefaultPath}:  Default recording folder and file name: &amp;quot;@{RECORD_PATH}/@{DATE %Y-%m-%d}/@{DefaultName}&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-F3D67B4B-NAP_SS7-IN-5550000-5550001-SS7-TRUNK_BELL_11-24.wav&amp;quot;&lt;br /&gt;
*** Example: &amp;quot;/lib/tb/toolpack/setup/12358/recorded_calls/73EBA698-73EBA698-NAP_SIP-OUT-5550000-5550001-SIP-G723-10.3.10.101-1050.wav&amp;quot;&lt;br /&gt;
** @{Direction}: Direction of current leg (IN our OUT)&lt;br /&gt;
*** Example: IN&lt;br /&gt;
** @{LegId}: Current LegId (Unique Id for this leg)&lt;br /&gt;
*** Example: F3D67B4B&lt;br /&gt;
** @{LinkId}: Current LinkId (Id common between all legs of this call bridge)&lt;br /&gt;
*** Example: 73EBA698&lt;br /&gt;
** @{PKG_HOME}: Path where packages are stored.&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg&lt;br /&gt;
** @{PROMPT_PATH}: Default path where audio prompts are stored&lt;br /&gt;
*** Note: It's not recomended to use that path on redundant systems, package file replication may cause confusion in recorded files.&lt;br /&gt;
*** Example: /lib/tb/toolpack/pkg/prompts&lt;br /&gt;
** @{Protocol}: Protocol of current leg&lt;br /&gt;
*** Example: SS7&lt;br /&gt;
** @{RECORD_PATH}: Default recording folder: &amp;quot;@{TB_SETUP_HOME}/recorded_calls/&amp;quot;&lt;br /&gt;
** @{TBX_GW_PORT}: Current &amp;quot;System Id&amp;quot; (also called &amp;quot;Gateway Port&amp;quot;)&lt;br /&gt;
*** Example: 12358&lt;br /&gt;
** And all variables listed here: [[Customer_application_framework:play_audio_files#Helpful_variables_to_build_play_or_record_file_paths|Building play or record file path]]&lt;br /&gt;
&lt;br /&gt;
== Controlling UUI (user-to-user information) relay  ==&lt;br /&gt;
UUI (user-to-user information) can be present in different messages received by either call leg during a call. For example, information can be carried during the initial invite, other information can be carried when the call is alerted, answered, or terminated.&lt;br /&gt;
&lt;br /&gt;
Routing scripts can control if the UUI received from one leg through the call will be forwarded to the other call leg:&lt;br /&gt;
*uui_forward_enabled&lt;br /&gt;
&lt;br /&gt;
Routing scripts can also read and modify the UUI received with the incoming call leg, before it gets forwarded upon creation of the outgoing call leg:&lt;br /&gt;
*uui &lt;br /&gt;
&lt;br /&gt;
=== UUI (user-to-user indication) values  ===&lt;br /&gt;
&lt;br /&gt;
Byte array represented as ruby String. Use ''bridge=params[:bridge]'', then ''bridge[:uui]'' to access the data.&lt;br /&gt;
&lt;br /&gt;
To access the bytes in Ruby, use ruby String operator []. For example:  bridge[:uui][0] will return the binary value of the first UUI byte.&lt;br /&gt;
&lt;br /&gt;
Function each_byte can also be useful to iterate through all bytes of the UUI.&lt;br /&gt;
&lt;br /&gt;
=== uui_forward_enabled values  ===&lt;br /&gt;
&lt;br /&gt;
Controls forwarding or discarding of UUI to outgoing call leg. &lt;br /&gt;
&lt;br /&gt;
Values for this parameter are &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true.&lt;br /&gt;
* 0/false: UUI is not forwarded between call legs&lt;br /&gt;
* 1/true: UUI is forwarded between call legs&lt;br /&gt;
&lt;br /&gt;
The value for this parameter at input of routing script depends on the &amp;quot;Forward UUI&amp;quot; parameter in the &amp;quot;Advanced&amp;quot; section of the Gateway configuration page of the Web Portal. The script may change this value to override the Gateway configuration.&lt;br /&gt;
&lt;br /&gt;
== Authorization ==&lt;br /&gt;
Starting with release 2.7, it is possible to issue RADIUS authorization requests from routing scripts. To do so, the params[:authorization] object must be filled with the required RADIUS attributes and [[#Refuse|an exception must be raised]] with reason :authorization_required.&lt;br /&gt;
&lt;br /&gt;
When the authorization is completed, the routing script is called again with the result. The params[:authorization] object will be filled with the RADIUS attributes from the response. The params[:authorization][:result] field will also contain a string indicating the result of the authorization:&lt;br /&gt;
&lt;br /&gt;
* ''accept'': The authorization was successful.&lt;br /&gt;
* ''reject'': The authorization was refused.&lt;br /&gt;
* ''challenge'': The authorization was challenged.&lt;br /&gt;
* ''timeout'': The authorization was not answered.&lt;br /&gt;
&lt;br /&gt;
== Call diversion options ==&lt;br /&gt;
It's possible to control the call flow when a call diversion information is received in the alerting state.&lt;br /&gt;
&lt;br /&gt;
Two fields are available: bridge[ :diversion ] and bridge[ :diversion_reason ]&lt;br /&gt;
&lt;br /&gt;
The internal release cause TOOLPACK_DIVERT_NOT_ALLOWED is used by gateway application to terminate both legs.&lt;br /&gt;
&lt;br /&gt;
  bridge[ :diversion ] = :allowed&lt;br /&gt;
The alert message will not be analyzed and the call will be progressed. Default behavior.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed&lt;br /&gt;
If the alert message indicates that the call is diverted, the call will be released no matter the In-band information to allow&lt;br /&gt;
early media.&lt;br /&gt;
  bridge[ :diversion ] = :not_allowed_w_early_media&lt;br /&gt;
The call will be released If the alert message indicates that the call is diverted with in-band information to allow early media.&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;*&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the gateway will drop the call for any redirecting reason. &lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;0,1,2&amp;quot;&lt;br /&gt;
or&lt;br /&gt;
  bridge[ :diversion_reason ] = &amp;quot;unknown,busy,no_reply&amp;quot;&lt;br /&gt;
If the diversion is not allowed, the redirecting reason will be analyzed and the call will only be dropped for the configured cases.&lt;br /&gt;
&lt;br /&gt;
See section [[Routing_script_tutorial:Mini_Development_Guide#Redirecting_number,_Original_Called_Number_and_Diversion_Reason|Redirecting number reason values]].&lt;br /&gt;
&lt;br /&gt;
== Call transfer requests ==&lt;br /&gt;
Toolpack allows that [[Call transfer]] requests are relayed from one leg to the other, or to process them locally (making another outgoing call to replace the call that requested the call transfer).&lt;br /&gt;
&lt;br /&gt;
If the chosen [[Call transfer]] mode is to process requests locally, upon reception of a call transfer request (SIP REFER or ISDN Facility), routing script will be called once again, to select the routes for the new outgoing call (call transfer target).&lt;br /&gt;
&lt;br /&gt;
=== How to route call transfer request ===&lt;br /&gt;
Routing of a call transfer request is done exactly like routing of a normal incoming call.&lt;br /&gt;
The routing script generally does not need any modification to support that.&lt;br /&gt;
&lt;br /&gt;
In some cases, the routing script may want to use information related to the transfer request to perform routing, or to insert information in the outgoing call leg.&lt;br /&gt;
Additional information is provided to the routing script, allowing routing decisions using information from the call transfer request (SIP REFER or ISDN Facility).&lt;br /&gt;
See below...&lt;br /&gt;
&lt;br /&gt;
=== params[ :call ] content during transfer request ===&lt;br /&gt;
When processing a call transfer request, the params[ :call ] hash contains the information from the inbound call (same as was passed to the routing script upon arrival of the inbound call)&lt;br /&gt;
 call = params[ :call ]          -&amp;gt; Information from original inbound call, with exception of call[ :called ]&lt;br /&gt;
&lt;br /&gt;
One exception (convenient because it allows a unmodified routing script to process call transfer request the same way as any other routing request):&lt;br /&gt;
 call[ :called ]                 -&amp;gt; Replaced by the called number from the call transfer request (also called &amp;quot;redirection number&amp;quot;)&lt;br /&gt;
Complementary information:&lt;br /&gt;
 call[ :original_called_number ] -&amp;gt; Contains the called number that was initially received from the incoming call, prior to call transfer request&lt;br /&gt;
 call[ :redirecting_number ]     -&amp;gt; Number of the call from which the call transfer request was received (generally equals to original_called_number)&lt;br /&gt;
&lt;br /&gt;
These fields will also be included in the outgoing call made after routing:&lt;br /&gt;
* original called number and redirecting number are existing fields on SS7 and ISDN calls&lt;br /&gt;
* SIP &amp;quot;diversion&amp;quot; header is used for SIP calls&lt;br /&gt;
&lt;br /&gt;
=== params[ :transfer ] content ===&lt;br /&gt;
(this if valid only for release 2.7.102 and above)&amp;lt;br&amp;gt;&lt;br /&gt;
When processing a call transfer request, information from the call transfer request message (SIP REFER, ISDN Facility) is provided in params[ :transfer ]:&lt;br /&gt;
  transfer = params[ :transfer ]&lt;br /&gt;
The following field is always present:&lt;br /&gt;
  transfer[ :original_nap ]      -&amp;gt; Contains the NAP of the first call from which a call transfer request was received&lt;br /&gt;
  transfer[ :redirecting_nap ]   -&amp;gt; Contains the NAP of the call from which the current call transfer request was received&lt;br /&gt;
                                    (same as :original_nap for the first call transfer, different for subsequent transfers)&lt;br /&gt;
Examples of other fields that may be present, when appropriate:&lt;br /&gt;
  transfer[ :uui ]               -&amp;gt; The UUI (user-to-user information) found in the call transfer request&lt;br /&gt;
  transfer[ :sip_header ]        -&amp;gt; Contains custom SIP headers from the call transfer request&lt;br /&gt;
  transfer[ :request_uri ]       -&amp;gt; Contains the SIP Request URI&lt;br /&gt;
&lt;br /&gt;
These fields are 'read-only'. They will not be included in the outgoing call, as they represent the contents of the call transfer request, and not the outgoing call to be made.&lt;br /&gt;
&lt;br /&gt;
To insert/modify attributes of the outgoing call, the parameters from params[ :call ] must be edited instead.&lt;br /&gt;
&lt;br /&gt;
== Redirection ==&lt;br /&gt;
In release 2.8 and above, redirection contacts are obtained from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  contacts = params[ :contacts ]&lt;br /&gt;
  contacts = {&lt;br /&gt;
      :index=&amp;gt;&amp;quot;3&amp;quot;,&lt;br /&gt;
      :list=&amp;gt;[&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6662&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6662@192.168.215.128&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6662@192.168.215.128&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6663&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6663@192.168.215.129&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6663@192.168.215.129&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
         {:called_number=&amp;gt;&amp;quot;6664&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6664@192.168.215.150&amp;quot;, :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6664@192.168.215.150&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
      ],&lt;br /&gt;
      :source_indexes=&amp;gt;&amp;quot;nil,0,0,0,2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt; contains the contact log. Each contact within the list has the following fields:&lt;br /&gt;
** &amp;lt;code&amp;gt;:called_number&amp;lt;/code&amp;gt; - the called number&lt;br /&gt;
** &amp;lt;code&amp;gt;:is_number_ported&amp;lt;/code&amp;gt; - if the called number has been ported (for SIP: if the npdi parameter is present)&lt;br /&gt;
** &amp;lt;code&amp;gt;:ported_number&amp;lt;/code&amp;gt; - the called number that was ported (for SIP: the rn parameter value, if available)&lt;br /&gt;
** &amp;lt;code&amp;gt;:sip_uri&amp;lt;/code&amp;gt; - the SIP URI of the contact, without the contact-params section (without the expires and q contact parameters)&lt;br /&gt;
** &amp;lt;code&amp;gt;:raw_data&amp;lt;/code&amp;gt; - the raw data representing the contact in the signaling protocol. For SIP, this is the full SIP URI (including the expires and q contact parameters).&lt;br /&gt;
** &amp;lt;code&amp;gt;:priority&amp;lt;/code&amp;gt; - the priority of the contact [0-1000]&lt;br /&gt;
** &amp;lt;code&amp;gt;:expiration&amp;lt;/code&amp;gt; - the expiration time in seconds of the contact&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:index]&amp;lt;/code&amp;gt; contains the index of the contact that is currently being routed.&lt;br /&gt;
* &amp;lt;code&amp;gt;params[:contacts][:source_indexes]&amp;lt;/code&amp;gt; contains a comma-separated list of indexes from &amp;lt;code&amp;gt;params[:contacts][:list]&amp;lt;/code&amp;gt;. Each index represents the contact from which the contact in the list was obtained from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get more information, see:&lt;br /&gt;
*[[Routing_script_tutorial:SIP_Redirection_Contacts|SIP Redirection Contacts Parameters in a Call Flow]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connected number ==&lt;br /&gt;
Insert a connected number in the answer message of the call flow.&lt;br /&gt;
&lt;br /&gt;
Routing script example:&lt;br /&gt;
    bridge = params[ :bridge ]&lt;br /&gt;
    bridge [ :connected_number ] = &amp;quot;3335577&amp;quot;&lt;br /&gt;
    bridge [ :connected_number_noa ] = :national_number&lt;br /&gt;
    bridge [ :connected_number_npi ] = :private&lt;br /&gt;
    bridge [ :connected_number_presentation ] = :allowed&lt;br /&gt;
    bridge [ :connected_number_screening ] = :pass&lt;br /&gt;
&lt;br /&gt;
== Terminating calls ==&lt;br /&gt;
In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in &amp;lt;code&amp;gt;params[:bridge][:reason]&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt; hash must be created and copied into &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;:&lt;br /&gt;
  terminate = {}&lt;br /&gt;
  params[:terminate] = terminate&lt;br /&gt;
The following fields can then be set in &amp;lt;code&amp;gt;:terminate&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;:sip_header&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:contacts&amp;lt;/code&amp;gt; # list of contacts as described in the [[#Redirection|redirection]] section&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:isup_raw_variant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:redirecting_number_indicator&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_noa&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_npi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_presentation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:original_called_number_counter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reason values  ==&lt;br /&gt;
&lt;br /&gt;
Check here for Termination Reason Cause codes:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Termination_cause_codes|Termination Reason Cause codes]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example to refuse an incoming call leg.&lt;br /&gt;
  raise RoutingException, :no_route&lt;br /&gt;
&lt;br /&gt;
Reason cause strings available inside routing scripts:&lt;br /&gt;
&lt;br /&gt;
List of Q.850 reason causes:&lt;br /&gt;
  :unallocated_number&lt;br /&gt;
  :no_route_to_network&lt;br /&gt;
  :no_route_to_destination&lt;br /&gt;
  :send_special_tone&lt;br /&gt;
  :misdialled_trunk_prefix&lt;br /&gt;
  :channel_unacceptable&lt;br /&gt;
  :call_awarded_in_established_channel&lt;br /&gt;
  :preemption&lt;br /&gt;
  :reattempt&lt;br /&gt;
  :qor_ported_number&lt;br /&gt;
  :normal_call_clearing&lt;br /&gt;
  :user_busy&lt;br /&gt;
  :no_user_responding&lt;br /&gt;
  :no_answer_from_user&lt;br /&gt;
  :subscriber_absent&lt;br /&gt;
  :call_rejected&lt;br /&gt;
  :number_changed&lt;br /&gt;
  :redirection&lt;br /&gt;
  :exchange_routing_error&lt;br /&gt;
  :non_selected_user_clearing&lt;br /&gt;
  :destination_out_of_order&lt;br /&gt;
  :address_incomplete&lt;br /&gt;
  :facility_rejected&lt;br /&gt;
  :response_to_status_enquiry&lt;br /&gt;
  :normal_unspecified&lt;br /&gt;
  :no_circuit_available&lt;br /&gt;
  :network_out_of_order&lt;br /&gt;
  :frame_mode_out_of_service&lt;br /&gt;
  :frame_mode_connection_operational&lt;br /&gt;
  :temporary_failure&lt;br /&gt;
  :switching_equipment_congestion&lt;br /&gt;
  :access_information_discarded&lt;br /&gt;
  :requested_circuit_not_available&lt;br /&gt;
  :precedence_call_blocked&lt;br /&gt;
  :resource_unavailable&lt;br /&gt;
  :quality_of_service_not_available&lt;br /&gt;
  :requested_facility_not_subscribed&lt;br /&gt;
  :outgoing_calls_barred&lt;br /&gt;
  :outgoing_calls_barred_within_cug&lt;br /&gt;
  :incoming_calls_barred&lt;br /&gt;
  :incoming_calls_barred_within_cug&lt;br /&gt;
  :bearer_cap_not_authorized&lt;br /&gt;
  :bearer_cap_not_available&lt;br /&gt;
  :inconsistency_access_info&lt;br /&gt;
  :service_not_available&lt;br /&gt;
  :bearer_cap_not_implemented&lt;br /&gt;
  :channel_type_not_implemented&lt;br /&gt;
  :requested_facility_not_implemented&lt;br /&gt;
  :only_restricted_digital_info&lt;br /&gt;
  :service_not_implemented&lt;br /&gt;
  :invalid_call_reference&lt;br /&gt;
  :channel_does_not_exist&lt;br /&gt;
  :call_identity_does_not_exist&lt;br /&gt;
  :call_identity_in_use&lt;br /&gt;
  :no_call_suspended&lt;br /&gt;
  :call_has_been_cleared&lt;br /&gt;
  :user_not_member_of_cug&lt;br /&gt;
  :incompatible_destination&lt;br /&gt;
  :non_existant_cug&lt;br /&gt;
  :invalid_transit_network&lt;br /&gt;
  :invalid_message_unspecified&lt;br /&gt;
  :mandatory_ie_missing&lt;br /&gt;
  :message_type_non_existent&lt;br /&gt;
  :message_not_compatible_with_call_state&lt;br /&gt;
  :ie_non_existent&lt;br /&gt;
  :invalid_ie_content&lt;br /&gt;
  :msg_not_compatible_with_call_state&lt;br /&gt;
  :recovery_on_timer_expiry&lt;br /&gt;
  :parameter_non_existent_passed_on&lt;br /&gt;
  :message_with_non_recognized_parameters_discarded&lt;br /&gt;
  :protocol_error&lt;br /&gt;
  :interworking_unspecified&lt;br /&gt;
&lt;br /&gt;
List of toolpack reason causes:&lt;br /&gt;
&lt;br /&gt;
  :toolpack_normal                       or :normal&lt;br /&gt;
  :toolpack_resource_error               or :resource_error&lt;br /&gt;
  :toolpack_timeout                      or :timeout&lt;br /&gt;
  :toolpack_no_route                     or :no_route&lt;br /&gt;
  :toolpack_call_collision               or :call_collision&lt;br /&gt;
  :toolpack_sync_drop                    or :sync_drop&lt;br /&gt;
  :toolpack_signaling_error              or :signaling_error&lt;br /&gt;
  :toolpack_locally_rejected             or :locally_rejected&lt;br /&gt;
  :toolpack_interface_not_available      or :interface_not_available&lt;br /&gt;
  :toolpack_reset_in_progress            or :reset_in_progress&lt;br /&gt;
  :toolpack_adapter_reject               or :adapter_reject&lt;br /&gt;
  :toolpack_missing_or_invalid_ie        or :missing_or_invalid_ie&lt;br /&gt;
  :toolpack_incoming_only                or :incoming_only&lt;br /&gt;
  :toolpack_system_configuration_changed or :system_configuration_changed&lt;br /&gt;
  :toolpack_resource_no_more_available   or :resource_no_more_available&lt;br /&gt;
  :toolpack_incompatible_media           or :incompatible_media&lt;br /&gt;
  :toolpack_resource_allocation_failed   or :resource_allocation_failed&lt;br /&gt;
  :toolpack_data_path_not_available      or :data_path_not_available&lt;br /&gt;
  :toolpack_local_congestion             or :local_congestion&lt;br /&gt;
  :toolpack_authorization_required       or :authorization_required&lt;br /&gt;
  :toolpack_call_divert_is_not_allowed   or :call_divert_is_not_allowed&lt;br /&gt;
&lt;br /&gt;
List of SIP reason causes:&amp;lt;br/&amp;gt;&lt;br /&gt;
Reason causes starting with a digit must use the following syntax (can't use : as prefix).&lt;br /&gt;
&lt;br /&gt;
  '300_multiple_choices'&lt;br /&gt;
  '301_moved_permanently'&lt;br /&gt;
  '302_moved_temporarily'&lt;br /&gt;
  '305_use_proxy'&lt;br /&gt;
  '380_alternative_service'&lt;br /&gt;
  '400_bad_request'&lt;br /&gt;
  '401_unauthorized'&lt;br /&gt;
  '402_payment_required'&lt;br /&gt;
  '403_forbidden'&lt;br /&gt;
  '404_not_found'&lt;br /&gt;
  '405_method_not_allowed'&lt;br /&gt;
  '406_not_acceptable'&lt;br /&gt;
  '407_proxy_authentication_required'&lt;br /&gt;
  '408_request_timeout'&lt;br /&gt;
  '409_conflict'&lt;br /&gt;
  '410_gone'&lt;br /&gt;
  '413_request_entity_too_large'&lt;br /&gt;
  '414_request_URI_too_long'&lt;br /&gt;
  '415_unsupported_media'&lt;br /&gt;
  '416_unsupported_URI_scheme'&lt;br /&gt;
  '420_bad_extension'&lt;br /&gt;
  '421_extension_required'&lt;br /&gt;
  '422_session_timer_too_small'&lt;br /&gt;
  '423_interval_too_brief'&lt;br /&gt;
  '429_referrer_identity_error'&lt;br /&gt;
  '480_temporary_unavailable'&lt;br /&gt;
  '481_call_or_transaction_does_not_exist'&lt;br /&gt;
  '482_loop_detected'&lt;br /&gt;
  '483_too_many_hops'&lt;br /&gt;
  '484_address_incomplete'&lt;br /&gt;
  '485_ambiguous'&lt;br /&gt;
  '486_busy_here'&lt;br /&gt;
  '487_request_terminated'&lt;br /&gt;
  '488_not_acceptable_here'&lt;br /&gt;
  '489_bad_event'&lt;br /&gt;
  '491_retry_after'&lt;br /&gt;
  '500_server_internal_error'&lt;br /&gt;
  '501_not_implemented'&lt;br /&gt;
  '502_bad_gateway'&lt;br /&gt;
  '503_service_unavailable'&lt;br /&gt;
  '504_server_timeout'&lt;br /&gt;
  '505_version_unsupported'&lt;br /&gt;
  '513_message_too_large'&lt;br /&gt;
  '600_busy_everywhere'&lt;br /&gt;
  '603_decline'&lt;br /&gt;
  '604_not_exist_anywhere'&lt;br /&gt;
  '606_not_acceptable'&lt;br /&gt;
&lt;br /&gt;
== Nap status  ==&lt;br /&gt;
&lt;br /&gt;
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file. &lt;br /&gt;
&lt;br /&gt;
'''Notice:''' These values may change between major release. &lt;br /&gt;
&lt;br /&gt;
  Routing script call attribute name    Description&lt;br /&gt;
  --------------------------------------------------------------------------------------------&lt;br /&gt;
  &amp;quot;name&amp;quot;                                NAP name.&lt;br /&gt;
  &amp;quot;signaling_type&amp;quot;                      Signaling type (SS7, ISDN, CASR2, SIP)&lt;br /&gt;
  &amp;quot;profile&amp;quot;                             Profile name.&lt;br /&gt;
  &amp;quot;sip_destination_ip&amp;quot;                  Destination IP address.&lt;br /&gt;
  &amp;quot;sip_destination_port&amp;quot;                Destination IP port.&lt;br /&gt;
  &amp;quot;sip_transport_type&amp;quot;                  SIP transport type (:udp, :tcp, or :tls) (Toolpack 3.1 and more)&lt;br /&gt;
  &amp;quot;inst_incoming_call_cnt&amp;quot;              Instantaneous Count of incoming calls.&lt;br /&gt;
  &amp;quot;inst_outgoing_call_cnt&amp;quot;              Instantaneous Count of outgoing calls.&lt;br /&gt;
  &amp;quot;available_cnt&amp;quot;                       Number of available circuits or channels.&lt;br /&gt;
  &amp;quot;unavailable_cnt&amp;quot;                     Number of unavailable circuits or channels.&lt;br /&gt;
  &amp;quot;availability_percent&amp;quot;                Percentage of available circuits or channels.&lt;br /&gt;
  &amp;quot;usage_percent&amp;quot;                       Percentage of used circuits or channels.&lt;br /&gt;
  &amp;quot;unused_shared_percent&amp;quot;               Percentage of used circuits or channels of this NAP available to make new calls with (taking into account shared with other NAPs)&lt;br /&gt;
  &amp;quot;total_incoming_call_cnt&amp;quot;             Total Count of incoming calls.&lt;br /&gt;
  &amp;quot;global_asr_percent&amp;quot;                  Global calculated ASR percentage.&lt;br /&gt;
  &amp;quot;total_outgoing_call_cnt&amp;quot;             Total Count of outgoing calls.&lt;br /&gt;
  &amp;quot;last_24h_asr_percent&amp;quot;                Last 24 hours calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_24h_outgoing_call_cnt&amp;quot;          Last 24 hours outgoing calls.&lt;br /&gt;
  &amp;quot;current_hour_asr_percent&amp;quot;            Current hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;current_hour_outgoing_call_cnt&amp;quot;      Current hour outgoing calls.&lt;br /&gt;
  &amp;quot;last_hour_asr_percent&amp;quot;               Last hour calculated ASR percentage.&lt;br /&gt;
  &amp;quot;last_hour_outgoing_call_cnt&amp;quot;         Last hour outgoing calls.&lt;br /&gt;
  &amp;quot;poll_remote_proxy&amp;quot;                   Remote proxy polling enabled&lt;br /&gt;
  &amp;quot;is_available&amp;quot;                        Remote proxy actually available or not&lt;br /&gt;
  &amp;quot;time_since_polling&amp;quot;                  Time since the last availibility polling&lt;br /&gt;
  &amp;quot;time_available_seconds&amp;quot;              Number of seconds since the NAP is available&lt;br /&gt;
  &amp;quot;time_unavailable_seconds&amp;quot;            Number of seconds since the NAP is unavailable&lt;br /&gt;
  &amp;quot;register_to_proxy&amp;quot;                   Register to proxy enabled&lt;br /&gt;
  &amp;quot;registered&amp;quot;                          Actually registered or not&lt;br /&gt;
  &amp;quot;time_since_refresh&amp;quot;                  Time since the last refresh&lt;br /&gt;
  &amp;quot;time_registered_seconds&amp;quot;             Number of seconds since the NAP is registered&lt;br /&gt;
  &amp;quot;time_not_registered_seconds&amp;quot;         Number of seconds since the NAP is not registered&lt;br /&gt;
  &amp;quot;asr_stats_incoming_struct&amp;quot;           Detailed Answer-Seizure Rate incoming statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;asr_stats_outgoing_struct&amp;quot;           Detailed Answer-Seizure Rate outgoing statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;global_asr_percent&amp;quot;                Global calculated ASR percentage.&lt;br /&gt;
    &amp;quot;total_call_cnt&amp;quot;                    Total count of calls.&lt;br /&gt;
    &amp;quot;total_accepted_call_cnt&amp;quot;           Total count of accepted calls (not dropped due to congestion or rate-limiting).&lt;br /&gt;
    &amp;quot;total_answered_call_cnt&amp;quot;           Total count of answered calls.&lt;br /&gt;
    &amp;quot;last_24h_asr_percent&amp;quot;              Last 24 hours calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_24h_call_cnt&amp;quot;                 Last 24 hours count of calls.&lt;br /&gt;
    &amp;quot;current_hour_asr_percent&amp;quot;          Current hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;current_hour_call_cnt&amp;quot;             Current hour count of calls.&lt;br /&gt;
    &amp;quot;last_hour_asr_percent&amp;quot;             Last hour calculated ASR percentage.&lt;br /&gt;
    &amp;quot;last_hour_call_cnt&amp;quot;                Last hour count of calls.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;mos_struct&amp;quot;                          Detailed Mean Opinion Score statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour calculated MOS for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour calculated MOS for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &amp;quot;network_quality_struct&amp;quot;              Detailed network quality statistics.&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;last_24h_ingress&amp;quot;                  Last 24 hours network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_24h_egress&amp;quot;                   Last 24 hours network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_ingress&amp;quot;              Current hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;current_hour_egress&amp;quot;               Current hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_ingress&amp;quot;                 Last hour network quality percentage for incoming RTP packets.&lt;br /&gt;
    &amp;quot;last_hour_egress&amp;quot;                  Last hour network quality percentage for outgoing RTP packets.&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; If the nap status is part of a substructure, the substructure will be a hash containing all subfield elements. &lt;br /&gt;
&lt;br /&gt;
Example to access the signaling type and the number of incoming call count for the NAP of the current call:&lt;br /&gt;
&lt;br /&gt;
   incoming_nap = params[:naps][ params[:call][ :nap ].to_sym]&lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP parameters=&amp;quot; + incoming_nap.inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP signaling type=&amp;quot; + incoming_nap[:signaling_type].inspect &lt;br /&gt;
   log_trace 4,&amp;quot;Incoming NAP call cnt=&amp;quot; + incoming_nap[:asr_stats_incoming_struct][:total_call_cnt].inspect &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.&lt;br /&gt;
&lt;br /&gt;
== Telephony Services ==&lt;br /&gt;
In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:&lt;br /&gt;
&lt;br /&gt;
  params[:telephony_services].each do |service|  -&amp;gt; Array of telephony services&lt;br /&gt;
    service[:name]                               -&amp;gt; Customer telephony service name&lt;br /&gt;
    service[:type]                               -&amp;gt; For now only &amp;quot;CNAM Request&amp;quot;&lt;br /&gt;
    service[:enabled]                            -&amp;gt; Indicate if the service is enabled (true) or not (false)&lt;br /&gt;
                                                    (Only the telephony service define in the profile associated to the NAP is enabled)&lt;br /&gt;
                                                    (The others telephony services define in others profiles are disabled)&lt;br /&gt;
                                                    (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)&lt;br /&gt;
    serviceParams = service[:params]&lt;br /&gt;
    serviceParams[:return_to_script]             -&amp;gt; Indicates to Gateway if we must return to the routing script after receiving the CNAM response&lt;br /&gt;
                                                    (It is important to set back to false this field to avoid an infinite loop)&lt;br /&gt;
    serviceQuery = service[:query]&lt;br /&gt;
    serviceQuery[:phone]                         -&amp;gt; 10 digits of calling number from the incoming call to send to the CNAM server&lt;br /&gt;
    serviceQuery[:timeout]                       -&amp;gt; Timeout in millisecond to wait a CNAM response from CNAM server&lt;br /&gt;
                                                    (Default value from profile configuration)&lt;br /&gt;
    serviceResponse = service[:response]&lt;br /&gt;
    serviceResponse[:success]                    -&amp;gt; Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
    serviceResponse[:caller_name]                -&amp;gt; The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)&lt;br /&gt;
&lt;br /&gt;
== Custom user context ==&lt;br /&gt;
The routing script may '''save per-call information within the call context''', that will be available if routing is called again later during the call flow.&lt;br /&gt;
&lt;br /&gt;
Cases where routing is called multiple time for the same call are:&lt;br /&gt;
- Call transfer requests&lt;br /&gt;
- SIP redirect requests&lt;br /&gt;
- Radius Authorization result&lt;br /&gt;
- Announcement server with digit collection&lt;br /&gt;
&lt;br /&gt;
The routing script can save a recursive hash of attributes here:&lt;br /&gt;
  params[:user_context]&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
  params[:user_context] = { &amp;quot;SomeKey&amp;quot; =&amp;gt; &amp;quot;Some value I want to retrieve upon next routing for this call&amp;quot;, &amp;quot;OtherVal&amp;quot; =&amp;gt; { &amp;quot;subkey&amp;quot; =&amp;gt; &amp;quot;subval&amp;quot; } }&lt;br /&gt;
&lt;br /&gt;
Upon first call to routing script, params[:user_context] will be nil.&lt;br /&gt;
Upon subsequent calls to routing script, it will contain whatever the script had stored upon previous call (or nil if it was not set)&lt;br /&gt;
&lt;br /&gt;
Note: This feature is available starting from release 2.9.85, 2.10.31 and 3.0.15 (in respective branches 2.9, 2.10 or 3.0)&lt;br /&gt;
&lt;br /&gt;
== Routing Script Tests ==&lt;br /&gt;
The Web portal features a tool for Testing Scripts. The user must enter parameters to simulate the incoming call and after pressing the Test button, will output selected routes and numbers.  You do not need to activate the new routes, or the new scripts to use this test tool: It can be used to test the routing scripts and routing table before activating it.&lt;br /&gt;
This is available in the Routing Scripts section of the Web portal.&lt;br /&gt;
&lt;br /&gt;
=== Test parameters ===&lt;br /&gt;
==== @call_params  ====&lt;br /&gt;
&lt;br /&gt;
That variable should contain a hash of call parameters that will be passed to the routing script. This is equivalent to the incoming call parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @nap_list  ====&lt;br /&gt;
&lt;br /&gt;
A list of the hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed. &lt;br /&gt;
&lt;br /&gt;
'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== @params  ====&lt;br /&gt;
&lt;br /&gt;
A hash of hashes containing parameters. This hash contains bridge parameters and other kind of parameter groups may be added in the future. &lt;br /&gt;
&lt;br /&gt;
  @params = {&lt;br /&gt;
     :bridge =&amp;gt; {:announcement_tone, &amp;quot;announcement.wav&amp;quot;},&lt;br /&gt;
     :contacts =&amp;gt; {&lt;br /&gt;
       :index=&amp;gt;&amp;quot;1&amp;quot;,&lt;br /&gt;
       :list=&amp;gt;[&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6660&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;&amp;quot;,&lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;},&lt;br /&gt;
          {:called_number=&amp;gt;&amp;quot;6661&amp;quot;, :priority=&amp;gt;&amp;quot;1000&amp;quot;, :is_number_ported=&amp;gt;&amp;quot;0&amp;quot;, :sip_uri=&amp;gt;&amp;quot;sip:6661@192.168.215.127&amp;quot;, &lt;br /&gt;
           :raw_data=&amp;gt;&amp;quot;&amp;lt;sip:6661@192.168.215.127&amp;gt;&amp;quot;, :expiration=&amp;gt;&amp;quot;3600&amp;quot;}&lt;br /&gt;
       ],&lt;br /&gt;
       :source_indexes=&amp;gt;&amp;quot;nil,0&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; Back to [[Routing script tutorial|Routing Script Tutorial]].&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Parameter:_Map_any_Response_to_Available_Status</id>
		<title>Parameter: Map any Response to Available Status</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Parameter:_Map_any_Response_to_Available_Status"/>
				<updated>2019-07-03T14:40:20Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''Map any Response to Available Status''' parameter is set to consider proxies as available on any response class (including 5xx/6xx).  This is required when a peer proxy does not support being polled with the '''OPTIONS''' method. This parameter is set by checking the box labeled '''Map any response to available status''', under the '''Advanced params''' collapsible sub menu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/SIP_NAP_Polling</id>
		<title>SIP NAP Polling</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/SIP_NAP_Polling"/>
				<updated>2019-07-03T14:36:11Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Polling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Polling ==&lt;br /&gt;
* In Tmedia, option [[Parameter:_Poll_Remote_Proxy|&amp;quot;Poll Remote Proxy?&amp;quot;]] is enabled by default&lt;br /&gt;
* Tmedia SIP polling is using SIP OPTIONS method to &amp;quot;poke&amp;quot; a SIP [[NAP|Network Access Point (NAP)]] to see if it's alive or not, that is, [[NAP]] availability&lt;br /&gt;
* Upon a response from the SIP [[NAP]], Tmedia will determine whether to mark the [[NAP]] as up&lt;br /&gt;
* If the option [[Parameter:_Map_any_Response_to_Available_Status|&amp;quot;Map any response to available status&amp;quot;]] is unchecked, any 2xx/3xx/4xx class response to a SIP OPTIONS will bring the [[NAP]] up&lt;br /&gt;
* The first time a SIP [[NAP]] is added in configuration and configuration activated, Tmedia polls at 5 seconds, after that and general use is polling at 60 seconds&lt;br /&gt;
** Since version 3.0.73 NAP SIP MAP polling is configurable with two parameters:&lt;br /&gt;
*** Proxy Polling Interval (Default 1 minute)&lt;br /&gt;
*** Proxy Polling Response Timeout (Default 30 seconds)&lt;br /&gt;
&lt;br /&gt;
== [[NAP|Network Access Point (NAP)]] Availability ==&lt;br /&gt;
If [[Parameter:_Poll_Remote_Proxy|&amp;quot;Poll Remote Proxy?&amp;quot;]] and [[Parameter:_Register_to_Proxy|&amp;quot;Register to Proxy?&amp;quot;]] are both checked, only the SIP OPTIONS answers will affect the [[NAP]] availability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
*[[Toolpack:Allocating a SIP Network Access Point (NAP) F|Allocating a SIP NAP Configuration v3.0]]&lt;br /&gt;
*[[Toolpack:Allocating a SIP Network Access Point (NAP) E|Allocating a SIP NAP Configuration v2.10]]&lt;br /&gt;
*[[Toolpack:Allocating a SIP Network Access Point (NAP) D|Allocating a SIP NAP Configuration v2.9]]&lt;br /&gt;
*[[Toolpack:Allocating a SIP Network Access Point (NAP) C|Allocating a SIP NAP Configuration v2.8]]&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; data-collapsetext=&amp;quot;other versions&amp;quot; data-expandtext=&amp;quot;Click here for other versions&amp;quot; style=&amp;quot;width: 400px;&amp;quot;&amp;gt;&lt;br /&gt;
*[[Toolpack:Allocating a SIP Network Access Point (NAP) B|Allocating a SIP NAP Configuration v2.7]]&lt;br /&gt;
*[[Toolpack:Allocating a SIP Network Access Point (NAP) B|Allocating a SIP NAP Configuration v2.6]]&lt;br /&gt;
*[[Toolpack:Allocating a SIP Network Access Point (NAP) A|Allocating a SIP NAP Configuration v2.5]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/How_to_Setup_Filters</id>
		<title>How to Setup Filters</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/How_to_Setup_Filters"/>
				<updated>2019-07-02T20:13:10Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Filter Scripts examples: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Filter Scripts are routing scripts that can be added to any other script. It modifies the behavior of the main script. For example, it can do a remapping of the incoming called number to make it uniform (i.e. Remove the international code). It can also make sure there is no loop (do not route the call back to the incoming Network).&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
While filters can edit call attributes, they do it once for all matching routes.&lt;br /&gt;
&lt;br /&gt;
'''Note: If you need to manipulate call attributes per matching route (providing different values for different matching routes), you should instead use ''' [[Routing_script_tutorial:route_remap_Tutorial|route_remap]].&lt;br /&gt;
== Setting up Filter Scripts&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
To setup a Filter, the main script needs to be modified. The main script can be either simple_routing.rb, or any other script.&amp;lt;br&amp;gt; &lt;br /&gt;
First, make sure scripts are enabled for this system: &amp;lt;br&amp;gt; &lt;br /&gt;
 Gateway&lt;br /&gt;
 use Script -&amp;gt; Example Scripts  (If none are available, go to the second step, then come back here to chose the script group)&lt;br /&gt;
&lt;br /&gt;
Second, go to the routing script section of the Web portal &lt;br /&gt;
&amp;lt;pre&amp;gt;Gateway -&amp;amp;gt; Routes -&amp;amp;gt; Routing scripts -&amp;amp;gt; Example Scripts -&amp;amp;gt; simple_routing.rb [Edit]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Three things need to be added. At the start of the script:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;require '[filter_ruby_filename]'&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
In the main class:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;include [module_name]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
and &lt;br /&gt;
&amp;lt;pre&amp;gt;before_filter&amp;amp;nbsp;:method =&amp;amp;gt;&amp;amp;nbsp;:[method_name]&amp;lt;/pre&amp;gt; &lt;br /&gt;
or&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;after_filter&amp;amp;nbsp;:method =&amp;amp;gt;&amp;amp;nbsp;:[method_name]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, the priority_and_weight_load_balancer.rb script would require this to be added to the main script:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;require 'priority_and_weight_load_balancer'&lt;br /&gt;
&lt;br /&gt;
class MyMainRoutingClass &amp;amp;lt; BaseRouting&lt;br /&gt;
  include PriorityAndWeightLoadBalancer&lt;br /&gt;
&lt;br /&gt;
  after_filter :method =&amp;gt; :filter_by_priority_and_weight,&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To find the module_name and method, you need to look in the routing script itself:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;Gateway -&amp;amp;gt; Routes -&amp;amp;gt; Routing Scripts -&amp;amp;gt; Filters Scripts -&amp;amp;gt; priority_and_weight_load_balancer.rb [Edit]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then look for the &amp;amp;lt;Module&amp;amp;gt; tag and the &amp;amp;lt;def&amp;amp;gt; tag for the main class &lt;br /&gt;
&lt;br /&gt;
=== Filter Scripts examples:  ===&lt;br /&gt;
&lt;br /&gt;
*'''Request-URI routing (called_pre_remap_and_ruri.rb):''' Will route the call on SIP RURI instead of the to: field &lt;br /&gt;
*'''Modify the Nature of Address (noa_npi_remap.rb):''' We can use this to change the NOA to national or international &lt;br /&gt;
*'''Remove Loop (FilterRemoveLoop.rb): '''Will prevent calls from being routed back to the sender &lt;br /&gt;
*'''Load sharing on NAP groups or on route groups (priority_and_weight_load_balancer.rb):''' This is a powerful script that allows to regroup routes/NAPs by priority, and distribute load among them.&amp;amp;nbsp; You need to add two columns to the NAPs (or the routes), one called &amp;quot;priority&amp;quot; and one called &amp;quot;weight&amp;quot;. Routes of lower value will have a higher priority (priority=0 has more priority than priority=10). The calls will be distributed within one priority according to the weight value. To have an equal number of calls on each destination, use the same weight value (weight=10). &amp;lt;br&amp;gt; See [[Adding Load Sharing to Routing Script|Adding Priority and Load Sharing to Routing Script]]&amp;lt;br&amp;gt; &lt;br /&gt;
*'''Black and White listing (black_white_listing.rb):''' With this script, any called or calling number prefix can be blacklisted or whitelisted. This script can be assigned globally, or per NAP. It reads a file which has the called and calling number list. &amp;lt;br&amp;gt; See [[Adding White or Black listing to Routing Script]]&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
One example is the Label Routing. Check here: [[Adding Label Routing to any Routing Script|Adding Label Routing to any Routing Script]]&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
These filters can be merged in the same routing script. Please contact support for more details.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/Product_Installation_SBC</id>
		<title>Product Installation SBC</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/Product_Installation_SBC"/>
				<updated>2019-06-07T21:11:06Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* FreeSBC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Product Installation}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
The following is a list of product installation manuals for TelcoBridges' SBC:&lt;br /&gt;
&lt;br /&gt;
===FreeSBC===&lt;br /&gt;
&amp;lt;section begin=TSBC-SW-INSTALLATION/&amp;gt;&lt;br /&gt;
*[[FreeSBC:Baremetal:Installation_A|Baremetal Installation Instructions]]&lt;br /&gt;
*[[FreeSBC:Cloud:OpenStack_Installation_A|OpenStack Installation Instructions]]&lt;br /&gt;
*[[FreeSBC:Cloud:VmWare_Installation_A|VmWare Installation Instructions]]&lt;br /&gt;
*[[Media:tsbc-hw-srv_Installation_Guide_Issue1.0.pdf|TSBC-HW-SRV-HIGH/MID System Installation Guide]]&lt;br /&gt;
*[[FreeSBC:Cloud:AWS_Installation_A|AWS installation instructions]]&lt;br /&gt;
*[[FreeSBC:Cloud:Azure_Installation_A|Azure installation instructions]]&lt;br /&gt;
&amp;lt;section end=TSBC-SW-INSTALLATION/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
*[[FreeSBC]] configuration can be found here: [[Sbc_Tutorial_Guide_Intro|FreeSBC Configuration]]&lt;br /&gt;
*Tmedia installation can be found here: [[Product_Installation|Installing Tmedia]]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-05-31T12:29:35Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* WARNING: This page is under construction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
This page provides installation and configuration information for people launching an instance of ''FreeSBC'' on the Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimum Azure cloud Requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size that has a Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
The Following table provides recommended VM sizes based on the number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Retrieving the Image ==&lt;br /&gt;
Go to [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to retrieve a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances in the cloud.  &lt;br /&gt;
&lt;br /&gt;
The following sections describe how to upload the latest FreeSBC image to your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a Storage Account ===&lt;br /&gt;
You will need a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one, but make sure that the storage account location matches the location where you plan to create and run your VM.&lt;br /&gt;
&lt;br /&gt;
==== Create Resource Group ====&lt;br /&gt;
If you need to create a storage account to upload the VM image, then you will need a resource group that matches the location where you plan to create and run your VM. &lt;br /&gt;
If required, create a resource group as follows:&lt;br /&gt;
&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups'.&lt;br /&gt;
*From 'Resource groups', click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name for the resource group.&lt;br /&gt;
*Select the appropriate resource group location. This is where you will be creating the VM.&lt;br /&gt;
*Click 'Review + Create'.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of the resource group creation before proceeding with the next steps.&lt;br /&gt;
&lt;br /&gt;
==== Create Storage Account ====&lt;br /&gt;
If you require a storage account, do the following:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts'.&lt;br /&gt;
*From 'Storage accounts', click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name for the storage account.&lt;br /&gt;
*Select the appropriate storage account location. This is where you will be creating the VM.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Review + Create'.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with the next steps.&lt;br /&gt;
&lt;br /&gt;
==== Create Storage Blob Container ====&lt;br /&gt;
If you require a blob container, do the following:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Click 'Storage accounts'.&lt;br /&gt;
*Select a storage account item to add the blob container.&lt;br /&gt;
*Click Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name for this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Ok'.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with the next steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image to the storage blob container, you must uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Click'Storage accounts'.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with the next steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Create a resource'.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'Image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create'.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
If not already available, follow this procedure to create a Virtual Network:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Virtual networks'.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide the virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with the next steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Virtual machines'.&lt;br /&gt;
*The 'Virtual machines' dialog box appears.&lt;br /&gt;
*From 'Virtual machines' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate region. This is where you will be creating the VM.&lt;br /&gt;
*Browse VM images to select the appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as the Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click 'Next:Disk&amp;gt;'.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click 'Next:Networking&amp;gt;'.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and the following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Next:Review + create&amp;gt;'.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with the following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add Inbound Security Rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Virtual machines'.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields in accordance with the expected VM accessibility from public network.&lt;br /&gt;
*The security rules must at least allow access to the VM through ports 22 and 12358 for SSH and Web Portal management access.&lt;br /&gt;
*The security rules must also allow access to the VM through other ports (i.e. 5060) for signaling and RTP access (ports depend on your system configuration).&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Add' to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI does not allow the enabling of the 'Advanced Networking' when creating the VM from a custom image. You must use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Virtual machines'.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to the clipboard the network interface name to modify the 'Accelerated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt, which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter the following command, using the correct network interface name and resource group, and press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like the following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Rebooting will NOT activate the 'Accelarated Networking' on the VM network interface. It is required to do the following operations to complete 'Accelarated Networking' activation:&lt;br /&gt;
**First, 'Stop' the virtual machine (This will take some time to stop the virtual machine).&lt;br /&gt;
**Then, 'Start' the virtual machine.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
By default, there is no root password. You will need to SSH on to the FreeSBC using an SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Log in using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  For example, if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From this point, go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-18T14:56:55Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Advanced Networking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run your VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run your VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'Image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access.&lt;br /&gt;
*The security rules must also allow access to VM through other ports (i.e. 5060) for signaling and RTP access (ports depend on your system configuration).&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Rebooting will NOT activate the 'Accelarated Networking' on the VM network interface. It required to do following operations to complete 'Accelarated Networking' activation:&lt;br /&gt;
**First, 'Stop' the virtual machine (could take many minutes to stop the virtual machine).&lt;br /&gt;
**Then, 'Start' the virtual machine.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-18T14:55:41Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Advanced Networking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run your VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run your VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'Image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access.&lt;br /&gt;
*The security rules must also allow access to VM through other ports (i.e. 5060) for signaling and RTP access (ports depend on your system configuration).&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Rebooting will NOT activate the 'Accelarated Networking' on the VM network interface. It required to do following operations to complete 'Accelarated Networking' activation:&lt;br /&gt;
**First, 'Stop' the virtual machine.&lt;br /&gt;
**Then, 'Start' the virtual machine in order to activate the 'Accelerated Networking'.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-18T14:54:30Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Advanced Networking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run your VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run your VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'Image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access.&lt;br /&gt;
*The security rules must also allow access to VM through other ports (i.e. 5060) for signaling and RTP access (ports depend on your system configuration).&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Rebooting will not activate the 'Accelarated Networking'. It required to do following operations to activate 'Accelarated Networking' on the VM network interface.&lt;br /&gt;
*First, 'Stop' the virtual machine.&lt;br /&gt;
*Then, 'Start' the virtual machine in order to activate the 'Accelerated Networking'.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-18T14:46:44Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Add inbound security rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run your VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run your VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'Image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access.&lt;br /&gt;
*The security rules must also allow access to VM through other ports (i.e. 5060) for signaling and RTP access (ports depend on your system configuration).&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-18T14:46:32Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Add inbound security rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run your VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run your VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'Image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access&lt;br /&gt;
*The security rules must also allow access to VM through other ports (i.e. 5060) for signaling and RTP access (ports depend on your system configuration).&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-18T14:43:05Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Create a VM Image from the FreeSBC storage blob */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run your VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run your VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'Image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access&lt;br /&gt;
*The security rules must also allow access to VM through other ports (i.e. 5060) for signaling and RTP access (ports depending on your system configuration).&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-18T14:39:35Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Create resource group */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run your VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run your VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access&lt;br /&gt;
*The security rules must also allow access to VM through other ports (i.e. 5060) for signaling and RTP access (ports depending on your system configuration).&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-18T14:39:07Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Get a storage account */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run your VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access&lt;br /&gt;
*The security rules must also allow access to VM through other ports (i.e. 5060) for signaling and RTP access (ports depending on your system configuration).&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T21:40:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Add inbound security rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access&lt;br /&gt;
*The security rules must also allow access to VM through other ports (i.e. 5060) for signaling and RTP access (ports depending on your system configuration).&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T21:40:22Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Add inbound security rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
*The security rules must at least allow access to VM through port 22 and 12358 for SSH and Web Portal management access&lt;br /&gt;
*The security rules must also allow access to VM through other ports for signaling and RTP access (ports depending on your system configuration).&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T21:13:26Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Upload a Virtual Hard Disk (VHD) Image */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps. This operation will take a long period of time (40GB to upload).&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T21:04:35Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Advanced Networking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Az_advanced_networking1.png</id>
		<title>File:Az advanced networking1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Az_advanced_networking1.png"/>
				<updated>2019-04-17T21:04:14Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: uploaded a new version of &amp;amp;quot;File:Az advanced networking1.png&amp;amp;quot;: blurred text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Azure Enable Advanced Networking&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T21:03:01Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Add inbound security rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Az_add_inbound_port_rule2.png</id>
		<title>File:Az add inbound port rule2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Az_add_inbound_port_rule2.png"/>
				<updated>2019-04-17T21:02:44Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: uploaded a new version of &amp;amp;quot;File:Az add inbound port rule2.png&amp;amp;quot;: blurred text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Azure add inbound port rule&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T21:02:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Add inbound security rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|860px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T21:01:42Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Add inbound security rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|850px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T21:00:31Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Add inbound security rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Az_add_inbound_port_rule1.png</id>
		<title>File:Az add inbound port rule1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Az_add_inbound_port_rule1.png"/>
				<updated>2019-04-17T21:00:15Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: uploaded a new version of &amp;amp;quot;File:Az add inbound port rule1.png&amp;amp;quot;: blurred text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Azure add inbound port rule&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T20:54:52Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Instantiate a FreeSBC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|750px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Az_create_vm1.png</id>
		<title>File:Az create vm1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Az_create_vm1.png"/>
				<updated>2019-04-17T20:54:32Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: uploaded a new version of &amp;amp;quot;File:Az create vm1.png&amp;amp;quot;: blurred text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Azure Create VM (first step)&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T20:49:05Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Create a VM Image from the FreeSBC storage blob */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Az_create_vm_image3.png</id>
		<title>File:Az create vm image3.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Az_create_vm_image3.png"/>
				<updated>2019-04-17T20:48:43Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: uploaded a new version of &amp;amp;quot;File:Az create vm image3.png&amp;amp;quot;: blurred text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Azure Create FreeSBC VM image (third step)&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T20:46:20Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Upload a Virtual Hard Disk (VHD) Image */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|850px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/File:Az_upload_image2.png</id>
		<title>File:Az upload image2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/File:Az_upload_image2.png"/>
				<updated>2019-04-17T20:45:55Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: uploaded a new version of &amp;amp;quot;File:Az upload image2.png&amp;amp;quot;: blurred text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Azure Upload FreeSBC image (select upload)&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A</id>
		<title>FreeSBC:Cloud:Azure Installation A</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/tbwiki/FreeSBC:Cloud:Azure_Installation_A"/>
				<updated>2019-04-17T20:44:43Z</updated>
		
		<summary type="html">&lt;p&gt;Jean-Francois Gosselin: /* Upload a Virtual Hard Disk (VHD) Image */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FreeSBC:Cloud:Azure Installation}}&lt;br /&gt;
&lt;br /&gt;
= WARNING: This page is under construction =&lt;br /&gt;
&lt;br /&gt;
This page is intended to give assistance to people launching an instance of ''FreeSBC'' on Microsoft Azure infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Minimal Azure cloud requirements:&lt;br /&gt;
* 2 VCPUs&lt;br /&gt;
* 4 GB RAM&lt;br /&gt;
* VM Size which has Network interface with Advanced Network capability (Mellanox NIC interface)&lt;br /&gt;
&lt;br /&gt;
Following are VM Size suggestions according to performance target in terms of number of sessions:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Sessions&lt;br /&gt;
! width=&amp;quot;150&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VM Size&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | VCPUs&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | RAM&lt;br /&gt;
! width=&amp;quot;100&amp;quot; style=&amp;quot;background: none repeat scroll 0% 0% rgb(239, 239, 239); -moz-background-inline-policy: continuous;&amp;quot; | Advanced Networking Capable&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Up to 350*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D2 v2, DS2_v2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
7 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
350*-1000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D4 v3, D4s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
4&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
1000*-2000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D8 v3, D8s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
8&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
32 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
2000*-4000*&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
D16 v3, D16s_v3&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
16&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
64 Gb&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
Yes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Preliminary estimated values&lt;br /&gt;
&lt;br /&gt;
== Getting the Image ==&lt;br /&gt;
Please go to our [http://www2.telcobridges.com/FreeSBCDownload FreeSBC Download site] to get a copy of the latest FreeSBC Image.&lt;br /&gt;
&lt;br /&gt;
== Installation on Azure cloud ==&lt;br /&gt;
&lt;br /&gt;
=== FreeSBC Azure Image ===&lt;br /&gt;
A virtual machine image is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud.  &lt;br /&gt;
&lt;br /&gt;
In the following sections, we will explain how to upload the latest FreeSBC image into your Microsoft Azure account and launch a virtual machine instance running the FreeSBC software.&lt;br /&gt;
&lt;br /&gt;
=== Get a storage account ===&lt;br /&gt;
Follow next instructions in order to obtain a blob container in your Azure storage account. This blob container is required to upload and store a FreeSBC VM image. You can either use an existing storage account or create a new one but make sure that the storage account location matchs where you plan to create and run the VM.&lt;br /&gt;
&lt;br /&gt;
==== Create resource group ====&lt;br /&gt;
If you need to create a storage account to upload VM image then you will need a resource group matching the location where you plan to create and run the VM. Here is a procedure to create a resource group if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Resource groups' item from the left menu.&lt;br /&gt;
*From 'Resource groups' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a resource group' dialog box appears.&lt;br /&gt;
*Provide a name to this resource group.&lt;br /&gt;
*Select the appropriate resource group location (where you'll be creating the VM).&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_resource_groups.png|850px]]&lt;br /&gt;
*Wait for completion of resource group creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage account ====&lt;br /&gt;
Here is a procedure to create a storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*From 'Storage accounts' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a storage account' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a name to this storage account.&lt;br /&gt;
*Select the appropriate storage account location (where you'll be creating the VM).&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Review + Create' button.&lt;br /&gt;
[[File:Az_storage_accounts.png|850px]]&lt;br /&gt;
*Wait for completion of storage account creation before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Create storage blob container ====&lt;br /&gt;
Here is a procedure to create a blob container in storage account if required to do so:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select 'Storage accounts' item from the left menu.&lt;br /&gt;
*Click on storage account item to add blob container.&lt;br /&gt;
*Click on the Blob Services button.&lt;br /&gt;
[[File:Az_storage_blob_container1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From 'Blobs' top menu, click 'Container' item.&lt;br /&gt;
*The 'Blob container' dialog box appears.&lt;br /&gt;
*Provide a name to this blob container.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Ok' button.&lt;br /&gt;
[[File:Az_storage_blob_container2.png|850px]]&lt;br /&gt;
*Wait for completion of storage blob container before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Upload a Virtual Hard Disk (VHD) Image ===&lt;br /&gt;
Follow this procedure to upload the FreeSBC image to a storage blob container:&lt;br /&gt;
*Before being able to upload the FreeSbc image in the storage blob container, it is required to uncompress (tag.gz) the FreeSBC image locally on your PC. You will require at least 40 GB of free space to uncompress the image.&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Storage accounts' item from the left menu.&lt;br /&gt;
*Select the appropriate 'storage account' then 'Blobs' container.&lt;br /&gt;
[[File:Az_upload_image1.png|850px]]&lt;br /&gt;
&lt;br /&gt;
*From the 'Blobs' container top menu, Click 'Upload' menu item.&lt;br /&gt;
*The 'Upload blob' dialog box appears.&lt;br /&gt;
*Select the Virtual Hard Disk image (freesbc_azure.vhd) to upload from your local disk image location.&lt;br /&gt;
*Click 'Upload' button.&lt;br /&gt;
[[File:Az_upload_image2.png|800px]]&lt;br /&gt;
*Wait until upload completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a VM Image from the FreeSBC storage blob ===&lt;br /&gt;
Follow this procedure to create a VM image from a storage blob:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Create a resource' item from the left menu.&lt;br /&gt;
*The 'Create resource' dialog box appears.&lt;br /&gt;
*Type 'image' in the search text box.&lt;br /&gt;
*A list of suggested items appears.&lt;br /&gt;
*Click 'image' item.&lt;br /&gt;
[[File:az_create_vm_image1.png]]&lt;br /&gt;
&lt;br /&gt;
*The 'Create image' dialog box appears.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image2.png]]&lt;br /&gt;
&lt;br /&gt;
*Provide an image name.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Select the appropriate location.&lt;br /&gt;
*Click on 'Linux' button for the OS type.&lt;br /&gt;
*Browse through storage accounts to select the FreeSBC blob.&lt;br /&gt;
*Click 'Select' button to complete FreeSBC blob selection.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_vm_image3.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== Create a Virtual Network ===&lt;br /&gt;
Follow this procedure to create a Virtual Network if not already available:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual networks' item from the left menu.&lt;br /&gt;
*The 'Virtual networks' dialog box appears.&lt;br /&gt;
*From 'Virtual networks' top menu, click 'Add' item.&lt;br /&gt;
*The 'Create a virtual network' dialog box appears.&lt;br /&gt;
*Provide a virtual network name.&lt;br /&gt;
*Provide virtual network's address range in CIDR notation.&lt;br /&gt;
*Select appropriate resource group.&lt;br /&gt;
*Select appropriate location.&lt;br /&gt;
*Provide subnet name and address range.&lt;br /&gt;
*For the other parameters, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click 'Create' button.&lt;br /&gt;
[[File:az_create_virtual_network.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completion before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
=== '''Instantiate a FreeSBC''' ===&lt;br /&gt;
Follow this procedure to create a FreeSBC instance:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Create a virtual machine' dialog box appears.&lt;br /&gt;
*Select the appropriate resource group.&lt;br /&gt;
*Provide a virtual machine name.&lt;br /&gt;
*Select the appropriate Region (where you'll be creating the VM).&lt;br /&gt;
*Browse VM images to select appropriate FreeSBC VM image.&lt;br /&gt;
*Select VM size according to expected performace.&lt;br /&gt;
*Select 'SSH public key' option as Authentification type.&lt;br /&gt;
*Type 'centos' as SSH Authentification Username.&lt;br /&gt;
*Provide a SSH public key as SSH Authentification.&lt;br /&gt;
*Click bottom 'Next:Disk&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*The Disks dialog box appears.&lt;br /&gt;
*Select the appropriate 'OS disk type' to support your workload or scenario.&lt;br /&gt;
*Click bottom 'Next:Networking&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Select the appropriate Virtual network.&lt;br /&gt;
*For the other parameters of this page and following pages, consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click bottom 'Next:Review + create&amp;gt;' button.&lt;br /&gt;
[[File:az_create_vm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*Wait until create completes before proceeding with following steps.&lt;br /&gt;
&lt;br /&gt;
==== Add inbound security rules ====&lt;br /&gt;
Follow this procedure to add inbound security rules:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine to add inbound security rules.&lt;br /&gt;
*The virtual machine overview dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Click the 'Add inbound port rule' button.&lt;br /&gt;
[[File:az_add_inbound_port_rule1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*The 'Add inbound security rule' dialog box appears.&lt;br /&gt;
*Fill the different fields according to expected VM accessibility from public network.&lt;br /&gt;
*Consult https://docs.microsoft.com/en-us/azure for more details.&lt;br /&gt;
*Click the 'Add' button to create the inbound security rule.&lt;br /&gt;
[[File:az_add_inbound_port_rule2.png|800px]]&lt;br /&gt;
&lt;br /&gt;
==== Advanced Networking ====&lt;br /&gt;
The Azure GUI doesn't allow enabling of the 'Advanced Networking' when creating the VM from a custom image. We need to use Azure CLI to do so. Follow this procedure to enable 'Advanced Networking' on a networking interface:&lt;br /&gt;
*Log in to the dashboard.&lt;br /&gt;
*Select the 'Virtual machines' item from the left menu.&lt;br /&gt;
*The 'Virtual machines' list dialog box appears.&lt;br /&gt;
*Select the appropriate virtual machine.&lt;br /&gt;
*The 'Virtual machine' dialog box appears.&lt;br /&gt;
*Select 'Networking' item from the virtual machine 'Settings' section.&lt;br /&gt;
*Copy to clipboard the network interface name to modify 'Accelarated Networking' setting.&lt;br /&gt;
[[File:az_advanced_networking1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
*Open a shell command prompt which is Azure CLI capable (consult https://docs.microsoft.com/en-us/azure to install the Azure CLI).&lt;br /&gt;
*Enter following command using the right network interface name and resource group then press enter:&lt;br /&gt;
  az network nic update --name azure-1if-2801 --resource-group sw_group --accelerated-networking true&lt;br /&gt;
&lt;br /&gt;
*The Azure CLI command output will look like following:&lt;br /&gt;
[[File:az_advanced_networking2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
*It is required to completely 'Stop' then 'Start' the virtual machine in order to activate the 'Accelerated Networking' on the VM network interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing the FreeSBC ==&lt;br /&gt;
==== FreeSBC SSH Access ====&lt;br /&gt;
There is no root password by default, you will need to SSH onto the FreeSBC using SSH private key matching the public provided in the '''SSH public key''' when [[#Instantiate a FreeSBC]] instance.  Login using ''centos'' as username.&lt;br /&gt;
&lt;br /&gt;
For example, if your FreeSBC management IP is 192.168.178.30:&lt;br /&gt;
  &amp;gt; ssh centos@192.168.178.30&lt;br /&gt;
    ECDSA key fingerprint is 5d:94:a1:93:0f:a4:7a:5d:41:cc:29:49:79:5a:58:f3.&lt;br /&gt;
    Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
    Warning: Permanently added '192.168.178.30' (ECDSA) to the list of known hosts.&lt;br /&gt;
    &lt;br /&gt;
    CentOS-7-x86_64-Minimal-1511/112/190195:197392, Fri  7 Apr 17:41:46 EDT 2017&lt;br /&gt;
    [centos@freesbc ~]$&lt;br /&gt;
&lt;br /&gt;
=== Accessing the FreeSBC web portal ===&lt;br /&gt;
* Open a web browser to the management IP of the FreeSBC, on port 12358.  Example if your server address is 192.168.178.30, the URL would be: &amp;lt;br/&amp;gt; http://192.168.178.30:12358&lt;br /&gt;
* You should get to the FreeSBC Configuration Wizard &amp;lt;br/&amp;gt; [[File:FreeSBC_WebPortal_Configuration_wizard.png|350px]]&lt;br /&gt;
&lt;br /&gt;
From here, you can go to [[TSBC-SW:WebPortal:Initial Configuration|Web Portal Initial Configuration Guide]] to continue the installation.&lt;br /&gt;
&lt;br /&gt;
== Web Portal Initial Configuration ==&lt;br /&gt;
Click on the following link to pursue installation from the web portal:&lt;br /&gt;
[[TSBC-SW:WebPortal:Initial Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Revise on Major]]&lt;br /&gt;
&lt;br /&gt;
== External References ==&lt;br /&gt;
* [https://devops.profitbricks.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key Accessing device with SSH and private key using putty]&lt;/div&gt;</summary>
		<author><name>Jean-Francois Gosselin</name></author>	</entry>

	</feed>