Escene provision (#1140)

* Add. Provision to Escene ES330/ES320

* Add. Look up Escene device by ext+domain.

* Update Escene template.

* Add. `provision` section in config.

Found than ES330 some time hangup when it try get software/core and get error from fusion.
This commit is contained in:
Alexey Melnichuk
2016-05-06 10:49:43 +03:00
committed by FusionPBX
parent 73605b4454
commit f828c1c56b
9 changed files with 2014 additions and 1754 deletions

View File

@@ -0,0 +1,86 @@
<all>
<Privisions>
<!-- protocol
0 - tftp
1 - http
2 - ftp
3 - https
-->
<privision
PNP="1"
AutoPrivisionFlag="1"
DHCPOptionFlag="1"
DHCPOptionValue="66"
protocol="1"
Firmware="{$domain_name}{$project_path}/app/provision"
username=""
password=""
Freqency="168"
time="24"
DownloadBroadsoft="0"
DownloadFirmwar="0"
DownloadKernel="0"
DownloadExtension="1"
Downloadconfig="1"
DownloadPhonebook="0"
DownloadPersonPhonebook="0"
Bootingchecked="0"
ExtensionNumber=""
BootingcheckedMode="0"
DownloadFilename="0"
/>
</Privisions>
<sipUsers>
{foreach $lines as $row}
{if $row.line_number neq ""}
{$line_subscribe_tmp=$line_subscribe_{$row.line_number}}
{if $line_subscribe_tmp==""} {$line_subscribe_tmp=$line_subscribe} {/if}
{if $line_subscribe_tmp==""} {$line_subscribe_tmp=$row.register_expires} {/if}
{if $line_subscribe_tmp<"120"} {$line_subscribe_tmp="120"} {/if}
<sipUser id="{$row.line_number-1}"
EnableAccount="{($row.enabled=='true')?'1':'0'}"
Describe="MyLabel"
DomainName="{$row.server_address}"
UserName="{$row.display_name}"
UserNumber="{$row.user_id}"
approveName="{$row.auth_id}"
Password="{$row.password}"
ProxyServerAddress="{if $row.outbound_proxy neq ''}{$row.outbound_proxy}{else}{$row.server_address}{/if}{if $row.sip_port neq '5060'}:{$row.sip_port}{/if}"
LinkUse="{if $row.sip_transport=='tcp'}1{elseif $row.sip_transport=='tls'}2{else}0{/if}"
PossessNumber="1"
SecondProxyServerAddress=""
PollingRegistrationTime="32"
RefreshTime="{$row.register_expires}"
Subscribe="{$line_subscribe_tmp}"
SecondDomainName=""
STUNAddress=""
STUNEnableFlag="0"
flag="0"
SupportNumber="8"
RTPBegin="10000" RTPEND="10128"
AccountMode="0"
RegisterMethod="0"
BLAEnableFlag="0"
BLANum=""
AnonymousCall="0"
UserSessionTimerEnable="0"
SessionTimer="300"
AllowEventsEnable="0"
DNSSRVEnable="0"
RegisteredNAT="1"
RingFilename=""
KeepaliveEnable="1"
KeepaliveInterval="30"
AnonymousCallReject="0"
ProxyEnableFlag="0"
AutoAnsEnableFlag="0"
SessionTimerRefresher="0"
UserphoneEnable="0"
UserSessionTimerRefresher="0"
/>
{/if}
{/foreach}
</sipUsers>
</all>

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<all>
<hotlines>
{$is_first_line='true'}
{foreach $keys as $row}
{if $row.device_key_category=="programmable"}
{if $row.device_key_id!=""}
{if $row.device_key_line==""}
{$row.device_key_line="127"}
{/if}
<hotline {if $is_first_line=='true'}ExternID="0"{$is_first_line='false'}{/if} id="{$row.device_key_id-1}" SipAccounts="{$row.device_key_line}" ID="{$row.device_key_id-1}" Type="{$row.device_key_type}" HotlineNum="{$row.device_key_value}" Name="{$row.device_key_label}"/>
{/if}
{/if}
{/foreach}
</hotlines>
<Extensions>
{foreach $keys as $row}
{if $row.device_key_category=="expansion"}
{if $row.device_key_id le "32"}
<extension id="{$row.device_key_id-1}" HotlineNum="{$row.device_key_value}" SipAccounts="{$row.device_key_line}" ID="{$row.device_key_id-1}" Type="{$row.device_key_type}" Name="{$row.device_key_label}" />
{/if}
{/if}
{/foreach}
</Extensions>
<Extension2s>
{foreach $keys as $row}
{if $row.device_key_category=="expansion"}
{if ($row.device_key_id gt "32")&&($row.device_key_id le "64")}
<extension2 id="{$row.device_key_id-33}" HotlineNum="{$row.device_key_value}" SipAccounts="{$row.device_key_line}" ID="{$row.device_key_id-33}" Type="{$row.device_key_type}" Name="{$row.device_key_label}" />
{/if}
{/if}
{/foreach}
</Extension2s>
<Extension3s>
{foreach $keys as $row}
{if $row.device_key_category=="expansion"}
{if ($row.device_key_id gt "64")&&($row.device_key_id le "96")}
<extension3 id="{$row.device_key_id-65}" HotlineNum="{$row.device_key_value}" SipAccounts="{$row.device_key_line}" ID="{$row.device_key_id-65}" Type="{$row.device_key_type}" Name="{$row.device_key_label}" />
{/if}
{/if}
{/foreach}
</Extension3s>
<Extension4s>
{foreach $keys as $row}
{if $row.device_key_category=="expansion"}
{if ($row.device_key_id gt "96")&&($row.device_key_id le "128")}
<extension4 id="{$row.device_key_id-97}" HotlineNum="{$row.device_key_value}" SipAccounts="{$row.device_key_line}" ID="{$row.device_key_id-97}" Type="{$row.device_key_type}" Name="{$row.device_key_label}" />
{/if}
{/if}
{/foreach}
</Extension4s>
<Extension5s>
{foreach $keys as $row}
{if $row.device_key_category=="expansion"}
{if ($row.device_key_id gt "128")&&($row.device_key_id le "160")}
<extension5 id="{$row.device_key_id-129}" HotlineNum="{$row.device_key_value}" SipAccounts="{$row.device_key_line}" ID="{$row.device_key_id-129}" Type="{$row.device_key_type}" Name="{$row.device_key_label}" />
{/if}
{/if}
{/foreach}
</Extension5s>
<Extension6s>
{foreach $keys as $row}
{if $row.device_key_category=="expansion"}
{if ($row.device_key_id gt "160")&&($row.device_key_id le "192")}
<extension6 id="{$row.device_key_id-161}" HotlineNum="{$row.device_key_value}" SipAccounts="{$row.device_key_line}" ID="{$row.device_key_id-161}" Type="{$row.device_key_type}" Name="{$row.device_key_label}" />
{/if}
{/if}
{/foreach}
</Extension6s>
</all>