Jalson International Inc.
  • Home
  • Services
    • Managed Services
    • Consulting and Professional Services
  • Contact
  • Blog

Digit Manipulation on Cisco IOS

3/28/2017

2 Comments

 
With digit manipulation on IOS, keep a few things in mind:
1.  / -- /    - It always starts with / and ends with /
2. Anything within parenthesis would be kept.
 characters are keep are like (a\)
 characters to ignore are like b\
 \1 copy the first set into the replacement number, \2 copy the second set into the replacement number, etc 
 
3. The following represents the digits/characters:
 . : Any single digit
 0 to 9,*,# : Any specific character
 [0-9] : Any range or sequence of characters
 * : Modifier—match none or more occurrences
 + : Modifier—match one or more occurrences
 ? : Modifier—match none or one occurrence

Look at the following examples. This should clarify:

Examples:

Example 1:
voice translation-rule 1
 rule 1 /123/ /456/

Will match and modify 123 anywhere in the pattern:

router#test voice translation-rule 1 123
Matched with rule 1
Original number: 123    Translated number: 456

router#test voice translation-rule 1 1234
Matched with rule 1
Original number: 1234   Translated number: 4564

router#test voice translation-rule 1 6123
Matched with rule 1
Original number: 6123   Translated number: 6456
router#test voice translation-rule 1 6123123
Matched with rule 1
Original number: 6123123        Translated number: 6456123

Example 2:
voice translation-rule 1
 rule 1 /^123/ /456/  
 
Will match only if the pattern start with 123 because carrot '^' is the starting character

router#test voice translation-rule 1 123 
Matched with rule 1
Original number: 123    Translated number: 456

router#test voice translation-rule 1 1234
Matched with rule 1
Original number: 1234   Translated number: 4564

router#test voice translation-rule 1 6123
6123 Didn't match with any of rules 

Example 3: 
voice translation-rule 1
 rule 1 /^123$/ /456/

Will only match if the pattern starts if its 123 exacly. Nothing after, nothing before.
 
router#test voice translation-rule 1 123 
Matched with rule 1
Original number: 123    Translated number: 456

router#test voice translation-rule 1 1234
1234 Didn't match with any of rules

router#test voice translation-rule 1 6123
6123 Didn't match with any of rules


Example 4:

voice translation-rule 1
 rule 1 /^40.../ /6666000/
 
Will match pattern starting with 40 and any 3 digits afterwards

router#test voice translation-rule 1 40123
Matched with rule 1
Original number: 40123    Translated number: 6666000

Example 5:

voice translation-rule 2
 rule 1 /.*/ /5554000/
 
Will replace any pattern with 555400

router#test voice translation-rule 2 123
Matched with rule 1
Original number: 123    Translated number: 5554000

router#test voice translation-rule 2 86573
Matched with rule 1
Original number: 86573  Translated number: 5554000

router#test voice translation-rule 2 ""
Matched with rule 1
Original number:   Translated number: 5554000

Example 6:

voice translation-rule 1
 rule 1 /^\(12\)3\(45\)$/ /6\1\2/

Set 1: 12
Set 2: 45
Ignore: 3

router#test voice translation-rule 1 12345
Matched with rule 1
Original number: 12345        Translated number: 61245

Example 7:

voice translation-rule 10
 rule 1 /\(32..\)$/ /416555\1/
 
Will replace 32xx to 41655532xx (used for outbound caller ID)

router#test voice translation-rule 10 3200
Matched with rule 10
Original number: 3200  Translated number: 4165553200

Example 8:

voice translation-rule 10
 rule 1 /^416555\(32..\)$/ /\1/
 
Will replace 4165553211 to 3211 (used for inbound caller ID)

router#test voice translation-rule 10 4165553211
Matched with rule 10
Original number: 4165553211  Translated number: 3211

Example 9:

voice translation-rule 7
 rule 1 /^4/ /904/ type national national
 rule 2 /^4/ /9004/ type international international
 
If number starts with 4 and type is National, it would be prefixed 90 and type will remain National
If number starts with 4 and type is International, it would be prefixed 900 and type remain International
 
router#test voice translation-rule 7 493456567 type national
Matched with rule 1
Original number: 493456567      Translated number: 90493456567
Original number type: national  Translated number type: national
Original number plan: none      Translated number plan: none
    
router#test voice translation-rule 7 493456567 type international
Matched with rule 2
Original number: 493456567              Translated number: 900493456567
Original number type: international     Translated number type: international
Original number plan: none              Translated number plan: none
 
Example 10:

voice translation-rule 8 
 rule 1 /^2\(...$\)/ /01779345\1/ type unknown national plan unknown isdn
 
This rule matches any four-digit number that starts with "2". The rule removes the "2", adds the number "01779345" as a prefix, and sets the plan to "isdn" and the type to "national".
 
router#test voice translation-rule 8 2001 type unknown plan unknown 
Matched with rule 1
Original number: 2001   Translated number: 01779345001
Original number type: unknown   Translated number type: national
Original number plan: unknown   Translated number plan: isdn 
 

 
POTS Dial-Peers
---------------

dial-peer 911 pots
 destination-pattern 911$ !Anything that is explicitly matched on POTS dial-peer is removed. This isn't true for VOIP. VOIP Dial-peer doesn't remove anything thats explicity matched.
 no digit strip <OR> prefix 911 <OR> forward-digits 3
 port 0/0/0:23 
 
dial-peer 9 pots
 destination-pattern 9[2-9]XX[2-9]XXXXXX$
 port 0/0/0:23
 ! no need for any prefix or any forward digits as only number explicitly matched is 9 which we want removed as its our PSTN code.
 
dial-peer 91 pots
 destination-pattern  91[2-9]XX[2-9]XXXXXX$
 prefix 1 <OR> forward-digits 11 ! 1 is being explicitly matched and we want it to go out as its our long distance code used by the PSTN.
 port 0/0/0:23
 
dial-peer 9011 pots
 destination-pattern 9011T ! no need for #. It would be automatically matched because of the next dial-peer.
 prefix 011 ! can't use forward-digits as we don't know the extension length that would be dialed. 
 port 0/0/0:23
 
dial-peer terminator # ! Its a default command and any call with # is already a terminator for interdigit timeout, unless its changed by someone.

Note: On CUCM, in Service Parameters "Strip # Sign from Called Party Number" is "True" by Default - Meaning it would remove # as the trailing number.


dial-peer 1 pots
 incoming called-number . ! will match incoming calls
 
dial-peer 2 voip
 destination-pattern 2...$
 session target ipv4:10.1.1.2 ! CUCM IP
 dtmf-relay h245-signal
 
dial-peer 3 voip
 incoming called-number .


Overlap Sending <-- SCCP works this way - one digit at a time.
En-Bloc <-- CUCM works this way.

A good document which I consulted when working on this post:
​http://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/61083-voice-transla-rules.html
2 Comments

Configuring Extension Mobility (EM) on CUCM

3/24/2017

0 Comments

 
1. ENABLING THE SERVICE

GO to Cisco Unified Serviceability, Tools --> Service Activation.
Make sure Cisco Extension Mobility service is enabled. If not enabled, enable it.

2. CREATING THE SERVICE

a. GO to CUCM Administration, Device --> Device Settings --> Phone Services.
b. Add new. Enter the name such as EM or Extension Mobilty
c. Enter the URL: URL: http://<CUCM IP>:8080/emapp/EMAppServlet?device=#DEVICENAME#
d. Choose XML Service and Standard IP Phone Service as the Service Category and Service Type respectively.
e. Click Save.

3. CONFIGURING PHONES

a. Go to Device --> Phone, open the phone where you want to enable the service.
b. Related links on top of the page, select Subscribe/Unsubscribe Services and click GO.
c. Select the service created on CREATING THE SERVICE above.
d. Subscribe and Save. 
e. Make sure 'Enable Extension Mobility' is checked on the Phone.

NOW PHONES HAVE SERVICE ENABLED, BUT USERS ARE STILL NOT ENABLED FOR EM. NOW LETS ENABLE USERS

4. CONFIGURING USER DEVICE PROFILE (UDP)

a. GO to Device --> Device Settings --> Device Profile
b. Add New
c. Select Phone type (according to the phone type where the user will log into)
d. Select Device Protocol <-- You will only be presented with the Protocl option if the Phone is question supports both SIP and SCCP.
e. Select a name: such as "User1" and fill in all required fields <-- Most of these options are similar to creating a phone - only difference is there is no MAC Address option here.
f. Related links on top of the page, select Subscribe/Unsubscribe Services and click GO.
g. Select the service created on CREATING THE SERVICE above.
h. Click on 'Line [1] - Add a new DN' and enter line information (just like you would do on an IP Phone)
i. Click Save.

5. CONFIGURING USERS

a. Go to User Management --> End Users
b. Open an existing user or create a new one.
c. Make sure userid, password, pin, and phone number are configured.
d. Also under 'Extension Mobility' select "User1" (or whichever user was created on CONFIGURING USER DEVICE PROFILE) and move it down to the controlled profiles section. 
0 Comments

Difference between JTAPI and AXL

3/20/2017

0 Comments

 
JTAPI stands for Java Telephony API. It was developed by Java for Computer Telephony Applications or CTIs. It provides a set of packages which provides basic guidelines for placing, answering and dropping a call. JTAPI is similar to TAPI (Telephony API) which was developed by Microsoft and Intel.

AXL stands for Administrative XML. AXL is used for pushing config on another system.

When integrating another system with CUCM (for example UCCX), JTAPI is used for CTI (placing call, ending call), and AXL is used to push the config onto CUCM.
0 Comments

Configuring Standard Local Route Group (SLRG) on CUCM

3/14/2017

0 Comments

 
a.   Create a Gateway (MGCP/H323) or SIP Trunk (SIP Gateway)   
b.   Create Route Group (RG), add the above created Gateway/SIP Trunk
c.   Create Route List (RL) --> Select "Standard Local Route Group" for Route Group 
c.   Create Route Pattern (RP) - for example 911 --> Select the RL (as created in step c)
d.   Device Pool --> Select Local Route Group (as created in step b)
0 Comments

Difference between CTI Route Point and CTI Port

3/9/2017

0 Comments

 
In CUCM CTI Route Points and CTI Ports are often used interchangeably. 
However there is a difference.
  • CTI Route Points are just used to redirect the calls but cannot terminate media.
  • CTI Ports can terminate media.
Just as the name says, Route Points are used to route - in other words redirect.
Most IVR based applications on CUCM however use CTI Ports to enable Post Routing capabilities.
0 Comments

CUCM Directory Integration in a Multi-Forest Environment

3/6/2017

1 Comment

 
Directory Integration with a Multi-Forest Environment is supported in CUCM through Active Directory Light Weight Directory Service (AD LDS).
Once AD LDS is configured, the configuration on Cisco side is very similar to doing a regular LDAP integration on CUCM.
AD LDS runs as a service on one of the Domain Controllers. In the picture below, the AD LDS could be installed on any of the DCs as long as that DC can speak to the other DCs.
A good configuration guide can be found here:
https://supportforums.cisco.com/document/63136/how-configure-unified-communication-manager-directory-integration-multi-forest

Picture
1 Comment

Cisco IOS Voice Dial-Peers Example

3/5/2017

0 Comments

 
This is an example of Dial-Peers how they are configured on an Cisco IOS Gateway which is registered to CUCM.

A rule of thumb, each call has two call-legs, hence two dial-peer have to be matched with incoming and outgoing call.

! This example assumes that PRI is being used for PSTN calls. If SIP is the service used, it would be similar dial-peers but voip and some other changes like dtmf, destination IPv4, etc.


Inbound from PSTN (Dial-peers 1 and 2 below - 2 call legs)

! Incoming Dial-Peer to receive calls from outside PSTN.

dial-peer 1 pots
 incoming called-number .  ! '.' will match any digit and any preceding digits. If this was a .$ then only one digit would be matched
​ direct-inward-dial

! Other leg of the incoming call going towards CUCM
! This dial-plan assumes that telco send 4 digit calls to the customer in the format 2XXX.
​
dial-peer 2 voip
 destination-pattern 2...$
 session target ipv4:10.1.1.2 ! CUCM IP
 dtmf-relay h245-signal

Outbound from CUCM to PSTN (Dial-peers 3 to recieve calls from CUCM and rest of dial-peers to send to PSTN - 2 call legs)

! Incoming Dial-Peer to receive calls from CUCM. 

dial-peer 3 voip
 incoming called-number .

 session target ipv4:10.1.1.2 ! CUCM IP
 dtmf-relay h245-signal

! For emergency calls

! Other leg of the outgoing call going towards PSTN - based on the number dialed. One of these will be used to call PSTN.

dial-peer 911 pots
 destination-pattern 911$ 
 no digit strip <OR> prefix 911 <OR> forward-digits 3 !Anything that is explicitly matched on POTS dial-peer is removed.     ! This isn't true for VOIP. VOIP Dial-peer doesn't remove anything that is explicitly matched.
 port 0/0/0:23 
 
! 10 digit North American calls

dial-peer 9 pots
 destination-pattern 9[2-9]XX[2-9]XXXXXX$
 port 0/0/0:23
 ! no need for any prefix or any forward digits as only number explicitly matched is 9 which we want removed as its our      ! PSTN code.
 
! 11 digit North American Long Distance calls

dial-peer 91 pots
 destination-pattern  91[2-9]XX[2-9]XXXXXX$
 prefix 1 <OR> forward-digits 11 ! 1 is being explicitly matched and we want it to go out as its our long distance code used by the PSTN.
 port 0/0/0:23

! International Calls
 
dial-peer 9011 pots
 destination-pattern 9011T ! International calls dialed with # in the end would be matched too. It would be automatically matched because of the next dial-peer. Next dial-peer is default so it isn't visible in the config.
 prefix 011 ! can't use forward-digits as we don't know the extension length that would be dialed. 
 port 0/0/0:23
 
dial-peer terminator # ! Its a default command and any call with # is already a terminator for interdigit timeout, unless changed by someone.

Note: On CUCM, in Service Parameters "Strip # Sign from Called Party Number" is "True" by Default - Meaning it would remove # as the trailing number.
0 Comments

    Author

    Saad is a Senior Consultant for Jalson International. He is CCIE x 3 (Collaboration, R&S and Data Center)
    ​

    Picture

    Categories

    All
    Cisco
    Collaboration
    IOS
    Microsoft
    Virtualization

    Archives

    June 2020
    July 2018
    April 2018
    March 2018
    January 2018
    April 2017
    March 2017
    February 2017

    RSS Feed

©2020 Jalson International, Inc.
All RIghts Reserved
  • Home
  • Services
    • Managed Services
    • Consulting and Professional Services
  • Contact
  • Blog