Configuration example for one-to-one binding between FXS and FXO
Network requirements
Router A and Router B are connected over an IP network and a PSTN. Telephone A attached to Router A can make calls to Telephone B attached to Router B over the IP network or the PSTN.
Usually, Telephone A makes calls to Telephone B over the IP network. In the case that the IP network is unavailable, Router A sends call from Telephone A through the bound FXO interface to Telephone B over PSTN.
Figure 15: Network diagram
Configuration outline
Configure one-to-one binding between FXS and FXO voice subscriber lines.
When the IP network is available, the VoIP entity is preferably used to make calls over the IP network.
When the IP network is unavailable, the POTS entity is used to make calls through the bound FXO voice subscriber line over the PSTN.
Configuration procedure
Routing-related configurations are beyond the scope of this example. This example assumes that Router A and Router B are reachable to each other.
Configure Router A:
<RouterA> system-view [RouterA] voice-setup [RouterA-voice] dial-program
# Configure a VoIP entity for IP calls and set the match template to 210….
[RouterA-voice-dial] entity 210 voip [RouterA-voice-dial-entity210] match-template 210.... [RouterA-voice-dial-entity210] address sip ip 192.168.0.76 [RouterA-voice-dial-entity210] quit
# Configure a POTS entity for the FXS voice subscriber line.
[RouterA-voice-dial] entity 0101001 pots [RouterA-voice-dial-entity101001] match-template 0101001 [RouterA-voice-dial-entity101001] line 6/24 [RouterA-voice-dial-entity101001] quit
# Configure a backup POTS entity on the FXO voice subscriber line, set the match template to .T, enable the sending of all digits of a called number, and configure a calling number permitted to originate calls to the POTS entity.
[RouterA-voice-dial] entity 211 pots [RouterA-voice-dial-entity211] match-template .T [RouterA-voice-dial-entity211] line 6/0 [RouterA-voice-dial-entity211] send-number all [RouterA-voice-dial-entity211] caller-permit 0101001 [RouterA-voice-dial-entity211] quit [RouterA-voice-dial] quit [RouterA-voice] quit
# Configure the PLAR function and the delay off-hook binding.
[RouterA] subscriber-line 6/0 [RouterA-subscriber-line6/0] private-line 0101001 [RouterA-subscriber-line6/0] hookoff-mode delay bind 6/24 [RouterA-subscriber-line6/0] quit
# Configure a dial plan where the VoIP entity is preferred.
[RouterA] voice-setup [RouterA-voice] dial-program [RouterA-voice-dial] select-rule type-first 2 1 3 4
Configure Router B:
<RouterB> system-view [RouterB] voice-setup [RouterB-voice] dial-program
# Configure a VoIP entity for IP calls and set the match template to 010….
[RouterB-voice-dial] entity 010 voip [RouterB-voice-dial-entity10] match-template 010.... [RouterB-voice-dial-entity10] address sip ip 192.168.0.71 [RouterB-voice-dial-entity10] quit
# Configure a POTS entity on the FXS voice subscriber line.
[[RouterB-voice-dial] entity 2101002 pots [RouterB-voice-dial-entity2101002] match-template 2101002 [RouterB-voice-dial-entity2101002] line 6/24 [RouterB-voice-dial-entity2101002] quit
# Configure a backup POTS entity on the FXO voice subscriber line, set the match template to .T, enable the sending of all digits of a called number, and configure a calling number permitted to originate calls to the POTS entity.
[RouterB-voice-dial] entity 011 pots [RouterB-voice-dial-entity11] match-template .T [RouterB-voice-dial-entity11] line 6/0 [RouterB-voice-dial-entity11] send-number all [RouterB-voice-dial-entity11] caller-permit 2101002 [RouterB-voice-dial-entity11] quit [RouterB-voice-dial] quit [RouterB-voice] quit
# Configure the PLAR function and the delay off-hook binding.
[RouterB] subscriber-line 6/0 [RouterB-line6/0] private-line 2101002 [RouterB-line6/0] hookoff-mode delay bind 6/24 [RouterB-line6/0] quit
# Configure a dial plan where the VoIP entity is preferred.
[RouterB] voice-setup [RouterB-voice] dial-program [RouterB-voice-dial] select-rule type-first 2 1 3 4
In the case that the IP network is unavailable, configure Router A and Router B as follows:
# Configure Router A, with the POTS entity preferred and the other configurations remaining unchanged.
<RouterA> system-view [RouterA] voice-setup [RouterA-voice] dial-program [RouterA-voice-dial] select-rule type-first 1 2 3 4
# Configure Router B, with the POTS preferred and the other configurations remaining unchanged.
<RouterB> system-view [RouterB] voice-setup [RouterB-voice] dial-program [RouterB-voice-dial] select-rule type-first 1 2 3 4