From 99db46432058badac2415f285c76c0e10be82f53 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 21 Nov 2019 19:25:34 -0700 Subject: [PATCH] Update phonebook.xml --- .../grandstream/gxp2170/phonebook.xml | 168 +++++++++++------- 1 file changed, 100 insertions(+), 68 deletions(-) diff --git a/resources/templates/provision/grandstream/gxp2170/phonebook.xml b/resources/templates/provision/grandstream/gxp2170/phonebook.xml index 2338a27981..deb211d001 100644 --- a/resources/templates/provision/grandstream/gxp2170/phonebook.xml +++ b/resources/templates/provision/grandstream/gxp2170/phonebook.xml @@ -3,111 +3,143 @@ - 6 + 1 Users default ringtone - 7 + 2 + Groups + default ringtone + + + 3 Extensions system + {$start_id=0} {foreach $contacts as $row} {if $row.category == "users"} - {$start_id=1} - {$start_id} + {$start_id++} {if $row.contact_name_given != ""} - {$row.contact_name_given} - - {$row.contact_name_family} - + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} - + 0 {foreach $row.numbers as $number} {if $number.phone_number != ""} - - 0 - - {$number.phone_number} - 0 - - - {$number.phone_extension} - 0 - - - {$number.phone_mobile} - 0 - - 6 + {if $number.phone_label == "work"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "home"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "mobile"} + + {$number.phone_number} + 0 + + {/if} + {/if} + {/foreach} + 1 0 {elseif $row.category == "groups"} - {$start_id=1} - {$start_id} + {$start_id++} {if $row.contact_name_given != ""} - {$row.contact_name_given} - - {$row.contact_name_family} - + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + 0 {foreach $row.numbers as $number} {if $number.phone_number != ""} - - 0 - - {$number.phone_number} - 0 - - - {$number.phone_extension} - 0 - - - {$number.phone_mobile} - 0 - - 6 + {if $number.phone_label == "work"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "home"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "mobile"} + + {$number.phone_number} + 0 + + {/if} + {/if} + {/foreach} + 2 0 {elseif $row.category == "extensions"} - {$start_id=1} - {$start_id} + {$start_id++} {if $row.contact_name_given != ""} - {$row.contact_name_given} - - {$row.contact_name_family} - + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} - - {foreach $row.numbers as $number} - {if $number.phone_number != ""} - 0 - - {$number.phone_number} - 0 - - - {$number.phone_extension} - 0 - - - {$number.phone_mobile} - 0 - - 6 + {if $row.phone_number != ""} + + {$row.phone_number} + 0 + + {else} + + {$row.phone_extension} + 0 + + {/if} + 3 0