Actions

Use Cases:SIP Redirect to ALL: Difference between revisions

(LM Updated routing script instructions)
(Updated page)
Line 13: Line 13:
<br />
<br />
{| colspan="4" border="1" class="wikitable"
{| colspan="4" border="1" class="wikitable"
! width="250" style="background: none repeat scroll 0% 0% rgb(0, 83, 139);" | Configure Routing Scripts
! width="300" style="background: none repeat scroll 0% 0% rgb(0, 83, 139);" | Configure Routing Scripts
! width="250" style="background: none repeat scroll 0% 0% rgb(0, 83, 139);" | Configure NAP
! width="300" style="background: none repeat scroll 0% 0% rgb(0, 83, 139);" | Configure NAP
! width="250" style="background: none repeat scroll 0% 0% rgb(0, 83, 139);" | Configure NAP Colums
! width="300" style="background: none repeat scroll 0% 0% rgb(0, 83, 139);" | Configure NAP Colums
! width="250" style="background: none repeat scroll 0% 0% rgb(0, 83, 139);" | Configure Routes
! width="300" style="background: none repeat scroll 0% 0% rgb(0, 83, 139);" | Configure Routes
|-
|-
|  
|  
*[[Toolpack:Call_Routes_Settings_B#Routing_Script|Configure Routing scripts]].
[[Toolpack:Call_Routes_Settings_B#Routing_Script|Configure Routing scripts]]
**'''Routing Scripts''' -> Import Script File
*'''Routing Scripts''' -> Import Script File
***'''File'''-> [[Media:Redirect_routing.rb.zip|redirect_routing.rb]]
**'''File'''-> [[Media:Redirect_routing.rb.zip|redirect_routing.rb]]
***'''ScriptType'''-> Customer
**'''ScriptType'''-> Customer
***'''Load on startup''' -> unchecked
**'''Load on startup''' -> unchecked
**'''Routing Scripts''' -> Select Main Script
*'''Routing Scripts''' -> Select Main Script
***At start of script:  
**At start of script:  
****require 'redirect_routing'
***require 'redirect_routing'
***In the main class:  
**In the main class:  
****include RedirectQuery
***include RedirectQuery
****before_filter method = redirect_query
***before_filter :method => :redirect_query
|  
|  
*[[Toolpack:Allocating_a_SIP_Network_Access_Point_(NAP)_D|Configure NAP]]. When you configure the NAPs, you need these:
[[Toolpack:Allocating_a_SIP_Network_Access_Point_(NAP)_D|Configure NAP]]
**'''NAP''' -> Create New NAP  
*'''NAP''' -> Create New NAP  
***'''Name'''-> NAP_REDIRECT_SERVER_A
**'''Name'''-> NAP_REDIRECT_SERVER_A
***'''Proxy address'''-> x.x.x.x (IP of SIP redirect server)
**'''Proxy address'''-> x.x.x.x (IP of SIP redirect server)
You can add more SIP redirect server as needed
You can add more SIP redirect server as needed
**'''NAP''' -> Create New NAP  
*'''NAP''' -> Create New NAP  
***'''Name'''-> SIP_NAP_ANY
**'''Name'''-> SIP_NAP_ANY
***'''Proxy address'''-> NONE
**'''Proxy address'''-> NONE
This will allow calls to be redirected to any IPs using this SIP transport Server
This will allow calls to be redirected to any IPs using this SIP transport Server
|  
|  
*In NAP Columns, set the following:
In NAP Columns, set the following:
**'''NAP Columns''' -> Create New Nap Column
*'''NAP Columns''' -> Create New Nap Column
***'''Name''' -> group
**'''Name''' -> server_type
***'''Type Attributes''' -> integer
**'''Type Attributes''' -> NORMAL|REDIRECT
***'''Default''' -> 50
**'''Default''' -> NORMAL
**'''NAP Columns''' -> Create New Nap Column
***'''Name''' -> weight
***'''Type Attributes''' -> integer
***'''Default''' -> 100
**'''NAP Columns''' -> Create New Nap Column
***'''Name''' -> server_type
***'''Type Attributes''' -> NORMAL|REDIRECT
***'''Default''' -> NORMAL
Select REDIRECT for each NAP that is a SIP Redirect server and you can prioritize with group (lowest value is highest priority) and weight (to load balance)
Select REDIRECT for each NAP that is a SIP Redirect server and you can prioritize with group (lowest value is highest priority) and weight (to load balance)
|  
|  
Line 77: Line 69:
|}
|}


Also make sure these settings are applied:
These settings are set by default, but may be verified if some changes were made in the default configuration:
   SIP -> Header Parameters -> Use legacy redirection mode [unchecked]
   SIP -> Header Parameters -> Use legacy redirection mode [unchecked] ( old naming convention was: Allow Recurse)
   Profiles -> Edit Reason Cause Mapping -> 302 Moved temporarily-> Route retry action -> Process Call Routing
   Profiles -> Edit Reason Cause Mapping -> 302 Moved temporarily-> Route retry action -> Process Call Routing
   gateway -> use Script -> Routing Scripts
   gateway -> use Script -> default_routing_script


== Files used for routing scripts ==
== Files used for routing scripts ==
[[Media:Redirect_routing.rb.zip|Redirect to SIP, ISDN, SS7 file]]
[[Media:Redirect_routing.rb.zip|Redirect to SIP, ISDN, SS7 file]]

Revision as of 13:39, 21 May 2019

Applies to version(s): v2.8 and above

In this scenario, the incoming call is sent to a SIP redirect server, which returns a 3xx message and a new call is sent to any other networks, be it SIP, ISDN,SS7, SIGTRAN, CAS.

Redirect to SIP SS7 ISDN.png


This is the call flow of such a scenario. A 302 Moved temporarily is returned from the SIP redirect server and new calls are made to different networks. The calls going to SS7 will need a called number prefix of 888, for ISDN 666 and for SIP 777.

SIP-SS7-ISDN Redirect callflow.png

Configure Routing Scripts Configure NAP Configure NAP Colums Configure Routes

Configure Routing scripts

  • Routing Scripts -> Import Script File
  • Routing Scripts -> Select Main Script
    • At start of script:
      • require 'redirect_routing'
    • In the main class:
      • include RedirectQuery
      • before_filter :method => :redirect_query

Configure NAP

  • NAP -> Create New NAP
    • Name-> NAP_REDIRECT_SERVER_A
    • Proxy address-> x.x.x.x (IP of SIP redirect server)

You can add more SIP redirect server as needed

  • NAP -> Create New NAP
    • Name-> SIP_NAP_ANY
    • Proxy address-> NONE

This will allow calls to be redirected to any IPs using this SIP transport Server

In NAP Columns, set the following:

  • NAP Columns -> Create New Nap Column
    • Name -> server_type
    • Type Attributes -> NORMAL|REDIRECT
    • Default -> NORMAL

Select REDIRECT for each NAP that is a SIP Redirect server and you can prioritize with group (lowest value is highest priority) and weight (to load balance)

  • When you Configure Routes, set the following:
    • Routes -> Create New Static Route
      • Name -> To_SIP_Endpoints
      • NAP -> any
      • Called -> /^(777)([0-9]*)$/
      • Remapped_NAP -> SIP_NAP_ANY
      • Remapped Called -> /^(777)([0-9]*)$/\2/
    • Routes -> Create New Static Route
      • Name -> To_SS7_Endpoints
      • NAP -> any
      • Called -> /^(888)([0-9]*)$/
      • Remapped_NAP -> SS7_NAP
      • Remapped Called -> /^(888)([0-9]*)$/\2/
    • Routes -> Create New Static Route
      • Name -> To_ISDN_Endpoints
      • NAP -> any
      • Called -> /^(666)([0-9]*)$/
      • Remapped_NAP -> ISDN_NAP
      • Remapped Called -> /^(666)([0-9]*)$/\2/

These settings are set by default, but may be verified if some changes were made in the default configuration:

 SIP -> Header Parameters -> Use legacy redirection mode [unchecked] ( old naming convention was: Allow Recurse)
 Profiles -> Edit Reason Cause Mapping -> 302 Moved temporarily-> Route retry action -> Process Call Routing
 gateway -> use Script -> default_routing_script

Files used for routing scripts

Redirect to SIP, ISDN, SS7 file