This commit is contained in:
markjcrane
2016-05-13 08:52:49 -06:00
3 changed files with 30 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ if (strlen($_GET["contact_uuid"]) > 0) {
$phone_description = check_str($_POST["phone_description"]);
//remove any phone number formatting
$phone_number = preg_replace('{\D}', '', $phone_number);
$phone_number = preg_replace('{(?!^\+)[\D]}', '', $phone_number);
//use custom label if set
$phone_label = ($phone_label_custom != '') ? $phone_label_custom : $phone_label;

View File

@@ -1,4 +1,5 @@
<all>
{if $smarty.server.HTTPS == "on"}{$https=true}{else}{$https=false}{/if}
<SipDSPs>
<!-- JITTERBUFFER 0 - adjust, 1 - fixed -->
<dsp
@@ -106,7 +107,7 @@
AutoPrivisionFlag="1"
DHCPOptionFlag="1"
DHCPOptionValue="66"
protocol="1"
protocol={if $https}"3"{else}"1"{/if}
Firmware="{$domain_name}{$project_path}/app/provision"
username=""
password=""
@@ -116,7 +117,7 @@
Downloadconfig="1"
DownloadExtension="1"
DownloadPhonebook="0"
DownloadPersonPhonebook="0"
DownloadPersonPhonebook="1"
Bootingchecked="1"
ZeroActive="0"
WaitTime="10"

View File

@@ -0,0 +1,26 @@
<all>
{foreach $contacts as $contact}
{$contact_groups[$contact.contact_category]=true}
{/foreach}
<PhoneGroups>
{$i=0}
{foreach $contact_groups as $name => $true}
<group id="{$i}" groupid="{$i}" name="{$name}" Descriptor="" RingType="" />
{$i=$i+1}
{/foreach}
</PhoneGroups>
<PhoneBooks>
{$i=0}
{foreach $contacts as $contact}
<book
id="{$i}" Bookid="{$i}" speedid="0" accountid="127" NewVer="1" ISUseBLF="0"
GroupName="{$contact.contact_category}" GroupNameTwo="" FirstName="{$contact.contact_name_given}" LastName="{$contact.contact_name_family}"
MobileNum="{$contact.phone_number_mobile}" OfficeNum="{$contact.phone_number_work}" OtherNum=""
Username="{$contact.contact_name_given}{$contact.contact_name_family}"
/>
{$i=$i+1}
{/foreach}
</PhoneBooks>
</all>