Network Intelligence/Restcomm Configuration

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(Network Diagram and Call Scenarios)
 
(103 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Network Intelligence/Restcomm Configuration}}
+
{{DISPLAYTITLE:Restcomm CPaaS Platform Configuration}}
 
 
 
=Introduction=
 
=Introduction=
This document provides instructions on how to configure FreeSBC to interoperate with the Netowrk Intelligence/Restcomm Communications platform as a service (CPaaS) system . Restcomm CPaaS enablement provides programmable voice like IVR service, progammable SMS service, mail, chat services and more, for service provider and enterprise customers. FreeSBC acts as a firewall before Restcomm CPaaS platform and provides many essestial protection features for voice communications over SIP and RTP traffic. With the example below, a softphone - PhonerLite, and a real mobile phone are used to provide originating end point that will call through FreeSBC to Restcomm platform. Further, in this example, FreeSBC AWS is used, but in fact, any FreeSBC platform will be able to achieve the same setup. <br/>
+
This document provides instructions on how to configure ProSBC to interoperate with the [https://www.restcomm.com/ Restcomm] Communications platform as a service (CPaaS) system. <br/>
 +
Restcomm CPaaS platform provides programmable voice like IVR service, programmable SMS service, mail, chat services and more, for service provider and enterprise customers. <br/>
 +
[[ProSBC]] acts as a Session Border Controller to protect the Restcomm CPaaS platform and provides many essential protection features for voice communications over SIP and RTP traffic. <br/>
 +
With the example below, a softphone - PhonerLite, and a real mobile phone are used to provide an originating endpoint that will call through [[ProSBC]] to Restcomm platform. <br/>
 +
Furthermore, in this example, [[ProSBC]] AWS is used, but in fact, any [[ProSBC]] platform will be able to achieve the same setup. <br/>
  
 
=Network Diagram and Call Scenarios=
 
=Network Diagram and Call Scenarios=
This section provides the simplified network diagram containing Softphone, Mobile phone, service provider, FreeSBC, Restcomm system, and the call flow scenarios.
+
This section provides the simplified network diagram containing Softphone, Mobile phone, service provider, ProSBC, Restcomm system, and the call flow scenarios.
  
[[File:Network_Intelligence-Restcomm_configuration_setup_call_flows.PNG|800px]]
 
  
# Source of ServiceProvider-A sends a call to FreeSBC-A.
+
# '''Restcomm welcome announcement''' - PhonerLite sends 'direct call' to ProSBC with called information 1234@52.60.132.155 where 52.60.132.155 is the public Elastic IP used for voip interface in this ProSBC AWS. ProSBC makes a mapping of called number to 1234@netg2.restcomm.com before making an outgoing call to Restcomm platform. PhonerLite hears a welcome greeting from Restcomm platform. Configuration steps (available in different sections of PhonerLite Configuration, ProSBC Configuration below):[[File:Restcomm_welcome_announcement.PNG|1000px]]
# FreeSBC-A forwards the call to OSPrey-A, which is a SIP redirect server providing LCR, fraud control, SHAKEN AS (Authentication Service) and other features.
+
##[[Network_Intelligence/Restcomm_Configuration#PhonerLite_direct_call_setting|PhonerLite direct call setting]]
# OSPrey-A performs LCR, fraud control and SHAKEN AS logic, then sends one of the following responses to FreeSBC-A
+
##[[Network_Intelligence/Restcomm_Configuration#ProSBC Local NAT Traversal setting|ProSBC Local NAT Traversal setting]]
##SIP 404 Not Found: No fraud or SHAKEN AS error is detected, and routing information is unavailable.
+
##[[Network_Intelligence/Restcomm_Configuration#ProSBC NAPs setting|ProSBC NAPs setting]]
##SIP 603 Decline: Fraud is detected or SHAKEN AS request fails.
+
##[[Network_Intelligence/Restcomm_Configuration#ProSBC routes setting|ProSBC routes setting]]
##SIP 3xx Redirect: Destination information (FreeSBC-B of ServiceProvider-B) and a SIP Identity header including a digitally signed token that includes the calling number (secure caller ID).
+
##[[Network_Intelligence/Restcomm_Configuration#ProSBC route called remapping|ProSBC route called remapping]]
#FreeSBC-A processes the response
+
# '''IVR DTMF acknowledgement''' - PhonerLite sends 'direct call'  to ProSBC with called information 1234@52.60.132.155. ProSBC makes a mapping of called number to 1234@netg2.restcomm.com before making outgoing call to Restcomm platform. PhonerLite hears welcome greeting from Restcomm platform with IVR to acknowledge the DTMF tones pressed. Same configuration steps as in call flow 1 with addition of [[Network_Intelligence/Restcomm_Configuration#PhonerLite_direct_call_setting|PhonerLite DTMF setting]] :[[File:IVR_DTMF_acknowledgement.PNG|1000px]]
##SIP 404 Not Found: FreeSBC-A tries the next destination configured in its local routing policy.
+
# '''IVR DID full number''' - PhonerLite sends 'direct callto ProSBC with called information 1234@52.60.132.155. ProSBC makes a mapping of called number to 13105894010@netg2.restcomm.com before making outgoing call to Restcomm platform. PhonerLite hears welcome greeting from Restcomm platform with IVR to acknowledge the DTMF tones pressed. Same configuration steps as in call flow 1 with addition of [[Network_Intelligence/Restcomm_Configuration#PhonerLite_direct_call_setting|PhonerLite DTMF setting]] :[[File:IVR_DID_full_number.PNG|1000px]]
##SIP 603 Decline: Proxies the response back to Source to block the call.
+
# '''Calling DID registered called number with IVR''' - Mobile phone is calling an international number 902129550330 through Mobile operator and SIP provider. 902129550330 is a registered number in SIP provider. ProSBC registering to this SIP provider (NAP) as a user for this 90212955033 and act as a termination point for this number. Once Mobile phone calling 902129550330, ProSBC detecting this called the number and forward it out, with remapping called number of 13105894010@netg2.restcomm.com to Restcomm platform. This call will also get IVR DTMF acknowledgment for DTMF tones pressed. Same configuration steps as in call flow 3 with addition of [[Network_Intelligence/Restcomm_Configuration#ProSBC register to NAP with username and password|ProSBC register to NAP with username and password]] :[[File:Calling_DID_registered_called_number_with_IVR.PNG|1000px]]
##SIP 3xx Redirect: Forwards the call to FreeSBC-B with the Identity header.
+
# '''IVR DID full number outside call''' - PhonerLite sends 'direct call'  to ProSBC with called information 1234@52.60.132.155. ProSBC makes a mapping of called number to 13105894010@netg2.restcomm.com before making an outgoing call to Restcomm platform. PhonerLite hears a welcome greeting from Restcomm platform with IVR to ask the caller to press '1', which will enable a separate call back from Restcomm platform. This separate call back is then routed through ProSBC to the SIP provider and Telecom operator and onto an outside number of a Telecobridges office phone number set. Same configuration steps as in call flow 4.
#FreeSBC-B forwards the call to OSPrey-B, which is a SIP redirect server providing fraud control, SHAKEN VS (Verification Service) and other features.
+
[[File:IVR_DID_full_number_outside_call.PNG|1000px]]
#OSPrey-B performs fraud control and SHAKEN VS logic, and then sends one of the following SIP responses to FreeSBC-B.
+
##SIP 404 Not Found: No fraud or SHAKEN VS error is detected, and routing information is unavailable.
+
##SIP 603 Decline: Fraud is detected or SHAKEN VS request fails.
+
##SIP 3xx Redirect: Destination information (Destination of ServiceProvider-B) is attached.
+
#FreeSBC-B processes the response
+
##SIP 404 Not Found: FreeSBC-B tries the next destination configured in its local routing policy.
+
##SIP 603 Decline: Proxies the response back to FreeSBC-A to block the call.
+
##SIP 3xx Redirect: Forwards the call to Destination.
+
Note: A variant scenario is that Destination of ServiceProvider-B is configured as the next destination in the local routing policy of ServiceProvider-B, OSPrey-B returns SIP 404 Not Found, then FreeSBC-B does failover to Destination.
+
  
=FreeSBC Configuration=
+
=PhonerLite Configuration=
This section provides FreeSBC configuration for the solution.
+
==Configure Routing Script==
+
FreeSBC is configured to use routing script to handle SIP 3xx Redirect response.
+
:1. Enable routing script
+
Gateway->Use script
+
:2. Load routing scripts
+
Gateway->Routes->Routing Script->Import Script File
+
    File->txnx_shaken.rb
+
    ScriptType->TxNx
+
    Load on startup->unchecked
+
Gateway->Routes->Routing Script->Import Script File
+
    File->txnx_routing.rb
+
    ScriptType->Txnx
+
    Load on startup->checked
+
  
[[:File:Txnx_scripts.zip|Click here to download txnx_shaken.rb and txnx_routing.rb Routing Scripts]]
+
This section provides PhonerLite configurations for the solution.
  
==Configure NAP (Network Access Point)==
+
==PhonerLite direct call setting==
OSPrey-A and OSPrey-B are configured as NAP on FreeSBC-A and FreeSBC-B respectively. A general SIP endpoint, NAP-ANY, is configured on both FreeSBC’s.
+
 
* On FreeSBC-A
+
Below are sections required to setup outbound direct call on PhonerLite,
NAPs->Create New NAP
+
 
    Name->NAP_OSPrey_A
+
'''Server''' setting: All Proxy/Registrar and Domain/Realm are empty
    Proxy address->x.x.x.x (IP of OSPrey-A)
+
 
NAPs->Create New NAP
+
[[File:PhonerLite_direct_call_Server.png|500px]]
    Name->NAP_ANY
+
 
Use Proxy Address->Unchecked
+
'''User''' setting
* On FreeSBC-B
+
 
NAPs->Create New NAP
+
[[File:PhonerLite_direct_call_User.png|500px]]
    Name->NAP_OSPrey_B
+
 
    Proxy address->x.x.x.x (IP of OSPrey-B)
+
'''Network''' setting
NAPs->Create New NAP
+
 
    Name->NAP_ANY
+
[[File:PhonerLite_direct_call_Network.png|500px]]
    Use Proxy Address->Unchecked
+
 
Note: To configure local routing policy with other destination NAPs, OSPrey NAPs should have the highest priority alone all destination NAPs.
+
'''Codecs and DTMF''' setting
==Configure NAP Column==
+
 
NAP column is used to mark OSPrey as redirect server.
+
[[File:PhonerLite_direct_call_Codecs_and_DTMF.png|500px]]
Gateway->Routes->NAP Column->Create New NAP Column
+
 
    Name: server_type
+
For dialout, we can specify the called number as 1234@52.60.132.155 where 52.60.132.155 is the public Elastic IP used for voip interface in this ProSBC AWS.
    Type Attributes: NORMAL|REDIRECT
+
 
    Default: NORMAL
+
=ProSBC Configuration=
*Both NAP_OSPrey-A and NAP_OSPrey-B are configured with NAP column server_type REDIRECT.
+
This section provides ProSBC configurations for the solution.
*NAP_ANY are configured with NAP column server_type NORMAL.
+
==ProSBC Local NAT Traversal setting==
==Configure Static Route==
+
 
A static route to NAP_ANY should be configured on both FreeSBC’s to allow FreeSBC to try the destination in the SIP 3xx response.
+
* See NAT section in [[Toolpack:Tsbc IP Network Settings 3.0]]
Gateway->Routes->Create New Static Route
+
 
    Name->ToEndpoints
+
==ProSBC NAPs setting==
    NAP->any
+
 
    Remapped_NAP->NAP_ANY
+
* See [[Toolpack:Allocating a SIP Network Access Point (NAP) SBC A|Create SIP NAP]] and [[Toolpack:Allocating a SIP Open Network Access Point (NAP) SBC A|Create Open NAP]]
==Enable SIP Custom Header==
+
** Here, SIP NAP will be Restcomm NAP and Service Provider NAP, and Open NAP will be from PhonerLite
Enable SIP Custom Headers must be checked to pass SHAKEN Identity header and several other headers used by the solution.
+
 
Profiles->SIP->Enable SIP Custom Headers
+
==ProSBC register to NAP with username and password==
==Disable Legacy Redirection Mode==
+
 
Use legacy redirection mode must be unchecked to allow FreeSBC to use routing script to handle SIP 3xx response.
+
* The following sections need to be set, as in example below,
SIP->Editing SIP Configuration->Header Parameters->Use legacy redirection mode
+
 
==Configure Route Retry Action==
+
 
Route retry action of 3xx, 404 and 603 must be configured to allow FreeSBC to perform failover, fraud control and SHAKEN AS/VS request.
+
[[File:ProSBC register to NAP with username and password.png|700px]]
  Profiles->Edit Reason Cause Mapping
+
 
    300 Multiple Choices->Route retry action->Process call routing
+
* In this example, ProSBC is behind NAT, so local NAT method is set
    302 Moved temporarily->Route retry action->Process call routing
+
 
    404 Not found->Route retry action->Continue call
+
==ProSBC routes setting==
    603 Decline->Route retry action->Stop call
+
 
Notes:
+
* See [[Toolpack:Creating a First Call Route E|Create a Static Route]]
*The default route retry action of 404 is Stop call.
+
** Here, we set the SIP end points (NAP) to and from as required in each call flow scenario
*The default route retry action of 603 is Continue call.
+
 
 +
==ProSBC route called remapping==
 +
 
 +
* The following section needs to be set, and depending what called number remapping required as in each call flow scenario,  
 +
   
 +
[[File:ProSBC route called remapping.png|700px]]
 +
 
 +
 
 +
== References ==
 +
*[https://www.telestax.com/ Communications Platform as a Service(CPaas)]
 +
*[https://www.restcomm.com/ Cloud based Voice and SMS APIs]

Latest revision as of 02:49, 25 January 2021

Contents

Introduction

This document provides instructions on how to configure ProSBC to interoperate with the Restcomm Communications platform as a service (CPaaS) system.
Restcomm CPaaS platform provides programmable voice like IVR service, programmable SMS service, mail, chat services and more, for service provider and enterprise customers.
ProSBC acts as a Session Border Controller to protect the Restcomm CPaaS platform and provides many essential protection features for voice communications over SIP and RTP traffic.
With the example below, a softphone - PhonerLite, and a real mobile phone are used to provide an originating endpoint that will call through ProSBC to Restcomm platform.
Furthermore, in this example, ProSBC AWS is used, but in fact, any ProSBC platform will be able to achieve the same setup.

Network Diagram and Call Scenarios

This section provides the simplified network diagram containing Softphone, Mobile phone, service provider, ProSBC, Restcomm system, and the call flow scenarios.


  1. Restcomm welcome announcement - PhonerLite sends 'direct call' to ProSBC with called information 1234@52.60.132.155 where 52.60.132.155 is the public Elastic IP used for voip interface in this ProSBC AWS. ProSBC makes a mapping of called number to 1234@netg2.restcomm.com before making an outgoing call to Restcomm platform. PhonerLite hears a welcome greeting from Restcomm platform. Configuration steps (available in different sections of PhonerLite Configuration, ProSBC Configuration below):Restcomm welcome announcement.PNG
    1. PhonerLite direct call setting
    2. ProSBC Local NAT Traversal setting
    3. ProSBC NAPs setting
    4. ProSBC routes setting
    5. ProSBC route called remapping
  2. IVR DTMF acknowledgement - PhonerLite sends 'direct call' to ProSBC with called information 1234@52.60.132.155. ProSBC makes a mapping of called number to 1234@netg2.restcomm.com before making outgoing call to Restcomm platform. PhonerLite hears welcome greeting from Restcomm platform with IVR to acknowledge the DTMF tones pressed. Same configuration steps as in call flow 1 with addition of PhonerLite DTMF setting :IVR DTMF acknowledgement.PNG
  3. IVR DID full number - PhonerLite sends 'direct call' to ProSBC with called information 1234@52.60.132.155. ProSBC makes a mapping of called number to 13105894010@netg2.restcomm.com before making outgoing call to Restcomm platform. PhonerLite hears welcome greeting from Restcomm platform with IVR to acknowledge the DTMF tones pressed. Same configuration steps as in call flow 1 with addition of PhonerLite DTMF setting :IVR DID full number.PNG
  4. Calling DID registered called number with IVR - Mobile phone is calling an international number 902129550330 through Mobile operator and SIP provider. 902129550330 is a registered number in SIP provider. ProSBC registering to this SIP provider (NAP) as a user for this 90212955033 and act as a termination point for this number. Once Mobile phone calling 902129550330, ProSBC detecting this called the number and forward it out, with remapping called number of 13105894010@netg2.restcomm.com to Restcomm platform. This call will also get IVR DTMF acknowledgment for DTMF tones pressed. Same configuration steps as in call flow 3 with addition of ProSBC register to NAP with username and password :Calling DID registered called number with IVR.PNG
  5. IVR DID full number outside call - PhonerLite sends 'direct call' to ProSBC with called information 1234@52.60.132.155. ProSBC makes a mapping of called number to 13105894010@netg2.restcomm.com before making an outgoing call to Restcomm platform. PhonerLite hears a welcome greeting from Restcomm platform with IVR to ask the caller to press '1', which will enable a separate call back from Restcomm platform. This separate call back is then routed through ProSBC to the SIP provider and Telecom operator and onto an outside number of a Telecobridges office phone number set. Same configuration steps as in call flow 4.

IVR DID full number outside call.PNG

PhonerLite Configuration

This section provides PhonerLite configurations for the solution.

PhonerLite direct call setting

Below are sections required to setup outbound direct call on PhonerLite,

Server setting: All Proxy/Registrar and Domain/Realm are empty

PhonerLite direct call Server.png

User setting

PhonerLite direct call User.png

Network setting

PhonerLite direct call Network.png

Codecs and DTMF setting

PhonerLite direct call Codecs and DTMF.png

For dialout, we can specify the called number as 1234@52.60.132.155 where 52.60.132.155 is the public Elastic IP used for voip interface in this ProSBC AWS.

ProSBC Configuration

This section provides ProSBC configurations for the solution.

ProSBC Local NAT Traversal setting

ProSBC NAPs setting

ProSBC register to NAP with username and password

  • The following sections need to be set, as in example below,


700px

  • In this example, ProSBC is behind NAT, so local NAT method is set

ProSBC routes setting

  • See Create a Static Route
    • Here, we set the SIP end points (NAP) to and from as required in each call flow scenario

ProSBC route called remapping

  • The following section needs to be set, and depending what called number remapping required as in each call flow scenario,

700px


References

Personal tools