From 4fde87105ff2b931606b0ebe0cfda704dde46c49 Mon Sep 17 00:00:00 2001 From: Len Date: Fri, 22 Nov 2019 21:32:55 -0500 Subject: [PATCH] Create phonebook.xml (#4905) --- .../grandstream/gac2500/phonebook.xml | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 resources/templates/provision/grandstream/gac2500/phonebook.xml diff --git a/resources/templates/provision/grandstream/gac2500/phonebook.xml b/resources/templates/provision/grandstream/gac2500/phonebook.xml new file mode 100644 index 0000000000..deb211d001 --- /dev/null +++ b/resources/templates/provision/grandstream/gac2500/phonebook.xml @@ -0,0 +1,151 @@ + + + + + + 1 + Users + default ringtone + + + 2 + Groups + default ringtone + + + 3 + Extensions + system + + + {$start_id=0} + {foreach $contacts as $row} + {if $row.category == "users"} + + {$start_id++} + {if $row.contact_name_given != ""} + {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 != ""} + {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++} + {if $row.contact_name_given != ""} + {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 != ""} + {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++} + {if $row.contact_name_given != ""} + {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 + {if $row.phone_number != ""} + + {$row.phone_number} + 0 + + {else} + + {$row.phone_extension} + 0 + + {/if} + 3 + 0 + + + + + {/if} + {/foreach} + +