SIP Dial Plan and KPML

By Vik Malhi on March 12th, 2009

The behavior of 79XX IP phones using SIP and SCCP firmware is somewhat different when a user goes off-hook and begins to dial the digits of the intended Called Party. When SCCP is used as the protocol, UCM/UCME collects each digit that the user enters on the keypad of the phone in the StationInit message that the phone sends. Digit analysis takes place by UCM/UCME in real-time as each digit is being received until the point when there is only one possible match or outcome. The UCM/UCME comes to the conclusion that there is only one potential match and the call is routed to the Device/Route List that has the matched number assigned. In the case of UCME this would be a destination-pattern within a dial-peer.

The benefit of using the method described above is that providing the dial plan has been designed correctly and there is no overlap in Directory Numbers and Route Patterns configured, the call is routed immediately after the caller has dialed the final digit. The only instance of callers having to wait for the inter-digit timer (T302- default 15 seconds) to expire is when the caller dials an international number since each country uses a variable number of digits as part of the telephone number. For this reason the “#” character is used as a terminator to inform UCM/UCME that the caller has completed dialing. Callers can avoid the inter-digit timeout if they enter the “#” character after dialing the international number.

Digit collection when SIP phones are used can be done in one of two ways. The first method is very similar to the process used with SCCP in that UCM/UCME collects each digit as the caller enters them on the keypad of the phone. Analysis takes places in real-time and the call is routed when the search has been narrowed down to one match. The method to support this behavior in SIP is called KeyPad Markup Language (KPML). Instead of using SCCP StationInit messages, SIP NOTIFY messages are used to carry the dialed digits from the phone to the server. KPML is supported on Cisco Unified IP Phones 7911G, 7941G, 7941GE, 7961G, 7961GE, 7970G, and 7971GE. Devices that use KPML are known as Type-B SIP phones. The benefit of using KPML (or SCCP) is that the user simply needs to enter the dialed digits and the call is routed. If the calls dials an invalid digit which rules out all possible matches in UCM/UCME, the caller will immediately receive the reorder tone (or error message). For example if only extension numbers 1000-1099 has been provision and the caller dials “1-1-0-0” then the caller will hear the reorder tone (or message) after dialing the second “1” since there is no match. There is never a need to dial the “#” key unless dialing internationally.

Phones that support KPML are automatically enabled for KPML. No configuration on the UCM/UCME is necessary for these devices to support KPML. It also must be stated that KPML is not supported on phones in SRST.

Type-A SIP phones use an entirely different method to the one used by SCCP and Type-B SIP phones. Each digit that is entered onto the keypad of the phone by the caller is NOT sent to the UCM/UCME in real-time. The phone collects all digits and the call is only ever routed to the server when the caller presses the “#” terminator or the “Dial” softkey. If the caller fails to enter “#” or the “Dial” softkey, that particular call is susceptible to the inter-digit timeout. However, when the user presses the “Redial” softkey there is no timeout.

To avoid the need for callers to enter the “#” or “Dial” softkey, SIP Dial Rules on UCM and SIP Dial Plans on UCME can be configured. This allows the phone to download a dial plan file from the TFTP server when the phone boots. This file, called dialplan.xml, is created on the TFTP server when SIP Dial Rules on UCM and Voice Register Dialplan on UCME have been configured. The phone will download dialplan.xml when the phone in question has been assigned the SIP Dial Rule/Voice Register Dialplan and has subsequently been reset. This method of using dial plans downloaded to the phone is indeed the best practice since there is a reduced burden on the server and offers a more scalable solution.

When a caller enters the dialed digits on the keypad, the phone analyzes the dialed digits and compares them with the strings contained within the dialplan.xml file stored locally on the phone. Once there is a match, and the timeout is set to 0 (the timeout for each string is part of the dialplan.xml file) the phone sends a SIP INVITE message, which contains the entire Called Party Number, to the server. If the dialed number does not match any of the strings contained within the diaplan.xml file, the call will only be routed when the inter-digit timeout expires (or the caller presses “#” of “Dial”). If a dialplan.xml file is downloaded to a phone that supports KPML, KPML is disabled and the phone will behave in the same way as a Type-A SIP Phone. A hybrid of using KPML and Dial Rules is not supported and SIP Dial Rules/Dial Plan will always take priority over KPML. The exception to this statement is when UCME is used and the last statement within the dialplan contains a dial pattern with a single wildcard character (.) as the last pattern in the dial plan. For example:

voice register dialplan 1
type 7940-7960-others
pattern 1 1…
pattern 2 91……….
pattern 3 .

In the UCME dialplan configured above, if the caller dials a number which does not match either of the first two strings, then the third string will match and KPML will be invoked for phones that support KPML!!

SIP Dial Plan and KPML, 3.7 out of 5 based on 3 ratings
Be Sociable, Share!

    Tags: CCIE, CCIE Training, ccie voice, ccie voice lab, CCIE Voice Training, keypad markup language, KPML, SIP Dial Plan, sip dial rule, type-a sip, type-b sip, voice register dialplan

    6 Responses to “SIP Dial Plan and KPML”

    1. Erik Peterson says:

      As I understand it the 79×1 phones will use kpml during SRST, at least in more recent versions of IOS:

      http://www.cisco.com/en/US/docs/voice_ip_comm/cusrst/admin/sipsrst/configuration/guide/spsrst0.html#wp1020012

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
    2. Erik Peterson says:

      As I understand it the 79×1 phones will use kpml during SRST, at least in more recent versions of IOS:

      http://www.cisco.com/en/US/docs/voice_ip_comm/cusrst/admin/sipsrst/configuration/guide/spsrst0.html#wp1020012

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
    3. Vik Malhi says:

      Erik,

      Yep- it’s creating SIP dial plans that is not supported in SRST- I said KPML is not supported but I should have said configuring a new SIP dialplan is not supported…

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
    4. Vik Malhi says:

      Erik,

      Yep- it’s creating SIP dial plans that is not supported in SRST- I said KPML is not supported but I should have said configuring a new SIP dialplan is not supported…

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
    5. Jonny J Vegas says:

      Good post Mr Malhi.
      Any chance you can package up these sort of updates and send out by email periodically?

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
    6. Jonny J Vegas says:

      Good post Mr Malhi.
      Any chance you can package up these sort of updates and send out by email periodically?

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)

    Leave a Reply