summaryrefslogtreecommitdiff
path: root/phoneprov
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2008-01-09 21:37:26 +0000
committerTerry Wilson <twilson@digium.com>2008-01-09 21:37:26 +0000
commit3570ad103d9f37f60f2f1ac0e21bab02bd1051e7 (patch)
treea60d56d18dfd1b80f57e5bc99e3b1fc1c2999bfe /phoneprov
parent46f4c8946f54f5ab04921c1d08dd5b4c808bccff (diff)
Added a new module, res_phoneprov, which allows auto-provisioning of phones
based on configuration templates that use Asterisk dialplan function and variable substitution. It should be possible to create phone profiles and templates that work for the majority of phones provisioned over http. It is currently only intended to provision a single user account per phone. An example profile and set of templates for Polycom phones is provided. NOTE: Polycom firmware is not included, but should be placed in AST_DATA_DIR/phoneprov/configs to match up with the included templates. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'phoneprov')
-rw-r--r--phoneprov/000000000000-directory.xml6
-rw-r--r--phoneprov/000000000000-phone.cfg1
-rw-r--r--phoneprov/000000000000.cfg2
-rw-r--r--phoneprov/polycom.xml37
4 files changed, 46 insertions, 0 deletions
diff --git a/phoneprov/000000000000-directory.xml b/phoneprov/000000000000-directory.xml
new file mode 100644
index 000000000..a79e6eda0
--- /dev/null
+++ b/phoneprov/000000000000-directory.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" standalone="yes"?>
+<directory>
+ <item_list>
+ ${PP_EACH_USER(<item><fn>%{DISPLAY_NAME}</fn><ct>%{CALLERID}</ct><bw>1</bw></item>|${MAC})}
+ </item_list>
+</directory>
diff --git a/phoneprov/000000000000-phone.cfg b/phoneprov/000000000000-phone.cfg
new file mode 100644
index 000000000..c04a5cb00
--- /dev/null
+++ b/phoneprov/000000000000-phone.cfg
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="yes"?>
diff --git a/phoneprov/000000000000.cfg b/phoneprov/000000000000.cfg
new file mode 100644
index 000000000..a1377382e
--- /dev/null
+++ b/phoneprov/000000000000.cfg
@@ -0,0 +1,2 @@
+<?xml version="1.0" standalone="yes"?>
+ <APPLICATION APP_FILE_PATH="sip.ld" CONFIG_FILES="${IF($[${STAT(e|${CUSTOM_CONFIG})}] ? "custom.cfg, ")}config/${TOLOWER(${MAC})}, sip.cfg" MISC_FILES="" LOG_FILE_DIRECTORY=""/>
diff --git a/phoneprov/polycom.xml b/phoneprov/polycom.xml
new file mode 100644
index 000000000..05195a862
--- /dev/null
+++ b/phoneprov/polycom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<phone1>
+ <reg reg.1.displayName="${DISPLAY_NAME}" reg.1.address="${USERNAME}" reg.1.label="${LABEL}" reg.1.type="private" reg.1.thirdPartyName="" reg.1.auth.userId="${USERNAME}" reg.1.auth.password="${SECRET}" reg.1.server.1.address="${SERVER}" reg.1.server.1.port="${SERVER_PORT}" reg.1.server.1.transport="DNSnaptr" reg.1.server.1.expires="300" reg.1.server.1.register="1" reg.1.server.1.retryTimeOut="" reg.1.server.1.retryMaxCount="" reg.1.server.1.expires.lineSeize="" reg.1.acd-login-logout="0" reg.1.acd-agent-available="0" reg.1.ringType="2" reg.1.lineKeys="2" reg.1.callsPerLineKey="1"/>
+ <call>
+ <donotdisturb call.donotdisturb.perReg="1" />
+ <autoOffHook call.autoOffHook.1.enabled="0" call.autoOffHook.1.contact="" call.autoOffHook.2.enabled="0" call.autoOffHook.2.contact="" call.autoOffHook.3.enabled="0" call.autoOffHook.3.contact="" call.autoOffHook.4.enabled="0" call.autoOffHook.4.contact="" call.autoOffHook.5.enabled="0" call.autoOffHook.5.contact="" call.autoOffHook.6.enabled="0" call.autoOffHook.6.contact=""/>
+ <serverMissedCall call.serverMissedCall.1.enabled="0" call.serverMissedCall.2.enabled="0" call.serverMissedCall.3.enabled="0" call.serverMissedCall.4.enabled="0" call.serverMissedCall.5.enabled="0" call.serverMissedCall.6.enabled="0"/>
+ </call>
+ <divert divert.1.contact="" divert.1.autoOnSpecificCaller="1" divert.1.sharedDisabled="1" divert.2.contact="" divert.2.autoOnSpecificCaller="1" divert.2.sharedDisabled="1" divert.3.contact="" divert.3.autoOnSpecificCaller="1" divert.3.sharedDisabled="1" divert.4.contact="" divert.4.autoOnSpecificCaller="1" divert.4.sharedDisabled="1" divert.5.contact="" divert.5.autoOnSpecificCaller="1" divert.5.sharedDisabled="1" divert.6.contact="" divert.6.autoOnSpecificCaller="1" divert.6.sharedDisabled="1">
+ <fwd divert.fwd.1.enabled="1" divert.fwd.2.enabled="1" divert.fwd.3.enabled="1" divert.fwd.4.enabled="1" divert.fwd.5.enabled="1" divert.fwd.6.enabled="1"/>
+ <busy divert.busy.1.enabled="1" divert.busy.1.contact="" divert.busy.2.enabled="1" divert.busy.2.contact="" divert.busy.3.enabled="1" divert.busy.3.contact="" divert.busy.4.enabled="1" divert.busy.4.contact="" divert.busy.5.enabled="1" divert.busy.5.contact="" divert.busy.6.enabled="1" divert.busy.6.contact=""/>
+ <noanswer divert.noanswer.1.enabled="1" divert.noanswer.1.timeout="60" divert.noanswer.1.contact="" divert.noanswer.2.enabled="1" divert.noanswer.2.timeout="60" divert.noanswer.2.contact="" divert.noanswer.3.enabled="1" divert.noanswer.3.timeout="60" divert.noanswer.3.contact="" divert.noanswer.4.enabled="1" divert.noanswer.4.timeout="60" divert.noanswer.4.contact="" divert.noanswer.5.enabled="1" divert.noanswer.5.timeout="60" divert.noanswer.5.contact="" divert.noanswer.6.enabled="1" divert.noanswer.6.timeout="60" divert.noanswer.6.contact=""/>
+ <dnd divert.dnd.1.enabled="0" divert.dnd.1.contact="" divert.dnd.2.enabled="0" divert.dnd.2.contact="" divert.dnd.3.enabled="0" divert.dnd.3.contact="" divert.dnd.4.enabled="0" divert.dnd.4.contact="" divert.dnd.5.enabled="0" divert.dnd.5.contact="" divert.dnd.6.enabled="0" divert.dnd.6.contact=""/>
+ </divert>
+ <dialplan
+ dialplan.1.impossibleMatchHandling="2" dialplan.1.removeEndOfDial="0"
+ />
+ <digitmap
+ dialplan.1.digitmap="" dialplan.1.digitmap.timeOut="3"
+ />
+ <routing>
+ <server dialplan.1.routing.server.1.address="" dialplan.1.routing.server.1.port="" dialplan.2.routing.server.1.address="" dialplan.2.routing.server.1.port="" dialplan.3.routing.server.1.address="" dialplan.3.routing.server.1.port="" dialplan.4.routing.server.1.address="" dialplan.4.routing.server.1.port="" dialplan.5.routing.server.1.address="" dialplan.5.routing.server.1.port="" dialplan.6.routing.server.1.address="" dialplan.6.routing.server.1.port=""/>
+ <emergency dialplan.1.routing.emergency.1.value="" dialplan.1.routing.emergency.1.server.1="" dialplan.2.routing.emergency.1.value="" dialplan.2.routing.emergency.1.server.1="" dialplan.3.routing.emergency.1.value="" dialplan.3.routing.emergency.1.server.1="" dialplan.4.routing.emergency.1.value="" dialplan.4.routing.emergency.1.server.1="" dialplan.5.routing.emergency.1.value="" dialplan.5.routing.emergency.1.server.1="" dialplan.6.routing.emergency.1.value="" dialplan.6.routing.emergency.1.server.1=""/>
+ </routing>
+ <msg msg.bypassInstantMessage="1">
+ <mwi msg.mwi.1.callBackMode="contact" msg.mwi.1.callBack="${VOICEMAIL_EXTEN}" />
+ </msg>
+ <nat nat.ip="" nat.signalPort="" nat.mediaPortStart=""/>
+ <user_preferences up.oneTouchVoiceMail="1" up.welcomeSoundEnabled="0" />
+ <volume voice.volume.persist.handset="1" voice.volume.persist.headset="1" />
+ <SNTP tcpIpApp.sntp.address="time" tcpIpApp.sntp.gmtOffset="-21600" />
+ <HTTPD httpd.enabled="1" />
+ <feature
+ feature.1.name="presence" feature.1.enabled="1"
+ feature.8.name="calllist-missed" feature.8.enabled="1"
+ />
+</phone1>