My Greeting

Hello my dear reader,

Welcome to my blog, which is dedicated to voice technologies. On its pages we will talk about the limitless world of telephony and network technologies.

We will focus on solutions and technologies in the area of IP-telephony (mostly on Cisco, but I will try to speak about the others too.). These are IP PBX based on Cisco Unified Communications Manager and Cisco Unified Communications Manager Express, Cisco contact centers, Cisco Voice Gateways, etc. Also, I will introduce you the news from the world of education: Cisco courses, my own developed training programs, our upcoming events, online learning.

If you have any questions regarding my posts, job or activities, please feel free to ask your questions. I will try to answer them when I have time.

Monday, March 11, 2013

CUCM SIP-trunk to ITSP (via CUBE)

Good day,

Many of my readers and students are very interested in the task of how to connect 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 (ie 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 ( 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
SIP proxy:
Outbound Proxy:
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, ie, 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 signalling, 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:

Next, for your SIP trunk set the IP-address of CUBE (in this example it is, usually it must be the address to which SIP signalling 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 was received from the 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:

To accept incoming calls to CUCM create a Translation Pattern. To reach our CUCM from SIPnetwork we will dial 00044847. This number must be converted into one of the CUCM's extensions, for example, in 2002:

This basic CUCM setup is completed . Now we continue wtth 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
interface FastEthernet0/0.111
 description HQ-1 Servers
 encapsulation dot1Q 111
 ip address
interface FastEthernet0/0.112
 description HQ-1 Phones
 encapsulation dot1Q 112
 ip address

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
  bind control source-interface FastEthernet0/0.100

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

 credentials username 00044847 password ciscolab realm -  it registers DN 00044847 at the ITSP network
 authentication username 00044847 password ciscolab realm -  it claims authentication parameters at outgoing call
 registrar expires 3600IP address of ITSP Registrar 
 sip-server - ITSP SIP Proxy IP address 

Now it is time to make voice dial-peers: one or more dial-peers in 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 far as our CUBE is behind NAT, we need to use SIP outbound proxy. So set outbound proxy name\IP address and port here.
dial-peer voice 847 voip
 description To_CUCM
 destination-pattern 00044847
 session protocol sipv2
 session target ipv4:
 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 signalling, use debug ccsip messages command on CUBE for troubleshooting.

Good luck and have a nice day! :)

1 comment: