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