Showing posts from August, 2013

IOS Tip: %Error deleting flash0:xxxx (Can't delete a directory that has files in it)

Have you seen this error before? Cisco IOS doesn't allow deletion of directories which contain sub-directories/files. This won't work with "delete" or "rmdir" command.

2951-router#delete /force flash0:CME9.1.0GUI
%Error deleting flash0:CME9.1.0GUI (Can't delete a directory that has files in it)

To make it working, you need to use "/recursive" keyword with "delete" command. It will start deleting using bottom-top approach from most deeper file in reverse direction..

2951-router#delete /force /recursive flash0:CME9.1.0GUI

IOS Tip: How to Move Directories within IOS Flash Memory

Have you ever uploaded a directory to Router Flash Memory (e.g. CME GUI Dir) and found that it was uploaded to wrong path? How to move it back to right path?

Let's consider a directory named CME9.1.0GUI. I wanted to upload it to "flash0:/" however, I discovered that its uploaded to "flash0:phone_loads/".

One option to put it back in the right path is to delete the directory from the wrong path and re-upload it. This can be easy when uploading from LAN or small directories over WAN. But not for big directories over WAN.

Another option is to use "rename" command. When you rename the directory, it will ask for the destination path of the renamed directory. This means that "rename" command is doing two functions which are copying the directory to new path and renaming it.

2951-router#rename flash0:phone_loads/CME9.1.0GUI flash0:CME9.1.0GUI        
Destination filename [CME9.1.0GUI]?

Directory of flash0:/

    1  -rw-    89934456  Ma…

Design Question: "dialplan-pattern" or "voice translation rule" ???

No doubt that voice translation rules are very powerful and provide many advantages in addition to digit manipulation. But let's consider a common scenario where you have CME and would like to convert extensions to E164 numbers for PSTN dialing.

One of the common ways to do this using "dialplan-pattern" command in CME. This is usually preferred over voice translation rules due to simplicity. Single command instead of voice-rule, voice-profile, assign profile to dial-peer or voice-port.

From design perspective, it is very dangerous to use "dialplan-pattern" feature. In fact I would say never use this feature. Let's look deeper.

The way how "dialplan-pattern" works that it will create an additional dial-peer for each Ephone-DN with destenation pattern as E164 number. For example, if you added a DN with number 6004 and your expansion pattern is 789.... , CME will create two virtual-dialpeers for numbers 6004 and 7896004 (you can see this using "…