This commit is contained in:
markjcrane 2016-05-11 09:06:29 -06:00
commit 421ab16a6a
5 changed files with 367 additions and 22 deletions

View File

@ -32,6 +32,7 @@ RewriteRule ^.*/([A-Fa-f0-9]{12})-web.cfg$ app/provision/?mac=$1&file=w
RewriteRule ^.*/([A-Fa-f0-9]{12})-directory.xml$ app/provision/?mac=$1&file=directory.xml [QSA]
#Escene
RewriteRule ^.*/provision/([A-Fa-f0-9]+)_Extern.xml$ app/provision/?ext=$1&file={$mac}_extern.xml [QSA]
RewriteRule ^.*/provision/([0-9]{1,11})_Extern.xml$ app/provision/?ext=$1&file={$mac}_extern.xml [QSA]
RewriteRule ^.*/provision/([0-9]{1,11})_Phonebook.xml$ app/provision/?ext=$1&file={$mac}_phonebook.xml [QSA]
Options -Indexes

View File

@ -67,7 +67,7 @@
else {
//ensure that the requested voicemail box is assigned to this user
$found = false;
foreach($voicemail_uuids as $row) {
if (is_array($voicemail_uuids)) foreach($voicemail_uuids as $row) {
if ($voicemail_uuid == $row['voicemail_uuid']) {
$sql .= "and voicemail_uuid = '".$row['voicemail_uuid']."' ";
$found = true;
@ -85,7 +85,7 @@
if (count($voicemail_ids) > 0) {
//show only the assigned voicemail ids
$sql .= "and (";
foreach($voicemail_ids as $row) {
if (is_array($voicemail_ids)) foreach($voicemail_ids as $row) {
if ($x == 0) {
$sql .= "voicemail_id = '".$row['voicemail_id']."' ";
}
@ -114,7 +114,7 @@
$voicemails = $this->voicemails();
//add the voicemail messages to the array
foreach ($voicemails as &$row) {
if (is_array($voicemails)) foreach ($voicemails as &$row) {
//get the voicemail messages
$this->voicemail_uuid = $row['voicemail_uuid'];
$this->voicemail_id = $row['voicemail_id'];
@ -134,7 +134,7 @@
if (is_array($this->voicemail_id)) {
$sql .= "and (";
$x = 0;
foreach($this->voicemail_id as $row) {
if (is_array($this->voicemail_id)) foreach($this->voicemail_id as $row) {
if ($x > 0) {
$sql .= "or ";
}
@ -159,7 +159,7 @@
$result_count = count($result);
unset ($prep_statement, $sql);
if ($result_count > 0) {
foreach($result as &$row) {
if (is_array($result)) foreach($result as &$row) {
//set the greeting directory
$path = $_SESSION['switch']['voicemail']['dir'].'/default/'.$_SESSION['domain_name'].'/'.$row['voicemail_id'];
if (file_exists($path.'/msg_'.$row['voicemail_message_uuid'].'.wav')) {
@ -266,7 +266,7 @@
$prep_statement = $this->db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
if (is_array($result)) foreach ($result as &$row) {
$this->voicemail_id = $row["voicemail_id"];
}
unset ($prep_statement);
@ -275,13 +275,13 @@
//delete the recording
$file_path = $_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$this->voicemail_id;
if ($this->voicemail_message_uuid != '') {
foreach (
glob($file_path."/msg_".$this->voicemail_message_uuid.".*") as $file_name) { unlink($file_name);
foreach (glob($file_path."/msg_".$this->voicemail_message_uuid.".*") as $file_name) {
unlink($file_name);
}
}
else {
foreach (
glob($file_path."/msg_*.*") as $file_name) { unlink($file_name); //remove all recordings
foreach (glob($file_path."/msg_*.*") as $file_name) {
unlink($file_name); //remove all recordings
}
}
@ -309,7 +309,7 @@
$prep_statement = $this->db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
if (is_array($result)) foreach ($result as &$row) {
$this->voicemail_id = $row["voicemail_id"];
}
unset ($prep_statement);
@ -382,7 +382,7 @@
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
if (count($result) > 0) {
foreach($result as &$row) {
if (is_array($result)) foreach($result as &$row) {
if ($row['message_base64'] != '') {
$message_decoded = base64_decode($row['message_base64']);
file_put_contents($path.'/msg_'.$this->voicemail_message_uuid.'.ext', $message_decoded);
@ -488,4 +488,4 @@ foreach ($_SESSION['user']['extension'] as $value) {
}
*/
?>
?>

View File

@ -0,0 +1,119 @@
GMT Greenwich Mean Time - 12
GMT+00:00 Denmark-Faroe Islands(Torshavn) - 67
GMT+00:00 Greenland - 66
GMT+00:00 Irelan(Dublin) - 68
GMT+00:00 Morocco - 72
GMT+00:00 Portugal(Lisboa, Porto, Funchal) - 69
GMT+00:00 Spain-Canary Islands(Las Palmas) - 70
GMT+00:00 United-Kingdom(London) - 71
GMT+01:00 Albania(Tirane) - 73
GMT+01:00 Austria(Vienna) - 74
GMT+01:00 Belgium(Brussels) - 75
GMT+01:00 Caicos - 76
GMT+01:00 Chad - 77
GMT+01:00 Croatia(Zagreb) - 79
GMT+01:00 Czech Republic(Prague) - 80
GMT+01:00 Denmark(Kopenhagen) - 81
GMT+01:00 France(Paris) - 82
GMT+01:00 Germany(Berlin) - 13
GMT+01:00 Hungary(Budapest) - 83
GMT+01:00 Italy(Rome) - 84
GMT+01:00 Luxembourg(Luxembourg) - 85
GMT+01:00 Macedonia(Skopje) - 86
GMT+01:00 Namibia(Windhoek) - 88
GMT+01:00 Netherlands(Amsterdam) - 87
GMT+01:00 Spain(Madrid) - 78
GMT+02:00 Egypt(Cairo) - 14
GMT+02:00 Estonia(Tallinn) - 89
GMT+02:00 Finland(Helsinki) - 90
GMT+02:00 Gaza Strip(Gaza) - 91
GMT+02:00 Greece(Athens) - 92
GMT+02:00 Israel(Tel Aviv) - 45
GMT+02:00 Jordan(Amman) - 93
GMT+02:00 Latvia(Riga) - 94
GMT+02:00 Lebanon(Beirut) - 95
GMT+02:00 Moldova(Kishinev) - 96
GMT+02:00 Romania(Bucharest) - 48
GMT+02:00 Russia(Kaliningrad) - 97
GMT+02:00 Syria(Damascus) - 98
GMT+02:00 Turkey(Ankara) - 99
GMT+02:00 Ukraine(Kyiv, Odessa) - 100
GMT+03:00 Bahrain,Russia(Moscow) - 15
GMT+03:00 East Africa Time - 101
GMT+03:00 Iraq(Baghdad) - 102
GMT+03:30 Iran(Teheran) - 47
GMT+04:00 Armenia(Yerevan) - 103
GMT+04:00 Azerbaijan(Baku) - 104
GMT+04:00 Georgia(Tbilisi) - 105
GMT+04:00 Kazakhstan(Aktau) - 106
GMT+04:00 Muscat - 16
GMT+04:00 Russia(Samara) - 107
GMT+04:30 Afghanistan - 108
GMT+05:00 Kazakhstan(Aqtobe) - 109
GMT+05:00 Kyrgyzstan(Bishkek) - 110
GMT+05:00 Pakistan(Islamabad) - 17
GMT+05:00 Russia(Chelyabinsk) - 111
GMT+05:30 India - 26
GMT+06:00 Kazakhstan(Astana, Almaty) - 112
GMT+06:00 Russia(Novosibirsk, Omsk) - 18
GMT+06:30 Myanmar - 46
GMT+07:00 Russia(Krasnoyarsk) - 113
GMT+07:00 Thailand(Bangkok) - 19
GMT+08:00 Australia(Perth) - 115
GMT+08:00 China(Beijing) - 20
GMT+08:00 Singapore(Singapore) - 114
GMT+09:00 Japan(Tokyo) - 21
GMT+09:00 Korea(Seoul) - 116
GMT+09:30 Australia(Adelaide, Darwin) - 117
GMT+09:30 Australia-Central - 44
GMT+10:00 Russia(Vladivostok) - 118
GMT+10:00 Sydney,Melbourne,Canberra,Brisbane,Hobart - 22
GMT+10:30 Australia(Lord Howe Islands) - 119
GMT+11:00 New Caledonia(Noumea) - 120
GMT+11:00 Solomon Islands - 23
GMT+12:00 New Zealand(Wellington, Auckland) - 24
GMT+12:45 New Zealand(Chatham Islands) - 121
GMT+13:00 Tonga(Nukualofa) - 25
GMT-01:00 Arquipelago Dos Acores - 11
GMT-01:00 Portugal(Azores) - 65
GMT-02:00 UTC-02 - 10
GMT-03:00 Argentina(Buenos Aires) - 64
GMT-03:00 Brasil(Brasilia) - 9
GMT-03:00 Denmark-Greenland(Nuuk) - 63
GMT-03:30 Canada-Newfoundland(St. Johns) - 43
GMT-04:00 Canada-Atlantic - 42
GMT-04:00 Paraguay(Asuncion) - 59
GMT-04:00 Santiago de Chile - 8
GMT-04:00 Trinidad & Tobago - 62
GMT-04:00 United kingdom(Falkland Islands) - 61
GMT-04:00 United kingdom-Bermuda(Bermuda) - 60
GMT-04:30 Venezuela(Caracas) - 58
GMT-05:00 Bahamas(Nassau) - 55
GMT-05:00 Canada(Montreal, Ottawa, Quebec) - 56
GMT-05:00 Cuba(Havana) - 57
GMT-05:00 Lima - 7
GMT-05:00 US-East-Indiana - 38
GMT-05:00 US-Eastern - 32
GMT-05:00 US-Michigan - 34
GMT-06:00 Canada-Manitoba(Winnipeg) - 53
GMT-06:00 Chile(Easter Islands) - 54
GMT-06:00 Mexico(Mexico City, Acapulco) - 6
GMT-06:00 US-Central - 37
GMT-06:00 US-Indiana-Starke - 39
GMT-07:00 Canada(Edmonton, Calgary) - 51
GMT-07:00 LaPaz - 5
GMT-07:00 Mexico(Mazatlan, Chihuahua) - 52
GMT-07:00 US-Arizona - 31
GMT-07:00 US-Mountain - 40
GMT-08:00 California - 4
GMT-08:00 Canada(Vancouver, Whitehorse) - 49
GMT-08:00 Mexico(Tijuana, Mexicali) - 50
GMT-08:00 US-Pacific - 35
GMT-09:00 US-Alaska - 30
GMT-09:00 UTC-9 - 3
GMT-10:00 US-Aleutian - 36
GMT-10:00 US-Hawaii - 33
GMT-10:00 UTC-10 - 2
GMT-11:00 US-Samoa - 41
GMT-11:00 UTC-11 - 1
GMT-12:00 UTC-12 - 0

View File

@ -1,4 +1,91 @@
<all>
<SipDSPs>
<!-- JITTERBUFFER 0 - adjust, 1 - fixed -->
<dsp
EchoSuppression="0"
CodecType="0"
CodecType1="1"
CodecType2="255"
CodecType3="255"
CodecType4="255"
CodecType5="255"
CodecType6="255"
CodecType7="255"
CodecType8="255"
HandInputVoice="5"
HandOutputVoice="3"
EarphoneInputVoice="5"
EarphoneOutputVoice="3"
RingTypeVoice="3"
DiallingTone="1"
RTPsize="1"
HandFreeInputVoice="5"
HandFreeOutputVoice="3"
VoEnableAEC="0"
VoEnableAGC="0"
HighG723="1"
VoEnableVAD="0"
ringfileName0=""
ringfileName1=""
ringfileName2=""
ringfileName3=""
ringfileName4=""
ringfileName5=""
ringfileName6=""
ringfileName7=""
ringfileName8=""
ringfileName9=""
CurrentRingName="Ring1"
enableCode0="G711A"
enableCode1="G711U"
enableCode2=""
enableCode3=""
enableCode4=""
enableCode5=""
enableCode6=""
enableCode7=""
enableCode8=""
disableCode0="iLBC"
disableCode1="G726_32"
disableCode2="G729"
disableCode3="G722"
disableCode4="G723"
disableCode5=""
disableCode6=""
disableCode7=""
disableCode8=""
disableCode9=""
ToneCountry="1"
JITTERBUFFER="1"
MinDelay="60"
MaxDelay="500"
NormalDelay="120"
SideTone="0"
InternalRingerText0=""
InternalRingerFile0="Ring1"
InternalRingerText1=""
InternalRingerFile1="Ring1"
InternalRingerText2=""
InternalRingerFile2="Ring1"
InternalRingerText3=""
InternalRingerFile3="Ring1"
InternalRingerText4=""
InternalRingerFile4="Ring1"
InternalRingerText5=""
InternalRingerFile5="Ring1"
InternalRingerText6=""
InternalRingerFile6="Ring1"
InternalRingerText7=""
InternalRingerFile7="Ring1"
InternalRingerText8=""
InternalRingerFile8="Ring1"
InternalRingerText9=""
InternalRingerFile9="Ring1"
CustomTone_Dial=""
CustomTone_RingBack=""
CustomTone_Busy=""
/>
</SipDSPs>
<Privisions>
<!-- protocol
0 - tftp
@ -6,8 +93,16 @@
2 - ftp
3 - https
-->
<!-- BootingcheckedMode - 'Disable the phone while booting' -->
<!-- DownloadFilename
0 - default
1 - upper case
2 - lower case
-->
<privision
PNP="1"
PNPPIN=""
PNPInterval="60"
AutoPrivisionFlag="1"
DHCPOptionFlag="1"
DHCPOptionValue="66"
@ -15,22 +110,147 @@
Firmware="{$domain_name}{$project_path}/app/provision"
username=""
password=""
Freqency="168"
time="24"
DownloadBroadsoft="0"
DownloadFirmwar="0"
DownloadKernel="0"
DownloadExtension="1"
Downloadconfig="1"
DownloadExtension="1"
DownloadPhonebook="0"
DownloadPersonPhonebook="0"
Bootingchecked="0"
ExtensionNumber=""
Bootingchecked="1"
ZeroActive="0"
WaitTime="10"
BootingcheckedMode="0"
Freqency="168"
time="24"
DownloadFilename="0"
ExtensionNumber=""
/>
</Privisions>
<calls>
<call
PrefixPSTNNum=""
PrefixVOIPNum=""
AutoAnswerNum="**"
CallLeaveMessageNum="*97"
callwaiting="1"
PlaycallwaitingTone="1"
AfterTurnType="0"
ShowPhonelist="1"
ShowPhonelistWay="0"
AutoAnswerEnableFlag="0"
AutoAnswerEnableGroupName=""
AutoAnswerMode="0"
CallBusyTone="1"
MisscallDisEnable="1"
DNDSoftkeyEnable="1"
CallListSaveEnable="1"
BLFTransferEnable="0"
BLFTransferMode="0"
AvoidDisturbEnableFlag="0"
SIPQos="26"
RTPQos="46"
forkEnableFlag="1"
forktime="500"
Unconditional="0"
UnconditionalNum=""
busytransfer="0"
busytransferNum=""
UnAnswer="0"
UnAnswerNum=""
RingFrequency="15"
PickupEnable="1"
ConfEndMethod="0"
PlaycallwaitingToneFreqency="10"
ReturnCodeWhenRefuse="0"
ReturnCodeWhenDND="0"
FlashHookEnable="0"
FlashHookTime="500"
HoldPlayToneEnable="1"
HoldPlayToneFreqency="30"
SuppressDTMFDisplay="0"
SIP100RelEnable="1"
CallerIDSource="1"
LLDP="1"
LLDPInterval="60"
/>
</calls>
<SysTimes>
<!-- SNTPEnableFlag 0 - use sntp server -->
<!-- TimeZoneType - see timezone.txt -->
<systime
SNTPAddress="{$ntp_server_primary}"
SNTPAddressBackup="{$ntp_server_secondary}"
DaylightSaveingFlag="0"
SNTPEnableFlag="0"
TimeZoneType="15"
DaySet="24"
HourSet="0"
MinuteSet="0"
SecondSet="17"
YearSet="2014"
MouthSet="10"
AutoAddress="0"
AutoAddressBackup="0"
DSTtype="0"
DSTStartMonth="1"
DSTStartDay="1"
DSTStartHour="0"
DSTEndMonth="12"
DSTEndDay="31"
DSTEndHour="23"
DSTWeekStartMonth="1"
DSTWeekStartWeek="0"
DSTWeekStartInMonth="1"
DSTWeekStartHour="0"
DSTWeekEndMonth="12"
DSTWeekEndWeek="6"
DSTWeekEndInMonth="5"
DSTWeekEndHour="23"
Offset="60"
UpdateInterval="600"
/>
</SysTimes>
<lcds>
<!-- DateFormat
0 - DD MM WWW
1 - MM DD WWW
2 - WWW MMM DD
3 - DD-MMM-YY
4 - YYYY-MM-DD
5 - DD/MM/YYYY
6 - MM/DD/YY
7 - DD MMM YYYY
8 - WWW DD MMM
-->
<lcd
Password=""
AvoidDisturbEnableFlag="0"
Language="1"
WebLanguage="1"
Light="3"
NoSoundEnableFlag="0"
ScreenLightEnableFlag="1"
BackLightEnableFlag="0"
TimeFormat="0"
TimeListSeparator="0"
TouchScreen="0"
CloseLightTime="60"
ScreenTime="60"
Contrast="3"
ScreenSaverEnable="0"
lockScreenPassword="1234"
LockScreenEnable="0"
LockScreenMode="0"
LockScreenTime="60"
DateFormat="4"
LockKeys="0"
PhoneLockTimeOut="0"
/>
</lcds>
<hotlineBLFs>
<hotlineBLF BLF="1" />
</hotlineBLFs>
<sipUsers>
{foreach $lines as $row}
{if $row.line_number neq ""}
@ -79,8 +299,14 @@
SessionTimerRefresher="0"
UserphoneEnable="0"
UserSessionTimerRefresher="0"
ServerType="0"
ConferenceWay="0"
ConferenceNum=""
EPPOutcodeEnable="0"
EPPOutcode=""
EPPOutcodeLength=""
/>
{/if}
{/foreach}
</sipUsers>
</all>
</all>

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<all>
<hotlines>
{$is_first_line='true'}