Update phonebook.xml (#4884)

This commit is contained in:
Len 2019-11-21 12:20:45 -05:00 committed by FusionPBX
parent 0747028021
commit e1aa2aa0e9
1 changed files with 54 additions and 46 deletions

View File

@ -1,49 +1,57 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="UTF-8"?>
<AddressBook> <AddressBook>
<version>1</version>
{foreach $contacts as $contact}
{if $contact.contact_type == "group"}
<pbgroup> <pbgroup>
<id>{$contact.id}</id> <id>6</id>
<name>{$contact.group_description|truncate:10}</name> <name>Users</name>
<ringtones>default ringtone</ringtones>
</pbgroup> </pbgroup>
{/if} <pbgroup>
{/foreach} <id>7</id>
{$i=0} <name>Extensions</name>
{foreach $contacts as $contact} <ringtones>system</ringtones>
{if $contact.contact_name_given != "" && $contact.contact_type == "contact"} </pbgroup>
{foreach $contacts as $row}
{if $row.category == "users"}
{$start_id=1}
<Contact> <Contact>
<FirstName>{$contact.contact_name_given}</FirstName> <id>{$start_id}</id>
<LastName>{$contact.contact_name_family}</LastName> {if $row.contact_name_given != ""}
{if $contact.contact_role != "" } <FirstName>{$row.contact_name_given}</FirstName>
<JobTitle>{$contact.contact_role}</JobTitle>
{/if} <LastName>{$row.contact_name_family}</LastName>
{if $contact.contact_category != "" }
<Department>{$contact.contact_category}</Department> <JobTitle></JobTitle>
{/if}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Frequent>0</Frequent>
<Phone type="Work"> <Phone type="Work">
<phonenumber>{$contact.contact_work}</phonenumber> <phonenumber>{$number.phone_number}</phonenumber>
<accountindex>1</accountindex> <accountindex>0</accountindex>
</Phone> </Phone>
{if $contact.contact_home != "" }
<Phone type="Home"> <Phone type="Home">
<phonenumber>{$contact.contact_home}</phonenumber> <phonenumber>{$number.phone_extension}</phonenumber>
<accountindex>1</accountindex> <accountindex>0</accountindex>
</Phone> </Phone>
{/if}
{if $contact.contact_cell != "" }
<Phone type="Cell"> <Phone type="Cell">
<phonenumber>{$contact.contact_cell}</phonenumber> <phonenumber>{$number.phone_mobile}</phonenumber>
<accountindex>1</accountindex> <accountindex>0</accountindex>
</Phone> </Phone>
<Group>6</Group>
<Primary>0</Primary>
<Department></Department>
<Job></Job>
<Company></Company>
{/if} {/if}
{if $contact.contact_organization != "" }
<Company>{$contact.contact_organization}</Company>
{/if}
{foreach $contact.groups as $group}
<Group>{$group}</Group>
{/foreach} {/foreach}
</Contact> </Contact>
{/if}
{/if} {/if}
{/foreach} {/foreach}
</AddressBook> </AddressBook>