United Kingdom Dial Plan XML for Cisco Phones

United Kingdom Dial Plan XML for Cisco Phones

Being too cheap to pay for the Cisco support contract for our Cisco 7961 series phones and thus not being able to download the dialplan.xml, we’ve constructed one based on this Wikipedia page. The UK telephone numbering plan is seemingly moderately complex and not entirely possible to make a perfect dialplan from. For example, you can have 10 and 11 digit 0800 numbers meaning that the 10 digit ones will have to wait on the timeout of the “Anything else” rule.

The below UK dialplan.xml is tested and shown to work though tweaks and corrections are definitely welcome.

  1. <DIALTEMPLATE>
  2. <TEMPLATE MATCH="999" Timeout="0"/> <!-- Emergency -->
  3. <TEMPLATE MATCH="112" Timeout="0"/> <!-- Emergency -->
  4. <TEMPLATE MATCH="101" Timeout="0"/> <!-- Almost an Emergency -->
  5.  
  6. <TEMPLATE MATCH="100" Timeout="0"/> <!-- Operator -->
  7. <TEMPLATE MATCH="155" Timeout="0"/> <!-- International Operator -->
  8. <TEMPLATE MATCH="123" Timeout="0"/> <!-- Speaking Clock -->
  9.  
  10. <TEMPLATE MATCH="118..." Timeout="0"/> <!-- Men with moustaches et al -->
  11. <TEMPLATE MATCH="116..." Timeout="0"/> <!-- Pan-European Social Help -->
  12.  
  13. <TEMPLATE MATCH="08001111" Timeout="0"/> <!-- Childline. lol -->
  14. <TEMPLATE MATCH="0845464." Timeout="0"/> <!-- NHS Direct et al -->
  15. <TEMPLATE MATCH="0500......" Timeout="0"/> <!-- Apparently 0500 is always 10 digits -->
  16.  
  17. <!-- Uncomment if you care about this one. Worst case, you'll wait 5 seconds -->
  18. <!-- <TEMPLATE MATCH="016977...." Timeout="0"/> --> <!-- Brampton, Carlisle. Also 10 digits -->
  19.  
  20. <TEMPLATE MATCH="00*" Timeout="5"/> <!-- International, 00 prefixed. No fixed length -->
  21. <TEMPLATE MATCH="0.........." Timeout="0"/> <!-- UK 11 digit, 0 prefixed -->
  22.  
  23. <TEMPLATE MATCH="\*.." Timeout="0"/> <!-- Asterisk *.. codes -->
  24.  
  25. <TEMPLATE MATCH="1.." Timeout="0"/> <!-- 1 prefixed 3 digit (internal extensions) -->
  26. <TEMPLATE MATCH="2.." Timeout="0"/> <!-- 2 prefixed 3 digit (internal extensions) -->
  27. <TEMPLATE MATCH="3.." Timeout="0"/> <!-- 3 prefixed 3 digit (internal extensions) -->
  28. <TEMPLATE MATCH="4.." Timeout="0"/> <!-- 4 prefixed 3 digit (internal extensions) -->
  29. <TEMPLATE MATCH="5.." Timeout="0"/> <!-- 5 prefixed 3 digit (internal extensions) -->
  30. <TEMPLATE MATCH="6.." Timeout="0"/> <!-- 6 prefixed 3 digit (internal extensions) -->
  31. <TEMPLATE MATCH="7.." Timeout="0"/> <!-- 7 prefixed 3 digit (internal extensions) -->
  32. <TEMPLATE MATCH="8.." Timeout="0"/> <!-- 8 prefixed 3 digit (internal extensions) -->
  33. <TEMPLATE MATCH="9.." Timeout="0"/> <!-- 9 prefixed 3 digit (internal extensions) -->
  34.  
  35. <TEMPLATE MATCH="*" Timeout="5"/> <!-- Anything else -->
  36. </DIALTEMPLATE>

 

You can also get it at dialplan.xml.

 

 

 

6 comments

  1. Hello!!

    Can this be used in Elastix / FreePBX, if so how?

    I’m new to all this and having problems understanding dial plans, so I’m kind of wondering if I can just import this and solve my problem.

    I’m using Elastix with Cisco SPA303 handsets, any ideas?

  2. This dial plan is for the Cisco phone itself. It’s loaded onto the phone by putting a dialplan.xml in the TFTP root.

    The behaviour of these phones is to wait until a dial plan rule has been met before sending the call request to the PBX (Asterisk in your case). Worst case, it’ll use the last rule and wait 5 seconds from the last key press before dialling. This dial plan just increases the efficiency of dialling by sending when a valid number is entered.

    • Hi Phil… Ref Elastix & FreePBX

      What goes in between my stars below for calling numbers in the UK, immediate text below is for the trunk settings. I’m calling from a number that looks like this 020-xxx-xxxxx and I need to be able to call all UK land-line and mobiles?

      (*prepend*) + *prefix* | *match pattern*

      Dial Rules Wizard: (pick one)
      Outbound Dial Prefix: 9

      Also,same applies to my OUTBOUND RULE’s; what do i need to add to the OUTBOUND RULES section, again if I’m calling from a number that looks like this 020-xxx-xxxxx and I need to be able to call all UK land-line and mobiles.

      “Dial Patterns that will use this Route section”

      (*prepend*) + *prefix* |[ *match pattern* / Callerid]
      Dial Patterns Wizards: (pick one)

      Any suggestions please….??

      • Both are very simple configs in our FreePBX. Outbound just has a single . in “Match Pattern”. “Prepend”, “Prefix” and “Called ID” are all blank.

        Inbound can be all empty except “Description” and a selection of where the calls should go to – whether it be an extension or ring group.

  3. You also need to add NHS 111 to the list of short codes.

    The first 18 versions of the Cisco dial plan contained a large number of errors. These are detailed here:
    http://supportforums.cisco.com/thread/2171992
    http://www.aa-asterisk.org.uk/index.php/Errors_in_Cisco_UK_Numbering_Plan_Documents

    The new version 28 is much better, but has a few new errors:
    http://supportforums.cisco.com/thread/2214042

    Many systems use the UK dial plan so there’s many details posted online, such as.
    http://github.com/floere/phony/blob/master/lib/phony/countries/united_kingdom.rb
    http://www.aa-asterisk.org.uk/index.php/Category:UK_Number_Plan
    http://www.aa-asterisk.org.uk/index.php/Number_format

    Local dialling isn’t detailed in many places, but these lists are complete:
    http://www.aa-asterisk.org.uk/index.php/Local_dialling_rules_for_GB_telephone_numbers
    http://github.com/g1smd/Local-Number-Format-44-GB

    Hope those help anyone else battling with this stuff.

  4. Thanks for this… I used it to sort out a mischevious 7971!! We were getting calls inbound, but not outbound!

Leave a Reply

Your email address will not be published. Required fields are marked *