Configuring the SIP agent of the IMS network (Beltelecom) on the CISCO router

But we have CISCO 2951 with raised telephony. There was a thought, is it possible to set up 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 delivered over 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 configuration on CISCO.
At the conclusion of the contract, the following data is provided:
Phone number: + 37517xxxxxxx
Login:+37517xxxxxxx@ims.beltel.by You
also need to find out the password for the IMS service: passIMS . I have ADSL2 and ADSL2 High-Speed WAN Interface Cards installed on my Cisco router .
First, configure the connection to the desired 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 give the following command to 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 the 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 let's move on to the direct configuration of sip-ua. There is a feature here, authorization should take place indicating the domain, i.e. type +37517xxxxxxx@ims.beltel.by. Therefore, we also use the number parameter .
sip-ua
credentials number +37517xxxxxxx username +37517xxxxxxx@ims.beltel.by password PassIMS realm ims.beltel.by
authentication username +37517xxxxxxx password PassIMS 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
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 #toIMS#
translation-profile outgoing fromIMS
destination-pattern 8017[2,3,5].T
session protocol sipv2
session target sip-server
session transport udp
voice-class codec 1
dtmf-relay rtp-nte
no vad
It is also necessary to replace your extension number with the number issued by Beltelecom so that the call is serviced. This is done through translation-profile .
voice translation-rule 1
rule 1 /.*/ /+37517xxxxxxx/
voice translation-profile fromIMS
translate calling 1
Since I use Cisco 6921 telephones, the secondary parameter on the extension number is simply set for the incoming call .
ephone-dn 1 dual-line
number 1234 secondary +37517xxxxxxx no-reg both
Thus, we get a SIP number in our telephone network without additional third-party equipment and in digital form.
Update: Recently Beltelecom began working on the UDP protocol. Therefore, it will not be possible to enter the secondary number for incoming connections. It is necessary to do dial-peer with an incoming rule.
Something like this:
dial-peer voice 9192 voip
description #Incoming_IMS#
translation-profile incoming incomIMS
session protocol sipv2
session target dns:ims.beltel.by
session transport udp
incoming called-number +37517xxxxxxx
voice-class codec 1
dtmf-relay rtp-nte
where translation-profile incoming incomIMS is the rule of matching the IMS number to your internal, to which you need to receive a call.
For instance:
voice translation-rule 5
rule 1 /.*/ /1234/
voice translation-profile incomIMS
translate called 5