mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Fix line keys on GXP2135 and contribute GHP6xx template. (#6780)
This commit is contained in:
committed by
GitHub
parent
9933b44335
commit
c97ac88cd2
151
resources/templates/provision/grandstream/ghp6xx/phonebook.xml
Normal file
151
resources/templates/provision/grandstream/ghp6xx/phonebook.xml
Normal file
@@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<AddressBook>
|
||||
|
||||
<pbgroup>
|
||||
<id>1</id>
|
||||
<name>Users</name>
|
||||
<ringtones>default ringtone</ringtones>
|
||||
</pbgroup>
|
||||
<pbgroup>
|
||||
<id>2</id>
|
||||
<name>Groups</name>
|
||||
<ringtones>default ringtone</ringtones>
|
||||
</pbgroup>
|
||||
<pbgroup>
|
||||
<id>3</id>
|
||||
<name>Extensions</name>
|
||||
<ringtones>system</ringtones>
|
||||
</pbgroup>
|
||||
|
||||
{$start_id=0}
|
||||
{foreach $contacts as $row}
|
||||
{if $row.category == "users"}
|
||||
<Contact>
|
||||
<id>{$start_id++}</id>
|
||||
{if $row.contact_name_given != ""}
|
||||
{if $row.contact_organization != ""}
|
||||
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
|
||||
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
|
||||
<Company>{$row.contact_organization}</Company>
|
||||
{else}
|
||||
<FirstName>{$row.contact_name_given}</FirstName>
|
||||
<LastName>{$row.contact_name_family}</LastName>
|
||||
{/if}
|
||||
{else}
|
||||
<FirstName>{$row.effective_caller_id_name}</FirstName>
|
||||
{/if}
|
||||
<JobTitle></JobTitle>
|
||||
<Frequent>0</Frequent>
|
||||
{foreach $row.numbers as $number}
|
||||
{if $number.phone_number != ""}
|
||||
{if $number.phone_label == "work"}
|
||||
<Phone type="Work">
|
||||
<phonenumber>{$number.phone_number}</phonenumber>
|
||||
<accountindex>0</accountindex>
|
||||
</Phone>
|
||||
{/if}
|
||||
{if $number.phone_label == "home"}
|
||||
<Phone type="Home">
|
||||
<phonenumber>{$number.phone_number}</phonenumber>
|
||||
<accountindex>0</accountindex>
|
||||
</Phone>
|
||||
{/if}
|
||||
{if $number.phone_label == "mobile"}
|
||||
<Phone type="Cell">
|
||||
<phonenumber>{$number.phone_number}</phonenumber>
|
||||
<accountindex>0</accountindex>
|
||||
</Phone>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<Group>1</Group>
|
||||
<Primary>0</Primary>
|
||||
<Department></Department>
|
||||
<Job></Job>
|
||||
<Company></Company>
|
||||
</Contact>
|
||||
{elseif $row.category == "groups"}
|
||||
<Contact>
|
||||
<id>{$start_id++}</id>
|
||||
{if $row.contact_name_given != ""}
|
||||
{if $row.contact_organization != ""}
|
||||
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
|
||||
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
|
||||
<Company>{$row.contact_organization}</Company>
|
||||
{else}
|
||||
<FirstName>{$row.contact_name_given}</FirstName>
|
||||
<LastName>{$row.contact_name_family}</LastName>
|
||||
{/if}
|
||||
{else}
|
||||
<FirstName>{$row.effective_caller_id_name}</FirstName>
|
||||
{/if}
|
||||
<JobTitle></JobTitle>
|
||||
|
||||
<Frequent>0</Frequent>
|
||||
{foreach $row.numbers as $number}
|
||||
{if $number.phone_number != ""}
|
||||
{if $number.phone_label == "work"}
|
||||
<Phone type="Work">
|
||||
<phonenumber>{$number.phone_number}</phonenumber>
|
||||
<accountindex>0</accountindex>
|
||||
</Phone>
|
||||
{/if}
|
||||
{if $number.phone_label == "home"}
|
||||
<Phone type="Home">
|
||||
<phonenumber>{$number.phone_number}</phonenumber>
|
||||
<accountindex>0</accountindex>
|
||||
</Phone>
|
||||
{/if}
|
||||
{if $number.phone_label == "mobile"}
|
||||
<Phone type="Cell">
|
||||
<phonenumber>{$number.phone_number}</phonenumber>
|
||||
<accountindex>0</accountindex>
|
||||
</Phone>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<Group>2</Group>
|
||||
<Primary>0</Primary>
|
||||
<Department></Department>
|
||||
<Job></Job>
|
||||
<Company></Company>
|
||||
</Contact>
|
||||
{elseif $row.category == "extensions"}
|
||||
<Contact>
|
||||
<id>{$start_id++}</id>
|
||||
{if $row.contact_name_given != ""}
|
||||
{if $row.contact_organization != ""}
|
||||
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
|
||||
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
|
||||
<Company>{$row.contact_organization}</Company>
|
||||
{else}
|
||||
<FirstName>{$row.contact_name_given}</FirstName>
|
||||
<LastName>{$row.contact_name_family}</LastName>
|
||||
{/if}
|
||||
{else}
|
||||
<FirstName>{$row.effective_caller_id_name}</FirstName>
|
||||
{/if}
|
||||
<JobTitle></JobTitle>
|
||||
<Frequent>0</Frequent>
|
||||
{if $row.phone_number != ""}
|
||||
<Phone type="Work">
|
||||
<phonenumber>{$row.phone_number}</phonenumber>
|
||||
<accountindex>0</accountindex>
|
||||
</Phone>
|
||||
{else}
|
||||
<Phone type="Work">
|
||||
<phonenumber>{$row.phone_extension}</phonenumber>
|
||||
<accountindex>0</accountindex>
|
||||
</Phone>
|
||||
{/if}
|
||||
<Group>3</Group>
|
||||
<Primary>0</Primary>
|
||||
<Department></Department>
|
||||
<Job></Job>
|
||||
<Company></Company>
|
||||
</Contact>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
</AddressBook>
|
||||
2688
resources/templates/provision/grandstream/ghp6xx/{$mac}.xml
Normal file
2688
resources/templates/provision/grandstream/ghp6xx/{$mac}.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -8602,14 +8602,15 @@
|
||||
<!-- # P1364 = 0 -->
|
||||
|
||||
<!-- Set $fixed_keys variable below and the rest should work -->
|
||||
<!-- detect with $template == grandstream/gxp21xx 2130=3fixed 2140=4fixed 2160=6fixed 2170=12fixed 2135=8fixed -->
|
||||
<!-- detect with $template == grandstream/gxp21xx 2130=3fixed 2140=4fixed 2160=6fixed 2170=12fixed 2135=4fixed -->
|
||||
<!-- $fixed_keys should be number of SIP accounts, not buttons--2135 has 8 buttons but 4 SIP accounts -->
|
||||
|
||||
{$fixed_keys=4}
|
||||
{if $template == "grandstream/gxp2130"}{$fixed_keys=3}{/if}
|
||||
{if $template == "grandstream/gxp2140"}{$fixed_keys=4}{/if}
|
||||
{if $template == "grandstream/gxp2160"}{$fixed_keys=6}{/if}
|
||||
{if $template == "grandstream/gxp2170"}{$fixed_keys=12}{/if}
|
||||
{if $template == "grandstream/gxp2135"}{$fixed_keys=8}{/if}
|
||||
{if $template == "grandstream/gxp2135"}{$fixed_keys=4}{/if}
|
||||
<!-- Detected {$template} with {$fixed_keys} fixed keys -->
|
||||
{$start_id=1363}
|
||||
{assign var=key_types value=["none"=>-1,"line"=>0,"shared line"=>1,"speed dial"=>10, "blf"=>11, "presence watcher"=>12, "eventlist blf"=>13,"speed dial active"=>14,"dial dtmf"=>15,"voicemail"=>16,"call return"=>17,"transfer"=>18,"call park"=>19,"intercom"=>20,"ldap search"=>21,"multicast paging"=>23,"record"=>24,"call log"=>25,"monitored call park"=>26,"menu"=>27]}
|
||||
|
||||
Reference in New Issue
Block a user