From 8f8caaede78c386c88500146dad44524c9267f9a Mon Sep 17 00:00:00 2001 From: ijaron Date: Sat, 9 Nov 2024 19:42:19 -0600 Subject: [PATCH] Update dp750/phonebook.xml (#7151) Fixes phonebook.xml to work with current contacts. Sets contact_organization to FirstName if contact_name_given and contact_name_family are not set but contact_organization is sets Phone type for home and mobile, sets all others to work Loads category == "extensions" as well --- .../provision/grandstream/dp750/phonebook.xml | 44 ++++++++++++++----- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/resources/templates/provision/grandstream/dp750/phonebook.xml b/resources/templates/provision/grandstream/dp750/phonebook.xml index 7dca557192..dc809767fe 100644 --- a/resources/templates/provision/grandstream/dp750/phonebook.xml +++ b/resources/templates/provision/grandstream/dp750/phonebook.xml @@ -1,26 +1,46 @@ 1 -{$i=0} -{foreach $contacts as $contact} -{if $contact.contact_name_given != "" && $contact.contact_type == "contact"} +{foreach $contacts as $contact} +{if $contact.contact_name_given != "" || $contact.contact_name_family != "" || $contact.contact_organization != ""} +{if $contact.contact_name_given == "" && $contact.contact_name_family == "" && $contact.contact_organization != ""} +{$contact.contact_organization} +{else} {$contact.contact_name_given} {$contact.contact_name_family} - -{$contact.contact_work} - -{if $contact.contact_home != "" } - -{$contact.contact_home} +{/if} +{if $contact.category == "extensions"} + +{$contact.phone_extension} {/if} -{if $contact.contact_cell != "" } +{if $contact.phone_label == "work"} + +{$contact.phone_number} + + +{elseif $contact.phone_label == "main"} + +{$contact.phone_number} + + +{elseif $contact.phone_label == "home"} + +{$contact.phone_number} + + +{elseif $contact.phone_label == "mobile"} -{$contact.contact_cell} +{$contact.phone_number} + + +{else} + +{$contact.phone_number} {/if} {/if} {/foreach} - + \ No newline at end of file