PSTN Access with a VoIP Gateway
Using a SIP-compliant VoIP Gateway, Brekeke PBX users can receive calls from a Public Switched Telephone Network (PSTN) and make calls to PSTN lines.
Step 1. VoIP Gateway Setup
Set the following at your VoIP Gateway:
SIP proxy address | IP address of Brekeke PBX |
Dialing number sent to Brekeke PBX | PSTN line number |
Step 2. ARS Route Setup
Set up “Patterns – IN” and “Patterns – OUT” in the default Gateway ARS Route to receive and make calls from/to the Gateway.
- Default ARS rule “gw1” is the setup template for one-stage dialing.
- Default ARS rule “gw2” is the setup template for two-stage dialing.
Use the following settings to register the gateway at the Brekeke PBX bundled SIP server. Many PSTN Gateways have a short interval between sessions, during which time the line is unavailable. You can modify the [Session interval (ms)] field setting to reflect this delay as needed.
- In Brekeke PBX v3.1.x, check the [Template] field to enable the [Variable Setting] page.
[Registration]
Register URI | sip:&v1@127.0.0.1 | Register expire (sec) | 3600 |
Proxy address | 127.0.0.1 | Register update period (%) | 90 |
User | Password |
Step 3. Receiving PSTN Calls
Create Gateway ARS Route “Patterns – IN” to receive calls from a gateway.
[Patterns – IN]
Matching patterns | Deploy patterns | |
From | ||
To | sip:&v1@ | &v3 |
Step 4. Calling PSTN Numbers
One-Stage Dialing
If your VoIP Gateway supports One Stage Dialing, a Brekeke PBX user can make a PSTN direct call by setting an ARS Route as follows:
[Patterns – OUT]
Matching patterns | Deploy patterns | |
From | ||
To | sip:([0-9]{7,25})@ | sip:$1@gw_IPaddress |
In this example, Regular Expressions were used to define the Matching and Deploy patterns. A Brekeke PBX user who dials a number that has between 7 and 25 digits will be considered as a PSTN call. Brekeke PBX will apply the above ARS Route and the call will be sent to the gateway.
If you use multiple VoIP Gateways for outbound calls, you can define more detailed dialing patterns in [Matching patterns] > [To], as well as change the [Priority] field as necessary to define the usage order of Gateways. Please note that lower numbers hold the higher priority. You can use the [Max Sessions] field to define the total number of sessions handled by each pattern.
Two-Stage Dialing
If your VoIP Gateway supports Two Stage Dialing, have the gateway’s PSTN port register with Brekeke PBX bundled SIP server. Let’s suppose the gateway’s PSTN port has the SIP user name 111. To call a PSTN number, dial the gateway’s registered PSTN port number (in this example, it’s number 111) and then dial the destination PSTN number. Alternatively, you can configure the DTMF setting at the ARS Route OUT pattern so that the dialed numbers will be sent to the gateway as DTMF tones.
The OUT pattern to send a destination number by DTMF in Two-Stage Dialing is as shown below:
Patterns – OUT
Matching patterns | Deploy patterns | ||
From | From | ||
To | sip:111(.+)@ | To | sip:111@gw_IPaddress |
Whisper/DTMF | $1 |
- If a delay is needed before sending a DTMF call, set the [Whisper/DTMF] field as {file_name}$1. Default files are {120ms}, {240ms}, {500ms}, {1sec} and {2sec}. Customized files can be uploaded from [PBX] > [Voice prompts] and set [Language]: Common.
Step 5. Assign Values to Variables
Click the [Variables] link at the upper-right corner of the ARS Route template page. At the [Variable Setting] page, select [New Route] and assign values to the variables defined in the above Patterns – IN and Patterns – OUT.
Route Name | Gateway1 (Brekeke PBX v3.1.x or later) |
Tenant | A tenant name (MT Edition) |
v1 | PSTN line number set in “Step 1. VoIP Gateway Setup” |
v3 | Specify a Brekeke PBX extension number, such as 300. |