mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 09:03:49 +00:00
Merge pull request #1139 from joernott/master
Allow provisioning with internal addressbook and update snom320 tpl
This commit is contained in:
@@ -743,6 +743,14 @@ include "root.php";
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//populate internal address book
|
||||
$sql = "SELECT extension as , effective_caller_id_name, effective_caller_id_number, outbound_caller_id_name, outbound_caller_id_number, directory_full_name FROM v_extensions";
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$internal_addressbook = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$view->assign("internal_addressbook",$internal_addressbook);
|
||||
unset ($prep_statement);
|
||||
|
||||
//set the mac address in the correct format
|
||||
$mac = $this->format_mac($mac, $device_vendor);
|
||||
|
||||
|
||||
@@ -100,19 +100,30 @@
|
||||
<codec_priority_list idx="12" perm="">g722,pcmu,pcma,gsm,g726-32,aal2-g726-32,g723,g729,telephone-event</codec_priority_list>
|
||||
</phone-settings>
|
||||
<functionKeys e="2">
|
||||
<fkey idx="0" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="1" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="2" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="3" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="4" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="5" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="6" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="7" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="8" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="9" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="10" context="active" label="" perm="">line</fkey>
|
||||
<fkey idx="11" context="active" label="" perm="">line</fkey>
|
||||
{foreach $keys as $row}
|
||||
{if $row.device_key_line == ""}
|
||||
{if $row.device_key_category == "line"}
|
||||
<fkey idx="{$row.device_key_id-1}" context="active" label="{$row.device_key_label}" perm="">{$row.device_key_type} {$row.device_key_value} {$row.device_key_extension}</fkey>
|
||||
{else}
|
||||
<fkey idx="{$row.device_key_id}" context="active" label="" perm="">line</fkey>
|
||||
{/if}
|
||||
{else}
|
||||
{if $row.device_key_category == "line"}
|
||||
<fkey idx="{$row.device_key_id-1}" context="{$row.device_key_line}" label="{$row.device_key_label}" perm="">{$row.device_key_type} {$row.device_key_value} {$row.device_key_extension}</fkey>
|
||||
{else}
|
||||
<fkey idx="{$row.device_key_id}" context="active" label="" perm="">line</fkey>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</functionKeys>
|
||||
<tbook e="2">
|
||||
<tbook e="2" complete="true">
|
||||
{foreach $internal_addressbook as $address}
|
||||
<item context="active" type="" fav="false">
|
||||
<number>{$address.extension}</number>
|
||||
<number_type>sip</number_type>
|
||||
<first_name>{$address.directory_full_name} ({$address.extension})</first_name>
|
||||
</item>
|
||||
{/foreach}
|
||||
|
||||
</tbook>
|
||||
</settings>
|
||||
Reference in New Issue
Block a user