CUCM SIP-trunk to ITSP (via CUBE) basic configuration

Good day,

Many of my readers and students are very interested in the topic of how to connect their CUCM to IP telephony service provider via SIP-trunk. This topic is very relevant, as more and more providers offer SIP services and connections, in addition to traditional E1 or BRI lines. This post will discuss the basic settings for SIP-trunks (i.e. without DTMF, fax settings, transfers, etc.).

So, here we go. First of all, let’s see, which topology we will configure. It is shown in the figure below. A SIP trunk will be created on the CUCM 8.0, for CUBE we will use a 2811 router with 12.4.24T IOS.

In my example I will connect my lab CUCM to Russian ITSP Telme (http://tel-me.ru). I have created a basic account there and received one internal directory number for our test. The DN is 00044847. The connection parameters are as follows:

Username: 00044847
Authorization user: 00044847
Password: ciscolab
Domain/Realm: sip.telphin.com
SIP proxy: sip.telphin.com:5068
Outbound Proxy: voice.telphin.com:5068
Register: Always
Register expires: 1800
Codecs supported: G711(a&u), G729.
As it can be seen from the connection settings, our ITSP requires mandatory registration of SIP devices in their network. Without registration neither incoming nor outgoing calls are possible. Unfortunately, CUCM does not support registration of SIP trunks, i.e., it can not register at SIP Registrar server as a SIP terminal (a SIP phone). For this reason, as well as for a number of other reasons (for the separation of networks, security, NAT overriding), we will connect our CUCM to SIP provider network through the IP-IP gateway – Cisco Unified Border Element (CUBE). CUBE is able to register at ITSP network, so it will be set with credentials and authentication parameters. Thus, we will have, in fact, two SIP legs:

1. SIP trunk between CUCM and CUBE.
2. SIP connection between the CUBE and the provider.

First, we set up SIP trunk on CUCM. As usual, screenshots illustrate the process. Go to the CM Administration, then select  Device -> Trunk -> Add New and add a new SIP trunk. Specify the trunk Name, Description, Device Pool, and do not forget to check Media Termination Point Required check box. It is necessary first of all to enable SIP Early Offer signaling, and also solves many other problems (DTMF in-band, problems with call transfer, alaw / ulaw conversion, etc). If you use this check box in your system, there must be preconfigured and registered MTP already (what MTPs are and their role you can find here):

Updated: I wrote this article a long time ago, and MTP Required check box was the only one solution to enable SIP Early Offer on the trunk in CUCM 8.0. However, in newer CUCM there are some other options for the Early Offer and you can read about them in my recent post – How to enable Early Offer in SIP Trunk CUCM?

Next, for your SIP trunk set the IP-address of CUBE (in this example it is 10.10.100.11, usually it must be the address to which SIP signaling is binded at the CUBE). Also, set Destination Port (for CUBE can use the standard 5060), SIP Security Profile and SIP Profile (default profiles are taken, however, depending on your task, they may require an adjustment of the parameters).

For outgoing calls create a Route Pattern. I will check outgoing calls by making call to a SIP terminal registered at the same provider (its number is 00012345). It is also possible to call provider’s technical support number, which is 00010004. Therefore, I will configure Route Pattern 9.00xxxxxx (9 is an Access Code to this destination). In a real system you will need to set up additional Route Patterns for calls to other directions:

When calling to SIP provider network, it is required to send a correct Calling number (CLID), which is required by your provider. Otherwise the call will not be allowed. Therefore, in Route Pattern settings let’s make appropriate Calling number manipulation. In our example we have only one number from the provider, so I use it. If the provider gives you a few directory numbers, a more complicated translation might be done. Do not forget to remove the Access code (9) from the Called Number:

For incoming calls to CUCM let’s create a Translation Pattern. To reach our CUCM from SIP network we dial 00044847. This number must be converted to one of the CUCM’s extensions, for example, to 2002:

Now, the basic CUCM setup is completed . It’s time to continue with the CUBE. Here are the network interface settings (assuming the routing configuration has already been done):

interface FastEthernet0/0.100
 description WAN
 encapsulation dot1Q 100
 ip address 10.10.100.11 255.255.255.0
!         
interface FastEthernet0/0.111
 description HQ-1 Servers
 encapsulation dot1Q 111
 ip address 10.1.1.101 255.255.255.0
!
interface FastEthernet0/0.112
 description HQ-1 Phones
 encapsulation dot1Q 112
 ip address 10.1.2.101 255.255.255.0

IP-IP calls are prohibited at Cisco voice gateways by default. Therefore, let’s allow such calls as well as make SIP signaling binding to one of the interfaces: to the interface, whose address we have configured at CUCM SIP trunk):

voice service voip 
 allow-connections sip to sip
 sip
  bind control source-interface FastEthernet0/0.100

Then configure SIP UA settings for registration and authentication at the ITSP network:

sip-ua 
 credentials username 00044847 password ciscolab realm sip.telphin.comрегистрирует номер 00044847 в сети провайдера
 authentication username 00044847 password ciscolab realm sip.telphin.comуказывает параметры аутентификации при исходящем звонке.
 registrar dns:sip.telphin.com:5068 expires 3600адрес сервера Registrar
 sip-server dns:sip.telphin.com:5068 – адрес прокси-сервера, через который будем осуществлять исходящие звонки

Now it is time to make voice dial-peers: one or more dial-peers to the provider network, and one dial-peer to our CUCM for incoming calls:


dial-peer voice 8 voip
 description To_SIP_Provider
 destination-pattern 000…..
 session protocol sipv2
 session target sip-server – our outgoing calls are done via SIP Proxy
  codec g711ulaw
 voice-class sip outbound-proxy dns:voice.telphin.com:5068 – as far as our CUBE is behind NAT, we need to use SIP outbound proxy. So set outbound proxy nameIP address and port here.
!
dial-peer voice 847 voip
 description To_CUCM
 destination-pattern 00044847
 session protocol sipv2
 session target ipv4:10.1.1.1
 codec g711ulaw

In fact, here are all the necessary settings. Now, check the registration of the directory number 00044847 at  the provider’s network by using show sip-ua register status command. Then make incoming and outgoing calls from / to ITSP network. If you face some problems with SIP signaling, use debug ccsip messages command on CUBE for troubleshooting.

Good luck and have a nice day! 🙂