Example: Configuring Integrated Convergence Services to Provide VoIP Support for a Branch Using a PBX Device
This example shows how to configure the SRX210 device as a front end to a PBX device to provide users at a customer site branch whose systems are directly connected to the PBX device, or connected on a LAN, with VoIP capability and additional PSTN trunks.
Requirements
This example uses the following hardware and software components:
- SRX210 device running Integrated Convergence Services
- 2 Port Foreign Exchange Subscriber (FXS)/2 Port Foreign Exchange Office (FXO) Mini Physical Interface Module (Mini-PIM)
- One SIP trunk from a SIP trunk service provider
Be sure that you have:
- Installed and configured the hardware properly.
- Created an IPsec tunnel. Junos OS Security Configuration Guide
- Configured Network Address Translation (NAT). See the Junos OS Security Configuration Guide
- Established Internet connectivity
Before you begin, read the following topics:
- Understanding Integrated Convergence Services Media Gateway Trunks and Dial Plans
- Understanding Digit Transform Rules and Digit Manipulation
- Understanding Route Patterns and Their Digit Patterns
- Understanding the SRX Series Survivable Call Server Dial Plan
Overview
This example uses a fictitious company called YourPlace to illustrate configuration of the SRX210 with Integrated Convergence Services for a branch office as a front-end to a PBX system. YourPlace, a nationwide kitchenware, appliances, and furniture company with their headquarters in Boston, uses PBX systems for their telephony requirements at their branch offices. PBX devices offer cost savings on internal phone calls and local calls and provide fax machine and modem support.
Because the PBX system serves their needs and supports their requirements, the company is reluctant to replace it with other technology or services. However, the company wants to reduce their cost of long-distance and international calls by using VoIP instead of the local PSTN. Also, recently their call routing usage to the PSTN has increased, and they have outgrown their current capacity.
The company wants to enhance their use of PBX devices with new technology that provides their branch offices with VoIP support. To this end, the company will deploy either SRX210 or SRX240 devices with Integrated Convergence Services at their branch offices. The San Francisco branch office will use the SRX210 with the 2 Port Foreign Exchange Subscriber (FXS)/2-Port Foreign Exchange Office (FXO) Mini Physical Interface Module (Mini-PIM as a front end to their PBX system.
Table 15 identifies the interfaces on the SRX210 base system and the 2 Port Foreign Exchange Subscriber (FXS)/2-Port Foreign Exchange Office (FXO) Mini Physical Interface Module (Mini-PIM).
Table 15: SRX210 Base System Using 2 Port FXS/2 Port FX0 Mini-PIM
Onboard Interfaces | 2 Port FXS + 2 Port FX0 Mini-PIM |
|---|---|
fxs-0/0/10 fxs-0/0/11 fxo-0/0/12 fxo-0/0/13 | fxs-1/0/0 fxs-1/0/1 fxo-1/0/2 fxo-1/0/3 |
This example shows how to configure the following components to deploy the SRX Series SCS as a front-end to a PBX device:
- Trunks
Table 16 shows the name of the interface used for a trunk, the trunk name, the trunk group, and how the trunk group (including its trunks) is used.

Note: Trunk groups are explained later in this topic.
Table 16: Interfaces, Trunks and Their Trunk Groups
Interface
Corresponding Trunk
Trunk Group
Provisioned For
sip1
sip-trnk-grp
SIP trunk from a SIP trunk service provider for IP calls outside the branch.
onboard fxo-0/0/12
fxo1
fxo-pstn-trnk-grp
Calls to and from the PSTN.
Using an FXS trunk, the SRX210 SRX Series SCS routes a call to an FXO interface on the PBX or from one.
onboard fxo-0/0/13
fxo2
fxo-pstn- grp-911
Outgoing emergency calls to the PSTN trunk. Reserved for emergency calls.
The SRX210 SRX Series SCS routes a call from the PBX to the PSTN trunk.
Mini-PIM fxo-1/0/2
fxo3
fxo-pstn-trnk-grp
Calls to and from the PSTN.
Using an FXS trunk, the SRX210 SRX Series SCS routes a call to an FXO interface on the PBX or from one.
Mini-PIM fxo-1/0/3
fxo4
fxo-pstn-trnk-grp
Calls to and from the PSTN.
Using an FXS trunk, the SRX210 SRX Series SCS routes a call to an FXO interface on the PBX or from one.
onboard fxs-0/0/10
fxs1
fxs-mgw-pbx-grp
Routing calls to and from the PBX.
onboard fxs-0/0/11
fxs2
fxs-mgw-pbx-grp
Routing calls to and from the PBX.
Mini-PIM fxs-1/0/0
fxs3
fxs-mgw-pbx-grp
Routing calls to and from the PBX.
Mini-PIM fxs-1/0/1
fxs4
fxs-mgw-pbx-grp
Routing calls to and from the PBX.
- Trunk groups.
Route patterns of a dial plan include trunk groups that specify the trunks used for routing calls that match the route pattern. Route policies specify trunk groups to which calls are directly routed.
This example configures the trunk groups identified in Table 16.
- Digit manipulation rules
Digit manipulation rules are assigned to trunk groups in a dial plan, not before a trunk group is added to it. This example uses the following digit manipulation rules:
- A rule called stripleading7 that strips the leading 7 from calls before they are routed to the SIP trunk peer proxy server.
- A rule called stripleading8 that strips the leading 8 from calls directed to the local PSTN before they are routed to it.
- A rule called stripleading9 that strips the leading 9 from 9-9-1-1 emergency calls before they are routed out the PSTN.
- A dial plan that uses route patterns for its outgoing
calls to the SIP trunk and the PSTN and route policies for its incoming
calls from the SIP trunk and the PSTN.
This example uses the following route patterns:

Note: Route patterns that you configure in a dial plan must match those configured for the PBX. The PBX configuration determines routing patterns for called numbers.
The SRX Series SCS or the SRX Series MGW simply passes calls from the PBX to the PSTN trunks and the SIP trunk.
- A route pattern with the digit 7 configured as a trunk access code to direct calls to the SIP trunk.
- A route pattern with digit 8 configured as a trunk access code to direct calls to be routed to the local PSTN.
- A route pattern with the digit 9 configured as a trunk access code to direct 9-1-1 calls to a dedicated PSTN trunk
This examples uses the following route policies:

Note: Incoming calls are routed to the Integrated Convergence Services SRX210 FXS interfaces and forwarded to the PBX FXO interfaces. The SRX Series MGW or SRX Series SCS acts as an FXS station to the PBX’s FXO station. The PBX configuration determines routing patterns for called numbers.
This example uses the following route policies:
- A route policy to route calls from the PSTN to the PBX.
- A route policy to route calls from the SIP trunk to the PBX.
Topology to Be Provided
Configuration
- Configuring Trunks
- Configuring Trunk Groups
- Configuring Digit Transform Rules
- Configuring the SRX Series SCS Dial Plan
Configuring Trunks
CLI Quick Configuration
To quickly configure trunks for routing calls, copy the following commands and paste them into the CLI.
J-Web Quick Configuration
Step-by-Step Procedure
To configure trunks:
- Configure a SIP trunk.
- Select Convergence Services > Media Gateway > Trunks, and click Add to add a new trunk.
- In the New Trunk Configuration pane, type sip1 in the Trunk name box.
- Select sip from the Trunk type list.
- From the codec list, select G711–MU.
- From the tone generation list, select, rfc-2833.
- In the Description box, type sfbr-to-hq-axises.
- In the Authentication box, type 14155556676.
- In the Authentication password box, type 09dew1.
- In the Port number box, type 5060.
- From the Transport list, select udp.
- Configure FXO interfaces for PSTN trunks.
- Select Convergence Services > Media Gateway > Trunks, and click Add.
- In the New Trunk Configuration pane, type fxo1 in the Trunk name box.
- Select fxo from the Trunk type list.
- In the TDM interface box, type fxo-0/0/12.
- Click OK.
- Click Add to add a second FXO trunk.
- In the New Trunk Configuration pane, type fxo2 in the Trunk name box.
- Select fxo from the Trunk type list.
- In the TDM interface box, type fxo-0/0/13.
- Click OK.
- Click Add to add a third FXO trunk.
- In the New Trunk Configuration pane, type fxo3 in the Trunk name box.
- Select fxo from the Trunk type list.
- In the TDM interface box, type fxs-1/0/0.
- Click OK.
- Click Add to add a fourth FXO trunk.
- In the New Trunk Configuration pane, type fxo4 in the Trunk name box.
- Select fxo from the Trunk type list.
- In the TDM interface box, type fxo-1/0/3.
- Configure FXS interfaces to be used for communication
between the SRX210 device and the PBX device.
- Click Add to add the first FXS trunk.
- In the New Trunk Configuration pane, type fxs1 in the Trunk name box.
- Select fxs from the Trunk type list.
- In the TDM interface box, type fxs-0/0/10.
- Click OK.
- Click Add to add the second FXS trunk.
- In the New Trunk Configuration pane, type fxs2 in the Trunk name box.
- Select fxs from the Trunk type list.
- In the TDM interface box, type fxs-0/0/11.
- Click OK.
- Click Add to add the third FXS trunk.
- In the New Trunk Configuration pane, type fxs3 in the Trunk name box.
- Select fxs from the Trunk type list.
- In the TDM interface box, type fxs-1/0/0.
- Click OK.
- Click Add to add the fourth FXS trunk.
- In the New Trunk Configuration pane, type fxs4 in the Trunk name box.
- Select fxs from the Trunk type list.
- In the TDM interface box, type fxs-1/0/1
- Click OK to check your configuration and save it as a candidate configuration.
- Click OK to check your configuration and save it as a candidate configuration.
- If you are done configuring the device, click Commit.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see “Using the CLI Editor in Configuration Mode”.
- Specify the SIP trunk name and type.[edit services convergence-services]user@host# edit trunk sip1 trunk-type sip peer-proxy-server
- Specify the FQDN address of the SIP trunk
service provider peer proxy server.[edit services convergence-services trunk sip1 trunk-type sip peer-proxy-server]user@host# set address fqdn sip.axises.com
- Configure the authentication ID and password
used to register to the peer-proxy-server.

Note:
The SIP trunk service provider provides you with the authentication ID and password.
[edit services convergence-services trunk sip1 trunk-type sip peer-proxy-server]user@host# set auth-id 14155556676user@host# set auth-password 09dew1 - Configure the codec and the DTMF method
for the SIP trunk.[edit services convergence-services trunk sip1 trunk-type sip peer-proxy-server]user@host# set codec G711–MU dtmf-method rfc-2833
- Provide a description of the SIP trunk
configuration, such as something that identifies the branch location
or the peer-proxy-server.[edit services convergence-services trunk sip1 trunk-type sip peer-proxy-server]user@host# set description sfbr-to-hq-axises
- Configure FXO interfaces for PSTN trunks.[edit services convergence-services]user@host# set trunk fxo1 trunk-type fxo tdm-interface fxo-0/0/12user@host# set trunk fxo2 trunk-type fxo tdm-interface fxo-0/0/13user@host# set trunk fxo3 trunk-type fxo tdm-interface fxo-1/0/2user@host# set trunk fxo4 trunk-type fxo tdm-interface fxo-1/0/3
- Configure FXS interfaces for communication
between the SRX210 and the PBX device.[edit services convergence-services]user@host# set trunk fxs1 trunk-type fxs tdm-interface fxs-0/0/10user@host# set trunk fxs2 trunk-type fxs tdm-interface fxs-0/0/11user@host# set trunk fxs3 trunk-type fxs tdm-interface fxs-1/0/0user@host# set trunk fxs4 trunk-type fxs tdm-interface fxs-1/0/1
Results
From configuration mode, confirm your SIP trunk configuration by entering the show services convergence-services trunk sip1 command.
For each FXO and FXS trunk configuration, type the show services convergence-services trunk trunk-name command. This example shows how to confirm the fxo1 trunk configuration.
If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Configuring Trunk Groups
CLI Quick Configuration
To quickly configure trunk-groups, copy the following commands and paste them into the CLI.
J-Web Quick Configuration
Step-by-Step Procedure
To configure trunk groups containing the preconfigured trunks:
- Select Convergence Services >
Media Gateway > Trunk groups, and click Add to add a new trunk group..
- In the New Trunk Group Configuration pane, type sip-trnk-grp in the Trunk group name box.
- From the Available trunks section, move sip1 to the Selected trunks section.
- Click OK.
- Click Add to add a second trunk group.
- In the New Trunk Group Configuration pane, type fxo-pstn-grp-911 in the Trunk group name box.
- From the Available trunks section, move fxo2 to the Selected trunks section.
- Click OK.
- Click Add to add a third trunk group.
- In the New Trunk Group Configuration box, type fxo-pstn-trnk-grp in the Trunk group name box.
- From the Available Trunks section, move fxo1, fxo3, and fxo4 to the Selected trunks section.
- Click OK.
- Click Add to add a fourth trunk group.
- In the New Trunk Group Configuration pane, type fxs-mgw-pbx-grp in the Trunk group name box.
- From the Available Trunks section, move fxo1, fxo2, fxo3, and fxo4 to the Selected trunks section.
- Click OK.
- Click OK to check your configuration and save it as a candidate configuration.
- If you are done configuring the device, click Commit>Options>Commit.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see “Using the CLI Editor in Configuration Mode”.
- Create trunk groups for the SIP trunk, emergency
9-1-1 trunk, FXO trunks, and FXS trunks.[edit services convergence-services]user@host# set trunk-group sip-trnk-grp trunk sip1user@host# set trunk-group fxo-pstn-grp-911 trunk fxo2 user@host# set trunk-group fxo-pstn-trnk-grp trunk fxo1 trunk fxo3 trunk fxo4user@host# set trunk-group fxs-mgw-pbx-grp trunk fxs1 trunk fxs2 trunk fxs3 trunk
Results
From configuration mode, confirm your configuration by entering the show services convergence-services trunk-group trunk-group-name command for each trunk group. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Configuring Digit Transform Rules
CLI Quick Configuration
To quickly configure digit transform rules, copy the following commands and paste them into the CLI.
J-Web Quick Configuration
Step-by-Step Procedure
Create three digit transform rules.
- Select Configure>Convergence-Services>Dial
Plan>Digit Manipulation and click Add.
- In the New digit manipulation configuration pane, type stripleading7 in the Digit Transform box.
- In the Regular Expression box, type s/^7//.
- Click OK.
- Click Add to add the second digit transform rule.
- In the New digit manipulation configuration pane, type stripleading8 in the Digit Transform box.
- In the Regular Expression box, type s/^8//.
- Click OK.
- Click Add to add the third digit transform rule.
- In the New digit manipulation configuration pane, type stripleading9 in the Digit Transform box.
- In the Regular Expression box, type s/^9//.
- Click OK.
- Click OK to check your configuration and save it as a candidate configuration.
- If you are done configuring the device, click Commit>Options>Commit.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see “Using the CLI Editor in Configuration Mode”.
- Configure three digit transform rules.[edit services convergence-services digit-manipulation]user@host set digit-transform stripleading7 regular-expression s/^7//user@host# set digit-transform stripleading8 regular-expression s/^8//user@host# set digit-transform stripleading9 regular-expression s/^9//
Results
From configuration mode, confirm your configuration by entering the show services convergence-services digit-manipulation digit-transform digit-transform-rule-name command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it. This example shows use of the command for the stripleading9 digit transform rule.
If you are done configuring the device, enter commit from configuration mode.
Configuring the SRX Series SCS Dial Plan
CLI Quick Configuration
To quickly configure the SCS dial plan, copy the following commands and paste them into the CLI.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see “Using the CLI Editor in Configuration Mode”.
- Specify the dial plan name. [edit services convergence-services]user@host edit dial-plan SF-dialplan
- Create a route pattern for emergency
calls.[edit services convergence-services dial-plan SF-dialplan]user@host# set route-pattern 9911 trunk-group fxo-pstn-grp-911 digit-transform stripleading9user@host# set route-pattern 9911 call-type emergency-call
- Create route patterns for routing long-distance
and international calls from the PBX to the SIP trunk. [edit services convergence-services dial-plan SF-dialplan]user@host# set route-pattern 71xxxxxxxxxx trunk-group sip-trnk-grp digit-transform stripleading7user@host# set route-pattern 71xxxxxxxxxx call-type long-distance-calluser@host set route-pattern 71xxxxxxxxxxxxxx trunk-group sip-trnk-grp digit-transform stripleading7user@host# set route-pattern 71xxxxxxxxxxxxxx call-type international-call
- Create a route pattern for routing some
local calls to the PSTN.[edit services convergence-services dial-plan SF-dialplan] user@host set route-pattern 8xxxxxxx trunk-group fxo-pstn-trnk-grp digit-transform stripleading8user@host set route-pattern 8xxxxxxx call-type local-call
- Configure a route policy to route calls
from the PSTN to the PBX[edit services convergence-services dial-plan SF-dialplan] user@host set route-policy from-pstn-to-pbx1 term next-hop-pbx1 from trunk-group fxo-pstn-trnk-grpuser@host set route-policy from-pstn-to-pbx1 term next-hop-pbx1 then route next-hop trunk-group fxs-mgw-pbx-grp
- Configure a route policy to route calls
from the SIP trunk to the PBX. [edit services convergence-services dial-plan SF-dialplan] user@host set route-policy sip-trunk-service-provider term next-hop-pbx1-from-SIP from trunk-group sip-trnk-grpuser@host set route-policy sip-trunk-service-provider term next-hop-pbx1-from-SIP then route next-hop trunk-group fxs-mgw-pbx-grp
Results
From configuration mode, confirm your configuration by entering the show services convergence-services dial-plan SF-dialplan command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Verification
To confirm that the configuration is working properly, this task:
Verifying that the SRX Series MGW is Active
Purpose
Verify that the SRX Series MGW is active. Display the length of time that the Integrated Convergence Services media gateway call routing engine has been executing.
Action
From operational mode, enter the show services convergence-services media-gateway uptime command.
Hide Navigation Pane
Show Navigation Pane
Download
SHA1