Phone Number Conversion

This topic describes how to automatically convert the synchronized extension of LDAP users.

  • This example imports only the last four digits of the telephone number.
  • Use a regular expression to convert the phone number.
Regular Expression Replacement Example Conversion
(.*) $1 Use the LDAP phone number as the Connection extension.
.*(\d{4}) $1 Use the last four digits of the LDAP phone number as the Connection extension.
(\d{4}).* $1 Use the first four digits of the LDAP phone number as the Connection extension.
.*(\d{4}) 9$1 Append a 9 to the left of the last four digits of the LDAP phone number.

If you want to map phone numbers in the LDAP directory to extensions in Cisco Unity Connection but the phone numbers do not match the extensions, you can add a regular expression and a replacement pattern that together convert the phone numbers into extensions:

  • The regular expression determines which phone numbers to operate on (for example, phone numbers that are 10 digits long) and the portion of the phone numbers to use as a basis for the extensions (for example, the last four digits).
  • The replacement pattern specifies to use either the values chosen by the regular expression or to perform additional operations (for example, prepend a 9).

Cisco Unity Connection uses the regular expression package of the Java library. The table in the figure lists some examples of the conversions that are possible with the expanded functionality.

Note the following:

  • Cisco Unity Connection automatically removes nonnumeric characters from the phone number, so the regular expression does not need to account for nonnumeric characters.
  • LDAP phone numbers are converted to Cisco Unity Connection extensions only once, when you first synchronize Cisco Unity Connection data with LDAP data. On subsequent, scheduled synchronizations, values in the Cisco Unity Connection Extension field are not updated with changes to the LDAP phone number. As a result, you can change the LDAP phone number as required, including specifying a completely different number, and the extension will not be overwritten the next time that Cisco Unity Connection synchronizes data with the LDAP directory.
  • You can often write more than one combination of a regular expression and a replacement pattern that produces the same result.
Advertisements

Author: drbabbers

ccieme.wordpress.com - my personal journey to ccie