mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
* Fix Yealink provisioning for contacts/groups Fix the Yealink provision templates to allow for directory_extensions, groups and users. * Fix group_uuid and user_uuid messup * Yealink directory and provisioning changes Includes the changes from PR 1582 with some fixes to the SQL. Also merged all the directory_* options into ONE directory.xml Will need to call the it with any of these: http://mydomain/app/provision/?file=directory.xml&contacts=groups http://mydomain/app/provision/?file=directory.xml&contacts=users http://mydomain/app/provision/?file=directory.xml&contacts=extensions http://mydomain/app/provision/?file=directory.xml&contacts=all
74 lines
2.1 KiB
XML
74 lines
2.1 KiB
XML
<YealinkIPPhoneDirectory>
|
|
{foreach $contacts as $row}
|
|
{if $smarty.get.contacts == "users" && $row.category == "users"}
|
|
<DirectoryEntry>
|
|
{if $row.contact_name_given != ""}
|
|
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
|
|
{else}
|
|
<Name>{$row.effective_caller_id_name}</Name>
|
|
{/if}
|
|
|
|
{foreach $row.numbers as $number}
|
|
{if $number.phone_number != ""}
|
|
<Telephone>{$number.phone_number}</Telephone>
|
|
{else}
|
|
<Telephone>{$number.phone_extension}</Telephone>
|
|
{/if}
|
|
{/foreach}
|
|
</DirectoryEntry>
|
|
{elseif $smarty.get.contacts == "groups" && $row.category == "groups"}
|
|
<DirectoryEntry>
|
|
{if $row.contact_name_given != ""}
|
|
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
|
|
{else}
|
|
<Name>{$row.effective_caller_id_name}</Name>
|
|
{/if}
|
|
|
|
{foreach $row.numbers as $number}
|
|
{if $number.phone_number != ""}
|
|
<Telephone>{$number.phone_number}</Telephone>
|
|
{else}
|
|
<Telephone>{$number.phone_extension}</Telephone>
|
|
{/if}
|
|
{/foreach}
|
|
</DirectoryEntry>
|
|
{elseif $smarty.get.contacts == "extensions" && $row.category == "extensions"}
|
|
<DirectoryEntry>
|
|
{if $row.contact_name_given != ""}
|
|
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
|
|
{else}
|
|
<Name>{$row.effective_caller_id_name}</Name>
|
|
{/if}
|
|
{if $row.phone_number != ""}
|
|
<Telephone>{$row.phone_number}</Telephone>
|
|
{else}
|
|
<Telephone>{$row.phone_extension}</Telephone>
|
|
{/if}
|
|
</DirectoryEntry>
|
|
{elseif $smarty.get.contacts == "all"}
|
|
<DirectoryEntry>
|
|
{if $row.contact_name_given != ""}
|
|
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
|
|
{else}
|
|
<Name>{$row.effective_caller_id_name}</Name>
|
|
{/if}
|
|
|
|
{if $row.category == "extensions"}
|
|
{if $row.phone_number != ""}
|
|
<Telephone>{$row.phone_number}</Telephone>
|
|
{else}
|
|
<Telephone>{$row.phone_extension}</Telephone>
|
|
{/if}
|
|
{else}
|
|
{foreach $row.numbers as $number}
|
|
{if $number.phone_number != ""}
|
|
<Telephone>{$number.phone_number}</Telephone>
|
|
{else}
|
|
<Telephone>{$number.phone_extension}</Telephone>
|
|
{/if}
|
|
{/foreach}
|
|
{/if}
|
|
</DirectoryEntry>
|
|
{/if}
|
|
{/foreach}
|
|
</YealinkIPPhoneDirectory> |