VoIP (Voice over IP) – a set of protocols that allow to transmit voice data via 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 a SIP profile

esr(config)# sip profile <NUM>

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

2

Configure a primary SIP proxy server and registration server

esr(config-sip-profile)# proxy primary


3

Configure a 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, you do not 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, you do not 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, you do not 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

Creating 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

Applying a routing rule.

esr(config-pbx-rule)# enable


7

Creating 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

Selecting a codec supported by a SIP profile.

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


9

Selecting SIP profile type.

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

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

10

Choosing 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

Selecting 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

The 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

PBX server configuration.

esr(config)# pbx


2

Trunk creation.

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

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

3

Configure a 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

Registration server port configuration.

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

The 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 (optionally).

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

The default is udp.

9

Trunk activation.

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, you do not need to specify it.

If it is necessary to use the registration, you should 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 dialling 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 dialled combination;
  • Interdigit Short Timer (letter “S” in dial plan entry) – timeout to enter the next digit if at least one pattern completely matches the dialled combination and there is at least one more pattern before matching with that it is necessary to perform the extension dialling.

Additional features:

  1. Replacement of a dialled sequence

    Syntax: <arg1:arg2>

    This feature allows to replace a dialled sequence to any sequence of dialled 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 ommited 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 continious tone will output when dialing number 8770.
  3. Number dialling restriction
    If at the end of pattern add symbol '!' the dialling of numbers corresponding to the template will be blocked.
    • Example: (8 10X xxxxxxx ! | 8 xxx xxxxxxx ) - expression allows dialling only intercity numbers and exclude international calls.
  4. Replacement of number dialling 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. Dialling via direct address (IP Dialing)

    “@” character put after the number means that the address of the server, to which the dialled number call will be sent, will be specified. We recommend to use 'IP Dialling' 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 dialling as well as unusual dialling 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, you need to 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, you should 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