Dial-out with telephone systems (PSTN)

You can use your Pexip-registered video endpoints or VMRs to dial out to PSTN destinations such as landline phones, mobile phones and audio bridges. So you no longer need a separate telephone in your conference room.

When the participants place a call to a PSTN number from a Virtual Meeting Room or Virtual Auditorium, they are routed to the appropriate carrier using the call routing rules. If you want to directly call a PSTN number from a Pexip-registered video endpoint (SIP and H.323 endpoints), you need to first connect to the Pexip Infinity Virtual Reception and then enter the PSTN number. The call gets routed to the appropriate carrier using call routing rules.

The carrier may request authentication details, in which case Pexip provides a SIP username and password. The carrier accepts the call and then delivers it to the destination PSTN number.

You can use any service but in this topic we use Twilio as an example.

Overview

The steps required to enable PSTN access are:

  1. Obtain one or more PSTN numbers — usually one for each country, city or other geographical location from which you want to provide telephone access.
  2. Configure the PSTN service so that calls from Pexip Infinity are routed correctly.
  3. Configure Pexip Infinity so that the calls to the PSTN service are routed correctly.

Prerequisites

Before creating your SIP trunk in Twilio, you need:

  1. A Twilio account.
  2. A Twilio phone number in the region/country you would like calls to be dialed out from. If you don't already have a suitable number, you can get one from Twilio by going to the Explore Products menu, and then selecting Super Network > Phone Numbers.

    We recommend setting up a number that is dedicated to outbound calls only to avoid any potential confusion over missed incoming calls and where they originated.

Setting up a SIP trunk in Twilio

The following instructions show an example configuration. Using settings other than the ones shown may also work but we recommend testing.

Creating the Elastic SIP trunk

  1. From the Explore Products menu select Elastic SIP Trunking > Trunks.
  2. Select the option to Create new SIP Trunk. You see a screen where you can configure your trunk.
  3. Enter a friendly name for your SIP trunk. In our example, we enter Pexip Example Outbound. The settings below have been tested with Pexip Infinity.

  4. Enable Secure Trunking.

  5. Save your changes and the page refreshes.

Using encryption

You can use encryption by setting Secure trunking to Enabled, however, you also need to ensure your video endpoint is configured with the right encryption settings. With secure trunking enabled, Twilio currently only accepts SIP INVITE messages with m=audio lines containing RTP/SAVP: m=audio nnnnn RTP/SAVP.

For Cisco video conferencing systems, the default setting Encryption:Best effort doesn't work with Twilio. However, if it's acceptable to use encryption for all calls made using your Cisco video endpoint, you can set Encryption to On.

Creating an access control list

You need to create an IP Access Control List that covers all the Pexip Infinity IP addresses that may be used to handle your outbound calls to your Twilio SIP trunk. Calls from IP addresses that are not safelisted are declined.

Creating the access control list in Twilio

  1. Select Elastic SIP Trunking > Manage and then select IP Access Control Lists.
  2. Click on the Create new Access Control List button and enter a friendly name for the list itself, and then enter the first IP address entry.

    The IP address should match the public IP address of the Conferencing Nodes in the outgoing location. For more information, see call routing rule.

  3. Select Create new ACL to save the list. Then use the +Create new IP Address Range button to add the remaining IP addresses.

    In our example, we create Pexip Example Access Control List and each IP address entry has the friendly name indicating the subnet region e.g. global-subnet1.

    Do not use the IP addresses in the screenshot as they may change.

Creating a set of credentials for Pexip Infinity

You need to create a set of credentials that Pexip Infinity uses to authenticate itself when dialing out to your unique SIP URI on Twilio (the SIP URI itself is defined in the next step).

  1. From the Elastic SIP Trunking menu, select Credential Lists.

    Add a new set of credentials:

    • Give the credentials set a friendly name, and enter a new username and password.
    • Save your changes and you see your new credentials set listed.

    In our example, we create a credential set called Pexip Example Credentials with username pexipexampleuser.

Creating SIP header manipulation for Pexip Infinity

You need to create a SIP header manipulation rule that Twilio can use to route calls with the correct caller-id.

The number of rules needed depends on how the customer and the carrier want to organize things. If the customer engages one carrier to deliver all the calls they want to make, then only one rule is needed, however, the customer could have more than one rule. For example, a customer can have a rule for each destination country where calls are made to, or a rule per caller-id.

  1. From Elastic SIP Trunking menu, select Settings > SIP Header Manipulation.
  2. Click on the Create a policy button and you see a page where you enter a friendly name for the manipulation policy.
  3. Select +Add request rule in the Request rules section, and enter a unique name for the rule.
  4. Select/enter the following details in the Actions section:

    Option Input
    SIP header field From number
    Action Replace with
    Value The Twilio phone number in the region/country you would like calls to be dialed out from.

Creating a Termination URI for your SIP trunk

To complete your SIP trunk configuration, you need to define a unique Termination SIP URI which Pexip Infinity uses to call your Twilio SIP trunk. You also need to link the Termination URI with the previously created access control list and credentials list so that Twilio can authenticate calls that come into your Termination SIP URI.

  1. From Elastic SIP Trunking go into your new SIP trunk and then go to Termination.
  2. In the Termination SIP URI box, you need to enter a unique SIP URI domain prefix which is a value you choose. Just enter the string that you would like to use, then click elsewhere on the page. An or indicator appears.

  3. In the Authentication section, select your IP Access Control List, Credentials List and in the Header Manipulation section, select the Header Manipulation to tie everything together.

    In our example, we enter pexip-example for the SIP URI domain prefix, giving the Termination URI: pexip-example.pstn.twilio.com, select Pexip Example Access Control List and Pexip Example Credentials for authentication and Pexip Example Policy for header manipulation.

  4. Save your changes.

Linking your SIP Trunk configuration to your number

The last step is to associate the number you purchased to your SIP Trunk.

  1. Go into your SIP trunk, and then go to Numbers.
  2. Click on Add an existing number, select the checkbox for the number you want to add, and then click on Add selected.

You have now completed the necessary configuration on the Twilio side.

Configuring SIP Credentials on Pexip Infinity

We need to create a username and password on Pexip Infinity that relates to the credential username in Twilio:

  1. From the Pexip Infinity Administrator interface, go to Call Control > SIP Credentials and select Add SIP credential. (For more information about configuring SIP credentials, see Integrating with external systems.)
  2. Complete the following fields:

    Option Input
    Realm sip.twilio.com
    Username and Password The username and password created in Twilio Credential list. In the example above, we used pexipexampleuser.

Configuring SIP Proxy on Pexip Infinity

To add Twilio as a SIP proxy:

  1. Go to Call control > SIP proxies.
  2. Select Add SIP proxy.
  3. Complete the following fields:

    Option Input
    Name Enter the name you want to use to refer to this SIP proxy. This example uses Twilio.
    Description Enter a description of the SIP proxy. This example uses SIP proxy to Twilio.
    Address Enter the IP address or FQDN of the Twilio. This is the Termination SIP URI including the Twilio domain. In the example above, we used pexip-example.pstn.twilio.com.
    Port / Transport

    Depending on your security policy, select either:

    • Port of 5060 and Transport of TCP
    • Port of 5061 and Transport of TLS
  4. Select Save.

Creating a Call Routing Rule

Call Routing Rules are required when dialing out from a conference and/or routing a direct call from an endpoint (after going via a virtual reception) to a PSTN destination. For more information, see Configuring Call Routing Rules. You can create separate call routing rules, one rule to place a direct call from an endpoint and another rule to dial out from a conference, or you can create a single rule to accommodate both scenarios. The call routing rule we create for Twilio must be configured with the following to control the dial-out capabilities:

  1. Go to Services > Call routing and select Add Call Routing Rule.
  2. Configure the following fields (all other fields can be configured with default values or as required for your specific deployment):

    Option Input
    Name Enter the name of this rule.
    Priority Assign the priority for this rule.
    Use this rule for
    Incoming gateway calls Ensure this option is selected if you are dialing a PSTN number from a registered endpoint (via Virtual Reception).
    Outgoing calls from a conference Ensure this option is selected if you want to dial out from a conference.
    When matching incoming Gateway calls...
    Match incoming calls from registered devices only Select this option if you want the rule to apply only to PSTN calls received from devices that are registered to Pexip Infinity. We recommend selecting this option to avoid toll fraud.
    Alias match and transform
    Destination alias regex match

    (\+?[1-9]\d{1,14})@<domain>

    In this example, we used (\+?[1-9]\d{1,14})@pexample.com

    Destination alias regex replace string

    \1@pexip-<termination-uri>

    This is the Termination SIP URI configured in Twilio. In this example, we used

    \1@pexip-example.pstn.twilio.com
    Call media settings

    Call capability

    Audio-only
    Outgoing call placement

    Call target

    Registered device or external system

    Outgoing location Specify the location that contains the Conferencing Nodes (typically Proxying Edge Nodes) that will communicate with Twilio.
    SIP proxy Select the SIP proxy created for Twilio.

Step 3: Create a Virtual Reception

This step is required only if you want to call a PSTN number via Virtual Reception

The Virtual Reception we create must be configured with the following capabilities:

  1. From the Pexip Infinity Administrator interface, go to Services > Virtual Receptions and select Add Virtual Reception. (For more information about configuring Virtual Receptions, see Configuring Virtual Reception IVRs.)
  2. Configure the following fields (all other fields can be configured with default values or as required for your specific deployment):

    Option Input
    Name Enter the name of this Virtual Reception.
    Service options
    Virtual Reception type Regular
    Advanced options
    Destination alias regex match (\+?[1-9]\d{1,14})
    Destination alias regex replace string

    \1@<domain>

    In this example, we used \1@pexample.com. This should match the Destination alias regex match in the call rule.

    Aliases
    Alias: #1
    Alias

    <name>@<domain>

    The name the participant will dial to access the Virtual Reception In this example, we used vrr@pexample.com

Dialing out to a PSTN number

  • Now participants can dial out to a PSTN number by dialing vrr@pexample.com and then entering the PSTN number.

    In our example, a participant using SIP or H.323 endpoints is routed to the Pexip Infinity Virtual Reception. There they hear an audio prompt asking them to enter the number they wish to connect to. They enter the PSTN number and the call gets routed to the appropriate telephone carrier.

  • Likewise, participants can dial out from a conference by dialing +1 555 456789@example.com (this is just an example) and the call gets routed to the appropriate telephone carrier.

    Any participants using a Connect app see the telephone participant in the roster with a name in the format <participant's telephone number>@ptsn.twilio.com: