You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/assets/linksys-spa5xx-configtempla...

75 lines
3.7 KiB

<flat-profile>
[% barge_in = 0 -%]
<Profile_Rule>[% config.url %]</Profile_Rule>
<Upgrade_Enable>Yes</Upgrade_Enable>
<Upgrade_Rule>($SWVER &lt; [% firmware.maxversion %])? [% firmware.baseurl %]/$MA/from/$SWVER/next</Upgrade_Rule>
<Station_Name>[% phone.stationname %]</Station_Name>
<Station_Display_Name>[% phone.stationname %]</Station_Display_Name>
<Server_Type>RFC3265_4235</Server_Type>
<Voice_Mail_Number>voicebox</Voice_Mail_Number>
<Attendant_Console_Call_Pickup_Code>**#</Attendant_Console_Call_Pickup_Code>
<Attendant_Console_Call_Park_Code>*68</Attendant_Console_Call_Park_Code>
<Attendant_Console_Call_unPark_Code>*88</Attendant_Console_Call_unPark_Code>
<Linksys_Key_System>Yes</Linksys_Key_System>
<Subscribe_Expires>300</Subscribe_Expires>
[% FOR range IN phone.lineranges -%]
[%
used_keys = [];
FOR key IN [1 .. range.num_lines];
used_keys.$key = 0;
END
-%]
[% FOR line IN range.lines -%]
[% key = line.keynum + 1 -%]
[% used_keys.${key} = 1; -%]
[% IF range.name == "Phone Keys" -%]
<Subscription_Expires_[% key %]_>300</Subscription_Expires_[% key %]_>
<Short_Name_[% key %]_>[% line.displayname %]</Short_Name_[% key %]_>
<Share_Call_Appearance_[% key %]_>[% line.type == "shared" ? line.type : "private" %]</Share_Call_Appearance_[% key %]_>
[% IF line.type == "blf" -%]
<Extended_Function_[% key %]_>fnc=blf+cp+sd;sub=[% line.username %]@[% line.domain %]</Extended_Function_[% key %]_>
[% ELSIF line.type == "shared" && barge_in == 0 -%]
<SCA_Barge-In_Enable>Yes</SCA_Barge-In_Enable>
[% barge_in = 1 -%]
[% END -%]
<Line_Enable_[% key %]_>[% line.type == "blf" ? "No" : "Yes" %]</Line_Enable_[% key %]_>
<Share_Ext_[% key %]_>[% line.type == "shared" ? "shared" : "private" %]</Share_Ext_[% key %]_>
<Shared_User_ID_[% key %]_>[% line.type == "shared" ? line.username : "" %]</Shared_User_ID_[% key %]_>
[% IF line.type == "private" || line.type == "shared" -%]
<Outbound_Proxy_[% key %]_>[% line.domain %]</Outbound_Proxy_[% key %]_>
<Use_Outbound_Proxy_[% key %]_>Yes</Use_Outbound_Proxy_[% key %]_>
<Extension_[% key %]_>[% key %]</Extension_[% key %]_>
<Register_[% key %]_>Yes</Register_[% key %]_>
<Use_DNS_SRV_[% key %]_>No</Use_DNS_SRV_[% key %]_>
<User_ID_[% key %]_>[% line.username %]</User_ID_[% key %]_>
<Password_[% key %]_>[% line.password %]</Password_[% key %]_>
<Proxy_[% key %]_>[% line.domain %]</Proxy_[% key %]_>
<Use_Auth_ID_[% key %]_></Use_Auth_ID_[% key %]_>
<Auth_ID_[% key %]_></Auth_ID_[% key %]_>
[% ELSE -%]
<Extension_[% key %]_>Disabled</Extension_[% key %]_>
[% END -%]
[% ELSIF range.name == "Attendant Console 1" -%]
<Unit_1_Key_[% key %]>fnc=sd+cp+blf;sub=[% line.username %]@[% line.domain %]</Unit_1_Key_[% key %]>
[% ELSIF range.name == "Attendant Console 2" -%]
<Unit_2_Key_[% key %]>fnc=sd+cp+blf;sub=[% line.username %]@[% line.domain %]</Unit_2_Key_[% key %]>
[% END -%]
[% END -%]
[% FOR key IN [1 .. range.num_lines] -%]
[% IF range.name == "Phone Keys" -%]
[% UNLESS used_keys.$key == 1 -%]
<Extension_[% key %]_>Disabled</Extension_[% key %]_>
[% END -%]
[% ELSIF range.name == "Attendant Console 1" -%]
[% UNLESS used_keys.$key == 1 -%]
<Unit_1_Key_[% key %]></Unit_1_Key_[% key %]>
[% END -%]
[% ELSIF range.name == "Attendant Console 2" -%]
[% UNLESS used_keys.$key == 1 -%]
<Unit_2_Key_[% key %]></Unit_2_Key_[% key %]>
[% END -%]
[% END -%]
[% END -%]
[% END -%]
</flat-profile>