diff options
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | templates/linksysata-template.lua | 838 | ||||
-rw-r--r-- | templates/polycom-template.lua | 312 |
3 files changed, 1156 insertions, 1 deletions
@@ -5,15 +5,18 @@ VERSION=0.0.5 APP_DIST=\ provisioning* \ +TEMPLATE_DIST = templates/* + EXTRA_DIST=README Makefile config.mk -DISTFILES=$(APP_DIST) $(EXTRA_DIST) +DISTFILES=$(APP_DIST) $(EXTRA_DIST) $(TEMPLATE_DIST) TAR=tar P=$(PACKAGE)-$(VERSION) tarball=$(P).tar.bz2 install_dir=$(DESTDIR)/$(appdir)/$(APP_NAME) +template_dir=$(DESTDIR)/etc/provisioning/templates all: clean: @@ -24,6 +27,8 @@ dist: $(tarball) install: mkdir -p "$(install_dir)" cp -a $(APP_DIST) "$(install_dir)" + mkdir -p "$(template_dir)" + cp -a $(TEMPLATE_DIST) "$(template_dir)" $(tarball): $(DISTFILES) rm -rf $(P) diff --git a/templates/linksysata-template.lua b/templates/linksysata-template.lua new file mode 100644 index 0000000..230c3fa --- /dev/null +++ b/templates/linksysata-template.lua @@ -0,0 +1,838 @@ +<% +-- Linksys ATA Configuration File Template +local values = ... +server=values.device.registrar +web_server=ENV['HTTP_HOST'] +moh=values.device.musiconhold +dialpattern=values.device.digitmap +%> + +<% local values = ... %> + +<flat-profile> + +<Restricted_Access_Domains ua="na"></Restricted_Access_Domains> +<Enable_Web_Server ua="na">Yes</Enable_Web_Server> +<Web_Server_Port ua="na">80</Web_Server_Port> +<Enable_Web_Admin_Access ua="na">Yes</Enable_Web_Admin_Access> + +<Admin_Passwd ua="na"><%= values.device.adminpassword %></Admin_Passwd> + +<User_Password ua="rw"><%= values.device.adminpassword %></User_Password> + + + +<DHCP ua="rw">Yes</DHCP> +<Static_IP ua="rw"></Static_IP> +<NetMask ua="rw"></NetMask> +<Gateway ua="rw"></Gateway> + + + +<HostName ua="rw"><% io.write(values.reg1.extension) %></HostName> +<Domain ua="rw" /> + +<Primary_DNS ua="rw"></Primary_DNS> +<Secondary_DNS ua="rw"></Secondary_DNS> +<DNS_Server_Order ua="na">DHCP,Manual</DNS_Server_Order> +<DNS_Query_Mode ua="na">Sequential</DNS_Query_Mode> + +<Syslog_Server ua="na"><% io.write(web_server) %></Syslog_Server> +<Debug_Server ua="na"></Debug_Server> +<Debug_Level ua="na"></Debug_Level> + +<Primary_NTP_Server ua="na"></Primary_NTP_Server> +<Secondary_NTP_Server ua="na"></Secondary_NTP_Server> + + + +<Provision_Enable ua="na">Yes</Provision_Enable> +<Resync_On_Reset ua="na">Yes</Resync_On_Reset> +<Resync_Random_Delay ua="na">2</Resync_Random_Delay> +<Resync_Periodic ua="na">900</Resync_Periodic> +<Resync_Error_Retry_Delay ua="na">900</Resync_Error_Retry_Delay> + +<Forced_Resync_Delay ua="na">60</Forced_Resync_Delay> + +<Resync_From_SIP ua="na">Yes</Resync_From_SIP> +<Resync_After_Upgrade_Attempt ua="na">Yes</Resync_After_Upgrade_Attempt> + +<Resync_Trigger_1 ua="na">Event: check-sync</Resync_Trigger_1> + +<Resync_Fails_On_FNF>No</Resync_Fails_On_FNF> + + + +<Profile_Rule ua="na"> +http://<% io.write(web_server) %>/Linksys/$MA.xml +</Profile_Rule> + +<Profile_Rule_B ua="na"> +</Profile_Rule_B> + +<Profile_Rule_C ua="na"> +</Profile_Rule_C> +<Profile_Rule_D ua="na"></Profile_Rule_D> +<Resync_Trigger_2 ua="na"></Resync_Trigger_2> + +<GPP_G ua="na"/> +<GPP_H ua="na"/> +<GPP_P ua="na"/> + + +<GPP_A ua="na"></GPP_A> +<GPP_B ua="na"></GPP_B> +<GPP_C ua="na"></GPP_C> + +<GPP_D ua="na"></GPP_D> +<GPP_E ua="na"/> + +<GPP_F ua="na"> +</GPP_F> + +<GPP_I ua="na"></GPP_I> +<GPP_J ua="na"></GPP_J> +<GPP_K ua="na"></GPP_K> +<GPP_L ua="na"></GPP_L> +<GPP_M ua="na"></GPP_M> + +<GPP_SA ua="na"></GPP_SA> +<GPP_SB ua="na"></GPP_SB> +<GPP_SC ua="na"></GPP_SC> +<GPP_SD ua="na"></GPP_SD> + +<Log_Resync_Request_Msg ua="na">$PN $MAC -- Requesting resync $SCHEME://$SERVIP:$PORT$PATH</Log_Resync_Request_Msg> +<Log_Resync_Success_Msg ua="na">$PN $MAC -- Successful resync $SCHEME://$SERVIP:$PORT$PATH</Log_Resync_Success_Msg> +<Log_Resync_Failure_Msg ua="na">$PN $MAC -- Resync failed: $ERR</Log_Resync_Failure_Msg> + +<Report_Rule ua="na"></Report_Rule> + + +<Upgrade_Enable ua="na">Yes</Upgrade_Enable> +<Upgrade_Error_Retry_Delay ua="na">7200</Upgrade_Error_Retry_Delay> + +<Downgrade_Rev_Limit ua="na"></Downgrade_Rev_Limit> + + + +<Upgrade_Rule ua="na"> +(!5.1.6)?http://<% io.write(web_server) %>/pap2t-5-1-6.bin +</Upgrade_Rule> + + +<Log_Upgrade_Request_Msg ua="na">$PN $MAC -- Requesting upgrade $SCHEME://$SERVIP:$PORT$PATH</Log_Upgrade_Request_Msg> +<Log_Upgrade_Success_Msg ua="na">$PN $MAC -- Successful upgrade $SCHEME://$SERVIP:$PORT$PATH -- $ERR</Log_Upgrade_Success_Msg> +<Log_Upgrade_Failure_Msg ua="na">$PN $MAC -- Upgrade failed: $ERR</Log_Upgrade_Failure_Msg> + + + +<Max_Forward ua="na">70</Max_Forward> +<Max_Redirection ua="na">5</Max_Redirection> +<Max_Auth ua="na">2</Max_Auth> +<SIP_User_Agent_Name ua="na">$MAU $VERSION</SIP_User_Agent_Name> +<SIP_Server_Name ua="na">$MAU $VERSION</SIP_Server_Name> + +<SIP_Accept_Language ua="na"></SIP_Accept_Language> +<DTMF_Relay_MIME_Type ua="na">application/dtmf-relay</DTMF_Relay_MIME_Type> +<Hook_Flash_MIME_Type ua="na">application/hook-flash</Hook_Flash_MIME_Type> +<Remove_Last_Reg ua="na">No</Remove_Last_Reg> +<Use_Compact_Header ua="na">No</Use_Compact_Header> + + + +<SIP_T1 ua="na">2</SIP_T1> +<SIP_T2 ua="na">32</SIP_T2> +<SIP_T4 ua="na">5</SIP_T4> +<SIP_Timer_B ua="na">6</SIP_Timer_B> +<SIP_Timer_F ua="na">31</SIP_Timer_F> +<SIP_Timer_H ua="na">32</SIP_Timer_H> +<SIP_Timer_D ua="na">32</SIP_Timer_D> +<SIP_Timer_J ua="na">32</SIP_Timer_J> +<INVITE_Expires ua="na">240</INVITE_Expires> +<ReINVITE_Expires ua="na">30</ReINVITE_Expires> +<Reg_Min_Expires ua="na">1</Reg_Min_Expires> +<Reg_Max_Expires ua="na">7200</Reg_Max_Expires> +<Reg_Retry_Intvl ua="na">60</Reg_Retry_Intvl> +<Reg_Retry_Long_Intvl ua="na">60</Reg_Retry_Long_Intvl> + + + +<SIT1_RSC ua="na"></SIT1_RSC> +<SIT2_RSC ua="na"></SIT2_RSC> +<SIT3_RSC ua="na"></SIT3_RSC> +<SIT4_RSC ua="na"></SIT4_RSC> + +<Try_Backup_RSC ua="na"></Try_Backup_RSC> +<Retry_Reg_RSC ua="na"></Retry_Reg_RSC> + + + +<RTP_Port_Min ua="na">10050</RTP_Port_Min> +<RTP_Port_Max ua="na">16384</RTP_Port_Max> +<Max_RTP_ICMP_Err ua="na">0</Max_RTP_ICMP_Err> +<RTCP_Tx_Interval ua="na">5</RTCP_Tx_Interval> + + + +<NSE_Dynamic_Payload ua="na">100</NSE_Dynamic_Payload> +<AVT_Dynamic_Payload ua="na">101</AVT_Dynamic_Payload> +<G726r16_Dynamic_Payload ua="na">98</G726r16_Dynamic_Payload> +<G726r24_Dynamic_Payload ua="na">97</G726r24_Dynamic_Payload> +<G726r40_Dynamic_Payload ua="na">96</G726r40_Dynamic_Payload> +<G729b_Dynamic_Payload ua="na">99</G729b_Dynamic_Payload> + +<NSE_Codec_Name ua="na">NSE</NSE_Codec_Name> +<AVT_Codec_Name ua="na">telephone-event</AVT_Codec_Name> +<G711u_Codec_Name ua="na">PCMU</G711u_Codec_Name> +<G711a_Codec_Name ua="na">PCMA</G711a_Codec_Name> +<G726r16_Codec_Name ua="na">G726-16</G726r16_Codec_Name> +<G726r24_Codec_Name ua="na">G726-24</G726r24_Codec_Name> +<G726r32_Codec_Name ua="na">G726-32</G726r32_Codec_Name> +<G726r40_Codec_Name ua="na">G726-40</G726r40_Codec_Name> +<G729a_Codec_Name ua="na">G729</G729a_Codec_Name> +<G729b_Codec_Name ua="na">G729ab</G729b_Codec_Name> +<G723_Codec_Name ua="na">G723</G723_Codec_Name> + + + +<Handle_VIA_received ua="na">Yes</Handle_VIA_received> +<Handle_VIA_rport ua="na">Yes</Handle_VIA_rport> +<Insert_VIA_received ua="na">Yes</Insert_VIA_received> +<Insert_VIA_rport ua="na">Yes</Insert_VIA_rport> +<Substitute_VIA_Addr ua="na">Yes</Substitute_VIA_Addr> +<Send_Resp_To_Src_Port ua="na">No</Send_Resp_To_Src_Port> +<STUN_Enable ua="na">No</STUN_Enable> +<STUN_Test_Enable ua="na">No</STUN_Test_Enable> +<STUN_Server ua="na"></STUN_Server> +<EXT_IP ua="na"></EXT_IP> +<EXT_RTP_Port_Min ua="na"></EXT_RTP_Port_Min> +<NAT_Keep_Alive_Intvl ua="na">15</NAT_Keep_Alive_Intvl> + + + + + + + + +<Line_Enable_1_ ua="na">Yes</Line_Enable_1_> + +<SAS_Enable_1_ ua="na">No</SAS_Enable_1_> +<MOH_Server_1_ ua="na"><% io.write(moh) %></MOH_Server_1_> +<SAS_DLG_Refresh_Intvl_1_ ua="na">30</SAS_DLG_Refresh_Intvl_1_> +<NAT_Mapping_Enable_1_ ua="na">No</NAT_Mapping_Enable_1_> +<SAS_Inbound_RTP_Sink_1_ ua="na"></SAS_Inbound_RTP_Sink_1_> + +<SIP_Port_1_ ua="na">5060</SIP_Port_1_> + +<NAT_Keep_Alive_Enable_1_ ua="na">No</NAT_Keep_Alive_Enable_1_> +<EXT_SIP_Port_1_ ua="na"></EXT_SIP_Port_1_> +<NAT_Keep_Alive_Msg_1_ ua="na">$NOTIFY</NAT_Keep_Alive_Msg_1_> +<SIP_TOS_DiffServ_Value_1_ ua="na">0x68</SIP_TOS_DiffServ_Value_1_> +<NAT_Keep_Alive_Dest_1_ ua="na">$PROXY</NAT_Keep_Alive_Dest_1_> +<RTP_TOS_DiffServ_Value_1_ ua="na">0xb8</RTP_TOS_DiffServ_Value_1_> + + + +<SIP_Debug_Option_1_ ua="na"></SIP_Debug_Option_1_> + +<Network_Jitter_Level_1_ ua="na">high</Network_Jitter_Level_1_> +<SIP_100REL_Enable_1_ ua="na">Yes</SIP_100REL_Enable_1_> +<Blind_Attn-Xfer_Enable_1_ ua="na">Yes</Blind_Attn-Xfer_Enable_1_> +<Auth_Resync-Reboot_1_ ua="na">No</Auth_Resync-Reboot_1_> +<Xfer_When_Hangup_Conf_1_ ua="na">Yes</Xfer_When_Hangup_Conf_1_> + + +<RTP_Log_Intvl_1_ ua="na">0</RTP_Log_Intvl_1_> +<Restrict_Source_IP_1_ ua="na">No</Restrict_Source_IP_1_> + + + + +<Proxy_1_ ua="na"><% io.write(server) %></Proxy_1_> + +<Use_Outbound_Proxy_1_ ua="na">No</Use_Outbound_Proxy_1_> +<Outbound_Proxy_1_ ua="na"></Outbound_Proxy_1_> +<Use_OB_Proxy_In_Dialog_1_ ua="na">Yes</Use_OB_Proxy_In_Dialog_1_> + +<Register_1_ ua="na">Yes</Register_1_> +<Make_Call_Without_Reg_1_ ua="na">No</Make_Call_Without_Reg_1_> + +<Register_Expires_1_ ua="na">60</Register_Expires_1_> +<Ans_Call_Without_Reg_1_ ua="na">Yes</Ans_Call_Without_Reg_1_> +<Use_DNS_SRV_1_ ua="na">Yes</Use_DNS_SRV_1_> +<DNS_SRV_Auto_Prefix_1_ ua="na">Yes</DNS_SRV_Auto_Prefix_1_> +<Proxy_Fallback_Intvl_1_ ua="na">3600</Proxy_Fallback_Intvl_1_> +<Voice_Mail_Server_1_ ua="na"></Voice_Mail_Server_1_> + + + +<Display_Name_1_ ua="na">Michael Mason ATA1 USA WKL</Display_Name_1_> +<User_ID_1_ ua="na"><% io.write(values.reg1.extension) %></User_ID_1_> +<Password_1_ ua="na"><% io.write(values.reg1.password) %></Password_1_> +<Use_Auth_ID_1_ ua="na">No</Use_Auth_ID_1_> +<Auth_ID_1_ ua="na"></Auth_ID_1_> +<Mini_Certificate_1_ ua="na"></Mini_Certificate_1_> +<SRTP_Private_Key_1_ ua="na"></SRTP_Private_Key_1_> + + + +<Call_Waiting_Serv_1_ ua="na">Yes</Call_Waiting_Serv_1_> +<Block_CID_Serv_1_ ua="na">No</Block_CID_Serv_1_> +<Block_ANC_Serv_1_ ua="na">No</Block_ANC_Serv_1_> +<Dist_Ring_Serv_1_ ua="na">Yes</Dist_Ring_Serv_1_> +<Cfwd_All_Serv_1_ ua="na">Yes</Cfwd_All_Serv_1_> +<Cfwd_Busy_Serv_1_ ua="na">Yes</Cfwd_Busy_Serv_1_> +<Cfwd_No_Ans_Serv_1_ ua="na">Yes</Cfwd_No_Ans_Serv_1_> +<Cfwd_Sel_Serv_1_ ua="na">No</Cfwd_Sel_Serv_1_> +<Cfwd_Last_Serv_1_ ua="na">No</Cfwd_Last_Serv_1_> +<Block_Last_Serv_1_ ua="na">No</Block_Last_Serv_1_> +<Accept_Last_Serv_1_ ua="na">No</Accept_Last_Serv_1_> +<DND_Serv_1_ ua="na">No</DND_Serv_1_> +<CID_Serv_1_ ua="na">Yes</CID_Serv_1_> +<CWCID_Serv_1_ ua="na">Yes</CWCID_Serv_1_> +<Call_Return_Serv_1_ ua="na">No</Call_Return_Serv_1_> +<Call_Back_Serv_1_ ua="na">Yes</Call_Back_Serv_1_> +<Three_Way_Call_Serv_1_ ua="na">Yes</Three_Way_Call_Serv_1_> +<Three_Way_Conf_Serv_1_ ua="na">Yes</Three_Way_Conf_Serv_1_> +<Attn_Transfer_Serv_1_ ua="na">Yes</Attn_Transfer_Serv_1_> +<Unattn_Transfer_Serv_1_ ua="na">Yes</Unattn_Transfer_Serv_1_> +<MWI_Serv_1_ ua="na">Yes</MWI_Serv_1_> +<VMWI_Serv_1_ ua="na">Yes</VMWI_Serv_1_> +<Speed_Dial_Serv_1_ ua="na">No</Speed_Dial_Serv_1_> +<Secure_Call_Serv_1_ ua="na">No</Secure_Call_Serv_1_> +<Referral_Serv_1_ ua="na">No</Referral_Serv_1_> +<Feature_Dial_Serv_1_ ua="na">Yes</Feature_Dial_Serv_1_> + + + +<Preferred_Codec_1_ ua="na">G711u</Preferred_Codec_1_> +<Silence_Supp_Enable_1_ ua="na">No</Silence_Supp_Enable_1_> +<Use_Pref_Codec_Only_1_ ua="na">No</Use_Pref_Codec_Only_1_> +<Silence_Threshold_1_ ua="na">medium</Silence_Threshold_1_> +<Echo_Canc_Enable_1_ ua="na">Yes</Echo_Canc_Enable_1_> +<G729a_Enable_1_ ua="na">Yes</G729a_Enable_1_> +<Echo_Canc_Adapt_Enable_1_ ua="na">Yes</Echo_Canc_Adapt_Enable_1_> +<G723_Enable_1_ ua="na">No</G723_Enable_1_> +<Echo_Supp_Enable_1_ ua="na">Yes</Echo_Supp_Enable_1_> +<G726-16_Enable_1_ ua="na">No</G726-16_Enable_1_> +<FAX_CED_Detect_Enable_1_ ua="na">Yes</FAX_CED_Detect_Enable_1_> +<G726-24_Enable_1_ ua="na">No</G726-24_Enable_1_> +<FAX_CNG_Detect_Enable_1_ ua="na">Yes</FAX_CNG_Detect_Enable_1_> +<G726-32_Enable_1_ ua="na">Yes</G726-32_Enable_1_> +<FAX_Passthru_Codec_1_ ua="na">G711u</FAX_Passthru_Codec_1_> +<G726-40_Enable_1_ ua="na">No</G726-40_Enable_1_> +<FAX_Codec_Symmetric_1_ ua="na">Yes</FAX_Codec_Symmetric_1_> +<DTMF_Tx_Method_1_ ua="na">Auto</DTMF_Tx_Method_1_> +<FAX_Passthru_Method_1_ ua="na">ReINVITE</FAX_Passthru_Method_1_> +<Hook_Flash_Tx_Method_1_ ua="na">None</Hook_Flash_Tx_Method_1_> +<FAX_Process_NSE_1_ ua="na">Yes</FAX_Process_NSE_1_> +<Release_Unused_Codec_1_ ua="na">No</Release_Unused_Codec_1_> + + +<Dial_Plan_1_ ua="na">(<% io.write(dialpattern) %>)</Dial_Plan_1_> + +<Enable_IP_Dialing_1_ ua="na">No</Enable_IP_Dialing_1_> + + + +<Idle_Polarity_1_ ua="na">Forward</Idle_Polarity_1_> +<Caller_Conn_Polarity_1_ ua="na">Forward</Caller_Conn_Polarity_1_> +<Callee_Conn_Polarity_1_ ua="na">Forward</Callee_Conn_Polarity_1_> + + +<% + if values.services and values.services.forwarding and values.reg1 then + local pg_t = values.reg1 + local fwddata = {} + + if pg_t.forwardallenable then + fwddata.all = pg_t.forwardall + else + fwddata.all = "" + end + if pg_t.forwardbusyenable then + fwddata.busy = pg_t.forwardbusy + else + fwddata.busy = "" + end + if pg_t.forwardnoanswerenable then + fwddata.noanswer = pg_t.forwardnoanswer + else + fwddata.noanswer = "" + end +%> +<Cfwd_All_Dest_1_ ua="na"><%= fwddata.all %></Cfwd_All_Dest_1_> +<Cfwd_Busy_Dest_1_ ua="na"><%= fwddata.busy %></Cfwd_Busy_Dest_1_> +<Cfwd_No_Ans_Dest_1_ ua="na"><%= fwddata.noanswer %></Cfwd_No_Ans_Dest_1_> +<Cfwd_No_Ans_Delay_1_ ua="na">20</Cfwd_No_Ans_Delay_1_> +<% + end +%> + + +<Cfwd_Sel1_Caller_1_ ua="na"></Cfwd_Sel1_Caller_1_> +<Cfwd_Sel1_Dest_1_ ua="na"></Cfwd_Sel1_Dest_1_> +<Cfwd_Sel2_Caller_1_ ua="na"></Cfwd_Sel2_Caller_1_> +<Cfwd_Sel2_Dest_1_ ua="na"></Cfwd_Sel2_Dest_1_> +<Cfwd_Sel3_Caller_1_ ua="na"></Cfwd_Sel3_Caller_1_> +<Cfwd_Sel3_Dest_1_ ua="na"></Cfwd_Sel3_Dest_1_> +<Cfwd_Sel4_Caller_1_ ua="na"></Cfwd_Sel4_Caller_1_> +<Cfwd_Sel4_Dest_1_ ua="na"></Cfwd_Sel4_Dest_1_> +<Cfwd_Sel5_Caller_1_ ua="na"></Cfwd_Sel5_Caller_1_> +<Cfwd_Sel5_Dest_1_ ua="na"></Cfwd_Sel5_Dest_1_> +<Cfwd_Sel6_Caller_1_ ua="na"></Cfwd_Sel6_Caller_1_> +<Cfwd_Sel6_Dest_1_ ua="na"></Cfwd_Sel6_Dest_1_> +<Cfwd_Sel7_Caller_1_ ua="na"></Cfwd_Sel7_Caller_1_> +<Cfwd_Sel7_Dest_1_ ua="na"></Cfwd_Sel7_Dest_1_> +<Cfwd_Sel8_Caller_1_ ua="na"></Cfwd_Sel8_Caller_1_> +<Cfwd_Sel8_Dest_1_ ua="na"></Cfwd_Sel8_Dest_1_> + +<Cfwd_Last_Caller_1_ ua="na"></Cfwd_Last_Caller_1_> +<Cfwd_Last_Dest_1_ ua="na"></Cfwd_Last_Dest_1_> +<Block_Last_Caller_1_ ua="na"></Block_Last_Caller_1_> +<Accept_Last_Caller_1_ ua="na"></Accept_Last_Caller_1_> + + + +<Speed_Dial_2_1_ ua="na"></Speed_Dial_2_1_> +<Speed_Dial_3_1_ ua="na"></Speed_Dial_3_1_> +<Speed_Dial_4_1_ ua="na"></Speed_Dial_4_1_> +<Speed_Dial_5_1_ ua="na"></Speed_Dial_5_1_> +<Speed_Dial_6_1_ ua="na"></Speed_Dial_6_1_> +<Speed_Dial_7_1_ ua="na"></Speed_Dial_7_1_> +<Speed_Dial_8_1_ ua="na"></Speed_Dial_8_1_> +<Speed_Dial_9_1_ ua="na"></Speed_Dial_9_1_> + + + + +<Block_CID_Setting_1_ ua="na">No</Block_CID_Setting_1_> +<Block_ANC_Setting_1_ ua="na">No</Block_ANC_Setting_1_> +<DND_Setting_1_ ua="na">No</DND_Setting_1_> +<CID_Setting_1_ ua="na">Yes</CID_Setting_1_> +<CWCID_Setting_1_ ua="na">Yes</CWCID_Setting_1_> +<Dist_Ring_Setting_1_ ua="na">Yes</Dist_Ring_Setting_1_> +<Secure_Call_Setting_1_ ua="na">No</Secure_Call_Setting_1_> + +<Message_Waiting_1_ ua="rw">No</Message_Waiting_1_> + + + +<Ring1_Caller_1_ ua="na"></Ring1_Caller_1_> +<Ring2_Caller_1_ ua="na"></Ring2_Caller_1_> +<Ring3_Caller_1_ ua="na"></Ring3_Caller_1_> +<Ring4_Caller_1_ ua="na"></Ring4_Caller_1_> +<Ring5_Caller_1_ ua="na"></Ring5_Caller_1_> +<Ring6_Caller_1_ ua="na"></Ring6_Caller_1_> +<Ring7_Caller_1_ ua="na"></Ring7_Caller_1_> +<Ring8_Caller_1_ ua="na"></Ring8_Caller_1_> + + + +<Default_Ring_1_ ua="na">1</Default_Ring_1_> +<Default_CWT_1_ ua="na">1</Default_CWT_1_> +<Hold_Reminder_Ring_1_ ua="na">8</Hold_Reminder_Ring_1_> +<Call_Back_Ring_1_ ua="na"></Call_Back_Ring_1_> + +<Cfwd_Ring_Splash_Len_1_ ua="na">0</Cfwd_Ring_Splash_Len_1_> +<Cblk_Ring_Splash_Len_1_ ua="na">0</Cblk_Ring_Splash_Len_1_> +<VMWI_Ring_Splash_Len_1_ ua="na">0</VMWI_Ring_Splash_Len_1_> +<VMWI_Ring_Policy_1_ ua="na">New VM Available</VMWI_Ring_Policy_1_> +<Ring_On_No_New_VM_1_ ua="na">No</Ring_On_No_New_VM_1_> + + + + +<Line_Enable_2_ ua="na">No</Line_Enable_2_> + +<SAS_Enable_2_ ua="na">No</SAS_Enable_2_> +<MOH_Server_2_ ua="na"></MOH_Server_2_> +<SAS_DLG_Refresh_Intvl_2_ ua="na">30</SAS_DLG_Refresh_Intvl_2_> +<NAT_Mapping_Enable_2_ ua="na">No</NAT_Mapping_Enable_2_> +<SAS_Inbound_RTP_Sink_2_ ua="na"></SAS_Inbound_RTP_Sink_2_> + +<SIP_Port_2_ ua="na">5060</SIP_Port_2_> + +<NAT_Keep_Alive_Enable_2_ ua="na">Yes</NAT_Keep_Alive_Enable_2_> +<EXT_SIP_Port_2_ ua="na"></EXT_SIP_Port_2_> +<NAT_Keep_Alive_Msg_2_ ua="na">$NOTIFY</NAT_Keep_Alive_Msg_2_> +<SIP_TOS_DiffServ_Value_2_ ua="na">0x68</SIP_TOS_DiffServ_Value_2_> +<NAT_Keep_Alive_Dest_2_ ua="na">$PROXY</NAT_Keep_Alive_Dest_2_> +<RTP_TOS_DiffServ_Value_2_ ua="na">0xb8</RTP_TOS_DiffServ_Value_2_> + + + +<SIP_Debug_Option_2_ ua="na"></SIP_Debug_Option_2_> + + + +<Network_Jitter_Level_2_ ua="na">high</Network_Jitter_Level_2_> +<SIP_100REL_Enable_2_ ua="na">No</SIP_100REL_Enable_2_> +<Blind_Attn-Xfer_Enable_2_ ua="na">No</Blind_Attn-Xfer_Enable_2_> +<Auth_Resync-Reboot_2_ ua="na">No</Auth_Resync-Reboot_2_> +<Xfer_When_Hangup_Conf_2_ ua="na">No</Xfer_When_Hangup_Conf_2_> + + +<RTP_Log_Intvl_2_ ua="na">0</RTP_Log_Intvl_2_> +<Restrict_Source_IP_2_ ua="na">No</Restrict_Source_IP_2_> + + + + +<Proxy_2_ ua="na"></Proxy_2_> + +<Use_Outbound_Proxy_2_ ua="na">No</Use_Outbound_Proxy_2_> +<Outbound_Proxy_2_ ua="na"></Outbound_Proxy_2_> +<Use_OB_Proxy_In_Dialog_2_ ua="na">Yes</Use_OB_Proxy_In_Dialog_2_> + +<Register_2_ ua="na">Yes</Register_2_> +<Make_Call_Without_Reg_2_ ua="na">No</Make_Call_Without_Reg_2_> + +<Register_Expires_2_ ua="na">60</Register_Expires_2_> +<Ans_Call_Without_Reg_2_ ua="na">Yes</Ans_Call_Without_Reg_2_> +<Use_DNS_SRV_2_ ua="na">No</Use_DNS_SRV_2_> +<DNS_SRV_Auto_Prefix_2_ ua="na">No</DNS_SRV_Auto_Prefix_2_> +<Proxy_Fallback_Intvl_2_ ua="na">3600</Proxy_Fallback_Intvl_2_> +<Voice_Mail_Server_2_ ua="na">2147483647</Voice_Mail_Server_2_> + + + +<Display_Name_2_ ua="na"></Display_Name_2_> +<User_ID_2_ ua="na"></User_ID_2_> +<Password_2_ ua="na"></Password_2_> +<Use_Auth_ID_2_ ua="na">No</Use_Auth_ID_2_> +<Auth_ID_2_ ua="na"></Auth_ID_2_> +<Mini_Certificate_2_ ua="na"></Mini_Certificate_2_> +<SRTP_Private_Key_2_ ua="na"></SRTP_Private_Key_2_> + + + +<Call_Waiting_Serv_2_ ua="na">Yes</Call_Waiting_Serv_2_> +<Block_CID_Serv_2_ ua="na">Yes</Block_CID_Serv_2_> +<Block_ANC_Serv_2_ ua="na">No</Block_ANC_Serv_2_> +<Dist_Ring_Serv_2_ ua="na">Yes</Dist_Ring_Serv_2_> +<Cfwd_All_Serv_2_ ua="na">No</Cfwd_All_Serv_2_> +<Cfwd_Busy_Serv_2_ ua="na">No</Cfwd_Busy_Serv_2_> +<Cfwd_No_Ans_Serv_2_ ua="na">No</Cfwd_No_Ans_Serv_2_> +<Cfwd_Sel_Serv_2_ ua="na">No</Cfwd_Sel_Serv_2_> +<Cfwd_Last_Serv_2_ ua="na">No</Cfwd_Last_Serv_2_> +<Block_Last_Serv_2_ ua="na">No</Block_Last_Serv_2_> +<Accept_Last_Serv_2_ ua="na">No</Accept_Last_Serv_2_> +<DND_Serv_2_ ua="na">No</DND_Serv_2_> +<CID_Serv_2_ ua="na">Yes</CID_Serv_2_> +<CWCID_Serv_2_ ua="na">Yes</CWCID_Serv_2_> +<Call_Return_Serv_2_ ua="na">No</Call_Return_Serv_2_> +<Call_Back_Serv_2_ ua="na">Yes</Call_Back_Serv_2_> +<Three_Way_Call_Serv_2_ ua="na">Yes</Three_Way_Call_Serv_2_> +<Three_Way_Conf_Serv_2_ ua="na">Yes</Three_Way_Conf_Serv_2_> +<Attn_Transfer_Serv_2_ ua="na">Yes</Attn_Transfer_Serv_2_> +<Unattn_Transfer_Serv_2_ ua="na">Yes</Unattn_Transfer_Serv_2_> +<MWI_Serv_2_ ua="na">Yes</MWI_Serv_2_> +<VMWI_Serv_2_ ua="na">Yes</VMWI_Serv_2_> +<Speed_Dial_Serv_2_ ua="na">No</Speed_Dial_Serv_2_> +<Secure_Call_Serv_2_ ua="na">No</Secure_Call_Serv_2_> +<Referral_Serv_2_ ua="na">No</Referral_Serv_2_> +<Feature_Dial_Serv_2_ ua="na">Yes</Feature_Dial_Serv_2_> + + + +<Preferred_Codec_2_ ua="na">G711u</Preferred_Codec_2_> +<Silence_Supp_Enable_2_ ua="na">No</Silence_Supp_Enable_2_> +<Use_Pref_Codec_Only_2_ ua="na">Yes</Use_Pref_Codec_Only_2_> +<Silence_Threshold_2_ ua="na">medium</Silence_Threshold_2_> +<Echo_Canc_Enable_2_ ua="na">Yes</Echo_Canc_Enable_2_> +<G729a_Enable_2_ ua="na">Yes</G729a_Enable_2_> +<Echo_Canc_Adapt_Enable_2_ ua="na">Yes</Echo_Canc_Adapt_Enable_2_> +<G723_Enable_2_ ua="na">No</G723_Enable_2_> +<Echo_Supp_Enable_2_ ua="na">Yes</Echo_Supp_Enable_2_> +<G726-16_Enable_2_ ua="na">No</G726-16_Enable_2_> +<FAX_CED_Detect_Enable_2_ ua="na">Yes</FAX_CED_Detect_Enable_2_> +<G726-24_Enable_2_ ua="na">No</G726-24_Enable_2_> +<FAX_CNG_Detect_Enable_2_ ua="na">Yes</FAX_CNG_Detect_Enable_2_> +<G726-32_Enable_2_ ua="na">Yes</G726-32_Enable_2_> +<FAX_Passthru_Codec_2_ ua="na">G711u</FAX_Passthru_Codec_2_> +<G726-40_Enable_2_ ua="na">No</G726-40_Enable_2_> +<FAX_Codec_Symmetric_2_ ua="na">Yes</FAX_Codec_Symmetric_2_> +<DTMF_Tx_Method_2_ ua="na">Auto</DTMF_Tx_Method_2_> +<FAX_Passthru_Method_2_ ua="na">ReINVITE</FAX_Passthru_Method_2_> +<Hook_Flash_Tx_Method_2_ ua="na">None</Hook_Flash_Tx_Method_2_> +<FAX_Process_NSE_2_ ua="na">Yes</FAX_Process_NSE_2_> +<Release_Unused_Codec_2_ ua="na">Yes</Release_Unused_Codec_2_> + + + +<Dial_Plan_2_ ua="na">(<:1123>[2-9]xxxxxxS0|<411:18003733411>|*xx|[369]11S0|0|00|011[2-9]x.|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)</Dial_Plan_2_> + +<Enable_IP_Dialing_2_ ua="na">No</Enable_IP_Dialing_2_> + + + +<Idle_Polarity_2_ ua="na">Forward</Idle_Polarity_2_> +<Caller_Conn_Polarity_2_ ua="na">Forward</Caller_Conn_Polarity_2_> +<Callee_Conn_Polarity_2_ ua="na">Forward</Callee_Conn_Polarity_2_> + + + +<Cfwd_All_Dest_2_ ua="na"></Cfwd_All_Dest_2_> +<Cfwd_Busy_Dest_2_ ua="na"></Cfwd_Busy_Dest_2_> +<Cfwd_No_Ans_Dest_2_ ua="na"></Cfwd_No_Ans_Dest_2_> +<Cfwd_No_Ans_Delay_2_ ua="na"></Cfwd_No_Ans_Delay_2_> + + + +<Cfwd_Sel1_Caller_2_ ua="na"></Cfwd_Sel1_Caller_2_> +<Cfwd_Sel1_Dest_2_ ua="na"></Cfwd_Sel1_Dest_2_> +<Cfwd_Sel2_Caller_2_ ua="na"></Cfwd_Sel2_Caller_2_> +<Cfwd_Sel2_Dest_2_ ua="na"></Cfwd_Sel2_Dest_2_> +<Cfwd_Sel3_Caller_2_ ua="na"></Cfwd_Sel3_Caller_2_> +<Cfwd_Sel3_Dest_2_ ua="na"></Cfwd_Sel3_Dest_2_> +<Cfwd_Sel4_Caller_2_ ua="na"></Cfwd_Sel4_Caller_2_> +<Cfwd_Sel4_Dest_2_ ua="na"></Cfwd_Sel4_Dest_2_> +<Cfwd_Sel5_Caller_2_ ua="na"></Cfwd_Sel5_Caller_2_> +<Cfwd_Sel5_Dest_2_ ua="na"></Cfwd_Sel5_Dest_2_> +<Cfwd_Sel6_Caller_2_ ua="na"></Cfwd_Sel6_Caller_2_> +<Cfwd_Sel6_Dest_2_ ua="na"></Cfwd_Sel6_Dest_2_> +<Cfwd_Sel7_Caller_2_ ua="na"></Cfwd_Sel7_Caller_2_> +<Cfwd_Sel7_Dest_2_ ua="na"></Cfwd_Sel7_Dest_2_> +<Cfwd_Sel8_Caller_2_ ua="na"></Cfwd_Sel8_Caller_2_> +<Cfwd_Sel8_Dest_2_ ua="na"></Cfwd_Sel8_Dest_2_> + +<Cfwd_Last_Caller_2_ ua="na"></Cfwd_Last_Caller_2_> +<Cfwd_Last_Dest_2_ ua="na"></Cfwd_Last_Dest_2_> +<Block_Last_Caller_2_ ua="na"></Block_Last_Caller_2_> +<Accept_Last_Caller_2_ ua="na"></Accept_Last_Caller_2_> + + + +<Speed_Dial_2_2_ ua="na"></Speed_Dial_2_2_> +<Speed_Dial_3_2_ ua="na"></Speed_Dial_3_2_> +<Speed_Dial_4_2_ ua="na"></Speed_Dial_4_2_> +<Speed_Dial_5_2_ ua="na"></Speed_Dial_5_2_> +<Speed_Dial_6_2_ ua="na"></Speed_Dial_6_2_> +<Speed_Dial_7_2_ ua="na"></Speed_Dial_7_2_> +<Speed_Dial_8_2_ ua="na"></Speed_Dial_8_2_> +<Speed_Dial_9_2_ ua="na"></Speed_Dial_9_2_> + + + + +<Block_CID_Setting_2_ ua="na">No</Block_CID_Setting_2_> +<Block_ANC_Setting_2_ ua="na">No</Block_ANC_Setting_2_> +<DND_Setting_2_ ua="na">No</DND_Setting_2_> +<CID_Setting_2_ ua="na">Yes</CID_Setting_2_> +<CWCID_Setting_2_ ua="na">Yes</CWCID_Setting_2_> +<Dist_Ring_Setting_2_ ua="na">Yes</Dist_Ring_Setting_2_> +<Secure_Call_Setting_2_ ua="na">No</Secure_Call_Setting_2_> + +<Message_Waiting_2_ ua="rw"/> + + + +<Ring1_Caller_2_ ua="na"></Ring1_Caller_2_> +<Ring2_Caller_2_ ua="na"></Ring2_Caller_2_> +<Ring3_Caller_2_ ua="na"></Ring3_Caller_2_> +<Ring4_Caller_2_ ua="na"></Ring4_Caller_2_> +<Ring5_Caller_2_ ua="na"></Ring5_Caller_2_> +<Ring6_Caller_2_ ua="na"></Ring6_Caller_2_> +<Ring7_Caller_2_ ua="na"></Ring7_Caller_2_> +<Ring8_Caller_2_ ua="na"></Ring8_Caller_2_> + + + +<Default_Ring_2_ ua="na">1</Default_Ring_2_> +<Default_CWT_2_ ua="na">1</Default_CWT_2_> +<Hold_Reminder_Ring_2_ ua="na">8</Hold_Reminder_Ring_2_> +<Call_Back_Ring_2_ ua="na"></Call_Back_Ring_2_> + +<Cfwd_Ring_Splash_Len_2_ ua="na">0</Cfwd_Ring_Splash_Len_2_> +<Cblk_Ring_Splash_Len_2_ ua="na">0</Cblk_Ring_Splash_Len_2_> +<VMWI_Ring_Splash_Len_2_ ua="na">0</VMWI_Ring_Splash_Len_2_> +<VMWI_Ring_Policy_2_ ua="na">New VM Available</VMWI_Ring_Policy_2_> +<Ring_On_No_New_VM_2_ ua="na">No</Ring_On_No_New_VM_2_> + + +<CW_Setting_1_ ua="na">1</CW_Setting_1_> +<CW_Setting_2_ ua="na">1</CW_Setting_2_> + +<RTP_Packet_Size ua="na">.020</RTP_Packet_Size> + + +<Dial_Tone ua="na">350@-19,440@-19;10(*/0/1+2)</Dial_Tone> +<Second_Dial_Tone ua="na">350@-19,440@-19;10(*/0/1+2)</Second_Dial_Tone> +<Outside_Dial_Tone ua="na">420@-16;10(*/0/1)</Outside_Dial_Tone> +<Prompt_Tone ua="na">350@-19,440@-19;10(*/0/1+2)</Prompt_Tone> +<Busy_Tone ua="na">480@-19,620@-19;10(.5/.5/1+2)</Busy_Tone> +<Reorder_Tone ua="na">480@-19,620@-19;10(.25/.25/1+2)</Reorder_Tone> +<Off_Hook_Warning_Tone ua="na">480@-10,620@0;10(.125/.125/1+2)</Off_Hook_Warning_Tone> +<Ring_Back_Tone ua="na">440@-19,480@-19;*(2/4/1+2)</Ring_Back_Tone> +<Confirm_Tone ua="na">600@-16;1(.25/.25/1)</Confirm_Tone> +<SIT1_Tone ua="na">985@-16,1428@-16,1777@-16;20(.380/0/1,.380/0/2,.380/0/3,0/4/0)</SIT1_Tone> +<SIT2_Tone ua="na">914@-16,1371@-16,1777@-16;20(.274/0/1,.274/0/2,.380/0/3,0/4/0)</SIT2_Tone> +<SIT3_Tone ua="na">914@-16,1371@-16,1777@-16;20(.380/0/1,.380/0/2,.380/0/3,0/4/0)</SIT3_Tone> +<SIT4_Tone ua="na">985@-16,1371@-16,1777@-16;20(.380/0/1,.274/0/2,.380/0/3,0/4/0)</SIT4_Tone> +<MWI_Dial_Tone ua="na">350@-19,440@-19;2(.1/.1/1+2);10(*/0/1+2)</MWI_Dial_Tone> +<Cfwd_Dial_Tone ua="na">350@-19,440@-19;2(.2/.2/1+2);10(*/0/1+2)</Cfwd_Dial_Tone> +<Holding_Tone ua="na">600@-19;*(.1/.1/1,.1/.1/1,.1/9.5/1)</Holding_Tone> +<Conference_Tone ua="na">350@-19;20(.1/.1/1,.1/9.7/1)</Conference_Tone> +<Secure_Call_Indication_Tone ua="na">397@-19,507@-19;15(0/2/0,.2/.1/1,.1/2.1/2)</Secure_Call_Indication_Tone> + + + +<Ring1_Cadence ua="na">60(2/4)</Ring1_Cadence> +<Ring2_Cadence ua="na">60(.3/.2,1/.2,.3/4)</Ring2_Cadence> +<Ring3_Cadence ua="na">60(.8/.4,.8/4)</Ring3_Cadence> +<Ring4_Cadence ua="na">60(.4/.2,.3/.2,.8/4)</Ring4_Cadence> +<Ring5_Cadence ua="na">60(.2/.2,.2/.2,.2/.2,1/4)</Ring5_Cadence> +<Ring6_Cadence ua="na">60(.2/.4,.2/.4,.2/4)</Ring6_Cadence> +<Ring7_Cadence ua="na">60(.4/.2,.4/.2,.4/4)</Ring7_Cadence> +<Ring8_Cadence ua="na">60(0.25/9.75)</Ring8_Cadence> + + + +<CWT1_Cadence ua="na">30(.3/3.7)</CWT1_Cadence> +<CWT2_Cadence ua="na">30(.1/.1, .1/9.7)</CWT2_Cadence> +<CWT3_Cadence ua="na">30(.1/.1, .3/.1, .1/9.3)</CWT3_Cadence> +<CWT4_Cadence ua="na">30(.1/.1,.1/.1,.1/9.5)</CWT4_Cadence> +<CWT5_Cadence ua="na">30(.3/.1,.1/.1,.3/9.1)</CWT5_Cadence> +<CWT6_Cadence ua="na">30(.1/.1,.3/.2,.3/9.1)</CWT6_Cadence> +<CWT7_Cadence ua="na">30(.3/.1,.3/.1,.1/9.1)</CWT7_Cadence> +<CWT8_Cadence ua="na">2.3(.3/2)</CWT8_Cadence> + + + +<Ring1_Name ua="na">Bellcore-dr1</Ring1_Name> +<Ring2_Name ua="na">Bellcore-dr2</Ring2_Name> +<Ring3_Name ua="na">Bellcore-dr3</Ring3_Name> +<Ring4_Name ua="na">Bellcore-dr4</Ring4_Name> +<Ring5_Name ua="na">Bellcore-dr5</Ring5_Name> +<Ring6_Name ua="na">Bellcore-dr6</Ring6_Name> +<Ring7_Name ua="na">Bellcore-dr7</Ring7_Name> +<Ring8_Name ua="na">Bellcore-dr8</Ring8_Name> + + + +<Ring_Waveform ua="na">Sinusoid</Ring_Waveform> +<Ring_Frequency ua="na">20</Ring_Frequency> +<Ring_Voltage ua="na">90</Ring_Voltage> +<CWT_Frequency ua="na">440@-10</CWT_Frequency> +<Synchronized_Ring ua="na">Yes</Synchronized_Ring> + + + +<Hook_Flash_Timer_Min ua="na">.1</Hook_Flash_Timer_Min> +<Hook_Flash_Timer_Max ua="na">1.0</Hook_Flash_Timer_Max> +<Callee_On_Hook_Delay ua="na">0</Callee_On_Hook_Delay> +<Reorder_Delay ua="na">5</Reorder_Delay> +<Call_Back_Expires ua="na">4500</Call_Back_Expires> +<Call_Back_Retry_Intvl ua="na">90</Call_Back_Retry_Intvl> +<Call_Back_Delay ua="na">2</Call_Back_Delay> +<VMWI_Refresh_Intvl ua="na">0</VMWI_Refresh_Intvl> +<Interdigit_Long_Timer ua="na">8</Interdigit_Long_Timer> +<Interdigit_Short_Timer ua="na">4</Interdigit_Short_Timer> +<CPC_Delay ua="na">2</CPC_Delay> +<CPC_Duration ua="na">.8</CPC_Duration> + + + +<Call_Return_Code ua="na"></Call_Return_Code> +<Blind_Transfer_Code ua="na">#90</Blind_Transfer_Code> +<Call_Back_Act_Code ua="na"></Call_Back_Act_Code> +<Call_Back_Deact_Code ua="na"></Call_Back_Deact_Code> +<Cfwd_All_Act_Code ua="na"></Cfwd_All_Act_Code> +<Cfwd_All_Deact_Code ua="na"></Cfwd_All_Deact_Code> +<Cfwd_Busy_Act_Code ua="na"></Cfwd_Busy_Act_Code> +<Cfwd_Busy_Deact_Code ua="na"></Cfwd_Busy_Deact_Code> +<Cfwd_No_Ans_Act_Code ua="na"></Cfwd_No_Ans_Act_Code> +<Cfwd_No_Ans_Deact_Code ua="na"></Cfwd_No_Ans_Deact_Code> +<Cfwd_Last_Act_Code ua="na"></Cfwd_Last_Act_Code> +<Cfwd_Last_Deact_Code ua="na"></Cfwd_Last_Deact_Code> +<Block_Last_Act_Code ua="na"></Block_Last_Act_Code> +<Block_Last_Deact_Code ua="na"></Block_Last_Deact_Code> +<Accept_Last_Act_Code ua="na"></Accept_Last_Act_Code> +<Accept_Last_Deact_Code ua="na"></Accept_Last_Deact_Code> +<CW_Act_Code ua="na"></CW_Act_Code> +<CW_Deact_Code ua="na"></CW_Deact_Code> +<CW_Per_Call_Act_Code ua="na"></CW_Per_Call_Act_Code> +<CW_Per_Call_Deact_Code ua="na"></CW_Per_Call_Deact_Code> +<Block_CID_Act_Code ua="na"></Block_CID_Act_Code> +<Block_CID_Deact_Code ua="na"></Block_CID_Deact_Code> +<Block_CID_Per_Call_Act_Code ua="na"></Block_CID_Per_Call_Act_Code> +<Block_CID_Per_Call_Deact_Code ua="na"></Block_CID_Per_Call_Deact_Code> +<Block_ANC_Act_Code ua="na"></Block_ANC_Act_Code> +<Block_ANC_Deact_Code ua="na"></Block_ANC_Deact_Code> +<DND_Act_Code ua="na"></DND_Act_Code> +<DND_Deact_Code ua="na"></DND_Deact_Code> +<CID_Act_Code ua="na"></CID_Act_Code> +<CID_Deact_Code ua="na"></CID_Deact_Code> +<CWCID_Act_Code ua="na"></CWCID_Act_Code> +<CWCID_Deact_Code ua="na"></CWCID_Deact_Code> +<Dist_Ring_Act_Code ua="na"></Dist_Ring_Act_Code> +<Dist_Ring_Deact_Code ua="na"></Dist_Ring_Deact_Code> +<Speed_Dial_Act_Code ua="na"></Speed_Dial_Act_Code> +<Secure_All_Call_Act_Code ua="na"></Secure_All_Call_Act_Code> +<Secure_No_Call_Act_Code ua="na"></Secure_No_Call_Act_Code> +<Secure_One_Call_Act_Code ua="na"></Secure_One_Call_Act_Code> +<Secure_One_Call_Deact_Code ua="na"></Secure_One_Call_Deact_Code> +<Conference_Act_Code ua="na"></Conference_Act_Code> +<Attn-Xfer_Act_Code ua="na"></Attn-Xfer_Act_Code> +<Referral_Services_Codes ua="na"></Referral_Services_Codes> +<Feature_Dial_Services_Codes ua="na"></Feature_Dial_Services_Codes> + + + + +<Prefer_G711u_Code ua="na"></Prefer_G711u_Code> +<Force_G711u_Code ua="na"></Force_G711u_Code> +<Prefer_G711a_Code ua="na"></Prefer_G711a_Code> +<Force_G711a_Code ua="na"></Force_G711a_Code> +<Prefer_G723_Code ua="na"></Prefer_G723_Code> +<Force_G723_Code ua="na"></Force_G723_Code> +<Prefer_G726r16_Code ua="na"></Prefer_G726r16_Code> +<Force_G726r16_Code ua="na"></Force_G726r16_Code> +<Prefer_G726r24_Code ua="na"></Prefer_G726r24_Code> +<Force_G726r24_Code ua="na"></Force_G726r24_Code> +<Prefer_G726r32_Code ua="na"></Prefer_G726r32_Code> +<Force_G726r32_Code ua="na"></Force_G726r32_Code> +<Prefer_G726r40_Code ua="na"></Prefer_G726r40_Code> +<Force_G726r40_Code ua="na"></Force_G726r40_Code> +<Prefer_G729a_Code ua="na"></Prefer_G729a_Code> +<Force_G729a_Code ua="na"></Force_G729a_Code> + +<Modem_Line_Toggle_Code ua="na">*99</Modem_Line_Toggle_Code> + + +<Set_Local_Date__mm_dd_ ua="na"/> +<Set_Local_Time__HH_mm_ ua="na"/> + +<Time_Zone ua="na"> + + +GMT +</Time_Zone> + +<Daylight_Saving_Time_Rule> +start=3/8/7/2:0:0;end=11/1/7/2:0:0;save=1 +</Daylight_Saving_Time_Rule> + +<FXS_Port_Impedance ua="na"> +600</FXS_Port_Impedance> + +<FXS_Port_Input_Gain ua="na">-1</FXS_Port_Input_Gain> +<FXS_Port_Output_Gain ua="na">-2</FXS_Port_Output_Gain> +<DTMF_Playback_Level ua="na">-16</DTMF_Playback_Level> +<DTMF_Playback_Length ua="na">.1</DTMF_Playback_Length> +<Detect_ABCD ua="na">Yes</Detect_ABCD> +<Playback_ABCD ua="na">Yes</Playback_ABCD> +<Caller_ID_Method ua="na">Bellcore(N.Amer,China)</Caller_ID_Method> +<FXS_Port_Power_Limit ua="na">5</FXS_Port_Power_Limit> + +<Protect_IVR_FactoryReset ua="na">Yes</Protect_IVR_FactoryReset> + +</flat-profile> + +<% +-- DEBUGGING +--require("session") +--io.write(session.serialize("values", values)) +%> diff --git a/templates/polycom-template.lua b/templates/polycom-template.lua new file mode 100644 index 0000000..5cfd226 --- /dev/null +++ b/templates/polycom-template.lua @@ -0,0 +1,312 @@ +<?xml version="1.0" standalone="yes"?> + +<% +-- Polycom Configuration File Template +-- We use single quotes to avoid escaping XML's double quotes + +-- It is important that the first line be the XML declaration + +--[[ + Implemented parameters: + values = { + device = { + adminpassword + digitmap + digitmaptimeout + homepage + musiconhold + pcportenable + registrar + sntpserver + timezone + urldialingenable + } + regX (where X is a number 1-34) = { + extension = EXTEN + password = string + forwardall = EXTEN + forwardallenable = boolean + forwardbusy = EXTEN (allow URI?) + forwardbusyenable = boolean + forwardnoanswer = EXTEN + forwardnoanswerenable = boolean + } + -- Assuming that services will not be nil + services = { + callhistoryenable = boolean + forwarding = boolean + hotlinedestination = string + hotlineenable = boolean + } +--]] +%> + +<dynamicConfig + +<% -- GLOBAL OPTIONS %> + +<% --TODO: Do we want to enable locking? %> +<% --phoneLock.enabled="1" %> + +<% --- From features.cfg %> +bitmap.idleDisplay.name.SPIP650="WT.bmp" +bitmap.idleDisplay.name.SPIP550="WT.bmp" +<% --feature.autoLocalHold="1" -- trying default for now%> +feature.callPark.enabled="1" +feature.directedCallPickup.enabled="1" +feature.enhancedFeatureKeys.enabled="1" +feature.groupCallPickup.enabled="1" +feature.messaging.enabled="1" +<% -- Management of buddies, and own status %> +feature.presence.enabled="1" +<% -- Run-time downloading of ringers %> +feature.ringDownload.enabled="1" + +<% --- From sip-interop.cfg %> +<% -- Allow user to set Do Not Disturb (DND) per-registration %> +call.donotdisturb.perReg="1" +<% -- When a conference is put on hold, other parties continue to talk %> +call.localConferenceCallHold="1" +<% -- Disallow transfers during the proceeding state of a consultation call %> +voIpProt.SIP.allowTransferOnProceeding="0" +<% -- TODO needed???%> +<% --voIpProt.SIP.CID.sourcePreference="" %> +<% -- Send 486 (SIP Busy Here) when 'Reject' is pressed during a ringing call %> +voIpProt.SIP.use486forReject="1" +<% -- Set phone's requested registration period in seconds %> +voIpProt.server.1.expires="60" +voIpProt.server.2.expires="60" + + +<% --- From site.cfg %> +<% -- Allow the use of device.xxx options (Admin Guide A-30) %> +device.set="1" +<% -- Override default user password of '123' see Admin Guide 4-103 %> +<% -- only used for phone locking and to protect redundant 'Reboot' option %> +device.auth.localUserPassword="" +device.auth.localUserPassword.set="1" +<% -- Attempt to determine VLAN ID and negotiate power through LLDP %> +device.net.lldpEnabled="1" +<% -- Apply option configured in device.net.lldpEnabled (Admin Guide A-30) %> +device.net.lldpEnabled.set="1" +<% -- Automatic periodic polling of provisioning server for upgrades %> +prov.polling.enabled="1" +<% -- Polling time of day hh:mm. %> +prov.polling.time="02:00" +<% -- Do not reject RTP packets arriving from a non-SDP-negotiated IP address %> +<% -- Needed for some ATAs that do provide bad SDP in transfers to MOH %> +tcpIpApp.port.rtp.filterByIp="0" +<% -- Reject RTP packets arriving from a non-SDP-negotiated port %> +<% -- To provide some security despite disabling filterByIp above.t %> +tcpIpApp.port.rtp.filterByPort="1" +<% -- Headset preferred over speakerphone after first use, until disabled %> +up.headsetMode="1" +<% -- Intensity of LCD backlight when phone is idle. 0 = off. %> +up.backlight.idleIntensity="0" +<% -- Receive volume of handset remembered between calls %> +voice.volume.persist.handset="1" +<% -- Receive volume of headset remembered between calls %> +voice.volume.persist.headset="1" + + + + + +<% local values = ... %> + +<% +local function xml_attr (t, v) +if v ~= nil then + -- v could be a string, false, or a number + io.write(table.concat(t, '.') .. '="' .. tostring(v) .. '"\n') +end +end +%> + +<% + +xml_attr({ 'voIpProt.server.1.address' }, values.device.registrar) +xml_attr({ 'mb.main.home' }, values.device.homepage) +xml_attr({ 'voIpProt.SIP.musicOnHold.uri' }, values.device.musiconhold) +xml_attr({ 'dialplan.digitmap' }, values.device.digitmap) +xml_attr({ 'dialplan.digitmap.timeOut' }, values.device.digitmaptimeout) +xml_attr({ 'feature.urlDialing.enabled' }, values.device.urldialingenable) + +if not values.device.pcportenable then + -- set mode to '-1' which disables it + xml_attr({ 'device.net.etherModePC' }, '-1') + -- apply settings in 'device' parameter above + xml_attr({ 'device.net.etherModePC.set' }, '1') +end + +-- Override the default admin password of '456' +if values.device.adminpassword then + xml_attr({ 'device.auth.localAdminPassword' }, values.device.adminpassword) + xml_attr({ 'device.auth.localAdminPassword.set' }, true) +end + +---[=[ +-- Handle SNTP and Time Zone parameters +-- See http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html +-- TZ variable, with no leading colon +-- Syntax: stdoffset[dst[offset][,start[/time],end[/time]]] +-- Examples: 'GMT0' 'EST5EDT,M3.2.0,M11.1.0' '<GMT+5>5' + +-- we can assume that values.device is not nil +-- since values.device.template is this file +if values.device.sntpserver then + xml_attr({ 'tcpIpApp.sntp.address' }, values.device.sntpserver) +end + + +-- Parse time zone variable +require('posixtz') +local tz = posixtz.parse(values.device.timezone) + +if tz then + + -- convert POSIX sign (W of GMT is '+') to Polycom (E of GMT is '+') + xml_attr({'tcpIpApp.sntp.gmtOffset'}, -1 * tz.offset.total) + + + + local function dstrule ( pos ) + local dstprefix = 'tcpIpApp.sntp.daylightSavings' + local t = tz.dst[pos] + + -- Handle explicit hour for DST change + -- (Polycom doesn't implement explicit min or sec) + -- (Polycom DST implementation assumes DST change is 1 hour) + if t.hour then + xml_attr({ dstprefix, pos, 'time' }, t.hour) + end + + if t.day then + -- there may be two of next line, Polycom uses first + xml_attr({ dstprefix, 'fixedDayEnable' }, true) + xml_attr({ dstprefix, pos, 'month' }, t.month) + xml_attr({ dstprefix, pos, 'date' }, t.day) + else + + -- there may be two of next line, Polycom uses first + xml_attr({ dstprefix, 'fixedDayEnable' }, false) + xml_attr({ dstprefix, pos, 'month' }, t.month) + + -- POSIX weekday is between 0 (Sun) and 6 (Sat) + -- Polycom dayOfWeek is 1=Sun, 7=Sat + xml_attr({ dstprefix, pos, 'dayOfWeek' }, tonumber(t.weekday) + 1) + + -- POSIX week from 1 to 5, where 1st,2nd..4th, and 5=last + if t.week == '5' then + xml_attr({ dstprefix, pos, 'dayOfWeek.lastInMonth' }, true) + else + -- Polycom uses 1, 8, 15, 22 for 1st, 2nd... 4th + local d = 7 * ( tonumber(t.week) - 1 ) + 1 + xml_attr({ dstprefix, pos, 'date' }, d) + end + end + + end + + if tz.dst then + xml_attr({'tcpIpApp.sntp.daylightSavings.enable'}, true) + + dstrule('start') + dstrule('stop') + end +end + +--]=] + + +-- Check 'services' params +local enable = {} +enable.forwarding = false +enable.hotline = false + +if values.services then + -- set variables so that we don't have to test values.services again + if not values.services.callhistoryenable then + xml_attr({ 'feature.callList.enabled' }, '0') + end + if values.services.forwarding then + enable.forwarding = true + end + if values.services.hotlineenable then + enable.hotline = true + end +end + + +-- Loop through Parameter Groups looking for 'reg' params +for pg, pg_t in pairs(values) do + +-- Is it of the form regX ? +local num = string.match(pg, 'reg(%d+)') +if num then + + + -- set Hotline on all possible registrations if it is configured + if enable.hotline then + local d = values.services.hotlinedestination + if d then + xml_attr({ 'call.autoOffHook', num, 'enabled' }, '1') + xml_attr({ 'call.autoOffHook', num, 'protocol' }, 'SIP') + xml_attr({ 'call.autoOffHook', num, 'contact' }, d) + end + end + + -- user part of From URI + xml_attr({ 'reg', num, 'address' }, pg_t.extension) + -- SIP authentication parameters + xml_attr({ 'reg', num, 'auth.userId' }, pg_t.extension) + xml_attr({ 'reg', num, 'auth.password' }, pg_t.password) + -- Caller ID string + xml_attr({ 'reg', num, 'displayName' }, pg_t.callerid) + + + -- From Admin_Guide_UCS_v3.3.0: + -- "The phone has a flexible call forward/diversion feature for each registration. In all cases, a call will only be diverted if a non-Null contact has been configured." + if enable.forwarding then + -- Although not documented, + -- Polycom phones send special options for + -- 'forward all calls', namely: + -- reg.x.fwdContact and reg.x.fwdStatus + + -- set forwardall as defined + xml_attr({ 'reg', num, 'fwdStatus' }, pg_t.forwardallenable) + xml_attr({ 'reg', num, 'fwdContact' }, pg_t.forwardall) + + -- set forwardnoanswer as defined + xml_attr({ 'reg', num, 'fwd.noanswer.status' }, pg_t.forwardnoanswerenable) + xml_attr({ 'reg', num, 'fwd.noanswer.contact' }, pg_t.forwardnoanswer) + xml_attr({ 'reg', num, 'fwd.noanswer.ringCount' }, '4') + -- set time in seconds before diversion + --xml_attr({ 'divert.noanswer', num, 'timeout' }, '20') + + -- set forwardbusy on DND and on busy, as defined + xml_attr({ 'reg', num, 'fwd.busy.status' }, pg_t.forwardbusyenable) + xml_attr({ 'divert.dnd', num, 'enabled' }, pg_t.forwardbusyenable) + xml_attr({ 'reg', num, 'fwd.busy.contact' }, pg_t.forwardbusy) + xml_attr({ 'divert.dnd', num, 'contact' }, pg_t.forwardbusy) + + else -- forwarding is not enabled + -- disable the soft-key menu for forwarding + xml_attr({ 'divert.fwd', num, 'enabled' }, '0') + end + + +end + +end + +%> + +/> + +<% +-- DEBUGGING +--require("session") +--local log, err = io.open("/root/polycom-template.log", "a") +--log:write(session.serialize("values", values)) +%> |