VoIP (Voice over IP) – set of protocols that allow transmission of voice information over IP networks. Within the given device, VoIP is used to connect analogue telephones to an IP network with the possibility to make phone calls.

SIP profile configuration algorithm

Step

Description

Command

Keys

1

Configure SIP profile.

esr(config)# sip profile <NUM>

<NUM> – SIP profile number, set in the form of a digit from 1 to 5.

2

Configure primary SIP proxy server and registration server.

esr(config-sip-profile)# proxy primary


3

Configure SIP proxy server.

esr(config-voip-sip-proxy)# ip address proxy-server <IP>

<IP> – proxy server IP address

4

Configure a SIP proxy server port.

esr(config-voip-sip-proxy)# ip port proxy-server <PORT>

<PORT> – number of proxy server UDP port, takes values of [1..65535]. If standard 5060 port is used, there is no need to specify it.

5

Configure a registration server address.

esr(config-voip-sip-proxy)# ip address registration-server <IP>

<IP> – registration server IP address.

6

Configure a registration server port.

esr(config-voip-sip-proxy)# ip portregistration-server <PORT>

<PORT> – number of registration server UDP port, takes values of [1..65535].

If standard 5060 port is used, there is no need to specify it.

7

Enable registration.

esr(config-voip-sip-proxy)# registration


8

Enable proxy server and registration server.

esr(config-voip-sip-proxy)# enable


9

Configure a registration server address.

esr(config-voip-sip-proxy)# ip address registration-server <IP>

<IP> – registration server IP address.

10

Configure a registration server port.

esr(config-voip-sip-proxy)# ip portregistration-server <PORT>

<PORT> – number of registration server UDP port, takes values of [1..65535]. If standard 5060 port is used, there is no need to specify it.

11

Specify SIP domain in which the device is located.

esr(config-sip-profile)# sip-domain address <ADDRESS>

<ADDRESS> – SIP domain in which the device is located, set by ipv4 address or domain name.

12

Enable the use of SIP domain when registering.

esr(config-sip-profile)# sip-domain registration enable


13

Configure a SIP profile.

esr(config)# sip profile <NUM>

<NUM> – SIP profile number, set in the form of a digit from 1 to 5.

14

Assign a dial plan to the current SIP profile.

esr(config-sip-profile)# dialplan pattern <DNAME>

<DNAME> – name of the dial plan, set by the string of up to 31 characters.

15

Enable SIP profile.

esr(config-sip-profile)# enable


FXS/FXO ports configuration algorithm

Step

Description

Command

Keys

1

Switch to the FXO/FXS ports configuration mode.

esr(config)# interface voice-port <NUM>

<NUM> – port number, takes values of [1..4].

2

Assign a subscriber number reserved for a telephone port.

esr(config-voice-port-fxs)# sip user phone <PHONE>

<PHONE> – subscriber number reserved for a telephone port, set by the string of up to 50 characters.

3

Assign the user name matched with the port.

esr-12v(config-voice-port-fxs)# sip user display-name <LOGIN>

<LOGIN> – user name displayed in the Display-Name field, set by the string of up to 31 characters.

4

Select SIP profile for a certain port.

esr(config-voice-port-fxs)# profile sip <PROFILE>

<PROFILE> – SIP profile number, set in the form of a digit from 1 to 5.

5

Configure a login for authentication.

esr(config-voice-port-fxs)# authentication name <LOGIN>

<LOGIN> – login for authentication, set by the string of up to 31 characters

6

Configure a password for authentication.

esr(config-voice-port-fxs)# authentication password <PASS>

<PASS> – authentication password, set by the string of up to 16 characters.

7

Enable FXO port.

esr(config)# interface voice-port <NUM>

<NUM> – FXO port number, takes values of [1..4].

8

Assign a subscriber number reserved for a telephone port.

esr(config-voice-port-fxo)# sip user phone <PHONE>

<PHONE> – subscriber number reserved for a telephone port.

9

Specify UDP port from which and to which the FXO set will send and receive SIP messages.

esr(config-voice-port-fxo)# sip port <PORT>

<PORT> – UDP port number.

10

Assign the user name matched with the port.

esr(config-voice-port-fxo)# sip user display-name <LOGIN>

<LOGIN> – user name displayed in the Display-Name field, set by the string of up to 31 characters.

11

Configure a login for authentication.

esr(config-voice-port-fxo)# authentication name <LOGIN>

<LOGIN> – login for authentication, set by the string of up to 31 characters.

12

Configure a password for authentication.

esr(config-voice-port-fxo)# authentication password <PASS>

<PASS> – authentication password, set by the string of up to 16 characters.

13

Enable the number transmission to PSTN.

esr(config-voice-port-fxo)# pstn transmit-number


14

Disable prefix transmission.

esr(config-voice-port-fxo)# no pstn transmit-prefix


15

Enable the 'Hostline PSTN to IP' service.

esr(config-voice-port-fxo)# hotline ipt


16

Number of the subscriber that will receive calls from PSTN.

esr(config-voice-port-fxo)# hotline number ipt <PHONE>

<PHONE> – phone number that calls are made to when using the service, takes the value from 1 to 50.

'Hot/Warm line' in the direction from analogue telephone line to VoIP.

Dial plan configuration algorithm

Step

Description

Command

Keys

1

Create a dial plan.

esr(config)# dialplan pattern <DNAME>

<DNAME> – name of the dial plan, set by the string of up to 31 characters.

2

Add dial rules.

esr(config-dial-ruleset)# pattern <REGEXP>

<REGEXP> - regular expression specifying the dial plan. Set by the string of up to 1024 characters. The rules for creating regular expressions are described in section Dial plan configuration example.

3

Enable the dial plan.

esr(config-dial-ruleset)# enable


PBX server configuration algorithm

Step

Description

Command

Keys

1

PBX server configuration.

esr(config)# pbx


2

Enable PBX server.

esr(config-pbx)# enable


3

Create a routing plan.

esr(config-pbx)# ruleset <rule_name>

<rule_name> – name of the routing plan, set by the string of up to 31 characters.

4

Create a routing rule.

esr(config-pbx-ruleset)# rule <rule_index>

<rule_index> – number of the rule in the routing plan, takes values from 1 to 1000.

5

Create a pattern in a routing rule.

esr(config-pbx-rule)# pattern <REGEXP>

<REGEXP> – regular expression specifying the routing rule. Set by the string of up to 256 characters. The rules for creating regular expressions are described in section Dial plan configuration example.

6

Apply a routing rule.

esr(config-pbx-rule)# enable


7

Create a SIP profile on a PBX Server.

esr(config-pbx)# profile <PROFILE>

<PROFILE> – name of the SIP profile, that used by PBX server, set by the string of 31 character.

8

Select a codec supported by a SIP profile.

esr(config-pbx-profile)# codec allow { G711A(alaw) |
G711U(ulaw) | G722 | G726 }


9

Select SIP profile type.

esr(config-pbx-profile)# client { peer | user | friend }

  • peer – incoming and outgoing calls are allowed without authorization.
  • user – only incoming calls are allowed.
  • friend – combines peer and user profile types.

10

Choose a NAT interaction policy (optional).

esr(config-pbx-profile)# nat { comedia | force-port | both }

  • comedia – send media stream to PBX port, regardless of SDP instructions.
  • force-port – use rport even if it is not present.
  • both – combines comedia and force-port.

11

Select a SIP profile routing plan.

esr(config-pbx-profile)# ruleset <NAME>

<NAME> – name of the routing plan, set by the string of up to 31 characters.

12

Create a subscriber.

esr(config-pbx)# user <user>

<user> – phone number or username, set by the string of up to 31 characters.

13

Create a password for the subscriber (optional).

esr(config-pbx-user)# password <password>

<password> – password that will be used by the user for authentication, set by the string of up to 16 characters.

14

Use of SIP profile for the subscriber.

esr(config-pbx-user)# profile <SIPPROFILE>

<SIPPROFILE> – SIP profile used for this subscriber, set by the string of up to 31 characters.

Registration trunk creation algorithm

Step

Description

Command

Keys

1

Configure PBX server.

esr(config)# pbx


2

Create trunk.

esr(config-pbx)# register-server <name>

<name> – trunk name, set by the string of up to 31 characters.

3

Configure registration server address.

esr(config-pbx-reg-server)# ip address <IP>

<IP> – address of the server on which registration proceeds, takes values of an IP address or can be specified by the string of up to 31 characters.

4

Configure registration server port.

esr(config-pbx-reg-server)# ip port <PORT>

<PORT> – number of registration server UDP port, takes values of [1..65535]. If standard 5060 port is used, you do not need to specify it.

5

Specify the authentication name.

esr(config-pbx-reg-server)# username <user>

<user> – username for this trunk on the upstream domain, set by the string of up to 31 characters.

6

Specify the authentication password.

esr(config-pbx-reg-server)# authentication password <password>

<user> – password for this trunk on the upstream domain, set by the string of up to 16 characters.

7

Use of SIP profile for the trunk.

esr(config-pbx-reg-server)# profile <PROFILE>

<PROFILE> – name of the SIP profile, that used for this trunk, set by the string of 31 character.

8

Select the transport protocol (optional).

esr(config-pbx-reg-server)# protocol {tcp | udp }

The default is udp.

9

Enable trunk.

esr(config-pbx-reg-server)# enable


VoIP configuration example

Objective:

Connect analogue telephones and fax modems to the IP network via ESR router. SIP server, located on the ESR, functions as proxy server and registration server.

Solution:

Configure a SIP profile:

esr(config)# sip profile 1
CODE

Configure a primary SIP proxy server and registration server:

esr(config-sip-profile)# proxy primary
CODE

Configure SIP proxy server address (use an embedded SIP server as SIP proxy server):

esr(config-voip-sip-proxy)# ip address proxy-server 192.0.2.5
CODE

Configure a SIP proxy server port:

esr(config-voip-sip-proxy)# ip port proxy-server 5080
CODE

If standard 5060 port is used, there is no need to specify it.

If it is necessary to use the registration, perform the following steps:

Configure registration server address (use an embedded SIP server as registration server):

esr(config-voip-sip-proxy)# ip address registration-server 192.0.2.5
CODE

Configure a registration server port:

esr(config-voip-sip-proxy)# ip port registration-server 5080
CODE

If standard 5060 port is used, you do not need to specify it.

Enable registration:

esr(config-voip-sip-proxy)# registration
CODE

Enable proxy server and registration server:

esr(config-voip-sip-proxy)# enable
CODE

This completes the configuration of SIP proxy server and registration server:

esr(config-voip-sip-proxy)# exit
CODE

The next step is to continue SIP profile configuration.

Configure a SIP domain:

esr(config-sip-profile)# sip-domain address sipdomain.com
CODE

If it is necessary to use SIP Domain for the registration, use the following command:

esr(config-sip-profile)# sip-domain registration enable
CODE

In this configuration all calls will be directed to SIP proxy server. If it is necessary to specify another direction for outgoing calls, you should perform the following:

Create a numbering plan, see section Dial plan configuration example.

Next, assign the created dial plan to the SIP profile:

esr(config)# sip profile 1
esr(config-sip-profile)# dialplan pattern firstDialplan
CODE

This completes the configuration of a dial plan for SIP profile.

Enable SIP profile:

esr-12v(config-sip-profile)# enable
CODE

This completes the baseline configuration of SIP profile:

esr(config-sip-profile)# exit
CODE

The next step is to configure subscriber ports:

esr(config)# interface voice-port 1
CODE

Specify a subscriber number:

esr(config-voice-port-fxs)# sip user phone 4101
CODE

Specify a displayed name:

esr(config-voice-port-fxs)# sip user display-name user-one
CODE

Used SIP profile:

esr(config-voice-port-fxs)# profile sip 1
CODE

Configure login and password for authentication

esr(config-voice-port-fxs)# authentication name login-4101
esr(config-voice-port-fxs)# authentication password superpassword
CODE

This completes the baseline configuration of a subscriber port:

esr(config-voice-port-fxs)# exit
CODE

 

Dial plan configuration example

Objective:

Configure a dial plan in such a manner that calls to local numbers (connected to the given ESR-12V) are switched locally and calls to all other directions – through SIP proxy.

Solution:

Create a dial plan:

esr(config)# dialplan pattern firstDialplan
CODE

Dial plan is specified by regular expressions:

esr(config-dial-ruleset)# pattern "<regular expressions>"
CODE

For the objective mentioned above, the '<regular expressions>' is given by:

'S5, L5 (410[1-3]@{local} | [xABCD*#].S)'

where:

  • 410[1-3]@{local} – calls to 4101, 4102, 4103 numbers will be switched locally;
  • [ xABCD*#]. S – calls to all other numbers will be directed to SIP proxy.

Enable the dial plan:

esr(config-dial-ruleset)# enable
CODE

Dial plan configuration is finished.

esr(config-dial-ruleset)# exit
CODE

Regular expression structure:

Sxx, Lxx ( ),

where:

  • xx – random values of S and L timers;
  • () – dialplan limits.

The basis is designators for dialled digits sequence to be written. Sequence of digits is written by several designators: digits dialled from a phone keyboard: 0, 1, 2, 3, …, 9, # and *.

The use of # character in dial plan can block the completion of dialing with this key.

Bracketed sequence of digits corresponds to any bracketed character.

  • Example: ([1239]) - corresponds to any of this digits: 1, 2, 3 and 9.
    You may specify the hyphenated range of characters. Usually it is used inside the square brackets.
  • Example 1: (1-5) - any digit from 1 to 5.
  • Example 2: ([1-39]) – example from previous paragraph with other record format.
    ‘X’ character corresponds to any digit from 0 to 9.
  • Example: (1XX) - any three-digit number, starting at 1.

    '.' - Previous symbol repeating from 0 to infinity.

    '+' – repeating the previous character from 1 to infinity number of times.

    {a,b} – repeating the previous character from a to b times;

    {a,} – repeating the previous character equal to or more than a times;

    {,b} – repeating the previous character equal to or less than b times.

  • Example: (810X.) - international number with any digits amount.
    Settings influencing on the dial plan processing:
  • Interdigit Long Timer (letter 'L' in dial plan entry) – timeout to enter the next digit if there are no templates matching the dialed combination;
  • Interdigit Short Timer (letter 'S' in dial plan entry) – timeout to enter the next digit if at least one pattern completely matches the dialed combination and there is at least one more pattern before matching with that it is necessary to perform the extension dialing.

Additional features:

  1. Replacement of a dialed sequence

    Syntax: <arg1:arg2>

    This feature allows to replace a dialed sequence to any sequence of dialed characters. In this case, the second argument must be specified with a certain value, both arguments may be empty.

    • Example: (<83812:> XXXXXX) — this record will comply to dialed digits 83812, but this sequence will omitted and will not be transmitted to SIP server.
  2. Insert a tone in the set
    For long-distance access (for city access in case of office PBX), it is common to hear a ringback, that may be implemented by inserting comma in a sequence of digits.
    • Example: (8, 770) - after digit 8 a continuous tone will output when dialing number 8770.
  3. Number dialing restriction
    If at the end of pattern add symbol '!' the dialing of numbers corresponding to the template will be blocked.
    • Example: (8 10X xxxxxxx ! | 8 xxx xxxxxxx ) - expression allows dialing only intercity numbers and exclude international calls.
  4. Replacement of number dialing timers values
    Timers values can be assigned both to a whole dial plan and to a certain template. 'S' is responsible for the 'Interdigit Short Timer' setup and 'L' – for the 'Interdigit Long Timer' Timers values can be specified for all templates in a dial plan if the values are listed before the opening parenthesis.
    • Example: S4 (8XXX.) or S4,L8 (XXX)
      If these values are listed in one sequence only, they are effective only for this sequence. Also, in this case it is not necessary to put a colon between the key and the timeout value, the value can be located anywhere in the template.
    • Example: (S4 8XXX. | XXX) или ([1-5] XX S0) – entry will call instant call transmission when three-digit number starting at 1, 2, ..., 5 is dialed.
  5. Dialing via direct address (IP Dialing)

    '@' character put after the number means that the address of the server, to which the dialed number call will be sent, will be specified. We recommend to use 'IP Dialing' and receive and transmission of call without registration ('Call Without Reg', 'Answer Without Reg'). This can help in case of server failure.

    In addition, the format of address with IP Dialing can be used in numbers intended to forward calls.

    • Example 1: ( 8 xxx xxxxxxx ) – 11-digit number, starting with 8.
    • Example 2: ( 8 xxx xxxxxxx | <:8495> xxxxxxx ) – 11-digit number, starting with 8; if 7-digit number was entered, add 8495 to the number being transmitted.
    • Example 3: (0[123] | 8 [2-9]xx [2-9]xxxxxx) – emergency service numbers dialing as well as unusual dialing of long-distance call numbers.
    • Example 4: (S0 <:82125551234>) – specified number speed dial, «Hotline» mode analogue on another gateways.
    • Example 5: (S5 <:1000> | xxxx) – the given dial plan allows to dial any number consisting of digits; if nothing is entered during 5 seconds, call number 1000 (let it be a secretary).
    • Example 6: (8, 10x.|1xx@10.110.60.51:5060) – the given dial plan allows to dial numbers starting with 810 and containing at least one digit after '810'. After entering 8, the 'station response' signal will be returned. Also a set of three-digit numbers starting with '1', the Invite of which will be sent to 10.110.60.51 IP address and 5060 port, will be returned.
    • Example 7: (S3 *xx#|#xx#|#xx#|*xx*x+#) – management and the use of VAS.
      Local calls inside the device may be required in some cases. If the device’s IP address is not known or is periodically changed, it is convenient to use the reserved word {local} as the server address, which means sending the corresponding sequence of digits to the device’s own address.
    • Example: (123@{local}) – call on number 123 will be locally processed within the device.

FXO port configuration

Objective:

Add the ability to make a call to PSTN subscriber through the ESR-12V FXO port.

Solution:

Enable FXO port:

esr(config)# interface voice-port 4
CODE

Specify FXO port number same as PSTN access prefix:

esr(config-voice-port-fxo)# sip user phone 9
CODE

Specify UDP port from which and to which the FXO set will send and receive SIP messages:

esr(config-voice-port-fxo)# sip port 5064
CODE

Specify a displayed name:

esr(config-voice-port-fxo)# sip user display-name user-one
CODE

Configure login and password for authentication:

esr(config-voice-port-fxo)# authentication name login-9
esr(config-voice-port-fxo)# authentication password superpassword
CODE

Assign SIP profile to FXO port:

esr(config-voice-port-fxo)# profile sip 1
CODE

Enable the number transmission to PSTN:

esr(config-voice-port-fxo)# pstn transmit-number
CODE

Disable prefix transmission:

esr(config-voice-port-fxo)# no pstn transmit-prefix
CODE

For outgoing calls to work, specify the following rule in the dial plan settings, which means that outgoing calls to numbers with prefix 9 are routed locally to the FXO set:

9x.@{local}:5064

This completes the baseline configuration of outgoing calls to PSTN. To make a call to PSTN, dial the callee number with the specified prefix (FXO set phone number).

To receive calls from PSTN, you should select the subscriber that will receive all calls from PSTN, let it be a subscriber with number 305.

Enable the 'Hostline PSTN to IP' service:

esr(config-voice-port-fxo)# hotline ipt
CODE

Number of the subscriber that will receive calls from PSTN:

esr(config-voice-port-fxo)# hotline number ipt 305
CODE

Example of VoIP configuration for FXS ports registration on external SIP server

Diagram:

Objective:

Configure VoIP for FXS ports registration on external SIP server.

Solution:

Configure SIP profile. It is necessary to configure proxy-server for registration of the phones connected to FXS ports:

esr(config)# sip profile 1
esr(config-sip-profile)# enable
esr(config-sip-profile)# sip-domain address 198.51.100.1
esr(config-sip-profile)# proxy primary
esr(config-voip-sip-proxy)# enable
esr(config-voip-sip-proxy)# ip address proxy-server 198.51.100.1
esr(config-voip-sip-proxy)# registration
esr(config-voip-sip-proxy)# ip address registration-server 198.51.100.1 
esr(config-voip-sip-proxy)# exit
esr(config-sip-profile)# exit
esr(config)#
CODE

Configure FXS ports. Specify number, parameters for authentication on an external server and sip profile:

esr(config)# interface voice-port 1
esr(config-voice-port-fxs)# sip user phone 6101
esr(config-voice-port-fxs)# authentication name as-phone
esr(config-voice-port-fxs)# authentication password password
esr(config-voice-port-fxs)# profile sip 1
esr(config-voice-port-fxs)# exit
esr(config)# interface voice-port 2
esr(config-voice-port-fxs)# sip user phone 6102
esr(config-voice-port-fxs)# authentication name as-phone
esr(config-voice-port-fxs)# authentication password password
esr(config-voice-port-fxs)# profile sip 1
esr(config-voice-port-fxs)# exit
esr(config)# 
CODE

To register and pass VoIP traffic over NAT, enable tracking and NAT for SIP on the router, and enable service-voip routing on the interface through which the SIP server is available:

esr(config)# ip firewall sessions tracking sip
esr(config)# nat alg sip 
esr(config)# interface gigabitethernet 1/0/1
esr(config-if-gi)# service-voip routing
esr(config-if-gi)# exit
esr(config)# 
CODE

Example of VoIP configuration on internal PBX server

Diagram:

Objective:

Configure registration of phones connected to the FXS port, and configure number registration of the phone line connected to the FXO port. It is also necessary to configure call transfer from FXO port to phone with number 5200. 

Solution:

Configure PBX.

Create PBX server:

esr(config)# pbx 
esr(config-pbx)#
CODE

The structure of the 'pattern' regular expression is described in the section Dial plan configuration example.

Configure routing context for FXO port (example of dial plan for call transfer to 5200-5202):

esr(config-pbx)# ruleset FXO
esr(config-pbx-ruleset)# rule 1
esr(config-pbx-rule)# pattern '_X.,1,Dial(SIP/5200&SIP/5201&SIP/5202)'
esr(config-pbx-rule)# enable
esr(config-pbx-rule)# exit
esr(config-pbx-ruleset)# exit
esr(config-pbx)#
CODE

Configure routing context for FXS ports (example of dial plan for call transfer to 5200-5202):

esr(config-pbx)# ruleset main_rule
esr(config-pbx-ruleset)# rule 1
esr(config-pbx-rule)# pattern '_520[0-3],1,Dial(SIP/${EXTEN},,t)'
esr(config-pbx-rule)# enable
esr(config-pbx-rule)# exit
esr(config-pbx-ruleset)# exit
esr(config-pbx)#
CODE

Configure SIP profile for FXS ports. Specify client type, enable necessary codecs and routing context:

esr(config-pbx)# profile fxs_ports
esr(config-pbx-profile)# client friend
esr(config-pbx-profile)# codec allow g711a
esr(config-pbx-profile)# codec allow g711u
esr(config-pbx-profile)# codec allow g729
esr(config-pbx-profile)# ruleset main_rule
esr(config-pbx-profile)# exit
esr(config-pbx)# 
CODE

Configure SIP profile for FXO ports. Specify client type, enable necessary codecs, configure invite-port, enable routing context:

esr(config-pbx)# profile fxo_ports
esr(config-pbx-profile)# client friend
esr(config-pbx-profile)# codec allow g711a
esr(config-pbx-profile)# codec allow g711u
esr(config-pbx-profile)# security level invite-port
esr(config-pbx-profile)# ruleset FXO
esr(config-pbx-profile)# exit
esr(config-pbx)# 
CODE

Configure subscribers on PBX server:

esr(config-pbx)# user 5200
esr(config-pbx-user)# profile fxs_ports
esr(config-pbx-user)# exit
esr(config-pbx)# user 5201
esr(config-pbx-user)# profile fxs_ports
esr(config-pbx-user)# exit
esr(config-pbx)# user 5202
esr(config-pbx-user)# profile fxs_ports
esr(config-pbx-user)# exit
esr(config-pbx)# user 333
esr(config-pbx-user)# profile fxo_ports
esr(config-pbx-user)# exit
esr(config-pbx)# 
CODE

Enable PBX server:

esr(config-pbx)# enable 
esr(config-pbx)# exit 
esr(config)#
CODE

Configure FXS ports. Specify number and SIP profile:

esr(config)# interface voice-port 1
esr(config-voice-port-fxs)# sip user phone 5200
esr(config-voice-port-fxs)# profile pbx fxs_ports
esr(config-voice-port-fxs)# exit
esr(config)# interface voice-port 2
esr(config-voice-port-fxs)# sip user phone 5201
esr(config-voice-port-fxs)# profile pbx fxs_ports
esr(config-voice-port-fxs)# exit
esr(config)# interface voice-port 3
esr(config-voice-port-fxs)# sip user phone 5202
esr(config-voice-port-fxs)# profile pbx fxs_ports
esr(config-voice-port-fxs)# exit
esr(config)#
CODE

Configure FXO port. Specify number and SIP profile, disable caller-id, enable 'Hostline PSTN to IP' service. Then specify number of subscriber that will receive calls from PSTN:

esr(config)# interface voice-port 4
esr(config-voice-port-fxo)# sip user phone 333
esr(config-voice-port-fxo)# profile pbx fxo_ports
esr(config-voice-port-fxo)# caller-id mode off
esr(config-voice-port-fxo)# hotline ipt
esr(config-voice-port-fxo)# hotline number ipt 5200
esr(config-voice-port-fxo)# exit
esr(config)# 
CODE