Cisco Callmanager Express (Cme) Sip Trunking Configuration Example
Cisco Callmanager Express (Cme) Sip Trunking Configuration Example
Cisco Callmanager Express (Cme) Sip Trunking Configuration Example
Configuration Example
Document ID: 91535
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
SIP Protocol
CME SIP Trunk Support
DTMF Relay for SIP Trunks
Codec Support and Transcoding
Call Forward
Call Transfer
Call Hold
Configure
Network Diagram
Configurations
Verify
Troubleshoot
Troubleshooting Registration
Troubleshooting Call Setup
Related Information
Introduction
Today, the telecommunications industry is in the process of making the transition from long establishing
switching and transport techonologies to IP−based transport and edge devices. The IP communication
revolution has started to create a tremendous commercial impact in small and medium businesses. These small
and medium businesses are realizing that the use of IP is very efficient because IP can use Voice, Video, and
Data capabilities over a single network, instead of using three separate special−purpose networks. Figure 1
shows an IP telephony deployment trending towards IP trunking.
IP PBXs are starting to predominate in the business of the Voice technology, and the TDM PBXs are no
longer the primary source as the crossover going between two Voice networks. The usage of the TDM PBXs
has decreased in the last couple of years, and the use of the IP PBX is becoming a good investment in IP
LANs and WANs. In order to connect to the PSTN, PBXs need some sort of trunking such as TDM (T1/E1)
or analog lines. IP PBXs can access the PSTN using these types of trunks, but need a media gateway that
converts the IP voice traffic to traditional PSTN, which sometimes can result in successive translation from IP
domain to TDM domain. These successive translations increase the maintenance costs of the gateways,
increases latency, and reduces voice quality.
In order to avoid these problems, the IP PBXs use protocols for session initiation and management, the most
prominent of which is Session Initiation Protocol (SIP). This document provides a description on SIP trunking
and Cisco CallManager Express (CME), and a configuration to implement an IP−based telephony system with
CME using SIP trunking for inbound and outbound calls.
Prerequisites
Requirements
Ensure that you meet these requirements before you attempt this configuration:
Components Used
The information in this document is based on these software and hardware versions:
The information in this document was created from the devices in a specific lab environment. All of the
devices used in this document started with a cleared (default) configuration. If your network is live, make sure
that you understand the potential impact of any command.
Conventions
Refer to the Cisco Technical Tips Conventions for more information on document conventions.
SIP Protocol
SIP is an ASCII based, application−layer control protocol that can be used to establish, maintain, and
terminate calls between two or more endpoints. SIP has rapidly emerged as the standard protocol used in IP
communications, because it is a multimedia protocol that can be used for video sessions and instant messaging
in addition to voice. Also, SIP can handle conference sessions and broadcasts, as well as one−to−one sessions.
SIP has great potential in transforming and developing the way people communicate. For this reason, Cisco
has and continues to play an important role in taking a leadership to create new technologies that make SIP
and its applications the standard of IP communications.
SIP trunks are similar to a phone line, except that SIP trunks use the IP network, not the PSTN. In addition,
SIP trunks permit the convergence of voice and data onto common all−IP connections. In order to access the
IP network using an SIP trunk, it is necessary that configurations be made on the service provider, as well as
on the customer side. Customers need to set and configure CME, which is the PBX that will interpret the SIP
signal adequately and pass traffic successfully. The service provider needs to configure an SIP Proxy Server.
However, SIP trunks are more complicated to establish than regular PSTN trunks. The reason is that a
customer faces challenges in handling different interpretation and implementations of SIP by equipment
vendors, delivering security, managing quality of service (QoS), enabling Network Address Translation
(NAT) and firewall traversal, and ensuring carrier−grade reliability and continuity of service.
These points describe why SIP trunks are becoming so apparent in small and medium businesses:
CME currently supports this list of DTMF internetworking for SIP to SIP calls:
CME currently supports this DTMF internetworking for SIP to SCCP calls:
Call Forward
When a call comes in on an SIP trunk and gets forwarded (CFNA / CFB / CFA), then the default behavior is
for the CME to send the 302 "Moved Temporarily" SIP message to the Service Provider (SP) proxy. The user
portion of the Contact Header in the 302 message might need to be translated to reflect a DID that the SP
proxy can route to. The host portion of the Contact Header in the 302 message should be modified to reflect
the Address of Record (AOR) using the host−registrar CLI under sip−ua and the b2bua CLI under the VoIP
dial peer going to the CUE.
Some SIP proxies might not support this. If so, then you need to add this:
Figure 2 shows the behavior of the CME system when the 302 message is disabled.
Figure 2 − Call Forward Busy (CFB) flow with 302 message disabled
This method will allow hairpinning of the 302 SIP messages for call forwards on the CME. The above is also
required if there are certain extensions that have no DID mapping as the SP proxy might not know how to
route such calls. If you disable the 3xx response, the calling−number initiator can be used to preserve the
caller ID of the original calling party.
Call Transfer
When a call comes in on an SIP trunk to an SCCP Phone or CUE AutoAttendant (AA) and is transferred, the
CME by default will send a SIP REFER message to the SP proxy. Most SP Proxy Servers do not support the
REFER method. This needs to be configured in order to force the CME to hairpin the call:
Router(config)#voice service voip
Figure 3 shows the behavior of the CME system with the REFER method disabled.
If REFER is supported on the SIP proxy, the user portion of the Refer−To and Referred−By must be
translated to a DID that the SP proxy understands. The host portion of the Refer−To and Referred−By fields
must be an IP address or DNS that the SP proxy can route to as well (this occurs by default on CME 4.1).
Call Hold
If an SCCP phone places a call from PSTN on HOLD, the CME locally changes the media. No SIP messages
are sent across on the SIP trunk. Music on Hold will be played to the user across the SIP trunk based on the
CME configuration.
Configure
In this section, you are presented with the information to configure the features described in this document.
Note: Use the Command Lookup Tool ( registered customers only) to obtain more information on the commands
used in this section.
Network Diagram
This document uses this network setup:
Configurations
These configuration elements provide an outline of the steps required to configure your CME with SIP trunks:
This is the complete configuration needed to deploy a CME system with SIP trunks:
sip
registrar server expires max 3600 min 3600
localhost dns:domain.test.com
!
!
voice class codec 1
codec preference 1 g711ulaw
!
!
!
!
!
!
!
!
!
!
!
voice translation−rule 1
rule 1 /5123781291/ /601/
!
voice translation−rule 2
rule 1 /^911$/ /911/
!
voice translation−rule 4
rule 1 /^9(.......)$/ /512\1/
!−−− An outbound rule to strip "9" from "9+" transfers and call−forwards
!
!
voice translation−profile CUE_Voicemail/AutoAttendant
translate called 1
!
voice translation−profile PSTN_CallForwarding
translate redirect−target 4
translate redirect−called 4
!
voice translation−profile PSTN_Outgoing
translate calling 3
translate called 2
translate redirect−target 4
translate redirect−called 4
!
!
!
!
!
!
!
vlan internal allocation policy ascending
!
!
!
!
!−−− Internet Connection Configuration −−−
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
media−type rj45
no keepalive
!
interface GigabitEthernet0/0.1
encapsulation dot1Q 1 native
ip address 172.22.1.71 255.255.255.0
!
interface GigabitEthernet0/0.20
encapsulation dot1Q 20
ip address 172.22.101.1 255.255.255.0
!
interface GigabitEthernet0/0.100
encapsulation dot1Q 100
ip address 172.22.100.1 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
media−type rj45
no keepalive
!
interface Service−Engine1/0
ip unnumbered GigabitEthernet0/0.1
service−module ip address 172.22.1.253 255.255.255.0
service−module ip default−gateway 172.22.1.71
!
ip route 0.0.0.0 0.0.0.0 172.22.1.1
ip route 172.22.1.253 255.255.255.255 Service−Engine1/0
!
!
ip http server
no ip http secure−server
!
!
!
tftp−server flash:P0030702T023.bin
tftp−server flash:P0030702T023.loads
tftp−server flash:P0030702T023.sb2
tftp−server flash:P0030702T023.sbn
!
control−plane
!
!
!
!
!
!
!
codec g711ulaw
!−−− With VAD enabled, messages left on CUE could be blank or poor quality
!
!
!
dial−peer voice 11 voip
description **CUE Auto Attendant**
translation−profile outgoing PSTN_CallForwarding
destination−pattern 601
b2bua
session protocol sipv2
session target ipv4:172.22.1.155
dtmf−relay sip−notify
codec g711ulaw
no vad
!
!
sip−ua
authentication username 5123781000 password 075A701E1D5E415447425B
no remote−party−id
retry invite 2
retry register 10
retry options 0
timers connect 100
registrar dns:domain.test.com expires 3600
sip−server dns:domain.test.com
host−registrar
!
!
telephony−service
no auto−reg−ephone
load 7960−7940 P0030702T023
max−ephones 168
max−dn 500
ip source−address 172.22.1.107 port 2000
calling−number initiator
moh music−on−hold.au
transfer−system full−consult dss
transfer−pattern 9.T
secondary−dialtone 9
create cnf−files version−stamp Jan 01 2002 00:00:00
!
!
!−−−"no−reg both" means do not try to register either extension with SP SIP Proxy
Generating configuration:
hostname se−172−22−1−253
ip domain−name localdomain
dtmf−relay sip−notify
mwi sip outcall
!−−− Subscribe / Notify and Unsolicited Notify have not been tested
!−−− Testing with REFER method on CUE has caused certain call flows to break
end subsystem
service phone−authentication
end phone−authentication
service voiceview
enable
end voiceview
end
Switch Configuration
interface FastEthernet0/2
description Trunk to 3825
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
duplex full
speed 100
interface FastEthernet0/7
switchport trunk encapsulation dot1q
switchport trunk native vlan 20
no ip address
spanning−tree portfast
interface FastEthernet0/8
switchport trunk encapsulation dot1q
switchport trunk native vlan 20
switchport mode trunk
switchport voice vlan 100
no ip address
spanning−tree portfast
interface Vlan1
ip address 172.22.1.194 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.22.1.1
ip http server
Verify
There is currently no verification procedure available for this configuration.
Troubleshoot
This section provides information you can use to troubleshoot your configuration.
The Output Interpreter Tool ( registered customers only) (OIT) supports certain show commands. Use the OIT to
view an analysis of show command output.
Note: Refer to Important Information on Debug Commands before you use debug commands.
Troubleshooting Registration
Troubleshooting the SIP trunk on CME involves the same commands you use for IOS SIP GW
troubleshooting and CME troubleshooting. Use these commands in order to check if your DN is registered:
• show sip−ua register statusUse this command to display the status of E.164 numbers that a SIP
gateway has registered with an external primary SIP registrar.
• debug ccsip messageEnables all SIP SPI message tracing, such as those that are exchanged between
the SIP user−agent client (UAC) and the access server.
Show commands:
Debug commands:
• debug ccsip messageEnables all SIP SPI message tracing, such as those that are exchanged between
the SIP UAC and the access server.
• debug voip ccapi inoutTraces the execution path through the call control API.
• debug voice translationChecks the functionality of a translation rule.
• debug ephone detail mac−address <mac of phone> Sets detail debugging for the Cisco IP phone.
• debug voip rtp session named−eventsEnables debugging for Real−Time Transport Protocol (RTP)
named events packets.
• debug sccp messageDisplays the sequence of the SCCP messages.
Related Information
• Cisco Unified Communications Manager Express System Administrator Guide
• Cisco Unity Express 2.3 Installation and Upgrade Guide
• Verifying and Troubleshooting SIP Features
• Managing and Monitoring Cisco Unified CallManager Express Systems
• Voice Technology Support
• Voice and Unified Communications Product Support
• Troubleshooting Cisco IP Telephony
• Technical Support & Documentation − Cisco Systems