The dial plan settings (<dialplan> or <dial-plan> tag) contain the global dial plan parameters. For further description please see the detailed XML dial plan feature description.
Index:
The XML Dial plan can be placed either inside the <settings> tag
<?xml version="1.0" encoding="utf-8" ?> <settings> <phone-settings></phone-settings> <functionKeys></functionKeys> <tbook></tbook> <uploads></uploads> <certificates></certificates> <dialplan e="2"> <!--Example North American Dialplan--> <TEMPLATE MATCH="0" Timeout="1" User="Phone"/> <TEMPLATE MATCH="9,011*" Timeout="6" User="Phone"/> <TEMPLATE MATCH="9,0" Timeout="1" User="Phone"/> <TEMPLATE MATCH="9,11" Timeout="0" User="Phone" Rewrite="9911"/> <TEMPLATE MATCH="9,.11" Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,101..............." Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,10.............." Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,10*" Timeout="6" User="Phone"/> <TEMPLATE MATCH="9,1.........." Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,......." Timeout="0" User="Phone"/> <TEMPLATE MATCH="*" Timeout="15"/> </dialplan> </settings> |
or as an individual XML file whose URL is listed inside <setting-files> tag:
<?xml version="1.0" encoding="utf-8"?> <dialplan e="2"> <!--Example North American Dialplan--> <TEMPLATE MATCH="0" Timeout="1" User="Phone"/> <TEMPLATE MATCH="9,011*" Timeout="6" User="Phone"/> <TEMPLATE MATCH="9,0" Timeout="1" User="Phone"/> <TEMPLATE MATCH="9,11" Timeout="0" User="Phone" Rewrite="9911"/> <TEMPLATE MATCH="9,.11" Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,101..............." Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,10.............." Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,10*" Timeout="6" User="Phone"/> <TEMPLATE MATCH="9,1.........." Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,......." Timeout="0" User="Phone"/> <TEMPLATE MATCH="*" Timeout="15"/> </dialplan> |
The following attributes are allowed:
If desired, specify at the end of each string where the comment defines the type of plan (for example, Long Distance or Corporate Dial Plan).
Special note on the dialplan nomenclature:
<?xml version="1.0" encoding="utf-8"?> <dialplan> <template match="0" timeout="4" scheme="sip" user="phone" rewrite="" /> <template match="00" timeout="0" scheme="sip" user="phone" rewrite="" /> <template match="011............" timeout="4" scheme="sip" user="phone" rewrite="" /> <template match="*79" timeout="0" scheme="sip" user="phone" rewrite="" /> <template match="*234" timeout="0" scheme="sip" user="phone" rewrite="" /> <template match="9,......." timeout="0" scheme="sip" user="phone" rewrite="" /> <template match="424#" timeout="0" scheme="sip" user="phone" rewrite="" /> <template match="...#" timeout="0" scheme="sip" user="phone" rewrite="" /> <template match="[7-9].." timeout="0" scheme="sip" user="phone" rewrite="" /> <template match="*[5-7][1-9]" timeout="0" scheme="sip" user="phone" rewrite="" /> </dialplan> |
<dialplan> <TEMPLATE MATCH="0" Timeout="1" User="Phone"/> <TEMPLATE MATCH="9,011*" Timeout="6" User="Phone"/> <TEMPLATE MATCH="9,0" Timeout="1" User="Phone"/> <TEMPLATE MATCH="9,11" Timeout="0" User="Phone" Rewrite="9911"/> <TEMPLATE MATCH="9,.11" Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,101..............." Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,10.............." Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,10*" Timeout="6" User="Phone"/> <TEMPLATE MATCH="9,1.........." Timeout="0" User="Phone"/> <TEMPLATE MATCH="9,......." Timeout="0" User="Phone"/> <TEMPLATE MATCH="*" Timeout="15"/> </dialplan> |
<?xml version="1.0" encoding="utf-8"?> <dialplan> <Title>US Asterisk</Title> <TEMPLATE MATCH="25." Timeout="0" Scheme="sip" User="Phone" Rewrite="252" /> <!-- test dp--> <TEMPLATE MATCH="\*.." Timeout="0" Scheme="sip" User="Phone" /> <!-- Feature Access--> <TEMPLATE MATCH="9,763......." Timeout="0" Scheme="sips" User="Phone" Rewrite="763......." /> <!-- Local 10 digit--> <TEMPLATE MATCH="9,612......." Timeout="0" User="Phone" Rewrite="612......." /> <!-- Local 10 digit--> <TEMPLATE MATCH="9,651......." Timeout="0" User="Phone" Rewrite="651......." /> <!-- Local 10 digit--> <TEMPLATE MATCH="9,952......." Timeout="0" User="Phone" Rewrite="952......." /> <!-- Local 10 digit--> <TEMPLATE MATCH="9,0" Timeout="3" User="Phone" Rewrite="0" /> <!-- Local operator--> <TEMPLATE MATCH="9,00" Timeout="0" User="Phone" Rewrite="00" /> <!-- LD Operator--> <TEMPLATE MATCH="9,01*" Timeout="3" User="Phone" Rewrite="01%1" /> <!-- International calls--> <TEMPLATE MATCH="9,011*" Timeout="3" User="Phone" Rewrite="011%1" /> <!-- International calls--> <TEMPLATE MATCH="9,0.........." Timeout="0" User="Phone" Rewrite="0.........." /> <!-- Operator assisted--> <TEMPLATE MATCH="9,.11" Timeout="0" Scheme="tel" User="Phone" Rewrite=".11" /> <!-- Service numbers --> <TEMPLATE MATCH="9,101....1.........." Timeout="0" User="Phone" Rewrite="101....1.........." /> <!-- Equal Access Service--> <TEMPLATE MATCH="9,101....0.........." Timeout="0" User="Phone" Rewrite="101....0.........." /> <!-- Equal Access Service--> <TEMPLATE MATCH="9,1.........." Timeout="0" User="Phone" Rewrite="1.........." /> <!-- Long Distance--> <TEMPLATE MATCH="9,......." Timeout="0" User="Phone" Rewrite="612......." /> <!-- 7 Digit Dialing--> <TEMPLATE MATCH="7.." Timeout="3" User="Phone" /> <!-- Call Parking--> <TEMPLATE MATCH="1." Timeout="5" User="Phone" Rewrite="612548561." /> <!-- Extension Dialing--> <TEMPLATE MATCH="611" Timeout="0" User="Phone" Rewrite="6519990888" /> <!-- Sound Choice Comm Help --> <TEMPLATE MATCH="*" Timeout="15" /> <!-- Insert prefix --> <TEMPLATE MATCH="9,......." Timeout="0" User="Phone" Rewrite="......." Insert="612" /> <!-- Rewrite the string and insert the prefix --> <TEMPLATE MATCH="914" Timeout="0" Rewrite="925" Insert="888"/> <!-- Only insert prefix --> <TEMPLATE MATCH="914" Timeout="0" Insert="888"/> <!-- Anything else --> </dialplan> |