
Currently in Belarus, the telecommunications operator Beltelecom is intensively introducing telephone communications based on the IMS network. Equipment is provided for use. It is a normal ADSL modem, but with a built-in SIP client.
But we have CISCO 2951 with the lifted telephony. The thought arose whether it was possible to configure such a phone number without Beltelecom equipment and directly in the router.
When parsing the settings in the modem, it turned out the following. VoIP is served on a separate PVC (VCI / VPI = 2/35) in IP / DHCP mode:

')
The modem receives the IP and gateway settings via DHCP.

It is important for us to remember the gateway address, for further setup on the CISCO.
At the conclusion of the contract the following data is issued:
Telephone Number:
+ 37517xxxxxxxLogin:
+37517xxxxxxx@ims.beltel.byYou must also find out the password for the IMS service:
passIMS . I have
ADSL2 and ADSL2 High-Speed WAN Interface Cards in my Cisco router.
We first configure the connection to the required PVC (2/35).
interface ATM0/1/0.2 point-to-point ip address dhcp no ip proxy-arp ip nat outside ip virtual-reassembly in atm route-bridged ip pvc 2/35 encapsulation aal5snap
.02 in the interface name is chosen arbitrarily, since I already have one connection on the same interface.
sh int atm 0/1/0.2
make sure that the interface is up and the IP address is received.
SIP server settings can also be seen in the modem, if you first issue the following command in telnet:
sendcmd 3 webd setconfig voippagedisp y .

We will use one of the SIP servers, namely
10.56.0.9 . Next, you need to register routes.
ip route 10.56.0.9 255.255.255.255 10.233.64.1 ip route 10.56.0.10 255.255.255.255 10.233.64.1 ip route 10.56.0.11 255.255.255.255 10.233.64.1
10.56.0.10 and
10.56.0.11 is the address of the RTP server serving the audio stream. Since ims.beltel.by does not have a DNS record, we prescribe it by hand.
ip host ims.beltel.by 10.56.0.9
Now go to the direct configuration of sip-ua. There is a feature here, authorization should take place indicating the domain, i.e. of the form +37517xxxxxxx@ims.beltel.by. Therefore, we use another parameter
number .
sip-ua credentials number +37517xxxxxxx username +37517xxxxxxx@ims.beltel.by password <i>PassIMS</i> realm ims.beltel.by authentication username +37517xxxxxxx password <i>PassIMS</i> realm ims.beltel.by retry invite 3 retry response 3 retry bye 3 retry cancel 3 retry register 5 registrar dns:ims.beltel.by:5060 expires 3600 auth-realm ims.beltel.by sip-server dns:ims.beltel.by:5060 connection-reuse host-registrar
The successful registration will be seen from the command:
sh sip-ua register status
Next, create a dial-peer for outgoing calls.
dial-peer voice 8017 voip description
It is also necessary to replace your internal number with the number issued by Beltelecom so that the call is serviced. This is done via
translation-profile .
voice translation-rule 1 rule 1 /.*/ /+37517xxxxxxx/ voice translation-profile fromIMS translate calling 1
Since I use Cisco 6921 phones, for the incoming call, the
secondary parameter on the extension number is simply registered.
ephone-dn 1 dual-line number 1234 secondary +37517xxxxxxx no-reg both
Thus, we receive a SIP number in our telephone network without additional third-party equipment and in digital form.
Update: Recently, Beltelecom began to work using the UDP protocol. Therefore, for incoming connections it is no longer possible to enter the secondary number. It is necessary to do dial-peer with the incoming rule.
Something like this:
dial-peer voice 9192 voip description
where
translation-profile incoming incomIMS is the IMS number mapping rule for your internal one to which you need to receive a call.
For example:
voice translation-rule 5 rule 1 /.*/ /1234/ voice translation-profile incomIMS translate called 5