Showing results for 
Search instead for 
Did you mean: 




I have created this blog based on my work experience in implementing PSTN Gateways in the Service Providers (SP) network and I will cover the Basics, Configuration and Troubleshooting part.

To help all types of readers I will start from Basics and then I will cover the Network Configuration and Troubleshooting part.

I'm writing this blog in continuation to my previous Blog post Implementing PSTN Gateways in CUCM


PSTN Gateways in CUCM

To place external calls, Cisco Unified Communications Network (CUCM) deployment needs a connection the Public Switched Telephone Network (PSTN). PSTN connections are provided through Gateways, which connect traditional time-division-multiplexing (TDM) telephony interface (digital T1/E1 or analog FXO port) and VOIP domains.


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.


Gateway Protocol functions for CUCM Integration


Three main signaling protocols - MGCP, H.323 and SIP provides different feature support. There are Pros and Cons in each protocol.


MGCP: Centralized dial plan configuration and Centralized gateway configuration hence it will be easy to implement in a large SP network.


H.323: Dial plan configured directly on the gateway. More specific call routing and it support third-party integration on SP network.


SIP: Dial plan configured directly on the gateway. It supports third-party telephony integration and end devices.


SIP Gateway Implementation


SIP Gateways are integrated with CUCM by using SIP Trunks provisioned from CUCM. A gateway is a device that can translate between different types of signaling and media.






1. Configure a SIP Gateway in CUCM

2. Configure SIP Gateway on the Cisco IOS router

Add a SIP Trunk


Step1: In CUCM Administration Page, choose Device > Trunk


Step2: Enter the following information as shown here, Trunk Type as SIP Trunk and Device Protocol as SIP


[Place the cursor on the image to get a clear view]



Step3: Click Next


Step4: Enter the Trunk configuration as shown here, Device Name, Description and Device Pool



[Place the cursor on the image to get a clear view]




Step5: Scroll down and Enter the SIP Information as shown here,


Enter Destination IP Address --> Will be the Gateway IP address and the Destination Port - 5060

SIP Trunk Security Profile, SIP Profile.




Step6: Click > Save and Apply Config




Configuration on IOS Gateway



voice service voip


bind control source-interface LoopBack0

bind media source-interface LoopBack0

session transport tcp


interface LoopBack0

ip address



! --- Change the Transport layer to TCP


! --- Configure the gateway to use the Loopback 0 interface IP address of on the router as a source IP address when communicating with CUCM.



Dial Peer Configuration



dial-peer voice 1 voip

destination-pattern 2...

session protocol sipv2

session target ipv4:

codec g711ulaw

dtmf-relay rtp-nte sip-notify



VOIP Dial-peer configuration for routing Inbound calls from the PSTN terminated at the SIP Gateway. Calls with a called party number starts with 2 and that will be routed to the CUCM with ip address  If the PSTN carrier was routing 10 digit for the called party digits, a translation profile is required and could be directly attached to the incoming TDM interface. Translation profile would match one of the customer's ten digit DID range and convert the dialed digits from ten digit to four digits.


! --- session protocol sipv2 command converts the VOIP dial peer from the default H.323 to SIP. The default signaling protocol on VOIP dial peer is H.323.


! ---  dtmf-relay command specifies the use of RFC 2833 in-band DTMF relay as first priority and out-of-band DTMF relay using the SIP Notify method, second priority



I hope the information in this blog is helpful. Thanks.

Aman Soi

Sure, the information shared would be helpful while config SIP GW.



Suresh Hudda
Rising star
Rising star

Informative one !!!

Regards, Suresh

Thanks Aman & Suresh.



hello frnds

                As I m new to SIP , i.e facing many problems . By looking upon the configuration , I configured sip cucm config , then sip gateway . Now m confused how to make a call to pstn number (lyk 911, sb national call .....) . Will you please explain me in brief . It will be very helpful for me .  Thankyou so much .

Ahmad Kefaya

Very useful document.


Best Regards,

Ahmad Kefaya

Frequent Contributor
Frequent Contributor

Hi Muthurani,


My Customer is configuring the SIP to connect with celular interface, but, didn´t worked. The interface SIP configuration is this way:


dial-peer voice 998131812 voip
 description Bast_TotalVox
 translation-profile outgoing Bastidor_Totalvox_RLG_2
 destination-pattern 999735690$
 session target ipv4:
 voice-class codec 1 
 voice-class h323 1
 dtmf-relay h245-alphanumeric


Is there any configuration error?






Hi All,

Excelent Post in relation SIP Gateway,


Angel Santos

Frequent Contributor
Frequent Contributor

Hi Angel,


Thanks a lot for documentation.




Is the IP a Call Manager where the DNIS 999735690$ is registered, or is it a PSTN number? If 999735690$ is on a Call Manager, then your config should work, provided the IP is the IP of the Call Manager. If 999735690$ is a PSTN number, then the dial peer should be a POTS dial peer like below sample and the cellular interface is configured where the signaling and media is bind.


dial-peer voice 1 pots
destination-pattern 999735690$
no digit-strip

The IP is either the SIP proxy IP, the CUCM, or the voice gateway of the DNIS 999735690$ if it is used as the session target in a voip dial peer.


Ignore pls


Good blog. but one correction or suggestion I have:

> if your carrier is sending more than 4 digits, 7 or 10, you dont have to have translation profiles. you can configure the SIP Trunk on Gateway to only allow 4 (i.e. if you are using 4 digit DNs). That is a simpler way that works like a charm.

Pasha Teplitsky

Hi Muthurani,

Thanks for the post! 5 stars!

wanted to let you know that it encouraged me to write an in depth SIP Gateway post, explaining all the parameters and best practices.

I also thought it might be a good idea to build a SIP gw Config Utility to create consistent, best practice driven configuration.

Thanks for the motivation. keep up the great work!



its indeed Good Info , what about   the dial-peer of Outgoing from CUCM towards Gateway and service Provider , it would be This .


dial-peer voice X pots

destination-pattern 0.T or 9.T

port 0/1/0:16 or port 0/10:23 >>>>>>>>. (E1 or T1).


Please Rate if Useful .

Hi, Thank you. Very Informative :-)

Very informative. Thank you!

Does anyone have a sample of SIP configuration to the provider? Does SIP to the provider need CUBE or can it be implemented on a 4331 router? Thanks.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers