CME Basic Setup

Background Info:
Files in Router Flash for CME to work properly
Cisco IOS: CME version depends on the IOS file version you installed. Refer to CME and IOS Version Compatibility Matrix for identifying the correct IOS version to download.
Normally, IOS already includes the phone firmware for most phone model to work properly.
CME Basic Files: make sure to download correct version according to your IOS version as well as CME version. It usually includes firmware of specific phone models, GUI files, Ringtones files, Phone background images, MoH files etc.
Phone Firmware Files: most likely to be included in IOS file or CME Basic Files, it can be downloaded individually for each phone model though.
For Early CME versions: (x –> major version | y –> minor version)
SCCP firmware—P003xxyy.bin  |  SIP firmware—P0S3xxyy.bin
For Later CME versions:
SCCP firmware—P003xxyyzzww: x –> major ver | y –> major subver | z –> maintenance ver | w –> maintenance subver
SIP firmware—P0S3-xx-y-zz: x –> major version | y –> minor version | z –> subversion
For Cisco ATA, the firmware filename begins with AT, while the ones for Cisco IP phone 7002, 7905 and 7912 begins with CP.
For Java-based IP phones, such as 7911, 7941, 7941GE, 7961, 7961GE, 7970, and 7971; the firmware consists of multiple files including JAR and tone files, which should be all downloaded through TFTP for phones to work fine.
When specifying the firmware version for the phones to download under CME CLI, only firmware file name is required, no suffix. Additionally, for Java-based phones, below naming conventions are used for SCCP firmware image (TERMnn.xx-y-z-ww <-> SCCPnn.xx-y-zz-ww).

Not all firmware files to be downloaded to a phone are specified in the load command. For a list of file names to be installed in flash memory, and which file names are to be specified by using the load command, see Cisco Unified CME Supported Firmware, Platforms, Memory, and Voice Products.
XML Template: the files named as xml.template can be copied and modified to grant different GUI privileges for different administrators. It is included both in CME Basic Files and GUI files.
Music-on-Hold (MoH) File: it is an audio file named music-on-hold.au, which is included in the CME Basic Files.
Script Files: TCL Scripts are listed individually on CME software download site, and can be downloaded to gain some supplementary services, as well as some advanced features such as Cisco Unified CME Basic Automatic Call Distribution and Auto Attendant Service (B-ACD).
Bundled TSP Archive: it contains several Telephony Application Programming Interface (TAPI) Telephony Service Provider (TSP) files. These files are required for any CTI-based applications.
to be continued.
Where is the Router Flash: Cisco Router has 2 types of Storing devices: Memory (RAM) and Flash. While Flash falls into 2 categories: Internally Embedded / Externally Attached; with different names respectively.
Internally Embedded Flash: bootflash
Externally Attached:  MEM formatted (refer to: Slot0:) or ATA formatted PCMCIA Flash (refer to: Disk0:); while CF card uses ATA format and should refer to Disk0: under IOS CLI.
Besides, flash: in IOS CLI is just a pointer, which points to Slot0: or Disk0:, you might issue “pwd” to show where the flash: is pointing. Here is a reference URL for more details: Memory and Flash of Switch Engine.
Troubleshooting Tips:
Router# show flash:

//phone firmware issue
Router# show ephone phone-load

//registration tftp & config-file issue.
Router# debug tftp event
Router# show telephony-service tftp-bindings
Router# show ephone registered
//
dial plan
show telephony-service
show dial-peer voice [summary | voip]
show telephony-service dial-peer  (for SCCP CME)
show dial-peer summary  (for SIP CME)

System-Level Network Related Service:

DHCP Service: DHCP Pool & DHCP Relay
NTP Service:

  • Some cisco SCCP & SIP IP phones always display CME local system date & time  which are configured using below commands
    Router(config)#clock timezone xx
    Router(config)#clock summer-time xx
    Router#clock set hh:mm:ss day month year
  • Others SCCP or SIP phones’ Date & Time display only depends on timezone config under SCCP or SIP Telephony Service configuration mode; then the exact time is calculated based on the time zone offset comparing to CME local system time
    Router(config-telephony)# time-zone xx
    Router(config-telephony)# time-format xx     OR
    Router(config)# voice register global
    Router(config-register-global)# timezone xx
  • configuring CME as a NTP client to synchronize to external clock source
    Router(config)# ntp server x.x.x.
  • In all above scenarios, every time when external clock source or CME local time changes, administrator has to manually re-issue the “timezone” command under SCCP or SIP telephony service configuration mode, in order to update that change to some IP phones. However, beginning with CME 9.0, Olson Timezones is introduced to solve that problem.
  • Troubleshooting Tips:
    Router#show clock detail

System-Level Voice Related Config:
Enable calls between Endpoints:
Each time you define a SCCP DN or a SIP DN registers, a POTS dial peer is created for that specific DN (refer to Dial-Plan Patterns for more details). In order to allow calls among SIP & SCCP endpoints, incoming calls to SIP phones through SIP or H323 Trunk, outgoing calls from SIP phones through SIP or H323 Trunk, or even relay calls between H323 Trunks, it is required to globally allow the connections between different types of call legs (dial peers).

Router(config)# voice service voip
Router(config-voi-srv)# allow-connections h323 to h323    //The only type of VoIP-to-VoIP connection that is supported by Cisco CME 3.1 or a later version is H.323-to-H.323 connection.
Router(config-voi-srv)# allow-connections h323 to SIP
Router(config-voi-srv)# allow-connections SIP to h323
Router(config-voi-srv)# allow-connections SIP to SIP

SIP Related:

  • Enable Register for SIP phones & SIP Gateways: enable SIP Register functionality for SIP phones under CME, and customize SIP Register interval, and time interval for consecutive NOTIFY message for a single DTMF event. From CME’s perspective, SIP phones and SIP gateways are no different as they are all connected to CME through SIP Trunk and SIP dial peer. Therefore, below configurations also apply to SIP gateways.
    Router(config-voi-srv)# sip
    Router(config-voi-sip)# registrarserver [expires[max sec][minsec]]  //enable SIP Register
    function on CME
    Router(config-voi-sip)# exit
    Router(config)# sip-ua
    Router(config-sip-ua)# notify telephone-event max-duration time
    Router(config-sip-ua)# registrar{dns:host-name| ipv4:ip-address}expires seconds[tcp] [secondary]
    Router(config-sip-ua)# retry register number
    Router(config-sip-ua)# timers register time
  • Bulk Registration Support for SIP Phones:
    Bulk Registration Support for SIP Phones aims to decrease the number SIP message exchanged during 2 transactions (SIP phone register & SIP phone status update) of SIP phone registration.
  • Bulk Registration to External SIP Registrar/Proxy: registering a route pattern (408526xxxx, similar to PSTN DID range) to external SIP Proxy/Registrar, so that external SIP network can route calls destined for that route pattern to CME. For configure, refer to Registering to external SIP Proxy.
  • Out-of-Dialog REFER (OOD-R): Out-of-dialog REFER (OOD-R) allows remote applications to establish calls by sending a REFER message to CME without an initial INVITE. After the REFER is sent, the remainder of the call setup is independent of the application and the media stream does not flow through the application. The application using OOD-R triggers a call setup request that specifies the Referee address in the Request-URI and the Refer-Target in the Refer-To header. Click-to-dial is an example of an application that can be created using OOD-R.

Setting Up CME:
SCCP CME Setup:

enable
configure terminal
tftp-server device:filename
telephony-service
load phone-type firmware-file 

cnf-file location {flash: | slot0: | tftp tftp-url}
cnf-file {perphonetype | perphone}
//Generating Configuration files for SCCP phones
create cnf-files
[Verifying configuration files list and locations, issue “Router#sh telephony-service tftp-bindings”]

//Maximum Ephones Define: In CME 4.3 and later, max-ephones defines the max number of registered phones, while the max number of configured phones is 1000.
max-ephones max-phones
max-dn max-directory-numbers [preference preference-order] [no-reg primary | both]

//Redundant Router configuration
ip source-address ip-address [port port] [secondary ip-address [rehome seconds]] [any-match | strict-match]

//Enable secondary dial tone
secondary-dialtone digit-string

//DSCP customization: begin with CME 7.1, DSCP customize is allowed.
ip qos dscp {{number | af | cs | default | ef} {media | service | signaling | video}}

//Customize timeouts
timeouts busy seconds
timeouts interdigit seconds
timeouts ringing seconds
keepalive seconds    

//Data & Time Setting.
date-format {dd-mm-yy | mm-dd-yy | yy-dd-mm | yy-mm-dd}
time-format {12 | 24}
time-zone number

//Block Automatic Registration
no auto-reg-ephone

//Define Phone Screen Logo
system message BEIJING

//Network Locale define
network-locale CN
//Define per-phone Configuration File location: mainly used to define the User & Network Locale. (User Locale: defines language display on the phone | Network Locale: Tones & Cadence according to country.

end

SIP CME Setup:

Low-Level Functional Configuration:
Phone & Extension configuration:

Extension Allocation:
Router(config)# ephone-dn 1 dual-line
Router(config-ephone-dn)# number 1001
//below are optional
Router(config-ephone-dn)# label TEST-1001           //display in conjunction with Extension.
Router(config-ephone-dn)# description 6789-1001   //displayed on upper-right corner of screen
Router(config-ephone-dn)# name Michael Law         //used in call alerting.
Router(config-ephone-dn)# call-forward {busy | noan …) xxxx

Phone Device Configuration:
Router(config)# ephone 1
Router(config-ephone)# mac-address xxxx.xxxx.xxxx
Router(config-ephone)# type CIPC
Router(config-ephone)# button 1:1

SCCP Dialing Plans Configuration:

Dial-Plan Patterns: are used to build the mapping between abbreviated extensions and any externally routable Phone numbers, thus are required for below scenarios
a) Multiple CME systems interconnected with Gatekeeper, dial-plan pattern is required for registering either E.164 PSTN prefix or abbreviated extension number (optional depends on your config) with Gatekeeper.
b) Enable DID Trunk function: dial-plan patterns can be used to map PSTN numbers to internal extensions, as dial-plan pattern command will create additionally POTS dial peers with the destination-pattern to be the PSTN numbers. (therefore, interconnecting CMEs without GK also requires Dial-Plan configuration)
Configuring Dial Plan Patterns:
enable
configure terminal
telephony-service
dialplan-pattern tag pattern extension-length extension-length [extension-pattern extension-pattern | no-reg]
end
for example: dialplan-pattern 1  861062286… extension-length 4 extension-pattern 6…
Note that it will affect the Calling Party for both inbound and outbound call.
If multiple dial-plan patterns are defined, the system matches extension numbers against the patterns in sequential order, starting with the lowest numbered dial-plan pattern tag first. Once a pattern matches an extension number, the pattern is used to generate an expanded number. If additional patterns subsequently match the extension number, they are not used.
Verifying Dial Plan patterns:
show telephony-service
show dial-peer voice [summary | voip]
show telephony-service dial-peer  (for SCCP CME)
show dial-peer summary  (for SIP CME)

Call Transfer & Forward Configuration
CME Transfer & Forward Overview & H.450.2/H.450.3 support: By Default, Cisco CME 3.2 and later versions provide full call-transfer and call-forwarding interoperability with call processing systems that support H.450.2, H.450.3, and H.450.12 standards. For call processing systems or endpoints in the Call flow of transfer & forward that do not support H.450 standards (such as CUCM, Cisco BTS or Cisco PGW), Cisco CME 3.2 and later versions will fall back to VoIP-to-VoIP hairpin call routing or insteadly use H.450 tandem gateway depends on your specific configuration. So, commands for H.450.2 / H.450.3 support are by default enabled as below: (If needed, you should explicitly disable them either globally or for individual dial peers to force hairpin routing for call transfer or forward).

voice service voip
   supplementary-service h450.2
   supplementary-service h450.3
supplementary-service sip moved-temporarily
supplementary-service sip refer

   exit
dial-peer voice tag voip
   supplementary-service h450.2
   supplementary-service h450.3
supplementary-service sip moved-temporarily   // for SIP dial peer
supplementary-service sip refer                             // for SIP dial peer

   end

Call forwarding over SIP networks uses the 302 Moved Temporarily SIP response, which works in a manner similar to the way in which the H.450.3 standard is used for H.323 networks.
Cisco Unified CME supports all SIP Refer method call transfer scenarios, but you must ensure that call transfer is enabled using H.450.2 standards.
H.450.12 Support: provide the abilities of dynamically advertise and discover H450.2 / H450.3 capabilities on a call-by-call basis. When enabled, H.450.2 and H.450.3 services are less preferred than hairpin call routing for call transfers and call forwards unless a positive H.450.12 indication is received from all other VoIP endpoints involved in the call. If no positive H.450.12 indications, the router uses the alternative method that you have configured for call transfers and forwards, either hairpin call routing (should be explicitly enabled by allow-connections h323 to h323 under “voice service voip”) or an H.450 tandem gateway.
Support for the H.450.12 standard is disabled by default and can be enabled globally or for individual dial peers.
Tips for Using H.450 Standards on CME: If some of the endpoints do not support H.450 standards (for example, Cisco Unified Communications Manager, Cisco BTS, or Cisco PGW), you can use hairpin call routing or an H.450 tandem gateway to handle transfers and forwards with those endpoints. Also, either you must explicitly disable H.450.2 and H.450.3 on the dial peers that handle those calls or you must enable H.450.12 capability to automatically detect the calls that support H.450.2 and H.450.3 and those calls that do not.

Consultative-transfer enhancements: Introduced in CME 4.3 and enabled by default for all CME versions after 4.3. With this enhancement, trasnfer-target number is collected on the new consultative call leg which is created when Transfer soft key is pressed. The Transfer soft key is not displayed again until the collected digits matched a transfer pattern and the transfer target is being alerted.
Before CME 4.3, transfer-target number is collected on the original call leg and those digits are buffered until they match a transfer pattern, after which the original call leg is put on hold and a new consultative call leg is created to sending the buffered transfer-target digits.
In summary, to enable this consult transfer enhancement, below commands are issued by default.(you still need to manually disable them if you do not prefer this default config)

telephony-service
transfer-system
full-consult [dss]                   //{ blind | full-blind | | local-consult }
ephone-dn x dual-line
transfer-mode 
consult                               // (consult | blind)

OR Globally modify the way the transfer-target digits are collected in consultative transfer call.
telephony-service
transfer-digit-collect
{new-call | orig-call}

Enable Call Transfer & Forward Globally: Configure Transfer-Pattern & Call-Forward Pattern to enable call transfer globally and define the destinations where the call can be Transferred and Forwarded to. Be default (without transfer-patterns & call-forward pattern configured), all non-local call transfers are blocked for SCCP phones, while non-local call transfers are enabled for backward compatibility.

telephony-service
transfer-pattern transfer-pattern [blind]
call-forward pattern pattern

Prevent Toll Fraud: to avoid toll fraud conduced by call transfer, Call Transfer Blocking can be implemented globally (by transfer-pattern under Telephony-Service configuration mode) or for individual phones, plus, Max number of Transfer-Target digits can be enabled globally.

Call Transfer Blocking: Be default (without transfer-patterns configured), all non-local call transfers are blocked for SCCP phones, while non-local call transfers are enabled for backward compatibility. How Transfer-Pattern configurations affect the transfer behaviors of CME SIP & SCCP phones, refer to Table 67 of Behaviors of Cisco Unified IP Phones for Specific Configurations.

  • Call Transfer Blocking for SCCP:
    enable
    configure terminal
    ephone-template template-tag
    transfer-pattern blocked
    transfer max-length digit-length
    exit
    ephone phone-tag
    ephone-template template-tag
    restart
    end

Dial Peer Configuration:
Dial Peer matching normally consists of 2 stages, Inbound Dial Peer Matching & Outbound Dial-Peer matching. 【Reference: Chapter 7 Configuring Path Selection of Cisco Voice over IP (CVOICE) 3rd Edition】
For Inbound dial peer matching, it is conducted in below sequence.
Introducing of “incoming called-pattern” & “answer-address” aims at ensuring the correct inbound dial peer to be matched, they are never used for call routing & outbound dial-peer matching, but only for Inbound dial-peer matching.
1-> If Called Number matches incoming called-pattern config
2-> If Calling Number matches answer-address config
3-> If Calling Number matches destination-pattern config
4-> If call enters on a POTS port, then dial peer with the same POTS port configured will be matched.
5-> If above all fail, default dial-peer 0 will be used.
For Outbound dial peer matching procedure differs depending on whether (DID) Direct-Inward-Dial is enabled on Inbound POTS port or not.
If DID not enabled on Inbound POTS dial peer, after an Inbound dial peer is matched, router will play secondary dial tone to prompt calling party to enter additional digits which will be used to match the Outbound dial peer, that is called “two-stage dialing”.
If DID is enabled on Inbound dial peer, router will use the full incoming dialed string to match the outbound dial peer in below sequence, which is called “one-stage dialing”. Only destination-pattern is used for Call Routing  & Outbound dial-peer matching.
1-> Full incoming dial string is used to match destination-pattern config, and the closet match will be selected.
2-> If several dial peers are matched at the same time, the dial peer with the lowest preference config wins.
3-> If we run into equal preference for all matched dial peer, one of them will be selected randomly.
Best Practice for Inbound Dial Peer Configure: To ensure PSTN incoming calls are directly routed to their destination based on Called Number, Create a default POTS dial peer with the direct-inward-dial attribute as below:

dial-peer voice 1 pots
incoming called-number .
direct-inward-dial
exit

Destination-Pattern: difference between 1… / 1…$ / 1…T:
Variable-length matching: which means that as long as the left-justified digits in the dial string match the configured pattern in the dial peer, any digits beyond the configured pattern are ignored for the purposes of matching. And Dollar Sign $ is used in the end of destination-pattern to disable variable-length matching for that specific dial peer.
- As routers defaults to variable-length matching, when destination-pattern 1… , digits of 1001 will be sent out when you dial 10012345 either in digit-by-digit way or en-block dialing.
- When destination-pattern 1…$ configured, 1001 will be sent out as called number if dialing 10012345 in digit-by-digit way, and 10012345 sent out if en-block dialing.
- If destination-pattern 1…T were configured, the whole dialed string 10012345 is sent to session target IP address when inter-digit timeout expires regardless of digit-by-digit dialing or en-block dialing.
From above tests, it seems like 1…T is the best choice which allows accurate matching.

Digital Manipulation:

  • Wildcards:
    . –> indicates a single-digit placeholder
    [] –> indicates a range of digits, E.g [5-7],  [5-7, 9]
    () –> indicates a pattern, normally used in conjunction with ?, %, or +
    ? –> preceding digit occurred zero or one time
    % –> preceding digit occurred zero or more times
    + –> preceding digit occurred one or more times
    T –> interdigit timeout, router will wait for additional digits except # is used to explicitly terminate.
    #: when it is treated as a terminator,
    The calling party can immediately terminate the inter-digit timeout by entering the # character. If the # character is entered while the router is waiting for additional digits, the # character is treated as a terminator; it is not treated as part of the dial string or sent across the network. But if the # character is entered before the router begins waiting for additional digits (meaning that the # is entered as part of the fixed-length destination pattern), then the # character is treated as a dialed digit.

    • Asterisk (*) and pound sign (#)–These characters on standard touch-tone dial pads can be used anywhere in the pattern. They can be used as the leading character (for example, *650), except on the Cisco 3600 series.
    • Dollar sign ($)–Disables variable-length matching. It must be used at the end of the dial string.
    • Circumflex symbol (^)–When used within brackets, allows you to eliminate a digit from consideration for dial peer matching purposes. For example, a destination pattern including [^7] would not match any string beginning with 7.
  • Digit Stripping & Prefixes:
    By default, in POTS dial peers, the digits in dialed string that explicitly matched the destination pattern will be  stripped off, while matched dialed digits are still kept for VOIP dial peers.
    dial-peer voice xxx pots / voip
    destination-pattern 1234….T
    no digit-strip |  prefix 999 |
    forward-digits {all | 4 | extra }       //Only support on POST dial peer. last 4 digits forwarded.
  • Number Expansion: a globally applied configuration which allow you to prepend specific digits to dialed string or replace the dial number with another one. (number expansion is mainly for outbound calls while dialplan-pattern is primarily for Inbound calls).
    num-exp 2… 5552…
    num-exp 1234 9876543

Translation Rules:

to be continue