Uncategorized

Implementing SIP Gateways in CUCM

I been Requested to make a blog about SIP Implementation by a Big Company in Saudi Arabia which make me proud just to post this here so let me start by explaining ;D

To place external calls, Cisco Unified Communications Network (CUCM) deployment needs a connection the Public Switched Telephone Network (PSTN). Gateways can be integrated in CUCM by using different protocols such as Media Gateway Control Protocol (MGCP), H.323 or Session Initiation Protocol (SIP) for signaling on VOIP call legs.
In an Earlier Blog i show you how to Configure the CUCM and make Calls through an H.323 Gateway which an earlier technology https://ccieroot.com/2014/11/08/cisco-unified-communications-manager-cucm-initial-setup/

In this blog i will show you how to configure a SIP Gateway in CUCM and in the IOS so First Make Sure you have all your Information about the Numbering Range and the SIP Server with you so no Delay could happen in configuring your Site
in our example our Numbering Range is 2217910 to 2217919
and the SIP Server is  10.208.9.69
My Gateway IP is 172.29.7.94

in the CUCM go to Device – Trunk – Add New SIP Trunk and Device Protocol as SIP and None for Trunk Service Type
Name the Device anything you want and choose the correct Device Pool, Location and configure your Calling Search Space for inbound Call Then go down Type the Address of your Gateway n the Field of Destination Address in our case 192.168.200.86, Chose your SIP Trunk Security Profile and SIP Profile

Screenshot 2014-11-08 17.58.45

 

 

 

 

 

Screenshot 2014-11-08 17.58.49

 

 

 

 

Screenshot 2014-11-08 17.58.53

 

 

 

 

Now Configure the Dial Peer for the SIP in the CUCM
something you should make sure from is when you make a call to outside number that your the calling number which is your ID number is the 221791X not only 791X  cause then it will drop your call
so you have two option weather you make a translation rule or prefix the 221 in the dial-peer
in our example we prefix it in the dial peer
so Go to Call Routing – Route/Hunt – Route Pattern – Add New
we will configure a route pattern to a mobile Number so you choose the Route Pattern which is 9.05XXXXXXXX, Choose the Route Partition and the Gateway/Route List. Afcors click the Provide Outside Dial Tone and change the Call Classification to Offnet
and here is the extra thing that differ this from H.323 configuration which is the
Calling Party Transformations we add  to Prefix Digits (Outgoing Calls) 221

1

 

 

 

 

 

 

 

Now Let’s Configure the IOS

First let me configure my Interfaces

interface GigabitEthernet0/0
Description “Lan Connection”
ip address 192.168.200.86 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 172.29.7.94 255.255.255.252
duplex auto
speed auto

Then Enable the route to the SIP Server

ip route 10.208.9.0 255.255.255.0 172.29.7.93

Now lets enable the voice service and allow it to communicate with different protocol

voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
sip
early-offer forced

“early-offer forced” it allows SIP Gateway to route calls in a Delayed Offer to Early Offer scenario. Almost all of the providers require Early Offer SIP calls. It is actually recommended to send Early Offer from CUCM in order to avoid early media cut-through issues.

Now Configure the Translation rule for outgoing call
voice translation-rule 1
rule 1 /^9\(\)/ /\1/

Added to a translation Profile
voice translation-profile OUT
translate called 1

and then added to a dial-peer
dial-peer voice 700 voip
description ** SIP TO STC **
translation-profile outgoing OUT
destination-pattern 9T
session protocol sipv2
session target ipv4:10.208.9.69:5060
session transport udp
voice-class sip dtmf-relay force rtp-nte
dtmf-relay sip-notify rtp-nte sip-kpml
codec g711alaw

the Command
voice-class sip dtmf-relay force rtp-nte
dtmf-relay sip-notify rtp-nte sip-kpml
is optional you could have enouhg by using
dtmf-relay rtp-nte sip-notify
but i use it all for worse cases

and Since our Phone Extension is 4 digit only we need to make a translation rule that strip the Number from the 221 for incoming call

voice translation-rule 2
rule 1 /^2217/ /7/
rule 2 /^0122217/ /7/

and added to a translation profile
voice translation-profile SIP-IN
translate called 2

and then configure an Incoming Dial-peer
dial-peer voice 701 voip
translation-profile incoming SIP-IN
destination-pattern 791.
session protocol sipv2
session target ipv4:192.168.200.10
incoming called-number 012221791.$
dtmf-relay sip-notify rtp-nte sip-kpml
codec g711alaw

Also the Command
incoming called-number 012221791.$
is optional now you can use
incoming called-number .
or nothing at all the call will use the destination-pattern to reach the phone but i use it for worse cases

Now you can try to make a call and it will go through

 

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s