Merge branch 'master' into gxp_feature_key_sync
@@ -99,6 +99,10 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "call_block_direction";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select the direction of the calls to block.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "extension_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
@@ -113,11 +117,15 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the name.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "call_block_country_code";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the country code.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "call_block_number";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "blocked_caller_number";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the full phone number.";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the phone number.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "call_block_count";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "blocked_call_count";
|
||||
|
||||
@@ -30,8 +30,8 @@ if ($domains_processed == 1) {
|
||||
$database = new database;
|
||||
$database->execute("DROP VIEW view_call_block;", null);
|
||||
$sql = "CREATE VIEW view_call_block AS ( \n";
|
||||
$sql .= " select c.domain_uuid, call_block_uuid, c.extension_uuid, call_block_name, \n";
|
||||
$sql .= " call_block_number, extension, number_alias, call_block_count, call_block_app, call_block_data, date_added, call_block_enabled, call_block_description \n";
|
||||
$sql .= " select c.domain_uuid, call_block_uuid, c.call_block_direction, c.extension_uuid, c.call_block_name, c.call_block_country_code, \n";
|
||||
$sql .= " c.call_block_number, e.extension, e.number_alias, c.call_block_count, c.call_block_app, c.call_block_data, c.date_added, c.call_block_enabled, c.call_block_description \n";
|
||||
$sql .= " from v_call_block as c \n";
|
||||
$sql .= " left join v_extensions as e \n";
|
||||
$sql .= " on c.extension_uuid = e.extension_uuid \n";
|
||||
|
||||
@@ -177,6 +177,27 @@ $text['label-provide-enabled']['ru-ru'] = "Пожалуйста, введите:
|
||||
$text['label-provide-enabled']['sv-se'] = "Ange: Aktiverad";
|
||||
$text['label-provide-enabled']['uk-ua'] = "Включити/відключити";
|
||||
|
||||
$text['label-country_code']['en-us'] = "Country Code";
|
||||
$text['label-country_code']['en-gb'] = "Country Code";
|
||||
$text['label-country_code']['ar-eg'] = "";
|
||||
$text['label-country_code']['de-at'] = ""; //copied from de-de
|
||||
$text['label-country_code']['de-ch'] = ""; //copied from de-de
|
||||
$text['label-country_code']['de-de'] = "";
|
||||
$text['label-country_code']['es-cl'] = "";
|
||||
$text['label-country_code']['es-mx'] = ""; //copied from es-cl
|
||||
$text['label-country_code']['fr-ca'] = "Préfixe"; //copied from fr-fr
|
||||
$text['label-country_code']['fr-fr'] = "Préfixe";
|
||||
$text['label-country_code']['he-il'] = "";
|
||||
$text['label-country_code']['it-it'] = "";
|
||||
$text['label-country_code']['nl-nl'] = "Voorloop";
|
||||
$text['label-country_code']['pl-pl'] = "";
|
||||
$text['label-country_code']['pt-br'] = "Prefixo"; //copied from pt-pt
|
||||
$text['label-country_code']['pt-pt'] = "";
|
||||
$text['label-country_code']['ro-ro'] = "";
|
||||
$text['label-country_code']['ru-ru'] = "";
|
||||
$text['label-country_code']['sv-se'] = "";
|
||||
$text['label-country_code']['uk-ua'] = "";
|
||||
|
||||
$text['label-number']['en-us'] = "Number";
|
||||
$text['label-number']['en-gb'] = "Number";
|
||||
$text['label-number']['ar-eg'] = "رقم";
|
||||
@@ -265,6 +286,48 @@ $text['label-inbound']['ru-ru'] = "Входящий";
|
||||
$text['label-inbound']['sv-se'] = "Inkommande";
|
||||
$text['label-inbound']['uk-ua'] = "Вихідний";
|
||||
|
||||
$text['label-outbound']['en-us'] = "Outbound";
|
||||
$text['label-outbound']['en-gb'] = "Outbound";
|
||||
$text['label-outbound']['ar-eg'] = "";
|
||||
$text['label-outbound']['de-at'] = "Ausgehend"; //copied from de-de
|
||||
$text['label-outbound']['de-ch'] = "Ausgehend"; //copied from de-de
|
||||
$text['label-outbound']['de-de'] = "Ausgehend";
|
||||
$text['label-outbound']['es-cl'] = "Salida";
|
||||
$text['label-outbound']['es-mx'] = "Salida"; //copied from es-cl
|
||||
$text['label-outbound']['fr-ca'] = "Sortant"; //copied from fr-fr
|
||||
$text['label-outbound']['fr-fr'] = "Sortant";
|
||||
$text['label-outbound']['he-il'] = "";
|
||||
$text['label-outbound']['it-it'] = "In Uscita";
|
||||
$text['label-outbound']['nl-nl'] = "";
|
||||
$text['label-outbound']['pl-pl'] = "Wychodzące";
|
||||
$text['label-outbound']['pt-br'] = "Saída"; //copied from pt-pt
|
||||
$text['label-outbound']['pt-pt'] = "Saída";
|
||||
$text['label-outbound']['ro-ro'] = "";
|
||||
$text['label-outbound']['ru-ru'] = "Исходящие";
|
||||
$text['label-outbound']['sv-se'] = "Utgående";
|
||||
$text['label-outbound']['uk-ua'] = "";
|
||||
|
||||
$text['label-destination']['en-us'] = "Destination";
|
||||
$text['label-destination']['en-gb'] = "Destination";
|
||||
$text['label-destination']['ar-eg'] = "";
|
||||
$text['label-destination']['de-at'] = "Ziel"; //copied from de-de
|
||||
$text['label-destination']['de-ch'] = "Ziel"; //copied from de-de
|
||||
$text['label-destination']['de-de'] = "Ziel";
|
||||
$text['label-destination']['es-cl'] = "Destino";
|
||||
$text['label-destination']['es-mx'] = "Destino"; //copied from es-cl
|
||||
$text['label-destination']['fr-ca'] = "Destination"; //copied from fr-fr
|
||||
$text['label-destination']['fr-fr'] = "Destination";
|
||||
$text['label-destination']['he-il'] = "";
|
||||
$text['label-destination']['it-it'] = "Destinazione";
|
||||
$text['label-destination']['nl-nl'] = "";
|
||||
$text['label-destination']['pl-pl'] = "Numer docelowy";
|
||||
$text['label-destination']['pt-br'] = "Número de destino";
|
||||
$text['label-destination']['pt-pt'] = "Destino";
|
||||
$text['label-destination']['ro-ro'] = "";
|
||||
$text['label-destination']['ru-ru'] = "Назначение";
|
||||
$text['label-destination']['sv-se'] = "Destination";
|
||||
$text['label-destination']['uk-ua'] = "Номер";
|
||||
|
||||
$text['label-edit-note']['en-us'] = "Block calls from a number. Edit the name and enable/disable below.";
|
||||
$text['label-edit-note']['en-gb'] = "Block calls from a number. Edit the name and enable/disable below.";
|
||||
$text['label-edit-note']['ar-eg'] = "";
|
||||
@@ -419,27 +482,27 @@ $text['label-count']['ru-ru'] = "Количество";
|
||||
$text['label-count']['sv-se'] = "Räkna";
|
||||
$text['label-count']['uk-ua'] = "Кількість";
|
||||
|
||||
$text['label-called-on']['en-us'] = "Called on";
|
||||
$text['label-called-on']['en-gb'] = "Called on";
|
||||
$text['label-called-on']['ar-eg'] = "تم الأتصال علي";
|
||||
$text['label-called-on']['de-at'] = "Anruf am"; //copied from de-de
|
||||
$text['label-called-on']['de-ch'] = "Anruf am"; //copied from de-de
|
||||
$text['label-called-on']['de-de'] = "Anruf am";
|
||||
$text['label-called-on']['el-gr'] = "Η κλήση πραγματοποιήθηκε";
|
||||
$text['label-called-on']['es-cl'] = "Llamó en";
|
||||
$text['label-called-on']['es-mx'] = "Llamó en"; //copied from es-cl
|
||||
$text['label-called-on']['fr-ca'] = "Appelé le"; //copied from fr-fr
|
||||
$text['label-called-on']['fr-fr'] = "Appelé le";
|
||||
$text['label-called-on']['he-il'] = "Opgeroepen op";
|
||||
$text['label-called-on']['it-it'] = "Chiamato il";
|
||||
$text['label-called-on']['nl-nl'] = "Aangeroepen op";
|
||||
$text['label-called-on']['pl-pl'] = "Zadzwoniono na";
|
||||
$text['label-called-on']['pt-br'] = "Chamada em ";
|
||||
$text['label-called-on']['pt-pt'] = "Chamado em";
|
||||
$text['label-called-on']['ro-ro'] = "Sunat pe";
|
||||
$text['label-called-on']['ru-ru'] = "Направление";
|
||||
$text['label-called-on']['sv-se'] = "Ringdes på";
|
||||
$text['label-called-on']['uk-ua'] = "Дзвінок здійснено";
|
||||
$text['label-called']['en-us'] = "Called";
|
||||
$text['label-called']['en-gb'] = "Called";
|
||||
$text['label-called']['ar-eg'] = "تم الأتصال علي";
|
||||
$text['label-called']['de-at'] = "Anruf"; //copied from de-de
|
||||
$text['label-called']['de-ch'] = "Anruf"; //copied from de-de
|
||||
$text['label-called']['de-de'] = "Anruf";
|
||||
$text['label-called']['el-gr'] = "Η κλήση πραγματοποιήθηκε";
|
||||
$text['label-called']['es-cl'] = "Llamó";
|
||||
$text['label-called']['es-mx'] = "Llamó"; //copied from es-cl
|
||||
$text['label-called']['fr-ca'] = "Appelé"; //copied from fr-fr
|
||||
$text['label-called']['fr-fr'] = "Appelé";
|
||||
$text['label-called']['he-il'] = "Opgeroepen";
|
||||
$text['label-called']['it-it'] = "Chiamato";
|
||||
$text['label-called']['nl-nl'] = "Aangeroepen";
|
||||
$text['label-called']['pl-pl'] = "Zadzwoniono";
|
||||
$text['label-called']['pt-br'] = "Chamada";
|
||||
$text['label-called']['pt-pt'] = "Chamado";
|
||||
$text['label-called']['ro-ro'] = "Sunat";
|
||||
$text['label-called']['ru-ru'] = "Направление";
|
||||
$text['label-called']['sv-se'] = "Ringdes";
|
||||
$text['label-called']['uk-ua'] = "Дзвінок здійснено";
|
||||
|
||||
$text['label-busy']['en-us'] = "Busy";
|
||||
$text['label-busy']['en-gb'] = "Busy";
|
||||
@@ -573,6 +636,49 @@ $text['label-action']['ru-ru'] = "Действие";
|
||||
$text['label-action']['sv-se'] = "Åtgärd";
|
||||
$text['label-action']['uk-ua'] = "Дія";
|
||||
|
||||
$text['label-direction']['en-us'] = "Direction";
|
||||
$text['label-direction']['en-gb'] = "Direction";
|
||||
$text['label-direction']['ar-eg'] = "";
|
||||
$text['label-direction']['de-at'] = "Richtung"; //copied from de-de
|
||||
$text['label-direction']['de-ch'] = "Richtung"; //copied from de-de
|
||||
$text['label-direction']['de-de'] = "Richtung";
|
||||
$text['label-direction']['es-cl'] = "Dirección";
|
||||
$text['label-direction']['es-mx'] = "Dirección"; //copied from es-cl
|
||||
$text['label-direction']['fr-ca'] = "Direction"; //copied from fr-fr
|
||||
$text['label-direction']['fr-fr'] = "Direction";
|
||||
$text['label-direction']['he-il'] = "";
|
||||
$text['label-direction']['it-it'] = "Direzione";
|
||||
$text['label-direction']['nl-nl'] = "";
|
||||
$text['label-direction']['pl-pl'] = "Kierunek";
|
||||
$text['label-direction']['pt-br'] = "Direção";
|
||||
$text['label-direction']['pt-pt'] = "Direcção";
|
||||
$text['label-direction']['ro-ro'] = "";
|
||||
$text['label-direction']['ru-ru'] = "Направление";
|
||||
$text['label-direction']['sv-se'] = "Riktning";
|
||||
$text['label-direction']['uk-ua'] = "Напрям";
|
||||
|
||||
$text['description-direction']['en-us'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['en-gb'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['ar-eg'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['de-at'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['de-ch'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['de-de'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['el-gr'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['es-cl'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['es-mx'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['fr-ca'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['fr-fr'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['he-il'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['it-it'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['nl-nl'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['pl-pl'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['pt-br'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['pt-pt'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['ro-ro'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['ru-ru'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['sv-se'] = "Select the direction of the calls to block.";
|
||||
$text['description-direction']['uk-ua'] = "Select the direction of the calls to block.";
|
||||
|
||||
$text['description-call_block_name']['en-us'] = "Enter the Caller ID Name to block.";
|
||||
$text['description-call_block_name']['en-gb'] = "Enter the Caller ID Name to block.";
|
||||
$text['description-call_block_name']['ar-eg'] = "";
|
||||
@@ -595,8 +701,29 @@ $text['description-call_block_name']['ru-ru'] = "";
|
||||
$text['description-call_block_name']['sv-se'] = "";
|
||||
$text['description-call_block_name']['uk-ua'] = "";
|
||||
|
||||
$text['description-call_block_number']['en-us'] = "Enter the Caller ID Number to block.";
|
||||
$text['description-call_block_number']['en-gb'] = "Enter the Caller ID Number to block.";
|
||||
$text['description-country_code']['en-us'] = "Enter the Country Code prefix.";
|
||||
$text['description-country_code']['en-gb'] = "Enter the Country Code prefix.";
|
||||
$text['description-country_code']['ar-eg'] = "";
|
||||
$text['description-country_code']['de-at'] = ""; //copied from de-de
|
||||
$text['description-country_code']['de-ch'] = ""; //copied from de-de
|
||||
$text['description-country_code']['de-de'] = "";
|
||||
$text['description-country_code']['es-cl'] = "";
|
||||
$text['description-country_code']['es-mx'] = ""; //copied from es-cl
|
||||
$text['description-country_code']['fr-ca'] = "Entrez le préfixe de destination."; //copied from fr-fr
|
||||
$text['description-country_code']['fr-fr'] = "Entrez le préfixe de destination.";
|
||||
$text['description-country_code']['he-il'] = "";
|
||||
$text['description-country_code']['it-it'] = "";
|
||||
$text['description-country_code']['nl-nl'] = "Voer de bestemming prefix in.";
|
||||
$text['description-country_code']['pl-pl'] = "";
|
||||
$text['description-country_code']['pt-br'] = "Insira o prefixo do destino.";
|
||||
$text['description-country_code']['pt-pt'] = "";
|
||||
$text['description-country_code']['ro-ro'] = "";
|
||||
$text['description-country_code']['ru-ru'] = "";
|
||||
$text['description-country_code']['sv-se'] = "";
|
||||
$text['description-country_code']['uk-ua'] = "";
|
||||
|
||||
$text['description-call_block_number']['en-us'] = "Enter the Country Code and Caller ID Number to block.";
|
||||
$text['description-call_block_number']['en-gb'] = "Enter the Country Code and Caller ID Number to block.";
|
||||
$text['description-call_block_number']['ar-eg'] = "";
|
||||
$text['description-call_block_number']['de-at'] = "";
|
||||
$text['description-call_block_number']['de-ch'] = "";
|
||||
@@ -617,8 +744,8 @@ $text['description-call_block_number']['ru-ru'] = "";
|
||||
$text['description-call_block_number']['sv-se'] = "";
|
||||
$text['description-call_block_number']['uk-ua'] = "";
|
||||
|
||||
$text['description-extension']['en-us'] = "Select the extension to block.";
|
||||
$text['description-extension']['en-gb'] = "Select the extension to block.";
|
||||
$text['description-extension']['en-us'] = "Select the extension to be affected.";
|
||||
$text['description-extension']['en-gb'] = "Select the extension to be affected.";
|
||||
$text['description-extension']['ar-eg'] = "";
|
||||
$text['description-extension']['de-at'] = "";
|
||||
$text['description-extension']['de-ch'] = "";
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= "lower(call_block_name) like :search ";
|
||||
$sql_search .= "or call_block_country_code like :search ";
|
||||
$sql_search .= "or lower(call_block_number) like :search ";
|
||||
$sql_search .= "or lower(call_block_description) like :search ";
|
||||
$sql_search .= ") ";
|
||||
@@ -136,7 +137,7 @@
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
$sql .= order_by($order_by, $order, 'call_block_number');
|
||||
$sql .= order_by($order_by, $order, ['call_block_country_code','call_block_number']);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
@@ -202,8 +203,10 @@
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($result ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
echo th_order_by('extension', $text['label-extension'], $order_by, $order);
|
||||
echo th_order_by('call_block_direction', $text['label-direction'], $order_by, $order, null, "style='width: 1%;' class='center'");
|
||||
echo th_order_by('extension', $text['label-extension'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('call_block_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('call_block_country_code', $text['label-country_code'], $order_by, $order);
|
||||
echo th_order_by('call_block_number', $text['label-number'], $order_by, $order);
|
||||
echo th_order_by('call_block_count', $text['label-count'], $order_by, $order, '', "class='center hide-sm-dn'");
|
||||
echo th_order_by('call_block_action', $text['label-action'], $order_by, $order);
|
||||
@@ -228,7 +231,13 @@
|
||||
echo " <input type='hidden' name='call_blocks[".$x."][uuid]' value='".escape($row['call_block_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td>";
|
||||
echo " <td class='center'>";
|
||||
switch ($row['call_block_direction']) {
|
||||
case "inbound": echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_answered.png' style='border: none;' title='".$text['label-inbound']."'>\n"; break;
|
||||
case "outbound": echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_answered.png' style='border: none;' title='".$text['label-outbound']."'>\n"; break;
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='center'>";
|
||||
if (strlen($row['extension']) == 0) {
|
||||
echo $text['label-all'];
|
||||
}
|
||||
@@ -238,6 +247,14 @@
|
||||
echo " </td>\n";
|
||||
echo " <td>".escape($row['call_block_name'])."</td>\n";
|
||||
echo " <td>";
|
||||
if (permission_exists('call_block_edit')) {
|
||||
echo "<a href='".$list_row_url."'>".escape($row['call_block_country_code'])."</a>";
|
||||
}
|
||||
else {
|
||||
echo escape($row['call_block_country_code']);
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td>";
|
||||
if (permission_exists('call_block_edit')) {
|
||||
echo "<a href='".$list_row_url."'>".escape(format_phone($row['call_block_number']))."</a>";
|
||||
}
|
||||
@@ -280,4 +297,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -52,8 +52,10 @@
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST) > 0) {
|
||||
$call_block_direction = $_POST["call_block_direction"];
|
||||
$extension_uuid = $_POST["extension_uuid"];
|
||||
$call_block_name = $_POST["call_block_name"];
|
||||
$call_block_country_code = $_POST["call_block_country_code"];
|
||||
$call_block_number = $_POST["call_block_number"];
|
||||
$call_block_enabled = $_POST["call_block_enabled"];
|
||||
$call_block_description = $_POST["call_block_description"];
|
||||
@@ -83,6 +85,7 @@
|
||||
$xml_cdrs = $_POST['xml_cdrs'];
|
||||
if (permission_exists('call_block_add') && is_array($xml_cdrs) && @sizeof($xml_cdrs) != 0) {
|
||||
$obj = new call_block;
|
||||
$obj->call_block_direction = $call_block_direction;
|
||||
$obj->extension_uuid = $extension_uuid;
|
||||
$obj->call_block_app = $call_block_app;
|
||||
$obj->call_block_data = $call_block_data;
|
||||
@@ -160,10 +163,12 @@
|
||||
if ($action == "add") {
|
||||
$array['call_block'][0]['call_block_uuid'] = uuid();
|
||||
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
|
||||
if (is_uuid($extension_uuid)) {
|
||||
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
|
||||
}
|
||||
$array['call_block'][0]['call_block_name'] = $call_block_name;
|
||||
$array['call_block'][0]['call_block_country_code'] = $call_block_country_code;
|
||||
$array['call_block'][0]['call_block_number'] = $call_block_number;
|
||||
$array['call_block'][0]['call_block_count'] = 0;
|
||||
$array['call_block'][0]['call_block_app'] = $call_block_app;
|
||||
@@ -184,7 +189,7 @@
|
||||
return;
|
||||
}
|
||||
if ($action == "update") {
|
||||
$sql = "select c.call_block_number, d.domain_name ";
|
||||
$sql = "select c.call_block_country_code, c.call_block_number, d.domain_name ";
|
||||
$sql .= "from v_call_block as c ";
|
||||
$sql .= "join v_domains as d on c.domain_uuid = d.domain_uuid ";
|
||||
$sql .= "where c.domain_uuid = :domain_uuid ";
|
||||
@@ -199,16 +204,18 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("app:call_block:".$domain_name.":".$call_block_number);
|
||||
$cache->delete("app:call_block:".$domain_name.":".$call_block_country_code.$call_block_number);
|
||||
}
|
||||
unset($sql, $parameters);
|
||||
|
||||
$array['call_block'][0]['call_block_uuid'] = $call_block_uuid;
|
||||
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
|
||||
if (is_uuid($extension_uuid)) {
|
||||
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
|
||||
}
|
||||
$array['call_block'][0]['call_block_name'] = $call_block_name;
|
||||
$array['call_block'][0]['call_block_country_code'] = $call_block_country_code;
|
||||
$array['call_block'][0]['call_block_number'] = $call_block_number;
|
||||
$array['call_block'][0]['call_block_app'] = $call_block_app;
|
||||
$array['call_block'][0]['call_block_data'] = $call_block_data;
|
||||
@@ -241,8 +248,10 @@
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$call_block_direction = $row["call_block_direction"];
|
||||
$extension_uuid = $row["extension_uuid"];
|
||||
$call_block_name = $row["call_block_name"];
|
||||
$call_block_country_code = $row["call_block_country_code"];
|
||||
$call_block_number = $row["call_block_number"];
|
||||
$call_block_app = $row["call_block_app"];
|
||||
$call_block_data = $row["call_block_data"];
|
||||
@@ -318,6 +327,21 @@
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-direction']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='call_block_direction'>\n";
|
||||
echo " <option value='inbound'>".$text['label-inbound']."</option>\n";
|
||||
echo " <option value='outbound' ".($call_block_direction == "outbound" ? "selected" : null).">".$text['label-outbound']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-direction']."\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('call_block_all')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
@@ -356,6 +380,7 @@
|
||||
echo " ".$text['label-number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_block_country_code' maxlength='6' style='width: 60px;' value=\"".escape($call_block_country_code)."\">\n";
|
||||
echo " <input class='formfld' type='text' name='call_block_number' maxlength='255' value=\"".escape($call_block_number)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_block_number']."\n";
|
||||
@@ -460,57 +485,49 @@
|
||||
//get recent calls from the db (if not editing an existing call block record)
|
||||
if (!is_uuid($_REQUEST["id"])) {
|
||||
|
||||
if (permission_exists('call_block_all')) {
|
||||
$sql = "select caller_id_number, caller_id_name, caller_id_number, start_epoch, direction, hangup_cause, duration, billsec, xml_cdr_uuid ";
|
||||
$sql .= "from v_xml_cdr where true ";
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$sql .= "and direction != 'outbound' ";
|
||||
$sql .= "order by start_stamp desc ";
|
||||
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters);
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//without block all permission, limit to assigned extension(s)
|
||||
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension'])) {
|
||||
foreach ($_SESSION['user']['extension'] as $assigned_extension) {
|
||||
$assigned_extensions[$assigned_extension['extension_uuid']] = $assigned_extension['user'];
|
||||
}
|
||||
|
||||
$sql = "select caller_id_number, caller_id_name, caller_id_number, start_epoch, direction, hangup_cause, duration, billsec, xml_cdr_uuid ";
|
||||
$sql .= "from v_xml_cdr ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
if (is_array($assigned_extensions) && sizeof($assigned_extensions) != 0) {
|
||||
$x = 0;
|
||||
foreach ($assigned_extensions as $assigned_extension_uuid => $assigned_extension) {
|
||||
$sql_where_array[] = "extension_uuid = :extension_uuid_".$x;
|
||||
//$sql_where_array[] = "caller_id_number = :caller_id_number_".$x;
|
||||
//$sql_where_array[] = "destination_number = :destination_number_1_".$x;
|
||||
//$sql_where_array[] = "destination_number = :destination_number_2_".$x;
|
||||
$parameters['extension_uuid_'.$x] = $assigned_extension_uuid;
|
||||
//$parameters['caller_id_number_'.$x] = $assigned_extension;
|
||||
//$parameters['destination_number_1_'.$x] = $assigned_extension;
|
||||
//$parameters['destination_number_2_'.$x] = '*99'.$assigned_extension;
|
||||
$x++;
|
||||
}
|
||||
if (is_array($sql_where_array) && sizeof($sql_where_array) != 0) {
|
||||
$sql .= "and (".implode(' or ', $sql_where_array).") ";
|
||||
}
|
||||
unset($sql_where_array);
|
||||
if (is_array($assigned_extensions) && sizeof($assigned_extensions) != 0) {
|
||||
$x = 0;
|
||||
foreach ($assigned_extensions as $assigned_extension_uuid => $assigned_extension) {
|
||||
$sql_where_array[] = "extension_uuid = :extension_uuid_".$x;
|
||||
$parameters['extension_uuid_'.$x] = $assigned_extension_uuid;
|
||||
$x++;
|
||||
}
|
||||
$sql .= "order by start_stamp desc";
|
||||
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($sql_where_array) && sizeof($sql_where_array) != 0) {
|
||||
$sql_where .= "and (".implode(' or ', $sql_where_array).") ";
|
||||
}
|
||||
unset($sql_where_array);
|
||||
}
|
||||
}
|
||||
|
||||
//get recent calls
|
||||
$sql = "select caller_id_name, caller_id_number, caller_destination, start_epoch, direction, hangup_cause, duration, billsec, xml_cdr_uuid ";
|
||||
$sql .= "from v_xml_cdr where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and direction <> 'local' ";
|
||||
$sql .= $sql_where;
|
||||
$sql .= "order by start_stamp desc ";
|
||||
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters);
|
||||
unset($sql, $parameters);
|
||||
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
echo "<input type='hidden' id='action' name='action' value='add'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar_sub'>\n";
|
||||
echo " <div class='heading'><b id='heading_sub'>".$text['heading-recent_calls']."</b></div>\n";
|
||||
echo " <div class='heading'>";
|
||||
echo " <b id='heading_sub'>".$text['heading-recent_calls']."</b>";
|
||||
echo " <select class='formfld' name='call_block_direction' style='margin-bottom: 6px; margin-left: 15px;' onchange=\"show_direction(this.options[this.selectedIndex].value);\">\n";
|
||||
echo " <option value='' disabled='disabled'>".$text['label-direction']."</option>\n";
|
||||
echo " <option value='inbound'>".$text['label-inbound']."</option>\n";
|
||||
echo " <option value='outbound'>".$text['label-outbound']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','id'=>'action_bar_sub_button_back','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'collapse'=>'hide-xs','style'=>'display: none;','link'=>'call_block.php']);
|
||||
if ($result) {
|
||||
@@ -539,83 +556,112 @@
|
||||
echo modal::create(['id'=>'modal-block','type'=>'general','message'=>$text['confirm-block'],'actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_block','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($result ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
echo "<th style='width: 1%;'> </th>\n";
|
||||
echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('caller_id_number', $text['label-number'], $order_by, $order);
|
||||
echo th_order_by('start_stamp', $text['label-called-on'], $order_by, $order);
|
||||
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "class='right hide-sm-dn'");
|
||||
echo "</tr>";
|
||||
foreach (['inbound','outbound'] as $direction) {
|
||||
echo "<table class='list' id='list_".$direction."' ".($direction == 'outbound' ? "style='display: none;'" : null).">\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all_".$direction."' name='checkbox_all' onclick=\"list_all_toggle('".$direction."');\" ".($result ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
echo "<th style='width: 1%;'> </th>\n";
|
||||
echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('caller_id_number', $text['label-number'], $order_by, $order);
|
||||
echo th_order_by('caller_id_number', $text['label-destination'], $order_by, $order);
|
||||
echo th_order_by('start_stamp', $text['label-called'], $order_by, $order);
|
||||
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "class='right hide-sm-dn'");
|
||||
echo "</tr>";
|
||||
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
$x = 0;
|
||||
foreach ($result as $row) {
|
||||
$list_row_onclick_uncheck = "if (!this.checked) { document.getElementById('checkbox_all').checked = false; }";
|
||||
$list_row_onclick_toggle = "onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick_uncheck."\"";
|
||||
if (strlen($row['caller_id_number']) >= 7) {
|
||||
if ($_SESSION['domain']['time_format']['text'] == '24h') {
|
||||
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('H:i:s', $row['start_epoch']).'</span>';
|
||||
}
|
||||
else {
|
||||
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('h:i:s a', $row['start_epoch']).'</span>';
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='xml_cdrs[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"".$list_row_onclick_uncheck."\">\n";
|
||||
echo " <input type='hidden' name='xml_cdrs[$x][uuid]' value='".escape($row['xml_cdr_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
if (
|
||||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_voicemail.png") &&
|
||||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_answered.png") &&
|
||||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_local_failed.png") &&
|
||||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_local_answered.png")
|
||||
) {
|
||||
echo " <td class='center' ".$list_row_onclick_toggle.">";
|
||||
switch ($row['direction']) {
|
||||
case "inbound" :
|
||||
if ($row['billsec'] == 0) {
|
||||
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_voicemail.png' style='border: none;' alt='".$text['label-inbound']." ".$text['label-missed']."'>\n";
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $x => $row) {
|
||||
if ($row['direction'] == $direction) {
|
||||
$list_row_onclick_uncheck = "if (!this.checked) { document.getElementById('checkbox_all_".$direction."').checked = false; }";
|
||||
$list_row_onclick_toggle = "onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick_uncheck."\"";
|
||||
if (strlen($row['caller_id_number']) >= 7) {
|
||||
if ($_SESSION['domain']['time_format']['text'] == '24h') {
|
||||
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('H:i:s', $row['start_epoch']).'</span>';
|
||||
}
|
||||
else {
|
||||
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('h:i:s a', $row['start_epoch']).'</span>';
|
||||
}
|
||||
echo "<tr class='list-row row_".$row['direction']."' href='".$list_row_url."'>\n";
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' class='checkbox_".$row['direction']."' name='xml_cdrs[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"".$list_row_onclick_uncheck."\">\n";
|
||||
echo " <input type='hidden' name='xml_cdrs[$x][uuid]' value='".escape($row['xml_cdr_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
if (
|
||||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_voicemail.png") &&
|
||||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_answered.png") &&
|
||||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_failed.png") &&
|
||||
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_answered.png")
|
||||
) {
|
||||
echo " <td class='center' ".$list_row_onclick_toggle.">";
|
||||
switch ($row['direction']) {
|
||||
case "inbound":
|
||||
if ($row['billsec'] == 0) {
|
||||
$title_mod = " ".$text['label-missed'];
|
||||
$file_mod = "_voicemail";
|
||||
}
|
||||
else {
|
||||
$file_mod = "_answered";
|
||||
}
|
||||
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound".$file_mod.".png' style='border: none;' title='".$text['label-inbound'].$title_mod."'>\n";
|
||||
break;
|
||||
case "outbound":
|
||||
if ($row['billsec'] == 0) {
|
||||
$title_mod = " ".$text['label-failed'];
|
||||
$file_mod = "_failed";
|
||||
}
|
||||
else {
|
||||
$file_mod = "_answered";
|
||||
}
|
||||
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound".$file_mod.".png' style='border: none;' title='".$text['label-outbound'].$title_mod."'>\n";
|
||||
break;
|
||||
}
|
||||
else {
|
||||
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_answered.png' style='border: none;' alt='".$text['label-inbound']."'>\n";
|
||||
}
|
||||
break;
|
||||
case "local" :
|
||||
if ($row['billsec'] == 0) {
|
||||
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_local_failed.png' style='border: none;' alt='".$text['label-local']." ".$text['label-failed']."'>\n";
|
||||
}
|
||||
else {
|
||||
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_local_answered.png' style='border: none;' alt='".$text['label-local']."'>\n";
|
||||
}
|
||||
break;
|
||||
echo " </td>\n";
|
||||
}
|
||||
else {
|
||||
echo " <td ".$list_row_onclick_toggle."> </td>";
|
||||
}
|
||||
echo " <td ".$list_row_onclick_toggle.">".$row['caller_id_name']." </td>\n";
|
||||
echo " <td ".$list_row_onclick_toggle.">".format_phone($row['caller_id_number'])."</td>\n";
|
||||
echo " <td ".$list_row_onclick_toggle.">".format_phone($row['caller_destination'])."</td>\n";
|
||||
echo " <td class='no-wrap' ".$list_row_onclick_toggle.">".$tmp_start_epoch."</td>\n";
|
||||
$seconds = ($row['hangup_cause'] == "ORIGINATOR_CANCEL") ? $row['duration'] : $row['billsec']; //if they cancelled, show the ring time, not the bill time.
|
||||
echo " <td class='right hide-sm-dn' ".$list_row_onclick_toggle.">".gmdate("G:i:s", $seconds)."</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
else {
|
||||
echo " <td ".$list_row_onclick_toggle."> </td>";
|
||||
}
|
||||
echo " <td ".$list_row_onclick_toggle.">".$row['caller_id_name']." </td>\n";
|
||||
echo " <td ".$list_row_onclick_toggle.">".format_phone($row['caller_id_number'])."</td>\n";
|
||||
echo " <td class='no-wrap' ".$list_row_onclick_toggle.">".$tmp_start_epoch."</td>\n";
|
||||
$seconds = ($row['hangup_cause'] == "ORIGINATOR_CANCEL") ? $row['duration'] : $row['billsec']; //if they cancelled, show the ring time, not the bill time.
|
||||
echo " <td class='right hide-sm-dn' ".$list_row_onclick_toggle.">".gmdate("G:i:s", $seconds)."</td>\n";
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
unset($result);
|
||||
|
||||
echo "</table>\n";
|
||||
}
|
||||
unset($result);
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
//handle hiding and showing of direction recent calls
|
||||
echo "<script>\n";
|
||||
echo " function show_direction(direction) {\n";
|
||||
echo " //determine other direction\n";
|
||||
echo " direction_other = direction == 'inbound' ? 'outbound' : 'inbound';\n";
|
||||
|
||||
echo " //hide other direction list\n";
|
||||
echo " document.getElementById('list_' + direction_other).style.display='none';\n";
|
||||
|
||||
echo " //uncheck all checkboxes\n";
|
||||
echo " var checkboxes = document.querySelectorAll(\"input[type='checkbox']\")\n";
|
||||
echo " if (checkboxes.length > 0) {\n";
|
||||
echo " for (var i = 0; i < checkboxes.length; ++i) {\n";
|
||||
echo " checkboxes[i].checked = false;\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
|
||||
echo " //show direction list\n";
|
||||
echo " document.getElementById('list_' + direction).style.display='inline';\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
|
||||
}
|
||||
|
||||
//make sub action bar sticky
|
||||
@@ -639,4 +685,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -23,6 +23,7 @@ if (!class_exists('call_block')) {
|
||||
/**
|
||||
* declare public variables
|
||||
*/
|
||||
public $call_block_direction;
|
||||
public $extension_uuid;
|
||||
public $call_block_app;
|
||||
public $call_block_data;
|
||||
@@ -307,7 +308,7 @@ if (!class_exists('call_block')) {
|
||||
|
||||
//get the caller id info from cdrs
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select caller_id_name, caller_id_number from v_xml_cdr ";
|
||||
$sql = "select caller_id_name, caller_id_number, caller_destination from v_xml_cdr ";
|
||||
$sql .= "where xml_cdr_uuid in (".implode(', ', $uuids).") ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
@@ -322,11 +323,17 @@ if (!class_exists('call_block')) {
|
||||
if (permission_exists('call_block_all')) {
|
||||
$array['call_block'][$x]['call_block_uuid'] = uuid();
|
||||
$array['call_block'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$array['call_block'][$x]['call_block_direction'] = $this->call_block_direction;
|
||||
if (is_uuid($this->extension_uuid)) {
|
||||
$array['call_block'][$x]['extension_uuid'] = $this->extension_uuid;
|
||||
}
|
||||
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
|
||||
$array['call_block'][$x]['call_block_number'] = trim($row["caller_id_number"]);
|
||||
if ($this->call_block_direction == 'inbound') {
|
||||
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
|
||||
$array['call_block'][$x]['call_block_number'] = trim($row["caller_id_number"]);
|
||||
}
|
||||
if ($this->call_block_direction == 'outbound') {
|
||||
$array['call_block'][$x]['call_block_number'] = trim($row["caller_destination"]);
|
||||
}
|
||||
$array['call_block'][$x]['call_block_count'] = 0;
|
||||
$array['call_block'][$x]['call_block_app'] = $this->call_block_app;
|
||||
$array['call_block'][$x]['call_block_data'] = $this->call_block_data;
|
||||
@@ -340,9 +347,15 @@ if (!class_exists('call_block')) {
|
||||
if (is_uuid($field['extension_uuid'])) {
|
||||
$array['call_block'][$x]['call_block_uuid'] = uuid();
|
||||
$array['call_block'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$array['call_block'][$x]['call_block_direction'] = $this->call_block_direction;
|
||||
$array['call_block'][$x]['extension_uuid'] = $field['extension_uuid'];
|
||||
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
|
||||
$array['call_block'][$x]['call_block_number'] = trim($row["caller_id_number"]);
|
||||
if ($this->call_block_direction == 'inbound') {
|
||||
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
|
||||
$array['call_block'][$x]['call_block_number'] = trim($row["caller_id_number"]);
|
||||
}
|
||||
if ($this->call_block_direction == 'outbound') {
|
||||
$array['call_block'][$x]['call_block_number'] = trim($row["caller_destination"]);
|
||||
}
|
||||
$array['call_block'][$x]['call_block_count'] = 0;
|
||||
$array['call_block'][$x]['call_block_app'] = $this->call_block_app;
|
||||
$array['call_block'][$x]['call_block_data'] = $this->call_block_data;
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
$array['dialplans'][0]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array['dialplans'][0]["dialplan_name"] = $queue_name;
|
||||
$array['dialplans'][0]["dialplan_number"] = $queue_extension;
|
||||
$array['dialplans'][0]["dialplan_context"] = $_SESSION['context'];
|
||||
$array['dialplans'][0]["dialplan_context"] = $_SESSION['domain_name'];
|
||||
$array['dialplans'][0]["dialplan_continue"] = "false";
|
||||
$array['dialplans'][0]["dialplan_xml"] = $dialplan_xml;
|
||||
$array['dialplans'][0]["dialplan_order"] = "230";
|
||||
@@ -377,7 +377,7 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//redirect the user
|
||||
if (isset($action)) {
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
$dialplan["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_name"] = ($this->queue_name != '') ? $this->queue_name : format_phone($this->destination_number);
|
||||
$dialplan["dialplan_number"] = $this->destination_number;
|
||||
$dialplan["dialplan_context"] = $_SESSION['context'];
|
||||
$dialplan["dialplan_context"] = $_SESSION['domain_name'];
|
||||
$dialplan["dialplan_continue"] = "false";
|
||||
$dialplan["dialplan_order"] = "210";
|
||||
$dialplan["dialplan_enabled"] = "true";
|
||||
@@ -267,7 +267,7 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION['context']);
|
||||
$cache->delete("dialplan:".$_SESSION['domain_name']);
|
||||
|
||||
//return the dialplan_uuid
|
||||
return $dialplan_response;
|
||||
@@ -366,7 +366,7 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
//synchronize configuration
|
||||
@@ -592,7 +592,7 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//set message
|
||||
message::add($text['message-copy']);
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
$auto_answer = check_str($_GET['auto_answer']); //true,false
|
||||
$rec = check_str($_GET['rec']); //true,false
|
||||
$ringback = check_str($_GET['ringback']);
|
||||
$context = $_SESSION['context'];
|
||||
$context = $_SESSION['domain_name'];
|
||||
|
||||
//clean up variable values
|
||||
$src = str_replace(array('.','(',')','-',' '), '', $src);
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
$array['dialplans'][0]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array['dialplans'][0]["dialplan_name"] = $conference_center_name;
|
||||
$array['dialplans'][0]["dialplan_number"] = $conference_center_extension;
|
||||
$array['dialplans'][0]["dialplan_context"] = $_SESSION['context'];
|
||||
$array['dialplans'][0]["dialplan_context"] = $_SESSION['domain_name'];
|
||||
$array['dialplans'][0]["dialplan_continue"] = "false";
|
||||
$array['dialplans'][0]["dialplan_xml"] = $dialplan_xml;
|
||||
$array['dialplans'][0]["dialplan_order"] = "333";
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//redirect the user
|
||||
if (isset($action)) {
|
||||
|
||||
@@ -89,7 +89,7 @@ if (!class_exists('conference_centers')) {
|
||||
}
|
||||
$sql = "select count(*) from v_conference_rooms as r, v_meetings as p ";
|
||||
if ($not_admin) {
|
||||
$sql .= "v_meeting_users as u, ";
|
||||
$sql .= ",v_meeting_users as u ";
|
||||
}
|
||||
$sql .= "where r.domain_uuid = :domain_uuid ";
|
||||
$sql .= "and r.meeting_uuid = p.meeting_uuid ";
|
||||
@@ -373,7 +373,7 @@ if (!class_exists('conference_centers')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
@@ -604,7 +604,7 @@ if (!class_exists('conference_centers')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//set message
|
||||
message::add($text['message-toggle']);
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
$array['dialplans'][0]['app_uuid'] = 'b81412e8-7253-91f4-e48e-42fc2c9a38d9';
|
||||
$array['dialplans'][0]['dialplan_xml'] = $dialplan_xml;
|
||||
$array['dialplans'][0]['dialplan_order'] = '333';
|
||||
$array['dialplans'][0]['dialplan_context'] = $_SESSION['context'];
|
||||
$array['dialplans'][0]['dialplan_context'] = $_SESSION['domain_name'];
|
||||
$array['dialplans'][0]['dialplan_enabled'] = $conference_enabled;
|
||||
$array['dialplans'][0]['dialplan_description'] = $conference_description;
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//redirect the browser
|
||||
header("Location: conferences.php");
|
||||
|
||||
@@ -141,7 +141,7 @@ if (!class_exists('conferences')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//set message
|
||||
message::add($text['message-delete']);
|
||||
@@ -227,7 +227,7 @@ if (!class_exists('conferences')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//set message
|
||||
message::add($text['message-toggle']);
|
||||
@@ -362,7 +362,7 @@ if (!class_exists('conferences')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//set message
|
||||
message::add($text['message-copy']);
|
||||
|
||||
@@ -4753,8 +4753,8 @@ $text['description-contacts_import_google']['ru-ru'] = "Выберите нуж
|
||||
$text['description-contacts_import_google']['sv-se'] = "Välj de kontakter som skall importeras.";
|
||||
$text['description-contacts_import_google']['uk-ua'] = "";
|
||||
|
||||
$text['description-contacts_import']['en-us'] = "Export your contacts from outlook to a comma delimitted csv file. Then use this tool to upload and add the contacts from that file.";
|
||||
$text['description-contacts_import']['en-gb'] = "Export your contacts from outlook to a comma delimitted csv file. Then use this tool to upload and add the contacts from that file.";
|
||||
$text['description-contacts_import']['en-us'] = "Submit or upload delimited data to add multiple records.";
|
||||
$text['description-contacts_import']['en-gb'] = "Submit or upload delimited data to add multiple records.";
|
||||
$text['description-contacts_import']['ar-eg'] = "";
|
||||
$text['description-contacts_import']['de-at'] = "Exportieren Sie Ihre Kontakte aus Outlook in eine CSV Datei und benützen Sie diese Funktion um Ihre Kontakte zu importieren."; //copied from de-de
|
||||
$text['description-contacts_import']['de-ch'] = "Exportieren Sie Ihre Kontakte aus Outlook in eine CSV Datei und benützen Sie diese Funktion um Ihre Kontakte zu importieren."; //copied from de-de
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: extension_imports.php');
|
||||
header('Location: contact_import.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -209,6 +209,7 @@
|
||||
echo " <optgroup label='".$row['table']."'>\n";
|
||||
foreach($row['fields'] as $field) {
|
||||
if ($field == 'phone_label') { continue; }
|
||||
if ($field == 'contact_url') { continue; } // can remove this after field is removed from the table
|
||||
$selected = '';
|
||||
if ($field == $line_field) {
|
||||
$selected = "selected='selected'";
|
||||
@@ -270,7 +271,7 @@
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: extension_imports.php');
|
||||
header('Location: contact_import.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,27 @@ $text['description-database_transactions']['ru-ru'] = "Изменения в б
|
||||
$text['description-database_transactions']['sv-se'] = "Databas Transaktioner";
|
||||
$text['description-database_transactions']['uk-ua'] = "";
|
||||
|
||||
$text['label-user']['en-us'] = "User";
|
||||
$text['label-user']['en-gb'] = "User";
|
||||
$text['label-user']['ar-eg'] = "";
|
||||
$text['label-user']['de-at'] = "Benutzer"; //copied from de-de
|
||||
$text['label-user']['de-ch'] = "Benutzer"; //copied from de-de
|
||||
$text['label-user']['de-de'] = "Benutzer";
|
||||
$text['label-user']['es-cl'] = "";
|
||||
$text['label-user']['es-mx'] = "";
|
||||
$text['label-user']['fr-ca'] = "Utilisateur";
|
||||
$text['label-user']['fr-fr'] = "Utilisateur";
|
||||
$text['label-user']['he-il'] = "";
|
||||
$text['label-user']['it-it'] = "";
|
||||
$text['label-user']['nl-nl'] = "Gebruiker";
|
||||
$text['label-user']['pl-pl'] = "";
|
||||
$text['label-user']['pt-br'] = "";
|
||||
$text['label-user']['pt-pt'] = "";
|
||||
$text['label-user']['ro-ro'] = "";
|
||||
$text['label-user']['ru-ru'] = "Пользователь";
|
||||
$text['label-user']['sv-se'] = "Användare";
|
||||
$text['label-user']['uk-ua'] = "";
|
||||
|
||||
$text['label-user_uuid']['en-us'] = "User";
|
||||
$text['label-user_uuid']['en-gb'] = "User";
|
||||
$text['label-user_uuid']['ar-eg'] = "";
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search term
|
||||
//add the user filter and search term
|
||||
$user_uuid = $_GET['user_uuid'];
|
||||
$search = strtolower($_GET["search"]);
|
||||
if ($search != '') {
|
||||
$sql_search = "and (";
|
||||
@@ -62,10 +63,14 @@
|
||||
}
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from v_database_transactions as t ";
|
||||
$sql = "select count(t.database_transaction_uuid) from v_database_transactions as t ";
|
||||
$sql .= "left outer join v_domains as d using (domain_uuid) ";
|
||||
$sql .= "left outer join v_users as u using (user_uuid) ";
|
||||
$sql .= "where t.domain_uuid = :domain_uuid ";
|
||||
if (is_uuid($user_uuid)) {
|
||||
$sql .= "and t.user_uuid = :user_uuid ";
|
||||
$parameters['user_uuid'] = $user_uuid;
|
||||
}
|
||||
$sql .= $sql_search;
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
@@ -81,12 +86,26 @@
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(*)','t.database_transaction_uuid, d.domain_name, u.username, t.user_uuid, t.app_name, t.app_uuid, t.transaction_code, t.transaction_address, t.transaction_type, t.transaction_date', $sql);
|
||||
$sql = str_replace('count(t.database_transaction_uuid)','t.database_transaction_uuid, d.domain_name, u.username, t.user_uuid, t.app_name, t.app_uuid, t.transaction_code, t.transaction_address, t.transaction_type, t.transaction_date', $sql);
|
||||
$sql .= order_by($order_by, $order, 't.transaction_date', 'desc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
unset($sql);
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get users
|
||||
$sql = "select user_uuid, username from v_users ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "order by username ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
$users[$row['user_uuid']] = $row['username'];
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
|
||||
//additional includes
|
||||
$document['title'] = $text['title-database_transactions'];
|
||||
@@ -97,9 +116,19 @@
|
||||
echo " <div class='heading'><b>".$text['title-database_transactions']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (is_array($users) && @sizeof($users) != 0) {
|
||||
echo "<select class='formfld' name='user_uuid' onchange=\"document.getElementById('form_search').submit();\">\n";
|
||||
echo " <option value=''>".$text['label-user']."...</option>\n";
|
||||
echo " <option value=''>".$text['label-all']."</option>\n";
|
||||
foreach ($users as $uuid => $username) {
|
||||
$selected = $user_uuid == $uuid ? "selected='selected'" : null;
|
||||
echo " <option value='".escape($uuid)."' ".$selected.">".escape($username)."</option>\n";
|
||||
}
|
||||
echo " </select>";
|
||||
}
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'database_transactions.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','onclick'=>"document.getElementById('search').value = ''; document.getElementById('form_search').submit();",'style'=>(!$search ? 'display: none;' : null)]);
|
||||
if ($paging_controls_mini != '') {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
|
||||
}
|
||||
|
||||
@@ -130,6 +130,14 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "multiple";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b132ff5a-da8d-4846-b46d-2f0bfa9ae96b";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "destinations";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "unique";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Require destinations to be unique true or false.";
|
||||
|
||||
//cache details
|
||||
$apps[$x]['cache']['key'] = "dialplan.\${destination_context}";
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
if (strlen($destination_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-destination_enabled']."<br>\n"; }
|
||||
|
||||
//check for duplicates
|
||||
if ($destination_type == 'inbound' && $destination_number != $db_destination_number) {
|
||||
if ($destination_type == 'inbound' && $destination_number != $db_destination_number && $_SESSION['destinations']['unique']['boolean'] == 'true') {
|
||||
$sql = "select count(*) from v_destinations ";
|
||||
$sql .= "where (destination_number = :destination_number or destination_prefix || destination_number = :destination_number) ";
|
||||
$sql .= "and destination_type = 'inbound' ";
|
||||
@@ -760,7 +760,7 @@
|
||||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
if (is_array($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
if (is_uuid($_GET["id"])) {
|
||||
$destination_uuid = $_GET["id"];
|
||||
$sql = "select * from v_destinations ";
|
||||
@@ -816,7 +816,7 @@
|
||||
unset($sql, $parameters);
|
||||
|
||||
//add an empty row to the array
|
||||
$x = count($dialplan_details);
|
||||
$x = (is_array($dialplan_details)) ? count($dialplan_details) : $x = 0;
|
||||
$limit = $x + 1;
|
||||
while($x < $limit) {
|
||||
$dialplan_details[$x]['domain_uuid'] = $domain_uuid;
|
||||
|
||||
@@ -180,7 +180,12 @@ if (!class_exists('destinations')) {
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x = 0;
|
||||
foreach ($config_list as &$config_path) {
|
||||
include($config_path);
|
||||
try {
|
||||
include($config_path);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
//echo 'Caught exception: ', $e->getMessage(), "\n";
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
$i = 0;
|
||||
@@ -443,7 +448,12 @@ if (!class_exists('destinations')) {
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x = 0;
|
||||
foreach ($config_list as &$config_path) {
|
||||
include($config_path);
|
||||
try {
|
||||
include($config_path);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
//echo 'Caught exception: ', $e->getMessage(), "\n";
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
$i = 0;
|
||||
@@ -647,7 +657,12 @@ if (!class_exists('destinations')) {
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x = 0;
|
||||
foreach ($config_list as &$config_path) {
|
||||
include($config_path);
|
||||
try {
|
||||
include($config_path);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
//echo 'Caught exception: ', $e->getMessage(), "\n";
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
$i = 0;
|
||||
@@ -761,7 +776,7 @@ if (!class_exists('destinations')) {
|
||||
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
|
||||
}
|
||||
|
||||
if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
|
||||
if (is_array($row['result']['data']) && strlen($row['select_value'][$destination_type]) > 0) {
|
||||
$label2 = $label;
|
||||
foreach ($row['result']['data'] as $data) {
|
||||
$select_value = $row['select_value'][$destination_type];
|
||||
|
||||
@@ -4713,6 +4713,29 @@ $text['header-device']['ru-ru'] = "Устройство";
|
||||
$text['header-device']['sv-se'] = "Enhet";
|
||||
$text['header-device']['uk-ua'] = "";
|
||||
|
||||
$text['description-device_export']['en-us'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['en-gb'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['ar-eg'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['de-at'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['de-ch'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['de-de'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['ek-gr'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['es-cl'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['es-mx'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['fr-ca'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['fr-fr'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['he-il'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['it-it'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['nl-nl'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['pl-pl'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['pt-br'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['pt-pt'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['ro-ro'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['ru-ru'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['sv-se'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['uk-ua'] = "Select the fields you wish to include in the export.";
|
||||
$text['description-device_export']['tr-tr'] = "Select the fields you wish to include in the export.";
|
||||
|
||||
$text['description-user']['en-us'] = "Assign a user to this device.";
|
||||
$text['description-user']['en-gb'] = "Assign a user to this device.";
|
||||
$text['description-user']['ar-eg'] = "";
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -28,7 +28,6 @@
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('device_export')) {
|
||||
@@ -75,14 +74,40 @@
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
}
|
||||
|
||||
|
||||
//define possible columns in the array
|
||||
$available_columns[] = 'device_uuid';
|
||||
$available_columns[] = 'domain_uuid';
|
||||
$available_columns[] = 'device_mac_address';
|
||||
$available_columns[] = 'device_label';
|
||||
$available_columns[] = 'device_template';
|
||||
$available_columns[] = 'device_description';
|
||||
$available_columns['devices'][] = 'device_uuid';
|
||||
$available_columns['devices'][] = 'device_profile_uuid';
|
||||
$available_columns['devices'][] = 'device_mac_address';
|
||||
$available_columns['devices'][] = 'device_label';
|
||||
$available_columns['devices'][] = 'device_vendor';
|
||||
$available_columns['devices'][] = 'device_template';
|
||||
$available_columns['devices'][] = 'device_enabled_date';
|
||||
$available_columns['devices'][] = 'device_username';
|
||||
$available_columns['devices'][] = 'device_password';
|
||||
$available_columns['devices'][] = 'device_uuid_alternate';
|
||||
$available_columns['devices'][] = 'device_provisioned_date';
|
||||
$available_columns['devices'][] = 'device_provisioned_method';
|
||||
$available_columns['devices'][] = 'device_provisioned_ip';
|
||||
$available_columns['devices'][] = 'device_enabled';
|
||||
$available_columns['devices'][] = 'device_description';
|
||||
|
||||
$available_columns['device_lines'][] = 'device_line_uuid';
|
||||
$available_columns['device_lines'][] = 'device_uuid';
|
||||
$available_columns['device_lines'][] = 'line_number';
|
||||
$available_columns['device_lines'][] = 'server_address';
|
||||
$available_columns['device_lines'][] = 'server_address_primary';
|
||||
$available_columns['device_lines'][] = 'server_address_secondary';
|
||||
$available_columns['device_lines'][] = 'outbound_proxy_primary';
|
||||
$available_columns['device_lines'][] = 'outbound_proxy_secondary';
|
||||
$available_columns['device_lines'][] = 'display_name';
|
||||
$available_columns['device_lines'][] = 'user_id';
|
||||
$available_columns['device_lines'][] = 'auth_id';
|
||||
$available_columns['device_lines'][] = 'password';
|
||||
$available_columns['device_lines'][] = 'sip_port';
|
||||
$available_columns['device_lines'][] = 'sip_transport';
|
||||
$available_columns['device_lines'][] = 'register_expires';
|
||||
$available_columns['device_lines'][] = 'shared_line';
|
||||
$available_columns['device_lines'][] = 'enabled';
|
||||
|
||||
//get the devices and send them as output
|
||||
$column_group = $_REQUEST["column_group"];
|
||||
@@ -96,23 +121,56 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//validate table names
|
||||
foreach($column_group as $table_name => $columns) {
|
||||
if (!isset($available_columns[$table_name])) {
|
||||
unset($column_group[$table_name]);
|
||||
}
|
||||
}
|
||||
|
||||
//validate columns
|
||||
foreach ($column_group as $index => $column_name) {
|
||||
if (!in_array($column_name, $available_columns)) {
|
||||
unset($column_group[$index]);
|
||||
foreach($column_group as $table_name => $columns) {
|
||||
foreach ($columns as $column_name) {
|
||||
if (!in_array($column_name, $available_columns[$table_name])) {
|
||||
unset($column_group[$table_name][$column_name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//iterate columns
|
||||
if (is_array($column_group) && @sizeof($column_group) != 0) {
|
||||
$column_names = implode(", ", $column_group);
|
||||
|
||||
$column_names = implode(", ", $column_group['devices']);
|
||||
$sql = "select ".$column_names." from v_devices ";
|
||||
$sql .= " where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$devices = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters, $column_names);
|
||||
//print_r($extensions);
|
||||
|
||||
foreach($column_group as $table_name => $columns) {
|
||||
if ($table_name !== 'devices') {
|
||||
$column_names = implode(", ", $columns);
|
||||
$sql = "select ".$column_names." from v_".$table_name." ";
|
||||
$sql .= " where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$$table_name = $database->select($sql, $parameters, 'all');
|
||||
$x = 0;
|
||||
foreach($devices as $device) {
|
||||
foreach($$table_name as $row) {
|
||||
if ($device['device_uuid'] == $row['device_uuid']) {
|
||||
foreach($row as $key => $value) {
|
||||
$devices[$x][$key] = $value;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
unset($sql, $parameters, $column_names);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($devices) && @sizeof($devices) != 0) {
|
||||
download_send_headers("device_export_".date("Y-m-d").".csv");
|
||||
@@ -143,30 +201,44 @@
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($available_columns ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
echo " <th>".$text['label-column_name']."</th>\n";
|
||||
echo "</tr>\n";
|
||||
echo $text['description-device_export'];
|
||||
echo "<br /><br />\n";
|
||||
|
||||
if (is_array($available_columns) && @sizeof($available_columns) != 0) {
|
||||
$x = 0;
|
||||
foreach ($available_columns as $column_name) {
|
||||
$list_row_onclick = "if (!this.checked) { document.getElementById('checkbox_all').checked = false; }";
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='column_group[]' id='checkbox_".$x."' value=\"".$column_name."\" onclick=\"".$list_row_onclick."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick."\">".$column_name."</td>";
|
||||
echo "</tr>";
|
||||
$x++;
|
||||
foreach ($available_columns as $table_name => $columns) {
|
||||
$table_name_label = ucwords(str_replace(['-','_',],' ', $table_name));
|
||||
echo "<div class='category'>\n";
|
||||
echo "<b>".$table_name_label."</b>\n";
|
||||
echo "<br>\n";
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all_".$table_name."' name='checkbox_all' onclick=\"list_all_toggle('".$table_name."');\" ".($available_columns ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
echo " <th>".$text['label-column_name']."</th>\n";
|
||||
echo "</tr>\n";
|
||||
foreach ($columns as $column_name) {
|
||||
$list_row_onclick = "if (!this.checked) { document.getElementById('checkbox_all').checked = false; }";
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' class='checkbox_".$table_name."' name='column_group[".$table_name."][".$column_name."]' id='checkbox_".$x."' value=\"".$column_name."\" onclick=\"".$list_row_onclick."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick."\">".$column_name."</td>";
|
||||
echo "</tr>";
|
||||
$x++;
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<br>\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
//test the validation
|
||||
//echo " <input type='hidden' name='column_group[devices][xxx]' value=\"xxx\">\n";
|
||||
//echo " <input type='hidden' name='column_group[device_lines][yyy]' value=\"yyy\">\n";
|
||||
//echo " <input type='hidden' name='column_group[device_zzz][zzz]' value=\"zzz\">\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
|
||||
@@ -283,11 +283,13 @@
|
||||
$y = 0;
|
||||
foreach ($device_lines as $row) {
|
||||
if (strlen($row['line_number']) > 0) {
|
||||
$new_line = false;
|
||||
if (is_uuid($row["device_line_uuid"])) {
|
||||
$device_line_uuid = $row["device_line_uuid"];
|
||||
}
|
||||
else {
|
||||
$device_line_uuid = uuid();
|
||||
$new_line = true;
|
||||
}
|
||||
$array['devices'][0]['device_lines'][$y]['domain_uuid'] = $domain_uuid;
|
||||
$array['devices'][0]['device_lines'][$y]['device_uuid'] = $device_uuid;
|
||||
@@ -296,15 +298,23 @@
|
||||
$array['devices'][0]['device_lines'][$y]['server_address'] = $row["server_address"];
|
||||
if (permission_exists('device_line_outbound_proxy_primary')) {
|
||||
$array['devices'][0]['device_lines'][$y]['outbound_proxy_primary'] = $row["outbound_proxy_primary"];
|
||||
} else if ($new_line && isset($_SESSION['provision']['outbound_proxy_primary'])) {
|
||||
$array['devices'][0]['device_lines'][$y]['outbound_proxy_primary'] = $_SESSION['provision']['outbound_proxy_primary']['text'];
|
||||
}
|
||||
if (permission_exists('device_line_outbound_proxy_secondary')) {
|
||||
$array['devices'][0]['device_lines'][$y]['outbound_proxy_secondary'] = $row["outbound_proxy_secondary"];
|
||||
} else if ($new_line && isset($_SESSION['provision']['outbound_proxy_secondary'])) {
|
||||
$array['devices'][0]['device_lines'][$y]['outbound_proxy_secondary'] = $_SESSION['provision']['outbound_proxy_secondary']['text'];
|
||||
}
|
||||
if (permission_exists('device_line_server_address_primary')) {
|
||||
$array['devices'][0]['device_lines'][$y]['server_address_primary'] = $row["server_address_primary"];
|
||||
} else if ($new_line && isset($_SESSION['provision']['server_address_primary'])) {
|
||||
$array['devices'][0]['device_lines'][$y]['server_address_primary'] = $_SESSION['provision']['server_address_primary']['text'];
|
||||
}
|
||||
if (permission_exists('device_line_server_address_secondary')) {
|
||||
$array['devices'][0]['device_lines'][$y]['server_address_secondary'] = $row["server_address_secondary"];
|
||||
} else if ($new_line && isset($_SESSION['provision']['server_address_secondary'])) {
|
||||
$array['devices'][0]['device_lines'][$y]['server_address_secondary'] = $_SESSION['provision']['server_address_secondary']['text'];
|
||||
}
|
||||
$array['devices'][0]['device_lines'][$y]['display_name'] = $row["display_name"];
|
||||
$array['devices'][0]['device_lines'][$y]['user_id'] = $row["user_id"];
|
||||
@@ -1019,10 +1029,12 @@
|
||||
$element['hidden'] = true;
|
||||
$element['visibility'] = "visibility:hidden;";
|
||||
}
|
||||
|
||||
//add the primary key uuid
|
||||
if (is_uuid($row['device_line_uuid'])) {
|
||||
echo " <input name='device_lines[".$x."][device_line_uuid]' type='hidden' value=\"".escape($row['device_line_uuid'])."\"/>\n";
|
||||
}
|
||||
|
||||
//show each row in the array
|
||||
echo " <tr>\n";
|
||||
echo " <td valign='top' align='left' nowrap='nowrap'>\n";
|
||||
@@ -1046,10 +1058,7 @@
|
||||
|
||||
if (permission_exists('device_line_server_address_primary')) {
|
||||
echo " <td valign='top' align='left' nowrap='nowrap'>\n";
|
||||
if (is_uuid($_SESSION['provision']['server_address_primary']['uuid'])) {
|
||||
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_primary]' maxlength='255' value=\"".escape($row['server_address_primary'])."\"/>\n";
|
||||
}
|
||||
else {
|
||||
if (isset($_SESSION['provision']['server_address_primary']) && !isset($_SESSION['provision']['server_address_primary']['text'])) {
|
||||
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][server_address_primary]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($_SESSION['provision']['server_address_primary'] as $field) {
|
||||
@@ -1057,15 +1066,15 @@
|
||||
}
|
||||
echo " </select>\n";
|
||||
}
|
||||
else {
|
||||
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_primary]' maxlength='255' value=\"".escape($row['server_address_primary'])."\"/>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_line_server_address_secondary')) {
|
||||
echo " <td valign='top' align='left' nowrap='nowrap'>\n";
|
||||
if (isset($_SESSION['provision']['server_address_secondary']['text'])) {
|
||||
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_secondary]' maxlength='255' value=\"".escape($row['server_address_secondary'])."\"/>\n";
|
||||
}
|
||||
else {
|
||||
if (isset($_SESSION['provision']['server_address_secondary']) && !isset($_SESSION['provision']['server_address_secondary']['text'])) {
|
||||
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][server_address_secondary]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($_SESSION['provision']['server_address_secondary'] as $field) {
|
||||
@@ -1073,15 +1082,15 @@
|
||||
}
|
||||
echo " </select>\n";
|
||||
}
|
||||
else {
|
||||
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_secondary]' maxlength='255' value=\"".escape($row['server_address_secondary'])."\"/>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_line_outbound_proxy_primary')) {
|
||||
echo " <td align='left'>\n";
|
||||
if (isset($_SESSION['provision']['outbound_proxy_primary']['text'])) {
|
||||
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_primary]' placeholder=\"".escape($text['label-primary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_primary'])."\"/>\n";
|
||||
}
|
||||
else {
|
||||
if (isset($_SESSION['provision']['outbound_proxy_primary']) && !isset($_SESSION['provision']['outbound_proxy_primary']['text'])) {
|
||||
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][outbound_proxy_primary]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($_SESSION['provision']['outbound_proxy_primary'] as $field) {
|
||||
@@ -1089,15 +1098,15 @@
|
||||
}
|
||||
echo " </select>\n";
|
||||
}
|
||||
else {
|
||||
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_primary]' placeholder=\"".escape($text['label-primary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_primary'])."\"/>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
|
||||
if (permission_exists('device_line_outbound_proxy_secondary')) {
|
||||
echo " <td align='left'>\n";
|
||||
if (isset($_SESSION['provision']['outbound_proxy_secondary']['text'])) {
|
||||
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_secondary]' placeholder=\"".escape($text['label-secondary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_secondary'])."\"/>\n";
|
||||
}
|
||||
else {
|
||||
if (isset($_SESSION['provision']['outbound_proxy_secondary']) && !isset($_SESSION['provision']['outbound_proxy_secondary']['text'])) {
|
||||
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][outbound_proxy_secondary]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($_SESSION['provision']['outbound_proxy_secondary'] as $field) {
|
||||
@@ -1105,6 +1114,9 @@
|
||||
}
|
||||
echo " </select>\n";
|
||||
}
|
||||
else {
|
||||
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_secondary]' placeholder=\"".escape($text['label-secondary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_secondary'])."\"/>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -66,25 +66,24 @@
|
||||
//save the data to the csv file
|
||||
if (isset($_POST['data'])) {
|
||||
$file = $_SESSION['server']['temp']['dir']."/devices-".$_SESSION['domain_name'].".csv";
|
||||
file_put_contents($file, $_POST['data']);
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
|
||||
//copy the csv file
|
||||
//$_POST['submit'] == "Upload" &&
|
||||
if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('device_imports')) {
|
||||
if ($_POST['type'] == 'csv') {
|
||||
move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']);
|
||||
$save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']);
|
||||
//system('chmod -R 744 '.$_SESSION['server']['temp']['dir'].'*');
|
||||
unset($_POST['txtCommand']);
|
||||
$file = $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name'];
|
||||
if (file_put_contents($file, $_POST['data'])) {
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
//copy the csv file
|
||||
//$_POST['submit'] == "Upload" &&
|
||||
if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('device_import')) {
|
||||
if ($_POST['type'] == 'csv') {
|
||||
$file = $_SESSION['server']['temp']['dir']."/devices-".$_SESSION['domain_name'].".csv";
|
||||
if (move_uploaded_file($_FILES['ulfile']['tmp_name'], $file)) {
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the schema
|
||||
if (strlen($delimiter) > 0) {
|
||||
if (strlen($delimiter) > 0 && file_exists($_SESSION['file'])) {
|
||||
//get the first line
|
||||
$line = fgets(fopen($_SESSION['file'], 'r'));
|
||||
$line_fields = explode($delimiter, $line);
|
||||
@@ -441,7 +440,6 @@
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
/*
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-import_file_upload']."\n";
|
||||
@@ -451,7 +449,6 @@
|
||||
echo " <br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
*/
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<br><br>";
|
||||
|
||||
@@ -311,6 +311,12 @@ include "root.php";
|
||||
//build the delete array
|
||||
foreach ($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$sql = "update v_devices set device_uuid_alternate = null where device_uuid_alternate = :device_uuid_alternate; ";
|
||||
$parameters['device_uuid_alternate'] = $record['uuid'];
|
||||
$database = new database;
|
||||
$database->execute($sql, $parameters);
|
||||
unset($sql, $parameters);
|
||||
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
||||
$array['device_settings'][$x]['device_uuid'] = $record['uuid'];
|
||||
$array['device_lines'][$x]['device_uuid'] = $record['uuid'];
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
if (strlen($dialplan_order) == 0) {
|
||||
$dialplan_order ='333';
|
||||
}
|
||||
$dialplan_context = $_SESSION['context'];
|
||||
$dialplan_context = $_SESSION['domain_name'];
|
||||
$dialplan_continue = 'false';
|
||||
$app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3';
|
||||
|
||||
@@ -684,6 +684,11 @@
|
||||
} //end foreach
|
||||
}
|
||||
|
||||
//add the dialplan permission
|
||||
$p = new permissions;
|
||||
$p->add("dialplan_add", "temp");
|
||||
$p->add("dialplan_detail_add", "temp");
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'outbound_routes';
|
||||
@@ -699,6 +704,10 @@
|
||||
$dialplans->uuid = $dialplan_uuid;
|
||||
$dialplans->xml();
|
||||
|
||||
//remove the temporary permission
|
||||
$p->delete("dialplan_add", "temp");
|
||||
$p->delete("dialplan_detail_add", "temp");
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$dialplan_context);
|
||||
@@ -720,12 +729,13 @@
|
||||
$sql = "select * from v_gateways ";
|
||||
$sql .= "where enabled = 'true' ";
|
||||
if (permission_exists('outbound_route_any_gateway')) {
|
||||
$sql .= "order by domain_uuid, gateway ";
|
||||
$sql .= "order by domain_uuid = :domain_uuid DESC, gateway ";
|
||||
}
|
||||
else {
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
|
||||
}
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$gateways = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
@@ -806,50 +816,49 @@ function type_onchange(dialplan_detail_type) {
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
|
||||
if (if_group("superadmin")) {
|
||||
echo "<script>\n";
|
||||
echo "var Objs;\n";
|
||||
echo "\n";
|
||||
echo "function changeToInput(obj){\n";
|
||||
echo " tb=document.createElement('INPUT');\n";
|
||||
echo " tb.type='text';\n";
|
||||
echo " tb.name=obj.name;\n";
|
||||
echo " tb.setAttribute('class', 'formfld');\n";
|
||||
echo " tb.setAttribute('style', 'width: 400px;');\n";
|
||||
echo " tb.value=obj.options[obj.selectedIndex].value;\n";
|
||||
echo " tbb=document.createElement('INPUT');\n";
|
||||
echo " tbb.setAttribute('class', 'btn');\n";
|
||||
echo " tbb.setAttribute('style', 'margin-left: 4px;');\n";
|
||||
echo " tbb.type='button';\n";
|
||||
echo " tbb.value=$('<div />').html('◁').text();\n";
|
||||
echo " tbb.objs=[obj,tb,tbb];\n";
|
||||
echo " tbb.onclick=function(){ Replace(this.objs); }\n";
|
||||
echo " obj.parentNode.insertBefore(tb,obj);\n";
|
||||
echo " obj.parentNode.insertBefore(tbb,obj);\n";
|
||||
echo " obj.parentNode.removeChild(obj);\n";
|
||||
echo "}\n";
|
||||
echo "\n";
|
||||
echo "function Replace(obj){\n";
|
||||
echo " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[1]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[2]);\n";
|
||||
echo "}\n";
|
||||
echo "function update_dialplan_expression() {\n";
|
||||
echo " if ( document.getElementById('dialplan_expression_select').value == 'CUSTOM_PREFIX' ) {\n";
|
||||
echo " document.getElementById('outbound_prefix').value = '';\n";
|
||||
echo " $('#enter_custom_outbound_prefix_box').slideDown();\n";
|
||||
echo " } else { \n";
|
||||
echo " document.getElementById('dialplan_expression').value += document.getElementById('dialplan_expression_select').value + '\\n';\n";
|
||||
echo " document.getElementById('outbound_prefix').value = '';\n";
|
||||
echo " $('#enter_custom_outbound_prefix_box').slideUp();\n";
|
||||
echo " }\n";
|
||||
echo "}\n";
|
||||
echo "function update_outbound_prefix() {\n";
|
||||
echo " document.getElementById('dialplan_expression').value += '^' + document.getElementById('outbound_prefix').value + '(\\\d*)\$' + '\\n';\n";
|
||||
echo "}\n";
|
||||
echo "</script>\n";
|
||||
echo "\n";
|
||||
}
|
||||
echo "<script>\n";
|
||||
echo "var Objs;\n";
|
||||
echo "\n";
|
||||
echo "function changeToInput(obj){\n";
|
||||
echo " tb=document.createElement('INPUT');\n";
|
||||
echo " tb.type='text';\n";
|
||||
echo " tb.name=obj.name;\n";
|
||||
echo " tb.setAttribute('class', 'formfld');\n";
|
||||
echo " tb.setAttribute('style', 'width: 400px;');\n";
|
||||
echo " tb.value=obj.options[obj.selectedIndex].value;\n";
|
||||
echo " tbb=document.createElement('INPUT');\n";
|
||||
echo " tbb.setAttribute('class', 'btn');\n";
|
||||
echo " tbb.setAttribute('style', 'margin-left: 4px;');\n";
|
||||
echo " tbb.type='button';\n";
|
||||
echo " tbb.value=$('<div />').html('◁').text();\n";
|
||||
echo " tbb.objs=[obj,tb,tbb];\n";
|
||||
echo " tbb.onclick=function(){ Replace(this.objs); }\n";
|
||||
echo " obj.parentNode.insertBefore(tb,obj);\n";
|
||||
echo " obj.parentNode.insertBefore(tbb,obj);\n";
|
||||
echo " obj.parentNode.removeChild(obj);\n";
|
||||
echo "}\n";
|
||||
echo "\n";
|
||||
echo "function Replace(obj){\n";
|
||||
echo " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[1]);\n";
|
||||
echo " obj[0].parentNode.removeChild(obj[2]);\n";
|
||||
echo "}\n";
|
||||
echo "function update_dialplan_expression() {\n";
|
||||
echo " if ( document.getElementById('dialplan_expression_select').value == 'CUSTOM_PREFIX' ) {\n";
|
||||
echo " document.getElementById('outbound_prefix').value = '';\n";
|
||||
echo " $('#enter_custom_outbound_prefix_box').slideDown();\n";
|
||||
echo " } else { \n";
|
||||
echo " document.getElementById('dialplan_expression').value += document.getElementById('dialplan_expression_select').value + '\\n';\n";
|
||||
echo " document.getElementById('outbound_prefix').value = '';\n";
|
||||
echo " $('#enter_custom_outbound_prefix_box').slideUp();\n";
|
||||
echo " }\n";
|
||||
echo "}\n";
|
||||
echo "function update_outbound_prefix() {\n";
|
||||
echo " document.getElementById('dialplan_expression').value += '^' + document.getElementById('outbound_prefix').value + '(\\\d*)\$' + '\\n';\n";
|
||||
echo "}\n";
|
||||
echo "</script>\n";
|
||||
echo "\n";
|
||||
|
||||
|
||||
//set the onchange
|
||||
$onchange = '';
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
}
|
||||
|
||||
//set the default
|
||||
if (strlen($dialplan_context) == 0) { $dialplan_context = $_SESSION['context']; }
|
||||
if (strlen($dialplan_context) == 0) { $dialplan_context = $_SESSION['domain_name']; }
|
||||
|
||||
//add or update data from http post
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
@@ -267,6 +267,9 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
if ($dialplan_context == "\${domain_name}" or $dialplan_context == "global") {
|
||||
$dialplan_context = "*";
|
||||
}
|
||||
$cache->delete("dialplan:".$dialplan_context);
|
||||
|
||||
//set the message
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<context name="{v_context}">
|
||||
<extension name="call_block" number="" continue="true" app_uuid="b1b31930-d0ee-4395-a891-04df94599f1f" enabled="false" order="40">
|
||||
<condition field="${call_direction}" expression="^inbound$" >
|
||||
<condition field="${call_direction}" expression="^(inbound|outbound)$" >
|
||||
<action application="lua" data="app.lua call_block"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
<condition field="${from_user_record}" expression="^local$" break="never">
|
||||
<action application="set" data="record_session=true" inline="true"/>
|
||||
</condition>
|
||||
<condition field="${record_session}" expression="^true$">
|
||||
<condition field="${record_session}" expression="^true$"/>
|
||||
<condition field="destination_number" expression="^(?:(?!\*).)+$">
|
||||
<action application="set" data="record_path=${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}" inline="true"/>
|
||||
<action application="set" data="record_name=${uuid}.${record_ext}" inline="true"/>
|
||||
<!--<action application="set" data="record_name=${destination_number}-${caller_id_number}_${strftime(%Y-%m-%d %H:%M)}.${record_ext}" inline="true"/>-->
|
||||
|
||||
@@ -165,6 +165,13 @@
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//load editor preferences/defaults
|
||||
$setting_size = $_SESSION["editor"]["font_size"]["text"] != '' ? $_SESSION["editor"]["font_size"]["text"] : '12px';
|
||||
$setting_theme = $_SESSION["editor"]["theme"]["text"] != '' ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
|
||||
$setting_invisibles = $_SESSION["editor"]["invisibles"]["boolean"] != '' ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
|
||||
$setting_indenting = $_SESSION["editor"]["indent_guides"]["boolean"] != '' ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
|
||||
$setting_numbering = $_SESSION["editor"]["line_numbers"]["boolean"] != '' ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
@@ -173,6 +180,69 @@
|
||||
$document['title'] = $text['title-email_template'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
echo "<script language='JavaScript' type='text/javascript'>\n";
|
||||
|
||||
echo " function toggle_option(opt) {\n";
|
||||
echo " switch (opt) {\n";
|
||||
echo " case 'numbering':\n";
|
||||
echo " toggle_option_do('showLineNumbers');\n";
|
||||
echo " toggle_option_do('fadeFoldWidgets');\n";
|
||||
echo " break;\n";
|
||||
echo " case 'invisibles':\n";
|
||||
echo " toggle_option_do('showInvisibles');\n";
|
||||
echo " break;\n";
|
||||
echo " case 'indenting':\n";
|
||||
echo " toggle_option_do('displayIndentGuides');\n";
|
||||
echo " break;\n";
|
||||
echo " }\n";
|
||||
echo " focus_editor();\n";
|
||||
echo " }\n";
|
||||
|
||||
echo " function toggle_option_do(opt_name) {\n";
|
||||
echo " var opt_val = editor.getOption(opt_name);\n";
|
||||
echo " editor.setOption(opt_name, ((opt_val) ? false : true));\n";
|
||||
echo " }\n";
|
||||
|
||||
echo " function focus_editor() {\n";
|
||||
echo " editor.focus();\n";
|
||||
echo " }\n";
|
||||
|
||||
//copy the value from the editor on submit
|
||||
echo " function set_value() {\n";
|
||||
echo " $('#template_body').val(editor.session.getValue());\n";
|
||||
echo " }\n";
|
||||
|
||||
//load editor value from hidden textarea
|
||||
echo " function load_value() {\n";
|
||||
echo " editor.session.setValue($('#template_body').val());";
|
||||
echo " }\n";
|
||||
|
||||
echo "</script>\n";
|
||||
|
||||
echo "<style>\n";
|
||||
|
||||
echo " img.control {\n";
|
||||
echo " cursor: pointer;\n";
|
||||
echo " width: auto;\n";
|
||||
echo " height: 23px;\n";
|
||||
echo " border: none;\n";
|
||||
echo " opacity: 0.5;\n";
|
||||
echo " }\n";
|
||||
|
||||
echo " img.control:hover {\n";
|
||||
echo " opacity: 1.0;\n";
|
||||
echo " }\n";
|
||||
|
||||
echo " div#editor {\n";
|
||||
//echo " box-shadow: 0 3px 10px #333;\n";
|
||||
echo " text-align: left;\n";
|
||||
echo " width: 100%;\n";
|
||||
echo " height: 600px;\n";
|
||||
echo " font-size: 12px;\n";
|
||||
echo " }\n";
|
||||
|
||||
echo "</style>\n";
|
||||
|
||||
//show the content
|
||||
echo "<form name='frm' id='frm' method='post'>\n";
|
||||
|
||||
@@ -180,7 +250,7 @@
|
||||
echo " <div class='heading'><b>".$text['title-email_template']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'email_templates.php']);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','onclick'=>"set_value(); $('#frm').submit();"]);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
@@ -236,7 +306,77 @@
|
||||
echo " ".$text['label-template_body']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <textarea class='formfld' name='template_body' style='min-width: 100%; height: 350px; font-family: monospace;'>".$template_body."</textarea>\n";
|
||||
echo " <textarea class='formfld' name='template_body' id='template_body' style='display: none;'>".$template_body."</textarea>\n";
|
||||
echo " <div id='editor'></div>\n";
|
||||
echo " <table cellpadding='0' cellspacing='0' border='0' style='float: right; padding-top: 5px;'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_numbering.png' title='Toggle Line Numbers' class='control' onclick=\"toggle_option('numbering');\"></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_invisibles.png' title='Toggle Invisibles' class='control' onclick=\"toggle_option('invisibles');\"></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_indenting.png' title='Toggle Indent Guides' class='control' onclick=\"toggle_option('indenting');\"></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_replace.png' title='Show Find/Replace [Ctrl+H]' class='control' onclick=\"editor.execCommand('replace');\"></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_goto.png' title='Show Go To Line' class='control' onclick=\"editor.execCommand('gotoline');\"></td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 4px;'>\n";
|
||||
echo " <select id='size' class='formfld' onchange=\"document.getElementById('editor').style.fontSize = this.options[this.selectedIndex].value; focus_editor();\">\n";
|
||||
$sizes = explode(',','9px,10px,11px,12px,14px,16px,18px,20px');
|
||||
if (!in_array($setting_size, $sizes)) {
|
||||
echo " <option value='".$setting_size."'>".escape($setting_size)."</option>\n";
|
||||
echo " <option value='' disabled='disabled'></option>\n";
|
||||
}
|
||||
foreach ($sizes as $size) {
|
||||
$selected = $size == $setting_size ? 'selected' : null;
|
||||
echo " <option value='".$size."' ".$selected.">".escape($size)."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='middle' style='padding-left: 4px; padding-right: 0px;'>\n";
|
||||
echo " <select id='theme' class='formfld' onchange=\"editor.setTheme('ace/theme/' + this.options[this.selectedIndex].value); focus_editor();\">\n";
|
||||
$themes['Light']['chrome']= 'Chrome';
|
||||
$themes['Light']['clouds']= 'Clouds';
|
||||
$themes['Light']['crimson_editor']= 'Crimson Editor';
|
||||
$themes['Light']['dawn']= 'Dawn';
|
||||
$themes['Light']['dreamweaver']= 'Dreamweaver';
|
||||
$themes['Light']['eclipse']= 'Eclipse';
|
||||
$themes['Light']['github']= 'GitHub';
|
||||
$themes['Light']['iplastic']= 'IPlastic';
|
||||
$themes['Light']['solarized_light']= 'Solarized Light';
|
||||
$themes['Light']['textmate']= 'TextMate';
|
||||
$themes['Light']['tomorrow']= 'Tomorrow';
|
||||
$themes['Light']['xcode']= 'XCode';
|
||||
$themes['Light']['kuroir']= 'Kuroir';
|
||||
$themes['Light']['katzenmilch']= 'KatzenMilch';
|
||||
$themes['Light']['sqlserver']= 'SQL Server';
|
||||
$themes['Dark']['ambiance']= 'Ambiance';
|
||||
$themes['Dark']['chaos']= 'Chaos';
|
||||
$themes['Dark']['clouds_midnight']= 'Clouds Midnight';
|
||||
$themes['Dark']['cobalt']= 'Cobalt';
|
||||
$themes['Dark']['idle_fingers']= 'idle Fingers';
|
||||
$themes['Dark']['kr_theme']= 'krTheme';
|
||||
$themes['Dark']['merbivore']= 'Merbivore';
|
||||
$themes['Dark']['merbivore_soft']= 'Merbivore Soft';
|
||||
$themes['Dark']['mono_industrial']= 'Mono Industrial';
|
||||
$themes['Dark']['monokai']= 'Monokai';
|
||||
$themes['Dark']['pastel_on_dark']= 'Pastel on dark';
|
||||
$themes['Dark']['solarized_dark']= 'Solarized Dark';
|
||||
$themes['Dark']['terminal']= 'Terminal';
|
||||
$themes['Dark']['tomorrow_night']= 'Tomorrow Night';
|
||||
$themes['Dark']['tomorrow_night_blue']= 'Tomorrow Night Blue';
|
||||
$themes['Dark']['tomorrow_night_bright']= 'Tomorrow Night Bright';
|
||||
$themes['Dark']['tomorrow_night_eighties']= 'Tomorrow Night 80s';
|
||||
$themes['Dark']['twilight']= 'Twilight';
|
||||
$themes['Dark']['vibrant_ink']= 'Vibrant Ink';
|
||||
foreach ($themes as $optgroup => $theme) {
|
||||
echo "<optgroup label='".$optgroup."'>\n";
|
||||
foreach ($theme as $value => $label) {
|
||||
$selected = strtolower($label) == strtolower($setting_theme) ? 'selected' : null;
|
||||
echo "<option value='".$value."' ".$selected.">".escape($label)."</option>\n";
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-template_body']."\n";
|
||||
echo "</td>\n";
|
||||
@@ -327,6 +467,39 @@
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "<script type='text/javascript' src='".PROJECT_PATH."/resources/ace/ace.js' charset='utf-8'></script>\n";
|
||||
echo "<script type='text/javascript'>\n";
|
||||
|
||||
//load editor
|
||||
echo " var editor = ace.edit('editor');\n";
|
||||
echo " editor.setOptions({\n";
|
||||
echo " mode: 'ace/mode/html',\n";
|
||||
echo " theme: 'ace/theme/'+document.getElementById('theme').options[document.getElementById('theme').selectedIndex].value,\n";
|
||||
echo " selectionStyle: 'text',\n";
|
||||
echo " cursorStyle: 'smooth',\n";
|
||||
echo " showInvisibles: ".$setting_invisibles.",\n";
|
||||
echo " displayIndentGuides: ".$setting_indenting.",\n";
|
||||
echo " showLineNumbers: ".$setting_numbering.",\n";
|
||||
echo " showGutter: true,\n";
|
||||
echo " scrollPastEnd: true,\n";
|
||||
echo " fadeFoldWidgets: ".$setting_numbering.",\n";
|
||||
echo " showPrintMargin: false,\n";
|
||||
echo " highlightGutterLine: false,\n";
|
||||
echo " useSoftTabs: false\n";
|
||||
echo " });\n";
|
||||
echo " document.getElementById('editor').style.fontSize='".$setting_size."';\n";
|
||||
echo " focus_editor();\n";
|
||||
|
||||
//load value into editor
|
||||
echo " load_value();\n";
|
||||
|
||||
//remove certain keyboard shortcuts
|
||||
echo " editor.commands.bindKey('Ctrl-T', null);\n"; //disable transpose letters - prefer new browser tab
|
||||
echo " editor.commands.bindKey('Ctrl-F', null);\n"; //disable find - control broken with bootstrap
|
||||
echo " editor.commands.bindKey('Ctrl-H', null);\n"; //disable replace - control broken with bootstrap
|
||||
|
||||
echo "</script>\n";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
|
||||
BIN
app/email_templates/resources/images/icon_file.png
Normal file
|
After Width: | Height: | Size: 257 B |
BIN
app/email_templates/resources/images/icon_folder.png
Normal file
|
After Width: | Height: | Size: 224 B |
BIN
app/email_templates/resources/images/icon_gear.png
Normal file
|
After Width: | Height: | Size: 726 B |
BIN
app/email_templates/resources/images/icon_goto.png
Normal file
|
After Width: | Height: | Size: 417 B |
BIN
app/email_templates/resources/images/icon_indenting.png
Normal file
|
After Width: | Height: | Size: 324 B |
BIN
app/email_templates/resources/images/icon_invisibles.png
Normal file
|
After Width: | Height: | Size: 821 B |
BIN
app/email_templates/resources/images/icon_numbering.png
Normal file
|
After Width: | Height: | Size: 521 B |
BIN
app/email_templates/resources/images/icon_replace.png
Normal file
|
After Width: | Height: | Size: 504 B |
@@ -63,7 +63,7 @@
|
||||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "call_groups";
|
||||
$apps[$x]['destinations'][$y]['name'] = "extensions";
|
||||
$apps[$x]['destinations'][$y]['sql']['pgsql'] = "select extension_uuid, distinct(unnest(string_to_array(call_group, ','))) as destination from v_extensions ";
|
||||
$apps[$x]['destinations'][$y]['sql']['pgsql'] = "select distinct(unnest(string_to_array(call_group, ','))) as destination from v_extensions ";
|
||||
$apps[$x]['destinations'][$y]['sql']['sqlite'] = "select distinct(call_group) as destination from v_extensions";
|
||||
$apps[$x]['destinations'][$y]['sql']['mysql'] = "select distinct(call_group) as destination from v_extensions";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_group <> '' and enabled = 'true' ";
|
||||
|
||||
@@ -2746,8 +2746,8 @@ $text['description-dial_string']['ru-ru'] = "Местоположение кон
|
||||
$text['description-dial_string']['sv-se'] = "Plats för enheten.";
|
||||
$text['description-dial_string']['uk-ua'] = "";
|
||||
|
||||
$text['description-cidr']['en-us'] = "Enter the CIDR here.";
|
||||
$text['description-cidr']['en-gb'] = "Enter the CIDR here.";
|
||||
$text['description-cidr']['en-us'] = "Enter allowed address/ranges in CIDR notation (comma separated).";
|
||||
$text['description-cidr']['en-gb'] = "Enter allowed address/ranges in CIDR notation (comma separated).";
|
||||
$text['description-cidr']['ar-eg'] = "";
|
||||
$text['description-cidr']['de-at'] = "Geben Sie hier die Beschränkung der IP Adresse an (z.B. 1.2.3.4/32)"; //copied from de-de
|
||||
$text['description-cidr']['de-ch'] = "Geben Sie hier die Beschränkung der IP Adresse an (z.B. 1.2.3.4/32)"; //copied from de-de
|
||||
|
||||
@@ -267,15 +267,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
//set the default user context
|
||||
if (permission_exists("extension_user_context")) {
|
||||
//allow a user assigned to super admin to change the user_context
|
||||
}
|
||||
else {
|
||||
//if the user_context was not set then set the default value
|
||||
$user_context = $_SESSION['domain_name'];
|
||||
}
|
||||
|
||||
//prevent users from bypassing extension limit by using range
|
||||
if ($_SESSION['limit']['extensions']['numeric'] != '') {
|
||||
if ($total_extensions + $range > $_SESSION['limit']['extensions']['numeric']){
|
||||
@@ -402,7 +393,14 @@
|
||||
$array["extensions"][$i]["directory_exten_visible"] = $directory_exten_visible;
|
||||
$array["extensions"][$i]["limit_max"] = $limit_max;
|
||||
$array["extensions"][$i]["limit_destination"] = $limit_destination;
|
||||
$array["extensions"][$i]["user_context"] = $user_context;
|
||||
if (permission_exists("extension_user_context")) {
|
||||
$array["extensions"][$i]["user_context"] = $user_context;
|
||||
}
|
||||
else {
|
||||
if ($action == "add") {
|
||||
$array["extensions"][$i]["user_context"] = $_SESSION['domain_name'];
|
||||
}
|
||||
}
|
||||
if (permission_exists('extension_missed_call')) {
|
||||
$array["extensions"][$i]["missed_call_app"] = $missed_call_app;
|
||||
$array["extensions"][$i]["missed_call_data"] = $missed_call_data;
|
||||
|
||||
@@ -115,7 +115,6 @@
|
||||
|
||||
//download the fax
|
||||
if ($_GET['a'] == "download") {
|
||||
session_cache_limiter('public');
|
||||
//test to see if it is in the inbox or sent directory.
|
||||
if ($_GET['type'] == "fax_inbox") {
|
||||
if (file_exists($fax_dir.'/'.$_GET['ext'].'/inbox/'.$_GET['filename'])) {
|
||||
@@ -349,19 +348,12 @@
|
||||
$page_height = 11.7;
|
||||
$page_size = 'a4';
|
||||
}
|
||||
//generate pdf (a work around, as tiff2pdf improperly inverts the colors)
|
||||
$cmd_tif2pdf = "tiff2pdf -i -u i -p ".$page_size." -w ".$page_width." -l ".$page_height." -f -o ".$dir_fax_temp.'/'.$file_name.".pdf ".$dir_fax.'/'.$file_name.".tif";
|
||||
//echo $cmd_tif2pdf."<br>";
|
||||
//generate pdf from tif
|
||||
$cmd_tif2pdf = "tiff2pdf -u i -p ".$page_size." -w ".$page_width." -l ".$page_height." -f -o ".$dir_fax.'/'.$file_name.".pdf ".$dir_fax.'/'.$file_name.".tif";
|
||||
exec($cmd_tif2pdf);
|
||||
chdir($dir_fax_temp);
|
||||
$cmd_pdf2tif = "gs -q -sDEVICE=tiffg3 -r".$gs_r." -g".$gs_g." -dNOPAUSE -sOutputFile=".$file_name."_temp.tif -- ".$file_name.".pdf -c quit";
|
||||
//echo $cmd_pdf2tif."<br>";
|
||||
exec($cmd_pdf2tif); //convert pdf to tif
|
||||
@unlink($dir_fax_temp.'/'.$file_name.".pdf");
|
||||
$cmd_tif2pdf = "tiff2pdf -i -u i -p ".$page_size." -w ".$page_width." -l ".$page_height." -f -o ".$dir_fax.'/'.$file_name.".pdf ".$dir_fax_temp.'/'.$file_name."_temp.tif";
|
||||
//echo $cmd_tif2pdf."<br>";
|
||||
exec($cmd_tif2pdf);
|
||||
@unlink($dir_fax_temp.'/'.$file_name."_temp.tif");
|
||||
//clean up temporary files, if any
|
||||
if (file_exists($dir_fax_temp.'/'.$file_name.'.pdf')) { @unlink($dir_fax_temp.'/'.$file_name.'.pdf'); }
|
||||
if (file_exists($dir_fax_temp.'/'.$file_name.'.tif')) { @unlink($dir_fax_temp.'/'.$file_name.'.tif'); }
|
||||
}
|
||||
|
||||
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
James Rose <james.o.rose@gmail.com>
|
||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
Errol Samuels <voiptology@gmail.com>
|
||||
Corey Moullas <cmoullas@emak.tech>
|
||||
*/
|
||||
|
||||
if (!isset($included)) { $included = false; }
|
||||
@@ -369,7 +370,9 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
$fax_name = str_replace("=", "_", $fax_name);
|
||||
|
||||
$attachment_file_name = $_files['name'][$index];
|
||||
rename($dir_fax_temp.'/'.$attachment_file_name, $dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension);
|
||||
if ($attachment_file_name != $fax_name.'.'.$fax_file_extension) {
|
||||
rename($dir_fax_temp.'/'.$attachment_file_name, $dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension);
|
||||
}
|
||||
unset($attachment_file_name);
|
||||
|
||||
if (!$included) {
|
||||
@@ -394,12 +397,8 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
if (file_exists($dir_fax_temp.'/'.$fax_name.'.pdf')) {
|
||||
chdir($dir_fax_temp);
|
||||
|
||||
//$cmd = gs_cmd("-q -sDEVICE=psmono -r".$gs_r." -g".$gs_g." -dNOPAUSE -dBATCH -dSAFER -sOutputFile=".correct_path($fax_name).".pdf -- ".correct_path($fax_name).".pdf -c quit");
|
||||
// echo($cmd . "<br/>\n");
|
||||
//exec($cmd);
|
||||
|
||||
//convert pdf to tif
|
||||
$cmd = gs_cmd("-q -sDEVICE=tiffg32d -r".$gs_r." -g".$gs_g." -dBATCH -dPDFFitPage -dNOPAUSE -sOutputFile=".correct_path($fax_name).".tif -- ".correct_path($fax_name).".pdf -c quit");
|
||||
$cmd = gs_cmd("-q -r".$gs_r." -g".$gs_g." -dBATCH -dPDFFitPage -dSAFER -dNOPAUSE -dBATCH -sOutputFile=".correct_path($fax_name).".tif -sDEVICE=tiffg4 -Ilib stocht.ps -c \"{ .75 gt { 1 } { 0 } ifelse} settransfer\" -- ".correct_path($fax_name).".pdf -c quit");
|
||||
// echo($cmd . "<br/>\n");
|
||||
exec($cmd);
|
||||
@unlink($dir_fax_temp.'/'.$fax_name.'.pdf');
|
||||
@@ -660,41 +659,14 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
@unlink($tif_file);
|
||||
}
|
||||
|
||||
//generate pdf (a work around, as tiff2pdf was improperly inverting the colors)
|
||||
//generate pdf from tif
|
||||
$cmd = 'tiff2pdf -u i -p '.$fax_page_size.
|
||||
' -w '.$page_width.
|
||||
' -l '.$page_height.
|
||||
' -f -o '.
|
||||
correct_path($dir_fax_temp.'/'.$fax_instance_uuid.'.pdf').' '.
|
||||
correct_path($dir_fax_temp.'/'.$fax_instance_uuid.'.tif');
|
||||
// echo($cmd . "<br/>\n");
|
||||
exec($cmd);
|
||||
|
||||
chdir($dir_fax_temp);
|
||||
|
||||
//$cmd = gs_cmd("-q -sDEVICE=psmono -r".$gs_r." -g".$gs_g." -dNOPAUSE -dBATCH -dSAFER -sOutputFile=".correct_path($fax_instance_uuid).".pdf -- ".correct_path($fax_instance_uuid).".pdf -c quit");
|
||||
// echo($cmd . "<br/>\n");
|
||||
//exec($cmd);
|
||||
|
||||
//convert pdf to tif
|
||||
$cmd = gs_cmd('-q -sDEVICE=tiffg32d -r'.$gs_r.' -g'.$gs_g.' -dBATCH -dPDFFitPage -dNOPAUSE -sOutputFile='.
|
||||
correct_path($fax_instance_uuid.'_temp.tif').
|
||||
' -- '.$fax_instance_uuid.'.pdf -c quit');
|
||||
// echo($cmd . "<br/>\n");
|
||||
exec($cmd);
|
||||
|
||||
@unlink($dir_fax_temp.'/'.$fax_instance_uuid.".pdf");
|
||||
|
||||
$cmd = 'tiff2pdf -u i -p '.$fax_page_size.
|
||||
' -w '.$page_width.
|
||||
' -l '.$page_height.
|
||||
' -f -o '.
|
||||
correct_path($dir_fax_temp.'/'.$fax_instance_uuid.'.pdf').' '.
|
||||
correct_path($dir_fax_temp.'/'.$fax_instance_uuid.'_temp.tif');
|
||||
// echo($cmd . "<br/>\n");
|
||||
exec($cmd);
|
||||
|
||||
@unlink($dir_fax_temp.'/'.$fax_instance_uuid."_temp.tif");
|
||||
}
|
||||
else {
|
||||
if (!$included) {
|
||||
|
||||
@@ -162,7 +162,7 @@ if (!class_exists('fax')) {
|
||||
$dialplan["dialplan_uuid"] = $this->dialplan_uuid;
|
||||
$dialplan["dialplan_name"] = ($this->fax_name != '') ? $this->fax_name : format_phone($this->destination_number);
|
||||
$dialplan["dialplan_number"] = $this->fax_extension;
|
||||
$dialplan["dialplan_context"] = $_SESSION['context'];
|
||||
$dialplan["dialplan_context"] = $_SESSION['domain_name'];
|
||||
$dialplan["dialplan_continue"] = "false";
|
||||
$dialplan["dialplan_xml"] = $dialplan_xml;
|
||||
$dialplan["dialplan_order"] = "310";
|
||||
@@ -195,7 +195,7 @@ if (!class_exists('fax')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION['context']);
|
||||
$cache->delete("dialplan:".$_SESSION['domain_name']);
|
||||
|
||||
//return the dialplan_uuid
|
||||
return $dialplan_response;
|
||||
@@ -346,7 +346,7 @@ if (!class_exists('fax')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//set message
|
||||
message::add($text['message-delete']);
|
||||
@@ -646,7 +646,7 @@ if (!class_exists('fax')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//set message
|
||||
message::add($text['message-copy']);
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
$queue_name = $extension_name."@\${domain_name}";
|
||||
$app_uuid = '16589224-c876-aeb3-f59f-523a1c0801f7';
|
||||
$dialplan_uuid = uuid();
|
||||
$dialplan_context = $_SESSION['context'];
|
||||
$dialplan_context = $_SESSION['domain_name'];
|
||||
$domain_uuid = $_SESSION['domain_uuid'];
|
||||
$dialplan_detail_order = 0;
|
||||
|
||||
@@ -406,7 +406,7 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//redirect the user
|
||||
message::add($text['message-add']);
|
||||
|
||||
@@ -197,6 +197,14 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ping_min";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ping_max";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "caller_id_in_from";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
@@ -484,6 +484,48 @@ $text['label-ping']['ru-ru'] = "Пинг";
|
||||
$text['label-ping']['sv-se'] = "Ping";
|
||||
$text['label-ping']['uk-ua'] = "Пінг";
|
||||
|
||||
$text['label-ping_min']['en-us'] = "Ping Min";
|
||||
$text['label-ping_min']['en-gb'] = "";
|
||||
$text['label-ping_min']['ar-eg'] = "";
|
||||
$text['label-ping_min']['de-at'] = "";
|
||||
$text['label-ping_min']['de-ch'] = "";
|
||||
$text['label-ping_min']['de-de'] = "";
|
||||
$text['label-ping_min']['es-cl'] = "";
|
||||
$text['label-ping_min']['es-mx'] = "";
|
||||
$text['label-ping_min']['fr-ca'] = "";
|
||||
$text['label-ping_min']['fr-fr'] = "";
|
||||
$text['label-ping_min']['he-il'] = "";
|
||||
$text['label-ping_min']['it-it'] = "";
|
||||
$text['label-ping_min']['nl-nl'] = "";
|
||||
$text['label-ping_min']['pl-pl'] = "";
|
||||
$text['label-ping_min']['pt-br'] = "";
|
||||
$text['label-ping_min']['pt-pt'] = "";
|
||||
$text['label-ping_min']['ro-ro'] = "";
|
||||
$text['label-ping_min']['ru-ru'] = "";
|
||||
$text['label-ping_min']['sv-se'] = "";
|
||||
$text['label-ping_min']['uk-ua'] = "";
|
||||
|
||||
$text['label-ping_max']['en-us'] = "Ping Max";
|
||||
$text['label-ping_max']['en-gb'] = "";
|
||||
$text['label-ping_max']['ar-eg'] = "";
|
||||
$text['label-ping_max']['de-at'] = "";
|
||||
$text['label-ping_max']['de-ch'] = "";
|
||||
$text['label-ping_max']['de-de'] = "";
|
||||
$text['label-ping_max']['es-cl'] = "";
|
||||
$text['label-ping_max']['es-mx'] = "";
|
||||
$text['label-ping_max']['fr-ca'] = "";
|
||||
$text['label-ping_max']['fr-fr'] = "";
|
||||
$text['label-ping_max']['he-il'] = "";
|
||||
$text['label-ping_max']['it-it'] = "";
|
||||
$text['label-ping_max']['nl-nl'] = "";
|
||||
$text['label-ping_max']['pl-pl'] = "";
|
||||
$text['label-ping_max']['pt-br'] = "";
|
||||
$text['label-ping_max']['pt-pt'] = "";
|
||||
$text['label-ping_max']['ro-ro'] = "";
|
||||
$text['label-ping_max']['ru-ru'] = "";
|
||||
$text['label-ping_max']['sv-se'] = "";
|
||||
$text['label-ping_max']['uk-ua'] = "";
|
||||
|
||||
$text['label-password']['en-us'] = "Password";
|
||||
$text['label-password']['en-gb'] = "Password";
|
||||
$text['label-password']['ar-eg'] = "كلمة السر";
|
||||
|
||||
@@ -75,12 +75,14 @@
|
||||
$channels = $row["channels"];
|
||||
$caller_id_in_from = $row["caller_id_in_from"];
|
||||
$supress_cng = $row["supress_cng"];
|
||||
$sip_cid_type = $row["sip_cid_type"];
|
||||
$extension_in_contact = $row["extension_in_contact"];
|
||||
$effective_caller_id_name = $row["effective_caller_id_name"];
|
||||
$effective_caller_id_number = $row["effective_caller_id_number"];
|
||||
$outbound_caller_id_name = $row["outbound_caller_id_name"];
|
||||
$outbound_caller_id_number = $row["outbound_caller_id_number"];
|
||||
$context = $row["context"];
|
||||
$profile = $row["profile"];
|
||||
$enabled = $row["enabled"];
|
||||
$description = $row["description"]." (".$text['label-copy'].")";
|
||||
}
|
||||
@@ -118,8 +120,10 @@
|
||||
//$array['gateways'][0]['channels'] = $channels;
|
||||
$array['gateways'][0]['caller_id_in_from'] = $caller_id_in_from;
|
||||
$array['gateways'][0]['supress_cng'] = $supress_cng;
|
||||
$array['gateways'][0]['sip_cid_type'] = $sip_cid_type;
|
||||
$array['gateways'][0]['extension_in_contact'] = $extension_in_contact;
|
||||
$array['gateways'][0]['context'] = $context;
|
||||
$array['gateways'][0]['profile'] = $profile;
|
||||
$array['gateways'][0]['enabled'] = $enabled;
|
||||
$array['gateways'][0]['description'] = $description;
|
||||
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
$retry_seconds = $_POST["retry_seconds"];
|
||||
$extension = $_POST["extension"];
|
||||
$ping = $_POST["ping"];
|
||||
$ping_min = $_POST["ping_min"];
|
||||
$ping_max = $_POST["ping_max"];
|
||||
$channels = $_POST["channels"];
|
||||
$caller_id_in_from = $_POST["caller_id_in_from"];
|
||||
$supress_cng = $_POST["supress_cng"];
|
||||
@@ -178,6 +180,8 @@
|
||||
$array['gateways'][$x]["retry_seconds"] = $retry_seconds;
|
||||
$array['gateways'][$x]["extension"] = $extension;
|
||||
$array['gateways'][$x]["ping"] = $ping;
|
||||
$array['gateways'][$x]["ping_min"] = $ping_min;
|
||||
$array['gateways'][$x]["ping_max"] = $ping_max;
|
||||
$array['gateways'][$x]["channels"] = $channels;
|
||||
$array['gateways'][$x]["caller_id_in_from"] = $caller_id_in_from;
|
||||
$array['gateways'][$x]["supress_cng"] = $supress_cng;
|
||||
@@ -279,6 +283,8 @@
|
||||
$retry_seconds = $row["retry_seconds"];
|
||||
$extension = $row["extension"];
|
||||
$ping = $row["ping"];
|
||||
$ping_min = $row["ping_min"];
|
||||
$ping_max = $row["ping_max"];
|
||||
$channels = $row["channels"];
|
||||
$caller_id_in_from = $row["caller_id_in_from"];
|
||||
$supress_cng = $row["supress_cng"];
|
||||
@@ -706,6 +712,28 @@
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-ping_min']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='number' name='ping_min' maxlength='255' min='1' max='65535' step='1' value=\"".escape($ping_min)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-ping_min']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-ping_max']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='number' name='ping_max' maxlength='255' min='1' max='65535' step='1' value=\"".escape($ping_max)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-ping_max']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('gateway_channels')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_dial_plan";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{\+x+|x+|*x+|*++|\p\a\r\k\+*x+|\f\l\o\w\+*x+}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{\+x+|x+|*x+|*++||\p\a\r\k\+*x+|\f\l\o\w\+*x+|**x+}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Define the digits that are allowed to be called.";
|
||||
$y++;
|
||||
@@ -614,53 +614,85 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring Timeout (in seconds). Default is 60 (30-3600)";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "06a35172-1bea-4611-87d0-9d66475ae709";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wallpaper_source";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "0 - Default, 1 - Download, 2-USB(for GXP2140/2160/2170 only), 3 - Uploaded, 4 - Color Background";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7ee552de-4634-4d61-8869-e0f5230858fa";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_display_language";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "Auto";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Display Language. See provision profile for codes.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "19604f85-b643-4b92-8e28-9c09c34cf559";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_blind_xfer_blf";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable Blind Transfer to BLF Yes=1, No=0. Default=0";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "82b7076b-e596-49e8-b535-af86e21e0453";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_ip_address_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "IP Address Mode. 0 - DHCP, 1 - Static IP, 2 - PPPoE. Default is 0";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6ab26457-fcc8-414e-8ac5-ae681f114974";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_speaker_ring_volume";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Number: 0-7. Default is 5.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "fd0e54fe-1008-11eb-adc1-0242ac120002";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_feature_key_sync";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enabled: 1, Disabled: 0 Defaults to 0. Valid for firmware higher than 1.0.9.202 for the GXP series and all firmwares GRP phones.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "06a35172-1bea-4611-87d0-9d66475ae709";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wallpaper_source";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "0 - Default, 1 - Download, 2-USB(for GXP2140/2160/2170 only), 3 - Uploaded, 4 - Color Background";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7ee552de-4634-4d61-8869-e0f5230858fa";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_display_language";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "Auto";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Display Language. See provision profile for codes.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "19604f85-b643-4b92-8e28-9c09c34cf559";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_blind_xfer_blf";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable Blind Transfer to BLF Yes=1, No=0. Default=0";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "82b7076b-e596-49e8-b535-af86e21e0453";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_ip_address_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "IP Address Mode. 0 - DHCP, 1 - Static IP, 2 - PPPoE. Default is 0";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6ab26457-fcc8-414e-8ac5-ae681f114974";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_speaker_ring_volume";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Number: 0-7. Default is 5.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6f3f3390-2b69-4898-a4d9-e62249d58d58";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_feature_key_sync";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enabled: 1, Disabled: 0 Defaults to 0. Valid for firmware higher than 1.0.9.202 for the GXP series and all firmwares GRP phones.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a6c84c0b-a7f1-4457-8afb-b64af601597d";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_enable";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Configure the WiFi radio on supported phones. If disabled allow the device to manage itself";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f7fdbe09-0d4a-4d06-b70b-e25cdf1b3376";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_essid";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Configure the WiFi ESSID on supported phones";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2edaa516-d87e-410f-8ddc-1cc468dabd2e";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_password";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Configure the WiFi password on supported phones";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7b525ca5-96ae-4104-ad6c-c929f85c30dc";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_hidden_security";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "None";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Configure the security to use when connecting to a hidden SSID. Valid values: None, WEP, WPA/WPA2_PSK, 802.1X_EAP";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -271,6 +271,10 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ivr_menu_pin_number";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ivr_menu_confirm_macro";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
@@ -631,6 +631,27 @@ $text['label-destination']['ru-ru'] = "Место назначения";
|
||||
$text['label-destination']['sv-se'] = "Destination";
|
||||
$text['label-destination']['uk-ua'] = "";
|
||||
|
||||
$text['label-pin_number']['en-us'] = "Pin Number";
|
||||
$text['label-pin_number']['en-gb'] = "Pin Number";
|
||||
$text['label-pin_number']['ar-eg'] = "";
|
||||
$text['label-pin_number']['de-at'] = "PIN Nummer"; //copied from de-de
|
||||
$text['label-pin_number']['de-ch'] = "PIN Nummer"; //copied from de-de
|
||||
$text['label-pin_number']['de-de'] = "PIN Nummer";
|
||||
$text['label-pin_number']['es-cl'] = "Número Pin";
|
||||
$text['label-pin_number']['es-mx'] = "Número Pin"; //copied from es-cl
|
||||
$text['label-pin_number']['fr-ca'] = "Code Pin"; //copied from fr-fr
|
||||
$text['label-pin_number']['fr-fr'] = "Code Pin";
|
||||
$text['label-pin_number']['he-il'] = "";
|
||||
$text['label-pin_number']['it-it'] = "PIN";
|
||||
$text['label-pin_number']['nl-nl'] = "PIN";
|
||||
$text['label-pin_number']['pl-pl'] = "";
|
||||
$text['label-pin_number']['pt-br'] = "Código Pin"; //copied from pt-pt
|
||||
$text['label-pin_number']['pt-pt'] = "Código Pin";
|
||||
$text['label-pin_number']['ro-ro'] = "";
|
||||
$text['label-pin_number']['ru-ru'] = "PIN Номер";
|
||||
$text['label-pin_number']['sv-se'] = "Pin Nummer";
|
||||
$text['label-pin_number']['uk-ua'] = "";
|
||||
|
||||
$text['label-comfirm_macro']['en-us'] = "Confirm Macro";
|
||||
$text['label-comfirm_macro']['en-gb'] = "Confirm Macro";
|
||||
$text['label-comfirm_macro']['ar-eg'] = "";
|
||||
@@ -1366,6 +1387,27 @@ $text['description-destination']['ru-ru'] = "Выберите пункт наз
|
||||
$text['description-destination']['sv-se'] = "Välj destination.";
|
||||
$text['description-destination']['uk-ua'] = "";
|
||||
|
||||
$text['description-pin_number']['en-us'] = "Optional pin number to secure access to the menu.";
|
||||
$text['description-pin_number']['en-gb'] = "Optional pin number to secure access to the menu.";
|
||||
$text['description-pin_number']['ar-eg'] = "";
|
||||
$text['description-pin_number']['de-at'] = "";
|
||||
$text['description-pin_number']['de-ch'] = "";
|
||||
$text['description-pin_number']['de-de'] = "";
|
||||
$text['description-pin_number']['es-cl'] = "";
|
||||
$text['description-pin_number']['es-mx'] = "";
|
||||
$text['description-pin_number']['fr-ca'] = "";
|
||||
$text['description-pin_number']['fr-fr'] = "";
|
||||
$text['description-pin_number']['he-il'] = "";
|
||||
$text['description-pin_number']['it-it'] = "";
|
||||
$text['description-pin_number']['nl-nl'] = "";
|
||||
$text['description-pin_number']['pl-pl'] = "";
|
||||
$text['description-pin_number']['pt-br'] = "";
|
||||
$text['description-pin_number']['pt-pt'] = "";
|
||||
$text['description-pin_number']['ro-ro'] = "";
|
||||
$text['description-pin_number']['ru-ru'] = "";
|
||||
$text['description-pin_number']['sv-se'] = "";
|
||||
$text['description-pin_number']['uk-ua'] = "";
|
||||
|
||||
$text['description-comfirm_macro']['en-us'] = "Enter the confirm macro.";
|
||||
$text['description-comfirm_macro']['en-gb'] = "Enter the confirm macro.";
|
||||
$text['description-comfirm_macro']['ar-eg'] = "";
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
$database = new database;
|
||||
$ivr_menus = $database->select($sql, $parameters, 'all');
|
||||
if (!is_array($ivr_menus)) {
|
||||
echo "access denied 63";
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
unset($sql, $parameters);
|
||||
@@ -84,6 +84,7 @@
|
||||
$ivr_menu_name = $ivr_menus[$x]['ivr_menu_name'];
|
||||
$ivr_menu_extension = $ivr_menus[$x]['ivr_menu_extension'];
|
||||
$ivr_menu_ringback = $ivr_menus[$x]['ivr_menu_ringback'];
|
||||
$ivr_menu_context = $ivr_menus[$x]['ivr_menu_context'];
|
||||
$ivr_menu_description = $ivr_menus[$x]['ivr_menu_description'].' ('.$text['label-copy'].')';
|
||||
|
||||
//prepare the ivr menu array
|
||||
@@ -123,7 +124,7 @@
|
||||
$dialplan[$x]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$dialplan[$x]["dialplan_name"] = $ivr_menu_name;
|
||||
$dialplan[$x]["dialplan_number"] = $ivr_menu_extension;
|
||||
$dialplan[$x]["dialplan_context"] = $_SESSION["context"];
|
||||
$dialplan[$x]["dialplan_context"] = $ivr_menu_context;
|
||||
$dialplan[$x]["dialplan_continue"] = "false";
|
||||
$dialplan[$x]["dialplan_xml"] = $dialplan_xml;
|
||||
$dialplan[$x]["dialplan_order"] = "101";
|
||||
@@ -156,7 +157,7 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$ivr_menu_context);
|
||||
|
||||
//set message
|
||||
message::add($text['message-copy']);
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
$ivr_menu_options = $_POST["ivr_menu_options"];
|
||||
$ivr_menu_invalid_sound = $_POST["ivr_menu_invalid_sound"];
|
||||
$ivr_menu_exit_sound = $_POST["ivr_menu_exit_sound"];
|
||||
$ivr_menu_pin_number = $_POST["ivr_menu_pin_number"];
|
||||
$ivr_menu_confirm_macro = $_POST["ivr_menu_confirm_macro"];
|
||||
$ivr_menu_confirm_key = $_POST["ivr_menu_confirm_key"];
|
||||
$ivr_menu_tts_engine = $_POST["ivr_menu_tts_engine"];
|
||||
@@ -260,6 +261,7 @@
|
||||
$array['ivr_menus'][0]["ivr_menu_greet_short"] = $ivr_menu_greet_short;
|
||||
$array['ivr_menus'][0]["ivr_menu_invalid_sound"] = $ivr_menu_invalid_sound;
|
||||
$array['ivr_menus'][0]["ivr_menu_exit_sound"] = $ivr_menu_exit_sound;
|
||||
$array['ivr_menus'][0]["ivr_menu_pin_number"] = $ivr_menu_pin_number;
|
||||
$array['ivr_menus'][0]["ivr_menu_confirm_macro"] = $ivr_menu_confirm_macro;
|
||||
$array['ivr_menus'][0]["ivr_menu_confirm_key"] = $ivr_menu_confirm_key;
|
||||
$array['ivr_menus'][0]["ivr_menu_tts_engine"] = $ivr_menu_tts_engine;
|
||||
@@ -456,6 +458,7 @@
|
||||
$ivr_menu_greet_short = $row["ivr_menu_greet_short"];
|
||||
$ivr_menu_invalid_sound = $row["ivr_menu_invalid_sound"];
|
||||
$ivr_menu_exit_sound = $row["ivr_menu_exit_sound"];
|
||||
$ivr_menu_pin_number = $row["ivr_menu_pin_number"];
|
||||
$ivr_menu_confirm_macro = $row["ivr_menu_confirm_macro"];
|
||||
$ivr_menu_confirm_key = $row["ivr_menu_confirm_key"];
|
||||
$ivr_menu_tts_engine = $row["ivr_menu_tts_engine"];
|
||||
@@ -1406,6 +1409,17 @@
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-pin_number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='ivr_menu_pin_number' maxlength='255' value=\"".escape($ivr_menu_pin_number)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-pin_number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-comfirm_macro']."\n";
|
||||
|
||||
@@ -52,9 +52,9 @@ if (!class_exists('ivr_menu')) {
|
||||
public function __construct() {
|
||||
|
||||
//assign private variables
|
||||
$this->app_name = 'ivr_menus';
|
||||
$this->app_uuid = 'a5788e9b-58bc-bd1b-df59-fff5d51253ab';
|
||||
$this->list_page = 'ivr_menus.php';
|
||||
$this->app_name = 'ivr_menus';
|
||||
$this->app_uuid = 'a5788e9b-58bc-bd1b-df59-fff5d51253ab';
|
||||
$this->list_page = 'ivr_menus.php';
|
||||
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ if (!class_exists('ivr_menu')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION['domain_name']);
|
||||
foreach ($ivr_menus as $ivr_menu_uuid => $ivr_menu) {
|
||||
$cache->delete("configuration:ivr.conf:".$ivr_menu_uuid);
|
||||
}
|
||||
@@ -467,7 +467,7 @@ if (!class_exists('ivr_menu')) {
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION['domain_name']);
|
||||
|
||||
//set message
|
||||
message::add($text['message-copy']);
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
$ivr_menu_max_timeouts = $row["ivr_menu_max_timeouts"];
|
||||
$ivr_menu_digit_len = $row["ivr_menu_digit_len"];
|
||||
$ivr_menu_direct_dial = $row["ivr_menu_direct_dial"];
|
||||
$ivr_menu_context = $row["ivr_menu_context"];
|
||||
$ivr_menu_enabled = $row["ivr_menu_enabled"];
|
||||
$ivr_menu_description = $row["ivr_menu_description"];
|
||||
|
||||
@@ -159,7 +160,7 @@
|
||||
unset($sub_sql, $sub_result, $sub_row);
|
||||
|
||||
if ($ivr_menu_direct_dial == "true") {
|
||||
$tmp .= " <entry action=\"menu-exec-app\" digits=\"/(^\d{3,6}$)/\" param=\"transfer $1 XML ".$_SESSION["context"]."\"/>\n";
|
||||
$tmp .= " <entry action=\"menu-exec-app\" digits=\"/(^\d{3,6}$)/\" param=\"transfer $1 XML ".$ivr_menu_context."\"/>\n";
|
||||
}
|
||||
$tmp .= " </menu>\n";
|
||||
$tmp .= "</include>\n";
|
||||
|
||||
@@ -155,88 +155,6 @@
|
||||
//get the domain name
|
||||
$domain_name = $_SESSION['domains'][$domain_uuid]['domain_name'];
|
||||
|
||||
//get the default settings
|
||||
$sql = "select * from v_default_settings ";
|
||||
$sql .= "where default_setting_enabled = 'true' ";
|
||||
$sql .= "order by default_setting_order asc ";
|
||||
$database = new database;
|
||||
$result = $database->select($sql, null, 'all');
|
||||
//unset the previous settings
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $row) {
|
||||
unset($_SESSION[$row['default_setting_category']]);
|
||||
}
|
||||
//set the settings as a session
|
||||
foreach ($result as $row) {
|
||||
$name = $row['default_setting_name'];
|
||||
$category = $row['default_setting_category'];
|
||||
$subcategory = $row['default_setting_subcategory'];
|
||||
if (strlen($subcategory) == 0) {
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][] = $row['default_setting_value'];
|
||||
}
|
||||
else {
|
||||
$_SESSION[$category][$name] = $row['default_setting_value'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][$subcategory][] = $row['default_setting_value'];
|
||||
}
|
||||
else {
|
||||
$_SESSION[$category][$subcategory]['uuid'] = $row['default_setting_uuid'];
|
||||
$_SESSION[$category][$subcategory][$name] = $row['default_setting_value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($sql, $result, $row);
|
||||
|
||||
//get the domains settings
|
||||
if (is_uuid($domain_uuid)) {
|
||||
$sql = "select * from v_domain_settings ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and domain_setting_enabled = 'true' ";
|
||||
$sql .= "order by domain_setting_order asc ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
//unset the arrays that domains are overriding
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $row) {
|
||||
$name = $row['domain_setting_name'];
|
||||
$category = $row['domain_setting_category'];
|
||||
$subcategory = $row['domain_setting_subcategory'];
|
||||
if ($name == "array") {
|
||||
unset($_SESSION[$category][$subcategory]);
|
||||
}
|
||||
}
|
||||
//set the settings as a session
|
||||
foreach ($result as $row) {
|
||||
$name = $row['domain_setting_name'];
|
||||
$category = $row['domain_setting_category'];
|
||||
$subcategory = $row['domain_setting_subcategory'];
|
||||
if (strlen($subcategory) == 0) {
|
||||
//$$category[$name] = $row['domain_setting_value'];
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][] = $row['domain_setting_value'];
|
||||
}
|
||||
else {
|
||||
$_SESSION[$category][$name] = $row['domain_setting_value'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
//$$category[$subcategory][$name] = $row['domain_setting_value'];
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][$subcategory][] = $row['domain_setting_value'];
|
||||
}
|
||||
else {
|
||||
$_SESSION[$category][$subcategory][$name] = $row['domain_setting_value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
//get the domain_name
|
||||
@@ -252,6 +170,89 @@
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//get the default settings
|
||||
$sql = "select * from v_default_settings ";
|
||||
$sql .= "where default_setting_enabled = 'true' ";
|
||||
$sql .= "order by default_setting_order asc ";
|
||||
$database = new database;
|
||||
$result = $database->select($sql, null, 'all');
|
||||
//unset the previous settings
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $row) {
|
||||
unset($_SESSION[$row['default_setting_category']]);
|
||||
}
|
||||
//set the settings as a session
|
||||
foreach ($result as $row) {
|
||||
$name = $row['default_setting_name'];
|
||||
$category = $row['default_setting_category'];
|
||||
$subcategory = $row['default_setting_subcategory'];
|
||||
if (strlen($subcategory) == 0) {
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][] = $row['default_setting_value'];
|
||||
}
|
||||
else {
|
||||
$_SESSION[$category][$name] = $row['default_setting_value'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][$subcategory][] = $row['default_setting_value'];
|
||||
}
|
||||
else {
|
||||
$_SESSION[$category][$subcategory]['uuid'] = $row['default_setting_uuid'];
|
||||
$_SESSION[$category][$subcategory][$name] = $row['default_setting_value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($sql, $result, $row);
|
||||
|
||||
//get the domains settings
|
||||
if (is_uuid($domain_uuid)) {
|
||||
$sql = "select * from v_domain_settings ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and domain_setting_enabled = 'true' ";
|
||||
$sql .= "order by domain_setting_order asc ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
//unset the arrays that domains are overriding
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $row) {
|
||||
$name = $row['domain_setting_name'];
|
||||
$category = $row['domain_setting_category'];
|
||||
$subcategory = $row['domain_setting_subcategory'];
|
||||
if ($name == "array") {
|
||||
unset($_SESSION[$category][$subcategory]);
|
||||
}
|
||||
}
|
||||
//set the settings as a session
|
||||
foreach ($result as $row) {
|
||||
$name = $row['domain_setting_name'];
|
||||
$category = $row['domain_setting_category'];
|
||||
$subcategory = $row['domain_setting_subcategory'];
|
||||
if (strlen($subcategory) == 0) {
|
||||
//$$category[$name] = $row['domain_setting_value'];
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][] = $row['domain_setting_value'];
|
||||
}
|
||||
else {
|
||||
$_SESSION[$category][$name] = $row['domain_setting_value'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
//$$category[$subcategory][$name] = $row['domain_setting_value'];
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][$subcategory][] = $row['domain_setting_value'];
|
||||
}
|
||||
else {
|
||||
$_SESSION[$category][$subcategory][$name] = $row['domain_setting_value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//build the provision array
|
||||
foreach($_SESSION['provision'] as $key=>$val) {
|
||||
if (strlen($val['var']) > 0) { $value = $val['var']; }
|
||||
|
||||
@@ -460,6 +460,9 @@ include "root.php";
|
||||
$templates['HW GXP1620'] = 'grandstream/gxp16xx';
|
||||
$templates['HW GXP1625'] = 'grandstream/gxp16xx';
|
||||
$templates['HW GXP1630'] = 'grandstream/gxp16xx';
|
||||
$templates['HW GXP1760W'] = 'grandstream/gxp17xx';
|
||||
$templates['HW GXP1780'] = 'grandstream/gxp17xx';
|
||||
$templates['HW GXP1782'] = 'grandstream/gxp17xx';
|
||||
$templates['HW GXP2124'] = 'grandstream/gxp2124';
|
||||
$templates['HW GXP2130'] = 'grandstream/gxp2130';
|
||||
$templates['HW GXP2135'] = 'grandstream/gxp2135';
|
||||
|
||||
@@ -44,8 +44,10 @@
|
||||
if (session:ready()) then
|
||||
--session:setAutoHangup(false);
|
||||
domain_uuid = session:getVariable("domain_uuid");
|
||||
call_direction = session:getVariable("call_direction");
|
||||
caller_id_name = session:getVariable("caller_id_name");
|
||||
caller_id_number = session:getVariable("caller_id_number");
|
||||
destination_number = session:getVariable("destination_number");
|
||||
context = session:getVariable("context");
|
||||
call_block = session:getVariable("call_block");
|
||||
extension_uuid = session:getVariable("extension_uuid");
|
||||
@@ -90,23 +92,48 @@
|
||||
assert(dbh:connected());
|
||||
|
||||
--check to see if the call should be blocked
|
||||
sql = "select * from v_call_block ";
|
||||
sql = sql .. "where domain_uuid = :domain_uuid ";
|
||||
sql = sql .. "and call_block_enabled = 'true' ";
|
||||
sql = sql .. "and ( ";
|
||||
sql = sql .. " (call_block_name = :call_block_name and call_block_number = :call_block_number) ";
|
||||
sql = sql .. " or (call_block_name is null and call_block_number = :call_block_number) ";
|
||||
sql = sql .. " or (call_block_name = :call_block_name and call_block_number is null) ";
|
||||
sql = sql .. ") ";
|
||||
sql = "select * from v_call_block\n";
|
||||
sql = sql .. "where domain_uuid = :domain_uuid \n";
|
||||
sql = sql .. "and call_block_enabled = 'true' \n";
|
||||
sql = sql .. "and call_block_direction = :call_block_direction \n";
|
||||
sql = sql .. "and ( \n";
|
||||
sql = sql .. " (\n";
|
||||
sql = sql .. " call_block_name = :call_block_name \n";
|
||||
sql = sql .. " and ( \n";
|
||||
sql = sql .. " '+' || call_block_country_code || call_block_number = :call_block_number \n";
|
||||
sql = sql .. " or call_block_country_code || call_block_number = :call_block_number \n";
|
||||
sql = sql .. " or call_block_number = :call_block_number \n";
|
||||
sql = sql .. " ) \n";
|
||||
sql = sql .. " ) \n";
|
||||
sql = sql .. " or (\n";
|
||||
sql = sql .. " call_block_name is null \n";
|
||||
sql = sql .. " and ( \n";
|
||||
sql = sql .. " '+' || call_block_country_code || call_block_number = :call_block_number \n";
|
||||
sql = sql .. " or call_block_country_code || call_block_number = :call_block_number \n";
|
||||
sql = sql .. " or call_block_number = :call_block_number \n";
|
||||
sql = sql .. " ) \n";
|
||||
sql = sql .. " ) \n";
|
||||
sql = sql .. " or (call_block_name = :call_block_name and call_block_number is null) \n";
|
||||
sql = sql .. ") \n";
|
||||
if (extension_uuid == nil) then
|
||||
sql = sql .. "and extension_uuid is null ";
|
||||
else
|
||||
sql = sql .. "and (extension_uuid is null or extension_uuid = :extension_uuid) ";
|
||||
end
|
||||
if (extension_uuid ~= nil) then
|
||||
params = {domain_uuid = domain_uuid, call_block_name = caller_id_name, call_block_number = caller_id_number, extension_uuid = extension_uuid};
|
||||
if (call_direction == 'inbound') then
|
||||
params = {domain_uuid = domain_uuid, call_block_direction = call_direction, call_block_name = caller_id_name, call_block_number = caller_id_number, extension_uuid = extension_uuid};
|
||||
end
|
||||
if (call_direction == 'outbound') then
|
||||
params = {domain_uuid = domain_uuid, call_block_direction = call_direction, call_block_name = caller_id_name, call_block_number = destination_number, extension_uuid = extension_uuid};
|
||||
end
|
||||
else
|
||||
params = {domain_uuid = domain_uuid, call_block_name = caller_id_name, call_block_number = caller_id_number};
|
||||
if (call_direction == 'inbound') then
|
||||
params = {domain_uuid = domain_uuid, call_block_direction = call_direction, call_block_name = caller_id_name, call_block_number = caller_id_number};
|
||||
end
|
||||
if (call_direction == 'outbound') then
|
||||
params = {domain_uuid = domain_uuid, call_block_direction = call_direction, call_block_name = caller_id_name, call_block_number = destination_number};
|
||||
end
|
||||
end
|
||||
if (debug["sql"]) then
|
||||
freeswitch.consoleLog("notice", "[dialplan] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||
@@ -217,4 +244,4 @@
|
||||
freeswitch.consoleLog("notice", "[call_block] " .. call_block_cache_key .. " source: cache\n");
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -12,6 +12,11 @@
|
||||
array = explode("/", sofia_contact);
|
||||
sip_profile = array[2];
|
||||
|
||||
--debug info
|
||||
--freeswitch.consoleLog("NOTICE", "sofia_contact */"..account.."\n");
|
||||
--freeswitch.consoleLog("NOTICE", "sip_profile="..sip_profile.."\n");
|
||||
--freeswitch.consoleLog("NOTICE", "sofia_contact="..sofia_contact.."\n");
|
||||
|
||||
--set the variables
|
||||
new_messages = tonumber(new_messages) or 0
|
||||
saved_messages = tonumber(saved_messages) or 0
|
||||
|
||||
@@ -277,73 +277,71 @@
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (transcribe_provider == "google") then
|
||||
local api_key = settings:get('voicemail', 'google_key', 'text') or '';
|
||||
local transcription_server = settings:get('voicemail', 'google_url', 'text') or '';
|
||||
if (api_key ~= '') then
|
||||
transcribe_cmd = [[sox ]]..file_path..[[ ]]..file_path..[[.flac && echo "{ 'config': { 'languageCode': 'en-US', 'enableWordTimeOffsets': false }, 'audio': { 'content': '`base64 -w 0 ]]..file_path..[[.flac`' } }" | curl -X POST -H "Content-Type: application/json" -d @- "]]..transcription_server..[[:recognize?key=]]..api_key..[[" && rm -f ]]..file_path..[[.flac]]
|
||||
|
||||
end
|
||||
if (transcribe_provider == "google") then
|
||||
local api_key = settings:get('voicemail', 'google_key', 'text') or '';
|
||||
local transcription_server = settings:get('voicemail', 'google_url', 'text') or '';
|
||||
if (api_key ~= '') then
|
||||
transcribe_cmd = [[sox ]]..file_path..[[ ]]..file_path..[[.flac trim 0 00:59 && echo "{ 'config': { 'languageCode': 'en-US', 'enableWordTimeOffsets': false , 'enableAutomaticPunctuation': true , 'alternativeLanguageCodes': 'es' }, 'audio': { 'content': '`base64 -w 0 ]]..file_path..[[.flac`' } }" | curl -X POST -H "Content-Type: application/json" -d @- "]]..transcription_server..[[:recognize?key=]]..api_key..[[" && rm -f ]]..file_path..[[.flac]]
|
||||
end
|
||||
|
||||
local handle = io.popen(transcribe_cmd);
|
||||
local transcribe_result = handle:read("*a");
|
||||
transcribe_result = transcribe_result:gsub('%%HESITATION ', '');
|
||||
handle:close();
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n");
|
||||
freeswitch.consoleLog("notice", "[voicemail] RESULT: " .. transcribe_result .. "\n");
|
||||
end
|
||||
local handle = io.popen(transcribe_cmd);
|
||||
local transcribe_result = handle:read("*a");
|
||||
transcribe_result = transcribe_result:gsub('%%HESITATION ', '');
|
||||
handle:close();
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n");
|
||||
freeswitch.consoleLog("notice", "[voicemail] RESULT: " .. transcribe_result .. "\n");
|
||||
end
|
||||
|
||||
--Trancribe request can fail
|
||||
if (transcribe_result == '') then
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n");
|
||||
return ''
|
||||
else
|
||||
status, transcribe_json = pcall(JSON.decode, transcribe_result);
|
||||
if not status then
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] error decoding google json\n");
|
||||
end
|
||||
return '';
|
||||
end
|
||||
end
|
||||
|
||||
if (transcribe_json["results"] ~= nil) then
|
||||
--Transcription
|
||||
if (transcribe_json["results"][1]["alternatives"][1]["transcript"] ~= nil) then
|
||||
transcription = '';
|
||||
for key, row in pairs(transcribe_json["results"]) do
|
||||
transcription = transcription .. row["alternatives"][1]["transcript"];
|
||||
end
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcription .. "\n");
|
||||
end
|
||||
else
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n");
|
||||
end
|
||||
return '';
|
||||
--Trancribe request can fail
|
||||
if (transcribe_result == '') then
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n");
|
||||
return ''
|
||||
else
|
||||
status, transcribe_json = pcall(JSON.decode, transcribe_result);
|
||||
if not status then
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] error decoding google json\n");
|
||||
end
|
||||
--Confidence
|
||||
if (transcribe_json["results"][1]["alternatives"][1]["confidence"]) then
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: " .. transcribe_json["results"][1]["alternatives"][1]["confidence"] .. "\n");
|
||||
end
|
||||
confidence = transcribe_json["results"][1]["alternatives"][1]["confidence"];
|
||||
else
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: (null) \n");
|
||||
end
|
||||
return '';
|
||||
end
|
||||
end
|
||||
if (transcribe_json["results"] ~= nil) then
|
||||
--Transcription
|
||||
if (transcribe_json["results"][1]["alternatives"][1]["transcript"] ~= nil) then
|
||||
transcription = '';
|
||||
for key, row in pairs(transcribe_json["results"]) do
|
||||
transcription = transcription .. row["alternatives"][1]["transcript"];
|
||||
end
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcription .. "\n");
|
||||
end
|
||||
return transcription;
|
||||
else
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: json error \n");
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n");
|
||||
end
|
||||
return '';
|
||||
end
|
||||
--Confidence
|
||||
if (transcribe_json["results"][1]["alternatives"][1]["confidence"]) then
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: " .. transcribe_json["results"][1]["alternatives"][1]["confidence"] .. "\n");
|
||||
end
|
||||
confidence = transcribe_json["results"][1]["alternatives"][1]["confidence"];
|
||||
else
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: (null) \n");
|
||||
end
|
||||
end
|
||||
return transcription;
|
||||
else
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: json error \n");
|
||||
end
|
||||
return '';
|
||||
end
|
||||
end
|
||||
|
||||
if (transcribe_provider == "custom") then
|
||||
local transcription_server = settings:get('voicemail', 'transcription_server', 'text') or '';
|
||||
@@ -396,9 +394,9 @@ end
|
||||
local message_max_length = settings:get('voicemail', 'message_max_length', 'numeric') or 300;
|
||||
local message_silence_threshold = settings:get('voicemail', 'message_silence_threshold', 'numeric') or 200;
|
||||
local message_silence_seconds = settings:get('voicemail', 'message_silence_seconds', 'numeric') or 3;
|
||||
transcribe_enabled = settings:get('voicemail', 'transcribe_enabled', 'boolean') or "false";
|
||||
local email_queue_enabled = settings:get('email_queue', 'enabled', 'boolean') or "false";
|
||||
local transcribe_provider = settings:get('voicemail', 'transcribe_provider', 'text') or '';
|
||||
local email_method = settings:get('email', 'method', 'text') or "smtp";
|
||||
transcribe_enabled = settings:get('voicemail', 'transcribe_enabled', 'boolean') or "false";
|
||||
|
||||
--debug information
|
||||
if (debug["info"]) then
|
||||
@@ -528,7 +526,7 @@ end
|
||||
start_epoch = os.time();
|
||||
|
||||
--if using the email queue disable inline transcription
|
||||
if (email_method == 'queue') then
|
||||
if (email_queue_enabled == 'true') then
|
||||
transcribe_enabled = 'false';
|
||||
end
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
function send_email(id, uuid)
|
||||
local db = dbh or Database.new('system')
|
||||
local settings = Settings.new(db, domain_name, domain_uuid)
|
||||
local email_method = settings:get('email', 'method', 'text');
|
||||
local transcribe_enabled = settings:get('voicemail', 'transcribe_enabled', 'boolean');
|
||||
local email_queue_enabled = settings:get('email_queue', 'enabled', 'boolean') or "false";
|
||||
|
||||
--get voicemail message details
|
||||
local sql = [[SELECT * FROM v_voicemails
|
||||
@@ -48,6 +48,7 @@
|
||||
--voicemail_password = row["voicemail_password"];
|
||||
--greeting_id = row["greeting_id"];
|
||||
voicemail_mail_to = row["voicemail_mail_to"];
|
||||
voicemail_transcription_enabled = row["voicemail_transcription_enabled"];
|
||||
voicemail_file = row["voicemail_file"];
|
||||
voicemail_local_after_email = row["voicemail_local_after_email"];
|
||||
voicemail_description = row["voicemail_description"];
|
||||
@@ -135,7 +136,7 @@
|
||||
sql = sql .. "WHERE (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
sql = sql .. "AND template_language = :template_language ";
|
||||
sql = sql .. "AND template_category = 'voicemail' "
|
||||
if (transcribe_enabled == 'true') then
|
||||
if (transcribe_enabled == 'true' and voicemail_transcription_enabled == 'true') then
|
||||
sql = sql .. "AND template_subcategory = 'transcription' "
|
||||
else
|
||||
sql = sql .. "AND template_subcategory = 'default' "
|
||||
@@ -184,6 +185,7 @@
|
||||
subject = subject:gsub("${voicemail_description}", voicemail_description);
|
||||
subject = subject:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
|
||||
subject = subject:gsub("${domain_name}", domain_name);
|
||||
subject = subject:gsub("${new_messages}", new_messages);
|
||||
subject = trim(subject);
|
||||
subject = '=?utf-8?B?'..base64.encode(subject)..'?=';
|
||||
|
||||
@@ -202,7 +204,9 @@
|
||||
body = body:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
|
||||
body = body:gsub("${domain_name}", domain_name);
|
||||
body = body:gsub("${sip_to_user}", id);
|
||||
body = body:gsub("${origination_callee_id_name}", origination_callee_id_name);
|
||||
if (origination_callee_id_name ~= nil) then
|
||||
body = body:gsub("${origination_callee_id_name}", origination_callee_id_name);
|
||||
end
|
||||
body = body:gsub("${dialed_user}", id);
|
||||
if (voicemail_file == "attach") then
|
||||
body = body:gsub("${message}", text['label-attached']);
|
||||
@@ -228,7 +232,7 @@
|
||||
end
|
||||
|
||||
--whether to keep the voicemail message and details local after email
|
||||
if (string.len(voicemail_mail_to) > 2 and email_method ~= 'queue') then
|
||||
if (string.len(voicemail_mail_to) > 2 and email_queue_enabled == 'false') then
|
||||
if (voicemail_local_after_email == "false") then
|
||||
--delete the voicemail message details
|
||||
local sql = [[DELETE FROM v_voicemail_messages
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
--get the argv values
|
||||
voicemail_id = argv[1];
|
||||
domain_name = argv[2];
|
||||
new_messages = argv[3] or '0';
|
||||
saved_messages = argv[4] or '0';
|
||||
|
||||
--include the lua script
|
||||
require "resources.functions.config";
|
||||
|
||||
--send MWI NOTIFY message
|
||||
require "app.voicemail.resources.functions.mwi_notify";
|
||||
|
||||
--debug info
|
||||
--freeswitch.consoleLog("NOTICE", "voicemail_id="..voicemail_id.."\n");
|
||||
--freeswitch.consoleLog("NOTICE", "domain_name="..domain_name.."\n");
|
||||
--freeswitch.consoleLog("NOTICE", "new_messages="..new_messages.."\n");
|
||||
--freeswitch.consoleLog("NOTICE", "saved_messages="..saved_messages.."\n");
|
||||
|
||||
--send the message waiting event
|
||||
mwi_notify(voicemail_id..'@'..domain_name, domain_name, new_messages, saved_messages);
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
ivr_menu_greet_short = row["ivr_menu_greet_short"];
|
||||
ivr_menu_invalid_sound = row["ivr_menu_invalid_sound"];
|
||||
ivr_menu_exit_sound = row["ivr_menu_exit_sound"];
|
||||
ivr_menu_pin_number = row["ivr_menu_pin_number"];
|
||||
ivr_menu_confirm_macro = row["ivr_menu_confirm_macro"];
|
||||
ivr_menu_confirm_key = row["ivr_menu_confirm_key"];
|
||||
ivr_menu_tts_engine = row["ivr_menu_tts_engine"];
|
||||
@@ -248,6 +249,7 @@
|
||||
table.insert(xml, [[ greet-short="]]..ivr_menu_greet_short..[[" ]]);
|
||||
table.insert(xml, [[ invalid-sound="]]..ivr_menu_invalid_sound..[[" ]]);
|
||||
table.insert(xml, [[ exit-sound="]]..ivr_menu_exit_sound..[[" ]]);
|
||||
table.insert(xml, [[ pin="]]..ivr_menu_pin_number..[[" ]]);
|
||||
table.insert(xml, [[ confirm-macro="]]..ivr_menu_confirm_macro..[[" ]]);
|
||||
table.insert(xml, [[ confirm-key="]]..ivr_menu_confirm_key..[[" ]]);
|
||||
table.insert(xml, [[ tts-engine="]]..ivr_menu_tts_engine..[[" ]]);
|
||||
|
||||
@@ -181,6 +181,12 @@
|
||||
if (string.len(field.ping) > 0) then
|
||||
table.insert(xml, [[ <param name="ping" value="]] .. field.ping .. [["/>]]);
|
||||
end
|
||||
if (string.len(field.ping_min) > 0) then
|
||||
table.insert(xml, [[ <param name="ping-min" value="]] .. field.ping_min .. [["/>]]);
|
||||
end
|
||||
if (string.len(field.ping_max) > 0) then
|
||||
table.insert(xml, [[ <param name="ping-max" value="]] .. field.ping_max .. [["/>]]);
|
||||
end
|
||||
if (string.len(field.context) > 0) then
|
||||
table.insert(xml, [[ <param name="context" value="]] .. field.context .. [["/>]]);
|
||||
end
|
||||
|
||||
@@ -3,28 +3,11 @@ local Database = require "resources.functions.database";
|
||||
local cache = require"resources.functions.cache";
|
||||
local log = require "resources.functions.log".send_mail
|
||||
|
||||
|
||||
local db = dbh or Database.new('system');
|
||||
--local settings = Settings.new(db, nil, nil);
|
||||
--local email_method = settings:get('email', 'method', 'text');
|
||||
local settings = Settings.new(db, domain_name, domain_uuid)
|
||||
local email_queue_enabled = settings:get('email_queue', 'enabled', 'boolean') or "false";
|
||||
|
||||
--get the dialplan mode from the cache
|
||||
email_method_key = "settings:email:email_mode";
|
||||
email_method, err = cache.get(email_method_key);
|
||||
|
||||
--if not found in the cache then get it from the database
|
||||
if (err == 'NOT FOUND') then
|
||||
--get the mode from default settings
|
||||
sql = "select default_setting_value from v_default_settings "
|
||||
sql = sql .. "where default_setting_category = 'email' ";
|
||||
sql = sql .. "and default_setting_subcategory = 'method' ";
|
||||
email_method = db:first_value(sql, nil);
|
||||
if (email_method) then
|
||||
local ok, err = cache.set(email_method_key, email_method, expire["dialplan"]);
|
||||
end
|
||||
end
|
||||
|
||||
if (email_method == 'queue') then
|
||||
if (email_queue_enabled == 'true') then
|
||||
function send_mail(headers, email_address, email_message, email_file)
|
||||
|
||||
--include json library
|
||||
@@ -36,7 +19,14 @@ if (email_method == 'queue') then
|
||||
local domain_uuid = headers["X-FusionPBX-Domain-UUID"];
|
||||
local domain_name = headers["X-FusionPBX-Domain-Name"];
|
||||
local email_type = headers["X-FusionPBX-Email-Type"] or 'info';
|
||||
local call_uuid = headers["X-FusionPBX-Email-Call-UUID"];
|
||||
local call_uuid = headers["X-FusionPBX-Call-UUID"];
|
||||
local local_after_email = headers["X-FusionPBX-local_after_email"] or '';
|
||||
|
||||
if (local_after_email == 'false') then
|
||||
email_action_after = 'delete';
|
||||
else
|
||||
email_action_after = '';
|
||||
end
|
||||
|
||||
local settings = Settings.new(db, domain_name, domain_uuid);
|
||||
|
||||
@@ -65,7 +55,10 @@ if (email_method == 'queue') then
|
||||
sql = sql .. " email_to, ";
|
||||
sql = sql .. " email_subject, ";
|
||||
sql = sql .. " email_body, ";
|
||||
sql = sql .. " email_status ";
|
||||
sql = sql .. " email_status, ";
|
||||
sql = sql .. " email_uuid, ";
|
||||
sql = sql .. " email_action_after ";
|
||||
|
||||
sql = sql .. ") ";
|
||||
sql = sql .. "values ( ";
|
||||
sql = sql .. " :email_queue_uuid, ";
|
||||
@@ -76,7 +69,9 @@ if (email_method == 'queue') then
|
||||
sql = sql .. " :email_to, ";
|
||||
sql = sql .. " :email_subject, ";
|
||||
sql = sql .. " :email_body, ";
|
||||
sql = sql .. " :email_status ";
|
||||
sql = sql .. " :email_status, ";
|
||||
sql = sql .. " :email_uuid, ";
|
||||
sql = sql .. " :email_action_after ";
|
||||
sql = sql .. ") ";
|
||||
local params = {
|
||||
email_queue_uuid = email_queue_uuid;
|
||||
@@ -87,6 +82,8 @@ if (email_method == 'queue') then
|
||||
email_subject = email_subject;
|
||||
email_body = email_body;
|
||||
email_status = email_status;
|
||||
email_uuid = call_uuid;
|
||||
email_action_after = email_action_after;
|
||||
}
|
||||
db:query(sql, params);
|
||||
|
||||
@@ -100,7 +97,8 @@ if (email_method == 'queue') then
|
||||
local email_table = split(email_file, '/', true)
|
||||
email_attachment_name = email_table[#email_table]
|
||||
|
||||
email_attachment_path = email_file.sub(email_file, 0, (string.len(email_file) - string.len(email_attachment_name)) - 1);
|
||||
email_attachment_path = email_file.sub(email_file, 0, (string.len(email_file) - string.len(email_attachment_name)) - 1);
|
||||
--freeswitch.consoleLog("notice", "[send_email] voicemail path: " .. email_attachment_path .. "/" .. email_attachment_name .. "\n");
|
||||
|
||||
--base64 encode the file
|
||||
--local file = require "resources.functions.file"
|
||||
@@ -136,7 +134,7 @@ if (email_method == 'queue') then
|
||||
email_attachment_base64 = email_attachment_base64;
|
||||
}
|
||||
if (debug["sql"]) then
|
||||
freeswitch.consoleLog("notice", "[dialplan] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||
freeswitch.consoleLog("notice", "[send_email] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||
end
|
||||
db:query(sql, params);
|
||||
end
|
||||
@@ -162,7 +160,7 @@ else
|
||||
local domain_uuid = headers["X-FusionPBX-Domain-UUID"]
|
||||
local domain_name = headers["X-FusionPBX-Domain-Name"]
|
||||
local email_type = headers["X-FusionPBX-Email-Type"] or 'info'
|
||||
local call_uuid = headers["X-FusionPBX-Email-Call-UUID"]
|
||||
local call_uuid = headers["X-FusionPBX-Call-UUID"]
|
||||
local db = dbh or Database.new('system')
|
||||
local settings = Settings.new(db, domain_name, domain_uuid)
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
|
||||
//set the message
|
||||
if ($action == "add") {
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the voicemail id.";
|
||||
$z++;
|
||||
|
||||
@@ -30,13 +30,15 @@ class plugin_database {
|
||||
$user_authorized = false;
|
||||
|
||||
//check the username and password if they don't match then redirect to the login
|
||||
$sql = "select * from v_users ";
|
||||
$sql = "select u.user_uuid, u.contact_uuid, u.username, u.password, u.salt, u.api_key, u.domain_uuid, d.domain_name ";
|
||||
$sql .= "from v_users as u, v_domains as d ";
|
||||
$sql .= "where u.domain_uuid = d.domain_uuid ";
|
||||
if (strlen($this->key) > 30) {
|
||||
$sql .= "where api_key = :api_key ";
|
||||
$sql .= "and u.api_key = :api_key ";
|
||||
$parameters['api_key'] = $this->key;
|
||||
}
|
||||
else {
|
||||
$sql .= "where lower(username) = lower(:username) ";
|
||||
$sql .= "and lower(u.username) = lower(:username) ";
|
||||
$parameters['username'] = $this->username;
|
||||
}
|
||||
if ($_SESSION["users"]["unique"]["text"] === "global") {
|
||||
@@ -44,7 +46,7 @@ class plugin_database {
|
||||
}
|
||||
else {
|
||||
//unique username - per domain
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$sql .= "and u.domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $this->domain_uuid;
|
||||
}
|
||||
$sql .= "and (user_enabled = 'true' or user_enabled is null) ";
|
||||
@@ -56,7 +58,7 @@ class plugin_database {
|
||||
if ($_SESSION["users"]["unique"]["text"] === "global" && $row["domain_uuid"] !== $this->domain_uuid) {
|
||||
//set the domain_uuid
|
||||
$this->domain_uuid = $row["domain_uuid"];
|
||||
$this->domain_name = $_SESSION['domains'][$this->domain_uuid]['domain_name'];
|
||||
$this->domain_name = $row["domain_name"];
|
||||
|
||||
//set the domain session variables
|
||||
$_SESSION["domain_uuid"] = $this->domain_uuid;
|
||||
|
||||
@@ -487,6 +487,21 @@
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//set domain > time_zone to UTC if not set
|
||||
$sql = "update v_default_settings set ";
|
||||
$sql .= "default_setting_value = 'UTC', ";
|
||||
$sql .= "default_setting_enabled = 'true' ";
|
||||
$sql .= "where ( ";
|
||||
$sql .= " default_setting_value is null or ";
|
||||
$sql .= " default_setting_value = '' ";
|
||||
$sql .= ") ";
|
||||
$sql .= "and default_setting_category = 'domain' ";
|
||||
$sql .= "and default_setting_subcategory = 'time_zone' ";
|
||||
$sql .= "and default_setting_name = 'name' ";
|
||||
$database = new database;
|
||||
$database->execute($sql);
|
||||
unset($sql);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
$default_setting_uuid = $_GET["id"];
|
||||
$sql = "select default_setting_uuid, default_setting_category, default_setting_subcategory, default_setting_name, default_setting_value, cast(default_setting_enabled as text), default_setting_description ";
|
||||
$sql = "select default_setting_uuid, default_setting_category, default_setting_subcategory, default_setting_name, default_setting_value, default_setting_order, cast(default_setting_enabled as text), default_setting_description ";
|
||||
$sql .= "from v_default_settings ";
|
||||
$sql .= "where default_setting_uuid = :default_setting_uuid ";
|
||||
$parameters['default_setting_uuid'] = $default_setting_uuid;
|
||||
|
||||
@@ -269,7 +269,7 @@ if (!class_exists('default_settings')) {
|
||||
$array['domain_settings'][$x]['domain_setting_name'] = $default_setting_name;
|
||||
$array['domain_settings'][$x]['domain_setting_value'] = $default_setting_value;
|
||||
$array['domain_settings'][$x]['domain_setting_order'] = $default_setting_order;
|
||||
$array['domain_settings'][$x]['domain_setting_enabled'] = $default_setting_enabled;
|
||||
$array['domain_settings'][$x]['domain_setting_enabled'] = $default_setting_enabled ?: 0;
|
||||
$array['domain_settings'][$x]['domain_setting_description'] = $default_setting_description;
|
||||
|
||||
//insert
|
||||
|
||||
@@ -325,7 +325,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true" && is_uuid($_GET["id"])) {
|
||||
$domain_setting_uuid = $_GET["id"];
|
||||
$sql = "select domain_setting_uuid, domain_setting_category, domain_setting_subcategory, domain_setting_name, domain_setting_value, cast(domain_setting_enabled as text), domain_setting_description ";
|
||||
$sql = "select domain_setting_uuid, domain_setting_category, domain_setting_subcategory, domain_setting_name, domain_setting_value, domain_setting_order, cast(domain_setting_enabled as text), domain_setting_description ";
|
||||
$sql .= "from v_domain_settings ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and domain_setting_uuid = :domain_setting_uuid ";
|
||||
|
||||
@@ -276,7 +276,7 @@ if (!class_exists('domain_settings')) {
|
||||
$array['domain_settings'][0]['domain_setting_name'] = $domain_setting_name;
|
||||
$array['domain_settings'][0]['domain_setting_value'] = $domain_setting_value;
|
||||
$array['domain_settings'][0]['domain_setting_order'] = $domain_setting_order;
|
||||
$array['domain_settings'][0]['domain_setting_enabled'] = $domain_setting_enabled;
|
||||
$array['domain_settings'][0]['domain_setting_enabled'] = $domain_setting_enabled ?: 0;
|
||||
$array['domain_settings'][0]['domain_setting_description'] = $domain_setting_description;
|
||||
|
||||
//insert
|
||||
|
||||
@@ -500,8 +500,6 @@
|
||||
|
||||
//clear the domains session array to update it
|
||||
unset($_SESSION["domains"]);
|
||||
unset($_SESSION["domain_uuid"]);
|
||||
unset($_SESSION["domain_name"]);
|
||||
unset($_SESSION['domain']);
|
||||
unset($_SESSION['switch']);
|
||||
|
||||
|
||||
@@ -1681,6 +1681,48 @@ $text['label-12-hour']['ru-ru'] = "12-часовой";
|
||||
$text['label-12-hour']['sv-se'] = "12-timmars";
|
||||
$text['label-12-hour']['uk-ua'] = "12-годинний";
|
||||
|
||||
$text['label-assigned']['en-us'] = "Assigned";
|
||||
$text['label-assigned']['en-gb'] = "Assigned";
|
||||
$text['label-assigned']['ar-eg'] = "Assigned";
|
||||
$text['label-assigned']['de-at'] = "Assigned";
|
||||
$text['label-assigned']['de-ch'] = "Assigned";
|
||||
$text['label-assigned']['de-de'] = "Assigned";
|
||||
$text['label-assigned']['es-cl'] = "Assigned";
|
||||
$text['label-assigned']['es-mx'] = "Assigned";
|
||||
$text['label-assigned']['fr-ca'] = "Assigned";
|
||||
$text['label-assigned']['fr-fr'] = "Assigned";
|
||||
$text['label-assigned']['he-il'] = "Assigned";
|
||||
$text['label-assigned']['it-it'] = "Assigned";
|
||||
$text['label-assigned']['nl-nl'] = "Assigned";
|
||||
$text['label-assigned']['pl-pl'] = "Assigned";
|
||||
$text['label-assigned']['pt-br'] = "Assigned";
|
||||
$text['label-assigned']['pt-pt'] = "Assigned";
|
||||
$text['label-assigned']['ro-ro'] = "Assigned";
|
||||
$text['label-assigned']['ru-ru'] = "Assigned";
|
||||
$text['label-assigned']['sv-se'] = "Assigned";
|
||||
$text['label-assigned']['uk-ua'] = "Assigned";
|
||||
|
||||
$text['label-unassigned']['en-us'] = "Unassigned";
|
||||
$text['label-unassigned']['en-gb'] = "Unassigned";
|
||||
$text['label-unassigned']['ar-eg'] = "Unassigned";
|
||||
$text['label-unassigned']['de-at'] = "Unassigned";
|
||||
$text['label-unassigned']['de-ch'] = "Unassigned";
|
||||
$text['label-unassigned']['de-de'] = "Unassigned";
|
||||
$text['label-unassigned']['es-cl'] = "Unassigned";
|
||||
$text['label-unassigned']['es-mx'] = "Unassigned";
|
||||
$text['label-unassigned']['fr-ca'] = "Unassigned";
|
||||
$text['label-unassigned']['fr-fr'] = "Unassigned";
|
||||
$text['label-unassigned']['he-il'] = "Unassigned";
|
||||
$text['label-unassigned']['it-it'] = "Unassigned";
|
||||
$text['label-unassigned']['nl-nl'] = "Unassigned";
|
||||
$text['label-unassigned']['pl-pl'] = "Unassigned";
|
||||
$text['label-unassigned']['pt-br'] = "Unassigned";
|
||||
$text['label-unassigned']['pt-pt'] = "Unassigned";
|
||||
$text['label-unassigned']['ro-ro'] = "Unassigned";
|
||||
$text['label-unassigned']['ru-ru'] = "Unassigned";
|
||||
$text['label-unassigned']['sv-se'] = "Unassigned";
|
||||
$text['label-unassigned']['uk-ua'] = "Unassigned";
|
||||
|
||||
$text['header-user_setting-edit']['en-us'] = "User Setting";
|
||||
$text['header-user_setting-edit']['en-gb'] = "User Setting";
|
||||
$text['header-user_setting-edit']['ar-eg'] = "";
|
||||
|
||||
@@ -94,6 +94,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
//get the view preference
|
||||
$view = $_REQUEST['view'];
|
||||
|
||||
//get the http post data
|
||||
if (is_array($_POST['group_permissions'])) {
|
||||
$action = $_POST['action'];
|
||||
@@ -233,7 +236,7 @@
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: group_permissions.php?group_uuid='.urlencode($group_uuid).'&search='.urlencode($search));
|
||||
header('Location: group_permissions.php?group_uuid='.urlencode($group_uuid).($view ? '&view='.urlencode($view) : null).($search ? '&search='.urlencode($search) : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -264,10 +267,6 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//get order and order by
|
||||
//$order_by = $_GET["order_by"];
|
||||
//$order = $_GET["order"];
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
@@ -287,7 +286,12 @@
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
echo "<input type='hidden' name='group_uuid' value='".escape($group_uuid)."'>\n";
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
|
||||
echo "<select class='txt' style='margin-left: 15px; margin-right: 0;' id='view' name='view' onchange=\"document.getElementById('form_search').submit();\">\n";
|
||||
echo " <option value=''>".$text['label-all']."</option>\n";
|
||||
echo " <option value='assigned' ".($view == 'assigned' ? "selected='selected'" : null).">".$text['label-assigned']."</option>\n";
|
||||
echo " <option value='unassigned' ".($view == 'unassigned' ? "selected='selected'" : null).">".$text['label-unassigned']."</option>\n";
|
||||
echo "</select>\n";
|
||||
echo "<input type='text' class='txt list-search' style='margin-left: 0;' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','collapse'=>'hide-sm-dn','style'=>($search != '' ? 'display: none;' : null)]);
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','collapse'=>'hide-sm-dn','link'=>'group_permissions.php?group_uuid='.urlencode($group_uuid),'style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if (permission_exists('group_permission_edit')) {
|
||||
@@ -304,6 +308,7 @@
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "<input type='hidden' name='group_uuid' value='".escape($group_uuid)."'>\n";
|
||||
echo "<input type='hidden' name='view' value=\"".escape($view)."\">\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
echo "<table class='list' style='margin-bottom: 25px;'>\n";
|
||||
if (is_array($group_permissions) && @sizeof($group_permissions) != 0) {
|
||||
@@ -311,19 +316,18 @@
|
||||
foreach ($group_permissions as $row) {
|
||||
$checked = ($row['permission_assigned'] === 'true') ? " checked=\"checked\"" : $checked = '';
|
||||
$protected = ($row['permission_protected'] === 'true') ? " checked=\"checked\"" : '';
|
||||
$application_name = strtolower($row['application_name']);
|
||||
$label_application_name = ucwords(str_replace(['_','-'], " ", $row['application_name']));
|
||||
|
||||
$label_application_name = ucwords($label_application_name);
|
||||
$application_name = strtolower(str_replace([' ','-'], '_', $row['application_name']));
|
||||
$application_name_label = ucwords(str_replace(['_','-'], " ", $row['application_name']));
|
||||
|
||||
//application heading
|
||||
if ($previous_application_name !== $row['application_name']) {
|
||||
echo " <tr>";
|
||||
echo " <tr class='heading_".$application_name."'>";
|
||||
echo " <td align='left' colspan='999'> </td>\n";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td align='left' colspan='999' nowrap='nowrap'><b>".escape($label_application_name)."</b></td>\n";
|
||||
echo " <tr class='heading_".$application_name."'>";
|
||||
echo " <td align='left' colspan='999' nowrap='nowrap'><b>".escape($application_name_label)."</b></td>\n";
|
||||
echo " </tr>";
|
||||
echo " <tr class='list-header'>\n";
|
||||
echo " <tr class='list-header heading_".$application_name."'>\n";
|
||||
if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all_".$application_name."' name='checkbox_all' onclick=\"list_all_toggle('".$application_name."');\">\n";
|
||||
@@ -337,32 +341,50 @@
|
||||
echo " </th>\n";
|
||||
}
|
||||
echo " </tr>\n";
|
||||
$displayed_permissions[$application_name] = 0;
|
||||
}
|
||||
|
||||
}
|
||||
echo "<tr class='list-row'>\n";
|
||||
if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) {
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='group_permissions[$x][checked]' id='checkbox_".$x."' class='checkbox_".$application_name."' value='true' ".$checked." onclick=\"if (!this.checked) { document.getElementById('checkbox_all_".$application_name."').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='group_permissions[$x][permission_uuid]' value='".escape($row['permission_uuid'])."' />\n";
|
||||
echo " <input type='hidden' name='group_permissions[$x][permission_name]' value='".escape($row['permission_name'])."' />\n";
|
||||
//application permission
|
||||
if (!$view || ($view == 'assigned' && $checked) || ($view == 'unassigned' && !$checked)) {
|
||||
echo "<tr class='list-row'>\n";
|
||||
if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) {
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='group_permissions[$x][checked]' id='checkbox_".$x."' class='checkbox_".$application_name."' value='true' ".$checked." onclick=\"if (!this.checked) { document.getElementById('checkbox_all_".$application_name."').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='group_permissions[$x][permission_uuid]' value='".escape($row['permission_uuid'])."' />\n";
|
||||
echo " <input type='hidden' name='group_permissions[$x][permission_name]' value='".escape($row['permission_name'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td class='no-wrap' onclick=\"if (document.getElementById('checkbox_".$x."').checked) { document.getElementById('checkbox_".$x."').checked = false; document.getElementById('checkbox_all_".$application_name."').checked = false; } else { document.getElementById('checkbox_".$x."').checked = true; }\">";
|
||||
echo " ".escape($row['permission_name']);
|
||||
echo " </td>\n";
|
||||
if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) {
|
||||
echo " <td> </td>\n";
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='group_permissions[$x][permission_protected]' id='checkbox_protected_".$x."' class='checkbox_".$application_name."_protected' value='true' ".$protected." onclick=\"if (!this.checked) { document.getElementById('checkbox_all_".$application_name."_protected').checked = false; }\">\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$displayed_permissions[$application_name]++;
|
||||
}
|
||||
echo " <td class='no-wrap' onclick=\"if (document.getElementById('checkbox_".$x."').checked) { document.getElementById('checkbox_".$x."').checked = false; document.getElementById('checkbox_all_".$application_name."').checked = false; } else { document.getElementById('checkbox_".$x."').checked = true; }\">";
|
||||
echo " ".escape($row['permission_name']);
|
||||
echo " </td>\n";
|
||||
if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) {
|
||||
echo " <td> </td>\n";
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='group_permissions[$x][permission_protected]' id='checkbox_protected_".$x."' class='checkbox_".$application_name."_protected' value='true' ".$protected." onclick=\"if (!this.checked) { document.getElementById('checkbox_all_".$application_name."_protected').checked = false; }\">\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
//set the previous category
|
||||
//set the previous application name
|
||||
$previous_application_name = $row['application_name'];
|
||||
$x++;
|
||||
|
||||
}
|
||||
unset($group_permissions);
|
||||
|
||||
//hide application heading if no permissions displayed
|
||||
if (is_array($displayed_permissions) && @sizeof($displayed_permissions) != 0) {
|
||||
echo "<script>\n";
|
||||
foreach ($displayed_permissions as $application_name => $permission_count) {
|
||||
if (!$permission_count) {
|
||||
echo "$('.heading_".$application_name."').hide();\n";
|
||||
}
|
||||
}
|
||||
echo "</script>\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
|
||||
@@ -925,4 +925,25 @@ $text['button-move_down']['ru-ru'] = "Переместить вниз";
|
||||
$text['button-move_down']['sv-se'] = "Flytta Ned";
|
||||
$text['button-move_down']['uk-ua'] = "Перемістити вниз";
|
||||
|
||||
?>
|
||||
$text['confirm-restore']['en-us'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['en-gb'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['ar-eg'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['de-at'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['de-ch'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['de-de'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['es-cl'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['es-mx'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['fr-ca'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['fr-fr'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['he-il'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['it-it'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['nl-nl'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['pl-pl'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['pt-br'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['pt-pt'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['ro-ro'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['ru-ru'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['sv-se'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
$text['confirm-restore']['uk-ua'] = "You are about to restore all <i>unprotected</i> items on this menu.";
|
||||
|
||||
?>
|
||||
@@ -165,13 +165,17 @@
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','link'=>'menu.php']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'collapse'=>'hide-xs','style'=>'margin-left: 15px;','link'=>'menu_reload.php?menu_uuid='.urlencode($menu_uuid).'&menu_language='.urlencode($menu_language)]);
|
||||
if (permission_exists('menu_restore') && $action == "update") {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-restore_default'],'icon'=>'key','collapse'=>'hide-xs','link'=>'menu_restore_default.php?menu_uuid='.urlencode($menu_uuid).'&menu_language='.urlencode($menu_language)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-restore_default'],'icon'=>'undo-alt','collapse'=>'hide-xs','onclick'=>"modal_open('modal-restore','btn_restore');"]);
|
||||
}
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('menu_restore') && $action == "update") {
|
||||
echo modal::create(['id'=>'modal-restore','type'=>'confirmation','message'=>$text['confirm-restore'],'actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_restore','style'=>'float: right; margin-left: 15px;','collapse'=>'never','link'=>'menu_restore_default.php?menu_uuid='.urlencode($menu_uuid).'&menu_language='.urlencode($menu_language),'onclick'=>'modal_close();'])]);
|
||||
}
|
||||
|
||||
echo $text['description-menu']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ if (!class_exists('software')) {
|
||||
* version
|
||||
*/
|
||||
public static function version() {
|
||||
return '4.5.18';
|
||||
return '4.5.19';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -86,9 +86,11 @@
|
||||
|
||||
// load an array of the database schema and compare it with the active database
|
||||
if ($do["schema"] && permission_exists("upgrade_schema")) {
|
||||
$upgrade_data_types = check_str($do["data_types"]);
|
||||
require_once "resources/classes/schema.php";
|
||||
$obj = new schema();
|
||||
if (isset($do["data_types"]) && $do["data_types"] == 'true') {
|
||||
$obj->data_types = true;
|
||||
}
|
||||
$_SESSION["response"]["schema"] = $obj->schema("html");
|
||||
message::add($text['message-upgrade_schema'], null, $message_timeout);
|
||||
}
|
||||
@@ -283,4 +285,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -64,12 +64,16 @@
|
||||
//get the database schema put it into an array then compare and update the database as needed.
|
||||
require_once "resources/classes/schema.php";
|
||||
$obj = new schema;
|
||||
if (isset($argv[1]) && $argv[1] == 'data_types') {
|
||||
$obj->data_types = true;
|
||||
}
|
||||
echo $obj->schema($format);
|
||||
|
||||
if (!$included && $format == 'html') {
|
||||
echo "<br />\n";
|
||||
echo "<br />\n";
|
||||
require_once "resources/footer.php";
|
||||
}
|
||||
//formatting for html
|
||||
if (!$included && $format == 'html') {
|
||||
echo "<br />\n";
|
||||
echo "<br />\n";
|
||||
require_once "resources/footer.php";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -319,7 +319,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//pre-populate the form
|
||||
if (is_uuid($_GET["id"]) && count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
$user_setting_uuid = $_GET["id"];
|
||||
$sql = "select user_setting_category, user_setting_subcategory, user_setting_name, user_setting_value, cast(user_setting_enabled as text), user_setting_description ";
|
||||
$sql = "select user_setting_category, user_setting_subcategory, user_setting_name, user_setting_value, user_setting_order, cast(user_setting_enabled as text), user_setting_description ";
|
||||
$sql .= "from v_user_settings ";
|
||||
$sql .= "where user_setting_uuid = :user_setting_uuid ";
|
||||
$sql .= "and user_uuid = :user_uuid ";
|
||||
|
||||
@@ -949,7 +949,7 @@
|
||||
echo " <td class='vtable' style='white-space: nowrap; padding-right: 30px;' nowrap='nowrap'>";
|
||||
echo escape($field['group_name']).(($field['group_domain_uuid'] != '') ? "@".$_SESSION['domains'][$field['group_domain_uuid']]['domain_name'] : null);
|
||||
echo " </td>\n";
|
||||
if (permission_exists('group_member_delete') || if_group("superadmin")) {
|
||||
if (permission_exists('user_group_delete') || if_group("superadmin")) {
|
||||
echo " <td class='list_control_icons' style='width: 25px;'>\n";
|
||||
echo " <a href='user_edit.php?id=".urlencode($user_uuid)."&domain_uuid=".urlencode($domain_uuid)."&group_uuid=".urlencode($field['group_uuid'])."&a=delete' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a>\n";
|
||||
echo " </td>\n";
|
||||
|
||||
@@ -62,26 +62,25 @@
|
||||
|
||||
//save the data to the csv file
|
||||
if (isset($_POST['data'])) {
|
||||
$file = $_SESSION['server']['temp']['dir']."/users-".$_SESSION['domain_name'].".csv";
|
||||
file_put_contents($file, $_POST['data']);
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
|
||||
//copy the csv file
|
||||
//$_POST['submit'] == "Upload" &&
|
||||
if (is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('user_imports')) {
|
||||
if ($_POST['type'] == 'csv') {
|
||||
move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']);
|
||||
$save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']);
|
||||
//system('chmod -R 744 '.$_SESSION['server']['temp']['dir'].'*');
|
||||
unset($_POST['txtCommand']);
|
||||
$file = $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name'];
|
||||
$file = $_SESSION['server']['temp']['dir'].'/users-'.$_SESSION['domain_name'].'.csv';
|
||||
if (file_put_contents($file, $_POST['data'])) {
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
//copy the csv file
|
||||
//$_POST['submit'] == "Upload" &&
|
||||
if (is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('user_import')) {
|
||||
if ($_POST['type'] == 'csv') {
|
||||
$file = $_SESSION['server']['temp']['dir'].'/users-'.$_SESSION['domain_name'].'.csv';
|
||||
if (move_uploaded_file($_FILES['ulfile']['tmp_name'], $file)) {
|
||||
$_SESSION['file'] = $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the schema
|
||||
if (strlen($delimiter) > 0) {
|
||||
if (strlen($delimiter) > 0 && file_exists($_SESSION['file'])) {
|
||||
//get the first line
|
||||
$line = fgets(fopen($_SESSION['file'], 'r'));
|
||||
$line_fields = explode($delimiter, $line);
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
if ($result["authorized"] === "true") {
|
||||
//set the session variables
|
||||
$_SESSION["domain_uuid"] = $result["domain_uuid"];
|
||||
//$_SESSION["domain_name"] = $result["domain_name"];
|
||||
$_SESSION["user_uuid"] = $result["user_uuid"];
|
||||
|
||||
//user session array
|
||||
@@ -246,7 +247,7 @@
|
||||
$_SESSION['user']['extension'][$x]['user_context'] = $row['user_context'];
|
||||
$_SESSION['user']['extension'][$x]['description'] = $row['description'];
|
||||
|
||||
//set the user context
|
||||
//set the context
|
||||
$_SESSION['user']['user_context'] = $row["user_context"];
|
||||
$_SESSION['user_context'] = $row["user_context"];
|
||||
}
|
||||
|
||||
@@ -59,7 +59,9 @@ if (!class_exists('button')) {
|
||||
$button .= $array['onclick'] ? "onclick=".self::quote($array['onclick'])." " : null;
|
||||
$button .= $array['onmouseover'] ? "onmouseenter=".self::quote($array['onmouseover'])." " : null;
|
||||
$button .= $array['onmouseout'] ? "onmouseleave=".self::quote($array['onmouseout'])." " : null;
|
||||
$button .= "class='btn btn-".($array['class'] ? $array['class'] : 'default')." ".($array['disabled'] ? 'disabled' : null)."' ";
|
||||
//detect class addition (using + prefix)
|
||||
$button_class = $array['class'] && $array['class'][0] == '+' ? 'default '.substr($array['class'], 1) : $array['class'];
|
||||
$button .= "class='btn btn-".($button_class ? $button_class : 'default')." ".($array['disabled'] ? 'disabled' : null)."' ";
|
||||
//ensure margin* styles are not applied to the button element when a link is defined
|
||||
if (is_array($array['style']) && @sizeof($array['style']) != 0) {
|
||||
foreach ($array['style'] as $property => $value) {
|
||||
|
||||
@@ -145,11 +145,13 @@ class cache {
|
||||
event_socket_request($fp, $event);
|
||||
|
||||
//remove the local files
|
||||
if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key)) {
|
||||
unlink($_SESSION['cache']['location']['text'] . "/" . $key);
|
||||
}
|
||||
if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp")) {
|
||||
unlink($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp");
|
||||
foreach (glob($_SESSION['cache']['location']['text'] . "/" . $key) as $file) {
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
if (file_exists($file)) {
|
||||
unlink($file . ".tmp");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ include "root.php";
|
||||
* Called when the object is created
|
||||
*/
|
||||
public function __construct() {
|
||||
if (!isset($this->domain_uuid)) {
|
||||
if (!isset($this->domain_uuid) && isset($_SESSION['domain_uuid'])) {
|
||||
$this->domain_uuid = $_SESSION['domain_uuid'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,8 +262,6 @@ if (!class_exists('domains')) {
|
||||
|
||||
//clear the domains session array to update it
|
||||
unset($_SESSION["domains"]);
|
||||
unset($_SESSION["domain_uuid"]);
|
||||
unset($_SESSION["domain_name"]);
|
||||
unset($_SESSION['domain']);
|
||||
unset($_SESSION['switch']);
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ if (!class_exists('schema')) {
|
||||
public $apps;
|
||||
public $db_type;
|
||||
public $result;
|
||||
public $data_types;
|
||||
|
||||
//class constructor
|
||||
public function __construct() {
|
||||
@@ -49,7 +50,12 @@ if (!class_exists('schema')) {
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x=0;
|
||||
foreach ($config_list as &$config_path) {
|
||||
include($config_path);
|
||||
try {
|
||||
include($config_path);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
//echo 'Caught exception: ', $e->getMessage(), "\n";
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
$this->apps = $apps;
|
||||
@@ -381,7 +387,7 @@ if (!class_exists('schema')) {
|
||||
$field_count++;
|
||||
}
|
||||
}
|
||||
$sql .= ");\n\n";
|
||||
$sql .= ");\n";
|
||||
return $sql;
|
||||
}
|
||||
}
|
||||
@@ -452,7 +458,7 @@ if (!class_exists('schema')) {
|
||||
$field_count++;
|
||||
}
|
||||
}
|
||||
$sql .= " FROM tmp_".$table.";\n\n";
|
||||
$sql .= " FROM tmp_".$table.";\n";
|
||||
return $sql;
|
||||
}
|
||||
}
|
||||
@@ -463,8 +469,9 @@ if (!class_exists('schema')) {
|
||||
public function schema ($format = '') {
|
||||
|
||||
//set the global variable
|
||||
global $db, $upgrade_data_types, $text,$output_format;
|
||||
if ($format=='') $format = $output_format;
|
||||
global $db, $text, $output_format;
|
||||
|
||||
if ($format == '') $format = $output_format;
|
||||
|
||||
//get the db variables
|
||||
require_once "resources/classes/config.php";
|
||||
@@ -519,7 +526,12 @@ if (!class_exists('schema')) {
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x=0;
|
||||
foreach ($config_list as &$config_path) {
|
||||
include($config_path);
|
||||
try {
|
||||
include($config_path);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
//echo 'Caught exception: ', $e->getMessage(), "\n";
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
@@ -665,7 +677,7 @@ if (!class_exists('schema')) {
|
||||
|
||||
//change the data type if it has been changed
|
||||
//if the data type in the app db array is different than the type in the database then change the data type
|
||||
if ($upgrade_data_types) {
|
||||
if ($this->data_types) {
|
||||
$db_field_type = $this->db_column_data_type ($db_type, $db_name, $table_name, $field_name);
|
||||
$field_type_array = explode("(", $field_type);
|
||||
$field_type = $field_type_array[0];
|
||||
@@ -896,11 +908,11 @@ if (!class_exists('schema')) {
|
||||
try {
|
||||
$this->db->query(trim($sql));
|
||||
if ($format == "text") {
|
||||
$response .= " $sql\n";
|
||||
$response .= " $sql;\n";
|
||||
}
|
||||
}
|
||||
catch (PDOException $error) {
|
||||
$response .= " error: " . $error->getMessage() . " sql: $sql<br/>";
|
||||
$response .= " error: " . $error->getMessage() . " sql: $sql\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH.'/themes/'.$_SESSION['domain']['template']['name'].'/';
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'];
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'] ?: sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
//add multi-lingual support
|
||||
|
||||
@@ -2058,13 +2058,25 @@ function number_pad($number,$n) {
|
||||
//validate and format order by clause of select statement
|
||||
if (!function_exists('order_by')) {
|
||||
function order_by($col, $dir, $col_default = '', $dir_default = 'asc') {
|
||||
$order_by = ' order by ';
|
||||
$col = preg_replace('#[^a-zA-Z0-9-_.]#', '', $col);
|
||||
$dir = strtolower($dir) == 'desc' ? 'desc' : 'asc';
|
||||
if ($col != '') {
|
||||
return ' order by '.$col.' '.$dir.' ';
|
||||
return $order_by.$col.' '.$dir.' ';
|
||||
}
|
||||
else if ($col_default != '') {
|
||||
return ' order by '.$col_default.' '.$dir_default.' ';
|
||||
else if (is_array($col_default) || $col_default != '') {
|
||||
if (is_array($col_default) && @sizeof($col_default) != 0) {
|
||||
foreach ($col_default as $k => $column) {
|
||||
$direction = (is_array($dir_default) && @sizeof($dir_default) != 0 && (strtolower($dir_default[$k]) == 'asc' || strtolower($dir_default[$k]) == 'desc')) ? $dir_default[$k] : 'asc';
|
||||
$order_bys[] = $column.' '.$direction.' ';
|
||||
}
|
||||
if (is_array($order_bys) && @sizeof($order_bys) != 0) {
|
||||
return $order_by.implode(', ', $order_bys);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return $order_by.$col_default.' '.$dir_default.' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,15 +246,12 @@ if ($db_type == "mysql") {
|
||||
if ($db_type == "pgsql") {
|
||||
//database connection
|
||||
try {
|
||||
if (isset($db_secure)) {
|
||||
$dbissecure = $db_secure;
|
||||
}
|
||||
else {
|
||||
$dbissecure = false;
|
||||
if (!isset($db_secure)) {
|
||||
$db_secure = false;
|
||||
}
|
||||
if (strlen($db_host) > 0) {
|
||||
if (strlen($db_port) == 0) { $db_port = "5432"; }
|
||||
if ($dbissecure == true) {
|
||||
if ($db_secure == true) {
|
||||
$db = new PDO("pgsql:host=$db_host port=$db_port dbname=$db_name user=$db_username password=$db_password sslmode=verify-ca sslrootcert=$db_cert_authority");
|
||||
}
|
||||
else {
|
||||
@@ -304,20 +301,20 @@ if ($db_type == "pgsql") {
|
||||
unset($result);
|
||||
}
|
||||
|
||||
if (is_array($domains)) {
|
||||
if (is_array($domains)) {
|
||||
foreach($domains as $row) {
|
||||
/*
|
||||
if (count($domains) == 1) {
|
||||
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||
$_SESSION["domain_name"] = $row['domain_name'];
|
||||
}
|
||||
else {
|
||||
if ($row['domain_name'] == $domain_array[0] || $row['domain_name'] == 'www.'.$domain_array[0]) {
|
||||
if (!isset($_SESSION['username'])) {
|
||||
if (count($domains) == 1) {
|
||||
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||
$_SESSION["domain_name"] = $row["domain_name"];
|
||||
$_SESSION["domain_name"] = $row['domain_name'];
|
||||
}
|
||||
}
|
||||
*/
|
||||
else {
|
||||
if ($row['domain_name'] == $domain_array[0] || $row['domain_name'] == 'www.'.$domain_array[0]) {
|
||||
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||
$_SESSION["domain_name"] = $row["domain_name"];
|
||||
}
|
||||
}
|
||||
}
|
||||
$_SESSION['domains'][$row['domain_uuid']] = $row;
|
||||
}
|
||||
unset($domains, $prep_statement);
|
||||
|
||||
@@ -72,11 +72,14 @@
|
||||
require_once "resources/functions.php";
|
||||
if ($config_exists) {
|
||||
require "resources/pdo.php";
|
||||
require_once "resources/switch.php";
|
||||
if (file_exists($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/resources/switch.php")) {
|
||||
require_once "resources/switch.php";
|
||||
}
|
||||
}
|
||||
|
||||
//change language on the fly - for translate tool (if available)
|
||||
if (isset($_REQUEST['view_lang_code']) && ($_REQUEST['view_lang_code']) != '') {
|
||||
$_SESSION['domain']['language']['code'] = $_REQUEST['view_lang_code'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -432,97 +432,96 @@ function outbound_route_to_bridge($domain_uuid, $destination_number, array $chan
|
||||
$hostname = 'unknown';
|
||||
}
|
||||
|
||||
$sql = "select * from v_dialplans ";
|
||||
if (is_uuid($domain_uuid)) {
|
||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where (domain_uuid is null) ";
|
||||
}
|
||||
$sql .= "and (hostname = :hostname or hostname is null) ";
|
||||
$sql .= "and app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' ";
|
||||
$sql .= "and dialplan_enabled = 'true' ";
|
||||
$sql .= "order by dialplan_order asc ";
|
||||
$sql = "select d.dialplan_uuid, ";
|
||||
$sql .= "d.dialplan_name, ";
|
||||
$sql .= "dd.dialplan_detail_uuid, ";
|
||||
$sql .= "dd.dialplan_detail_tag, ";
|
||||
$sql .= "dd.dialplan_detail_type, ";
|
||||
$sql .= "dd.dialplan_detail_data , ";
|
||||
$sql .= "d.dialplan_continue ";
|
||||
$sql .= "from v_dialplans d, v_dialplan_details dd ";
|
||||
$sql .= "where d.dialplan_uuid = dd.dialplan_uuid ";
|
||||
if (is_uuid($domain_uuid)) {
|
||||
$sql .= "and (d.domain_uuid = :domain_uuid or d.domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
}
|
||||
else {
|
||||
$sql .= "and (d.domain_uuid is null) ";
|
||||
}
|
||||
$sql .= "and (hostname = :hostname or hostname is null) ";
|
||||
$sql .= "and d.app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' ";
|
||||
$sql .= "and d.dialplan_enabled = 'true' ";
|
||||
$sql .= "order by d.domain_uuid, d.dialplan_order, dd.dialplan_detail_order ";
|
||||
$parameters['hostname'] = $hostname;
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
$x = 0;
|
||||
foreach ($result as &$row) {
|
||||
//set as variables
|
||||
$dialplan_uuid = $row['dialplan_uuid'];
|
||||
$dialplan_detail_tag = $row["dialplan_detail_tag"];
|
||||
$dialplan_detail_type = $row['dialplan_detail_type'];
|
||||
$dialplan_continue = $row['dialplan_continue'];
|
||||
|
||||
//get the extension number using the dialplan_uuid
|
||||
$sql = "select * ";
|
||||
$sql .= "from v_dialplan_details ";
|
||||
$sql .= "where dialplan_uuid = :dialplan_uuid ";
|
||||
$sql .= "order by dialplan_detail_order asc ";
|
||||
$parameters['dialplan_uuid'] = $dialplan_uuid;
|
||||
$database = new database;
|
||||
$sub_result = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
$condition_match = false;
|
||||
if (is_array($sub_result) && @sizeof($sub_result) != 0) {
|
||||
foreach ($sub_result as &$sub_row) {
|
||||
if ($sub_row['dialplan_detail_tag'] == "condition") {
|
||||
if ($sub_row['dialplan_detail_type'] == "destination_number") {
|
||||
$pattern = '/'.$sub_row['dialplan_detail_data'].'/';
|
||||
preg_match($pattern, $destination_number, $matches, PREG_OFFSET_CAPTURE);
|
||||
if (count($matches) == 0) {
|
||||
$condition_match[] = 'false';
|
||||
}
|
||||
else {
|
||||
$condition_match[] = 'true';
|
||||
$regex_match_1 = $matches[1][0];
|
||||
$regex_match_2 = $matches[2][0];
|
||||
$regex_match_3 = $matches[3][0];
|
||||
$regex_match_4 = $matches[4][0];
|
||||
$regex_match_5 = $matches[5][0];
|
||||
}
|
||||
}
|
||||
elseif ($sub_row['dialplan_detail_type'] == "\${toll_allow}") {
|
||||
$pattern = '/'.$sub_row['dialplan_detail_data'].'/';
|
||||
preg_match($pattern, $channel_variables['toll_allow'], $matches, PREG_OFFSET_CAPTURE);
|
||||
if (count($matches) == 0) {
|
||||
$condition_match[] = 'false';
|
||||
}
|
||||
else {
|
||||
$condition_match[] = 'true';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array('false', $condition_match)) {
|
||||
$x = 0;
|
||||
foreach ($sub_result as &$sub_row) {
|
||||
$dialplan_detail_data = $sub_row['dialplan_detail_data'];
|
||||
if ($sub_row['dialplan_detail_tag'] == "action" && $sub_row['dialplan_detail_type'] == "bridge" && $dialplan_detail_data != "\${enum_auto_route}") {
|
||||
$dialplan_detail_data = str_replace("\$1", $regex_match_1, $dialplan_detail_data);
|
||||
$dialplan_detail_data = str_replace("\$2", $regex_match_2, $dialplan_detail_data);
|
||||
$dialplan_detail_data = str_replace("\$3", $regex_match_3, $dialplan_detail_data);
|
||||
$dialplan_detail_data = str_replace("\$4", $regex_match_4, $dialplan_detail_data);
|
||||
$dialplan_detail_data = str_replace("\$5", $regex_match_5, $dialplan_detail_data);
|
||||
$bridge_array[$x] = $dialplan_detail_data;
|
||||
$x++;
|
||||
if ($dialplan_continue == "false") {
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$dialplan_uuid = $row["dialplan_uuid"];
|
||||
$dialplan_detail_uuid = $row["dialplan_detail_uuid"];
|
||||
$outbound_routes[$dialplan_uuid][$dialplan_detail_uuid]["dialplan_detail_tag"] = $row["dialplan_detail_tag"];
|
||||
$outbound_routes[$dialplan_uuid][$dialplan_detail_uuid]["dialplan_detail_type"] = $row["dialplan_detail_type"];
|
||||
$outbound_routes[$dialplan_uuid][$dialplan_detail_uuid]["dialplan_detail_data"] = $row["dialplan_detail_data"];
|
||||
$outbound_routes[$dialplan_uuid]["dialplan_continue"] = $row["dialplan_continue"];
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($outbound_routes) && @sizeof($outbound_routes) != 0) {
|
||||
$x = 0;
|
||||
foreach ($outbound_routes as &$dialplan) {
|
||||
$condition_match = false;
|
||||
foreach ($dialplan as &$dialplan_details) {
|
||||
if ($dialplan_details['dialplan_detail_tag'] == "condition") {
|
||||
if ($dialplan_details['dialplan_detail_type'] == "destination_number") {
|
||||
$pattern = '/'.$dialplan_details['dialplan_detail_data'].'/';
|
||||
preg_match($pattern, $destination_number, $matches, PREG_OFFSET_CAPTURE);
|
||||
if (count($matches) == 0) {
|
||||
$condition_match[] = 'false';
|
||||
}
|
||||
else {
|
||||
$condition_match[] = 'true';
|
||||
$regex_match_1 = $matches[1][0];
|
||||
$regex_match_2 = $matches[2][0];
|
||||
$regex_match_3 = $matches[3][0];
|
||||
$regex_match_4 = $matches[4][0];
|
||||
$regex_match_5 = $matches[5][0];
|
||||
}
|
||||
}
|
||||
elseif ($dialplan_details['dialplan_detail_type'] == "\${toll_allow}") {
|
||||
$pattern = '/'.$dialplan_details['dialplan_detail_data'].'/';
|
||||
preg_match($pattern, $channel_variables['toll_allow'], $matches, PREG_OFFSET_CAPTURE);
|
||||
if (count($matches) == 0) {
|
||||
$condition_match[] = 'false';
|
||||
}
|
||||
else {
|
||||
$condition_match[] = 'true';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array('false', $condition_match)) {
|
||||
foreach ($dialplan as &$dialplan_details) {
|
||||
$dialplan_detail_data = $dialplan_details['dialplan_detail_data'];
|
||||
if ($dialplan_details['dialplan_detail_tag'] == "action" && $dialplan_details['dialplan_detail_type'] == "bridge" && $dialplan_detail_data != "\${enum_auto_route}") {
|
||||
$dialplan_detail_data = str_replace("\$1", $regex_match_1, $dialplan_detail_data);
|
||||
$dialplan_detail_data = str_replace("\$2", $regex_match_2, $dialplan_detail_data);
|
||||
$dialplan_detail_data = str_replace("\$3", $regex_match_3, $dialplan_detail_data);
|
||||
$dialplan_detail_data = str_replace("\$4", $regex_match_4, $dialplan_detail_data);
|
||||
$dialplan_detail_data = str_replace("\$5", $regex_match_5, $dialplan_detail_data);
|
||||
$bridge_array[$x] = $dialplan_detail_data;
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($dialplan["dialplan_continue"] == "false") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($result, $row);
|
||||
return $bridge_array;
|
||||
}
|
||||
//$destination_number = '1231234';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--Template is optimized for firmware ver 2.2.10 and newer. Older firmware has incorrect tag names.-->
|
||||
<sysConf>
|
||||
<Version>2.0000000000</Version>
|
||||
<net>
|
||||
@@ -33,7 +34,36 @@
|
||||
<Vendor6ClassID>Fanvil X4U</Vendor6ClassID>
|
||||
<wifi>
|
||||
<WIFIEnable>{$fanvil_wifi_enable}</WIFIEnable>
|
||||
<WIFILogEnable>0</WIFILogEnable>
|
||||
<WANTYPE>0</WANTYPE>
|
||||
<WANIP>192.168.1.179</WANIP>
|
||||
<WANSubnetMask>255.255.255.0</WANSubnetMask>
|
||||
<WANGateway>192.168.1.1</WANGateway>
|
||||
<DomainName></DomainName>
|
||||
<PrimaryDNS>8.8.8.8</PrimaryDNS>
|
||||
<SecondaryDNS>202.96.134.133</SecondaryDNS>
|
||||
<EnableDHCP>1</EnableDHCP>
|
||||
<DHCPAutoDNS>1</DHCPAutoDNS>
|
||||
<DHCPOption100-101>1</DHCPOption100-101>
|
||||
<UseVendorClassID>0</UseVendorClassID>
|
||||
<VendorClassID>Fanvil X4U</VendorClassID>
|
||||
<EnablePPPoE>0</EnablePPPoE>
|
||||
<PPPoEUser>user123</PPPoEUser>
|
||||
<PPPoEPassword>password</PPPoEPassword>
|
||||
<WAN6IP></WAN6IP>
|
||||
<WAN6IPPREFIX></WAN6IPPREFIX>
|
||||
<WAN6Gateway></WAN6Gateway>
|
||||
<Domain6Name></Domain6Name>
|
||||
<PrimaryDNS6></PrimaryDNS6>
|
||||
<SecondaryDNS6></SecondaryDNS6>
|
||||
<EnableDHCP6>1</EnableDHCP6>
|
||||
<DHCP6AutoDNS>1</DHCP6AutoDNS>
|
||||
<UseVendor6ClassID>0</UseVendor6ClassID>
|
||||
<Vendor6ClassID></Vendor6ClassID>
|
||||
</wifi>
|
||||
<NetGlobal>
|
||||
<NetPriority>10</NetPriority>
|
||||
</NetGlobal>
|
||||
</net>
|
||||
<mm>
|
||||
<G723BitRate>1</G723BitRate>
|
||||
@@ -54,6 +84,7 @@
|
||||
<RTPInitialPort>10000</RTPInitialPort>
|
||||
<RTPPortQuantity>1000</RTPPortQuantity>
|
||||
<RTPKeepAlive>1</RTPKeepAlive>
|
||||
<RTPRelay>0</RTPRelay>
|
||||
<RTCPCNAMEUser></RTCPCNAMEUser>
|
||||
<RTCPCNAMEHost></RTCPCNAMEHost>
|
||||
<SelectYourTone>{if isset($fanvil_country_toneset)}{$fanvil_country_toneset}{else}11{/if}</SelectYourTone>
|
||||
@@ -104,22 +135,25 @@
|
||||
<RegisterUser>{$account.1.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.1.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.1.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.1.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.1.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.1.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.1.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.1.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.1.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.1.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.1.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -251,6 +285,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="2">
|
||||
<PhoneNumber>{$account.2.user_id}</PhoneNumber>
|
||||
@@ -261,22 +297,25 @@
|
||||
<RegisterUser>{$account.2.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.2.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.2.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.2.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.2.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.2.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.2.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.2.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.2.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.2.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.2.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -408,6 +447,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="3">
|
||||
<PhoneNumber>{$account.3.user_id}</PhoneNumber>
|
||||
@@ -418,22 +459,25 @@
|
||||
<RegisterUser>{$account.3.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.3.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.3.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.3.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.3.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.3.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.3.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.3.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.3.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.3.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.3.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -565,6 +609,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="4">
|
||||
<PhoneNumber>{$account.4.user_id}</PhoneNumber>
|
||||
@@ -575,22 +621,25 @@
|
||||
<RegisterUser>{$account.4.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.4.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.4.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.4.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.4.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.4.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.4.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.4.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.4.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.4.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.4.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -722,6 +771,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="5">
|
||||
<PhoneNumber>{$account.5.user_id}</PhoneNumber>
|
||||
@@ -732,22 +783,25 @@
|
||||
<RegisterUser>{$account.5.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.5.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.5.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.5.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.5.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.5.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.5.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.5.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.5.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.5.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.5.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -879,6 +933,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="6">
|
||||
<PhoneNumber>{$account.6.user_id}</PhoneNumber>
|
||||
@@ -889,22 +945,25 @@
|
||||
<RegisterUser>{$account.6.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.6.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.6.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.6.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.6.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.6.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.6.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.6.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.6.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.6.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.6.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1036,6 +1095,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="7">
|
||||
<PhoneNumber>{$account.7.user_id}</PhoneNumber>
|
||||
@@ -1046,22 +1107,25 @@
|
||||
<RegisterUser>{$account.7.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.7.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.7.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.7.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.7.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.7.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.7.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.7.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.7.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.7.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.7.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1193,6 +1257,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="8">
|
||||
<PhoneNumber>{$account.8.user_id}</PhoneNumber>
|
||||
@@ -1203,22 +1269,25 @@
|
||||
<RegisterUser>{$account.8.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.8.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.8.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.8.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.8.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.8.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.8.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.8.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.8.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.8.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.8.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1350,6 +1419,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="9">
|
||||
<PhoneNumber>{$account.9.user_id}</PhoneNumber>
|
||||
@@ -1360,22 +1431,25 @@
|
||||
<RegisterUser>{$account.9.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.9.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.9.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.9.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.9.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.9.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.9.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.9.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.9.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.9.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.9.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1507,6 +1581,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="10">
|
||||
<PhoneNumber>{$account.10.user_id}</PhoneNumber>
|
||||
@@ -1517,22 +1593,25 @@
|
||||
<RegisterUser>{$account.10.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.10.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.10.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.10.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.10.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.10.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.10.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.10.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.10.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.10.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.10.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1664,6 +1743,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="11">
|
||||
<PhoneNumber>{$account.11.user_id}</PhoneNumber>
|
||||
@@ -1674,22 +1755,25 @@
|
||||
<RegisterUser>{$account.11.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.11.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.11.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.11.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.11.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.11.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.11.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.11.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.11.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.11.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.11.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1821,6 +1905,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="12">
|
||||
<PhoneNumber>{$account.12.user_id}</PhoneNumber>
|
||||
@@ -1831,22 +1917,25 @@
|
||||
<RegisterUser>{$account.12.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.12.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.12.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.12.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.12.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.12.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.12.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.12.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.12.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.12.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.12.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1978,12 +2067,17 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<p2p>
|
||||
<SIPP2PEnableAutoAnswer>0</SIPP2PEnableAutoAnswer>
|
||||
<SIPP2PAutoAnswerDelay>30</SIPP2PAutoAnswerDelay>
|
||||
<SIPP2PDtmfMode>1</SIPP2PDtmfMode>
|
||||
<SIPP2PSipInfoDtmfMode>0</SIPP2PSipInfoDtmfMode>
|
||||
<SIPP2PEnablePreview>0</SIPP2PEnablePreview>
|
||||
<SIPP2PPreviewMode>0</SIPP2PPreviewMode>
|
||||
<SIPP2PUseVPN>1</SIPP2PUseVPN>
|
||||
</p2p>
|
||||
</sip>
|
||||
<call>
|
||||
@@ -2057,6 +2151,10 @@
|
||||
<ConfDTMFCode></ConfDTMFCode>
|
||||
<DisableDialSearch>0</DisableDialSearch>
|
||||
<CallNumberFilter></CallNumberFilter>
|
||||
<AutoResumeCurrent>0</AutoResumeCurrent>
|
||||
<AlertTimeout>120</AlertTimeout>
|
||||
<RingTimeout>120</RingTimeout>
|
||||
<RingPriority>0</RingPriority>
|
||||
</port>
|
||||
<basic>
|
||||
<DialbyPound>1</DialbyPound>
|
||||
@@ -2137,13 +2235,17 @@
|
||||
<CallLogDisplayType>0</CallLogDisplayType>
|
||||
<EnableRecvSMS>1</EnableRecvSMS>
|
||||
<EnableCallHistory>1</EnableCallHistory>
|
||||
<LineDisplayFormat>$name@$protocol$instance</LineDisplayFormat>
|
||||
<LineDisplayFormat>$name</LineDisplayFormat>
|
||||
<EnableMWITone>0</EnableMWITone>
|
||||
<AllPswdEncryption>0</AllPswdEncryption>
|
||||
<SIPNotifyXML>1</SIPNotifyXML>
|
||||
<BlockXMLWhenCall>1</BlockXMLWhenCall>
|
||||
<XMLUpdateInterval>30</XMLUpdateInterval>
|
||||
<VqmDisplayOrder></VqmDisplayOrder>
|
||||
<EnablePushXMLAuth>0</EnablePushXMLAuth>
|
||||
<PickupVisualAlert>0</PickupVisualAlert>
|
||||
<PickupAudioAlert>0</PickupAudioAlert>
|
||||
<PickupRingType></PickupRingType>
|
||||
<display>
|
||||
<LCDTitle>{$fanvil_greeting}</LCDTitle>
|
||||
<LCDConstrast>5</LCDConstrast>
|
||||
@@ -2172,14 +2274,25 @@
|
||||
<blfLed>
|
||||
<BLFIdleColor>0</BLFIdleColor>
|
||||
<BLFIdleCtl>1</BLFIdleCtl>
|
||||
<BLFIdleText>terminated</BLFIdleText>
|
||||
<BLFRingColor>1</BLFRingColor>
|
||||
<BLFRingCtl>2</BLFRingCtl>
|
||||
<BLFUsingColor>1</BLFUsingColor>
|
||||
<BLFUsingCtl>1</BLFUsingCtl>
|
||||
<BLFRingText>early</BLFRingText>
|
||||
<BLFDialingColor>1</BLFDialingColor>
|
||||
<BLFDialingCtl>0</BLFDialingCtl>
|
||||
<BLFDialingText></BLFDialingText>
|
||||
<BLFTalkingColor>1</BLFTalkingColor>
|
||||
<BLFTalkingCtl>1</BLFTalkingCtl>
|
||||
<BLFTalkingText>confirmed</BLFTalkingText>
|
||||
<BLFHoldColor>1</BLFHoldColor>
|
||||
<BLFHoldCtl>0</BLFHoldCtl>
|
||||
<BLFHoldText></BLFHoldText>
|
||||
<BLFFailedColor>2</BLFFailedColor>
|
||||
<BLFFailedCtl>0</BLFFailedCtl>
|
||||
<BLFFailedText>failed</BLFFailedText>
|
||||
<BLFParkedColor>0</BLFParkedColor>
|
||||
<BLFParkedCtl>3</BLFParkedCtl>
|
||||
<BLFParkedText>parked</BLFParkedText>
|
||||
</blfLed>
|
||||
<volume>
|
||||
<HandsetVol></HandsetVol>
|
||||
@@ -2237,6 +2350,7 @@
|
||||
<DialerCfwdSoftkey>send;2aB;delete;exit;</DialerCfwdSoftkey>
|
||||
<DesktopClick>history;status;none;none;none;</DesktopClick>
|
||||
<DailerClick>pline;nline;none;none;none;</DailerClick>
|
||||
<RingingClick>none;none;none;none;none;</RingingClick>
|
||||
<CallClick>none;none;voldown;volup;none;</CallClick>
|
||||
<DesktopLongPress>status;none;none;none;reset;</DesktopLongPress>
|
||||
<DialerConfSoftkey>contact;clogs;redial;video;cancel;</DialerConfSoftkey>
|
||||
@@ -2477,6 +2591,8 @@
|
||||
<dm>
|
||||
<OnhookTime>120</OnhookTime>
|
||||
<EnableHookflash>0</EnableHookflash>
|
||||
<KeyLongPressTime>2</KeyLongPressTime>
|
||||
<KeyLongLongPressTime>6</KeyLongLongPressTime>
|
||||
</dm>
|
||||
<vqm>
|
||||
<SessionReport>1</SessionReport>
|
||||
@@ -2526,6 +2642,7 @@
|
||||
<NewMissedcallUrl></NewMissedcallUrl>
|
||||
<NewMWIUrl></NewMWIUrl>
|
||||
<NewSMSUrl></NewSMSUrl>
|
||||
<WebAuthChangedUrl></WebAuthChangedUrl>
|
||||
<at></at>
|
||||
</cti>
|
||||
<ateTest>
|
||||
@@ -2597,6 +2714,9 @@
|
||||
<Port>0</Port>
|
||||
<Channel>0</Channel>
|
||||
</addr>
|
||||
<dynamic>
|
||||
<AutoExitExpires>60</AutoExitExpires>
|
||||
</dynamic>
|
||||
</mcast>
|
||||
<dsskey>
|
||||
<SelectDsskeyAction>0</SelectDsskeyAction>
|
||||
@@ -2604,10 +2724,12 @@
|
||||
<FuncKeyPageNum>5</FuncKeyPageNum>
|
||||
<SideKeyPageNum>1</SideKeyPageNum>
|
||||
<DSSHomePage>0</DSSHomePage>
|
||||
<DisplayParkedInfo>0</DisplayParkedInfo>
|
||||
<DSSDIALSwitchMode>0</DSSDIALSwitchMode>
|
||||
<FirstCallWaitTime>16</FirstCallWaitTime>
|
||||
<FirstNumStartTime>360</FirstNumStartTime>
|
||||
<FirstNumEndTime>1080</FirstNumEndTime>
|
||||
<DSSLongPressAction>1</DSSLongPressAction>
|
||||
<Extern1PageBelong>0</Extern1PageBelong>
|
||||
<Extern2PageBelong>0</Extern2PageBelong>
|
||||
<Extern3PageBelong>0</Extern3PageBelong>
|
||||
@@ -2737,7 +2859,7 @@
|
||||
</log>
|
||||
<tr069>
|
||||
<TR069Tone>1</TR069Tone>
|
||||
<CPESerialNumber>00100400FV02001000000c383e42691d</CPESerialNumber>
|
||||
<CPESerialNumber></CPESerialNumber>
|
||||
<ACSServerType>1</ACSServerType>
|
||||
<EnableTR069>0</EnableTR069>
|
||||
<ACSURL>0.0.0.0</ACSURL>
|
||||
@@ -2859,6 +2981,7 @@
|
||||
<DHCPOption>66</DHCPOption>
|
||||
<DHCPv6Option>0</DHCPv6Option>
|
||||
<DhcpOption120>0</DhcpOption120>
|
||||
<SaveDHCPOpion>0</SaveDHCPOpion>
|
||||
</opt>
|
||||
</ap>
|
||||
<fwCheck>
|
||||
@@ -2929,5 +3052,27 @@
|
||||
<OtherPopup>1</OtherPopup>
|
||||
<EnablePortMirror>0</EnablePortMirror>
|
||||
<AutoCloseLed>0</AutoCloseLed>
|
||||
<IdleTimeFontColor>0xffffff</IdleTimeFontColor>
|
||||
<CommonTitleFontColor>0xffffff</CommonTitleFontColor>
|
||||
<SoftkeyFontColor>0xffffff</SoftkeyFontColor>
|
||||
<MenuListFontColor>0x262626</MenuListFontColor>
|
||||
<ScrollBarColor>0x5a9dba</ScrollBarColor>
|
||||
<WarnThemeColor>0xc4012f</WarnThemeColor>
|
||||
<InformThemeColor>0x007bb0</InformThemeColor>
|
||||
<FunkeyListFontColor>0xffffff</FunkeyListFontColor>
|
||||
<TalkingFontColor>0x262626</TalkingFontColor>
|
||||
<SidekeyLabelLength>0</SidekeyLabelLength>
|
||||
<AppIconDisplay>1,1,1,1</AppIconDisplay>
|
||||
<DisplayProvisionprompt>0</DisplayProvisionprompt>
|
||||
<DsskeyPage1Type>0</DsskeyPage1Type>
|
||||
<DsskeyPage2Type>0</DsskeyPage2Type>
|
||||
<DsskeyPage3Type>0</DsskeyPage3Type>
|
||||
<DsskeyPage4Type>0</DsskeyPage4Type>
|
||||
<DsskeyPage5Type>0</DsskeyPage5Type>
|
||||
<DsskeyPage1XmlUrl></DsskeyPage1XmlUrl>
|
||||
<DsskeyPage2XmlUrl></DsskeyPage2XmlUrl>
|
||||
<DsskeyPage3XmlUrl></DsskeyPage3XmlUrl>
|
||||
<DsskeyPage4XmlUrl></DsskeyPage4XmlUrl>
|
||||
<DsskeyPage5XmlUrl></DsskeyPage5XmlUrl>
|
||||
</background>
|
||||
</sysConf>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--Template is optimized for firmware ver 2.2.10 and newer. Older firmware has incorrect tag names.-->
|
||||
<sysConf>
|
||||
<Version>2.0000000000</Version>
|
||||
<net>
|
||||
@@ -33,7 +34,36 @@
|
||||
<Vendor6ClassID>Fanvil X5U</Vendor6ClassID>
|
||||
<wifi>
|
||||
<WIFIEnable>{$fanvil_wifi_enable}</WIFIEnable>
|
||||
<WIFILogEnable>0</WIFILogEnable>
|
||||
<WANTYPE>0</WANTYPE>
|
||||
<WANIP>192.168.1.179</WANIP>
|
||||
<WANSubnetMask>255.255.255.0</WANSubnetMask>
|
||||
<WANGateway>192.168.1.1</WANGateway>
|
||||
<DomainName></DomainName>
|
||||
<PrimaryDNS>8.8.8.8</PrimaryDNS>
|
||||
<SecondaryDNS>202.96.134.133</SecondaryDNS>
|
||||
<EnableDHCP>1</EnableDHCP>
|
||||
<DHCPAutoDNS>1</DHCPAutoDNS>
|
||||
<DHCPOption100-101>1</DHCPOption100-101>
|
||||
<UseVendorClassID>0</UseVendorClassID>
|
||||
<VendorClassID>Fanvil X5U</VendorClassID>
|
||||
<EnablePPPoE>0</EnablePPPoE>
|
||||
<PPPoEUser>user123</PPPoEUser>
|
||||
<PPPoEPassword>password</PPPoEPassword>
|
||||
<WAN6IP></WAN6IP>
|
||||
<WAN6IPPREFIX></WAN6IPPREFIX>
|
||||
<WAN6Gateway></WAN6Gateway>
|
||||
<Domain6Name></Domain6Name>
|
||||
<PrimaryDNS6></PrimaryDNS6>
|
||||
<SecondaryDNS6></SecondaryDNS6>
|
||||
<EnableDHCP6>1</EnableDHCP6>
|
||||
<DHCP6AutoDNS>1</DHCP6AutoDNS>
|
||||
<UseVendor6ClassID>0</UseVendor6ClassID>
|
||||
<Vendor6ClassID></Vendor6ClassID>
|
||||
</wifi>
|
||||
<NetGlobal>
|
||||
<NetPriority>10</NetPriority>
|
||||
</NetGlobal>
|
||||
</net>
|
||||
<mm>
|
||||
<G723BitRate>1</G723BitRate>
|
||||
@@ -54,6 +84,7 @@
|
||||
<RTPInitialPort>10000</RTPInitialPort>
|
||||
<RTPPortQuantity>1000</RTPPortQuantity>
|
||||
<RTPKeepAlive>1</RTPKeepAlive>
|
||||
<RTPRelay>0</RTPRelay>
|
||||
<RTCPCNAMEUser></RTCPCNAMEUser>
|
||||
<RTCPCNAMEHost></RTCPCNAMEHost>
|
||||
<SelectYourTone>{if isset($fanvil_country_toneset)}{$fanvil_country_toneset}{else}11{/if}</SelectYourTone>
|
||||
@@ -104,22 +135,25 @@
|
||||
<RegisterUser>{$account.1.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.1.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.1.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.1.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.1.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.1.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.1.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.1.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.1.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.1.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.1.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -251,6 +285,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="2">
|
||||
<PhoneNumber>{$account.2.user_id}</PhoneNumber>
|
||||
@@ -261,22 +297,25 @@
|
||||
<RegisterUser>{$account.2.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.2.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.2.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.2.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.2.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.2.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.2.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.2.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.2.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.2.sip_port}</BakProxyPort>
|
||||
<EnableFailback>{if isset($account.2.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<EnableFailback>1</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -408,6 +447,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="3">
|
||||
<PhoneNumber>{$account.3.user_id}</PhoneNumber>
|
||||
@@ -418,22 +459,25 @@
|
||||
<RegisterUser>{$account.3.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.3.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.3.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.3.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.3.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.3.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.3.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.3.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.3.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.3.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.3.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -565,6 +609,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="4">
|
||||
<PhoneNumber>{$account.4.user_id}</PhoneNumber>
|
||||
@@ -575,22 +621,25 @@
|
||||
<RegisterUser>{$account.4.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.4.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.4.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.4.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.4.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.4.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.4.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.4.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.4.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.4.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.4.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -722,6 +771,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="5">
|
||||
<PhoneNumber>{$account.5.user_id}</PhoneNumber>
|
||||
@@ -732,22 +783,25 @@
|
||||
<RegisterUser>{$account.5.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.5.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.5.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.5.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.5.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.5.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.5.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.5.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.5.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.5.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.5.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -879,6 +933,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="6">
|
||||
<PhoneNumber>{$account.6.user_id}</PhoneNumber>
|
||||
@@ -889,22 +945,25 @@
|
||||
<RegisterUser>{$account.6.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.6.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.6.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.6.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.6.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.6.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.6.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.6.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.6.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.6.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.6.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1036,6 +1095,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="7">
|
||||
<PhoneNumber>{$account.7.user_id}</PhoneNumber>
|
||||
@@ -1046,22 +1107,25 @@
|
||||
<RegisterUser>{$account.7.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.7.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.7.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.7.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.7.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.7.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.7.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.7.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.7.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.7.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.7.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1193,6 +1257,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="8">
|
||||
<PhoneNumber>{$account.8.user_id}</PhoneNumber>
|
||||
@@ -1203,22 +1269,25 @@
|
||||
<RegisterUser>{$account.8.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.8.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.8.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.8.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.8.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.8.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.8.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.8.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.8.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.8.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.8.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1350,6 +1419,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="9">
|
||||
<PhoneNumber>{$account.9.user_id}</PhoneNumber>
|
||||
@@ -1360,22 +1431,25 @@
|
||||
<RegisterUser>{$account.9.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.9.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.9.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.9.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.9.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.9.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.9.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.9.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.9.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.9.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.9.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1507,6 +1581,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="10">
|
||||
<PhoneNumber>{$account.10.user_id}</PhoneNumber>
|
||||
@@ -1517,22 +1593,25 @@
|
||||
<RegisterUser>{$account.10.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.10.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.10.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.10.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.10.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.10.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.10.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.10.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.10.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.10.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.10.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1664,6 +1743,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="11">
|
||||
<PhoneNumber>{$account.11.user_id}</PhoneNumber>
|
||||
@@ -1674,22 +1755,25 @@
|
||||
<RegisterUser>{$account.11.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.11.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.11.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.11.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.11.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.11.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.11.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.11.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.11.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.11.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.11.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1821,6 +1905,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="12">
|
||||
<PhoneNumber>{$account.12.user_id}</PhoneNumber>
|
||||
@@ -1831,22 +1917,25 @@
|
||||
<RegisterUser>{$account.12.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.12.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.12.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.12.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.12.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.12.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.12.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.12.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.12.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.12.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.12.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -1978,6 +2067,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="13">
|
||||
<PhoneNumber>{$account.13.user_id}</PhoneNumber>
|
||||
@@ -1988,22 +2079,25 @@
|
||||
<RegisterUser>{$account.13.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.13.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.13.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.13.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.13.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.13.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.13.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.13.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.13.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.13.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.13.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -2135,6 +2229,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="14">
|
||||
<PhoneNumber>{$account.14.user_id}</PhoneNumber>
|
||||
@@ -2145,22 +2241,25 @@
|
||||
<RegisterUser>{$account.14.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.14.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.14.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.14.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.14.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.14.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.14.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.14.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.14.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.14.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.14.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -2292,6 +2391,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="15">
|
||||
<PhoneNumber>{$account.15.user_id}</PhoneNumber>
|
||||
@@ -2302,22 +2403,25 @@
|
||||
<RegisterUser>{$account.15.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.15.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.15.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.15.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.15.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.15.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.15.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.15.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.15.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.15.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.15.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -2449,6 +2553,8 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<line index="16">
|
||||
<PhoneNumber>{$account.16.user_id}</PhoneNumber>
|
||||
@@ -2459,22 +2565,25 @@
|
||||
<RegisterUser>{$account.16.auth_id}</RegisterUser>
|
||||
<RegisterPswd>{$account.16.password}</RegisterPswd>
|
||||
<RegisterTTL>{$account.16.register_expires}</RegisterTTL>
|
||||
<NeedRegOn>0</NeedRegOn>
|
||||
<BackupAddr></BackupAddr>
|
||||
<BackupPort>5060</BackupPort>
|
||||
<BackupTransport>0</BackupTransport>
|
||||
<BackupTTL>3600</BackupTTL>
|
||||
<BackupNeedRegOn>0</BackupNeedRegOn>
|
||||
<EnableReg>{if isset($account.16.password)}1{else}0{/if}</EnableReg>
|
||||
<ProxyAddr>{$account.16.outbound_proxy_primary}</ProxyAddr>
|
||||
<ProxyPort>{$account.16.sip_port}</ProxyPort>
|
||||
<ProxyUser>{$account.16.auth_id}</ProxyUser>
|
||||
<ProxyPswd>{$account.16.password}</ProxyPswd>
|
||||
<ProxyNeedRegOn>0</ProxyNeedRegOn>
|
||||
<BakProxyAddr>{$account.16.outbound_proxy_secondary}</BakProxyAddr>
|
||||
<BakProxyPort>{$account.16.sip_port}</BakProxyPort>
|
||||
<BakProxyNeedRegOn>0</BakProxyNeedRegOn>
|
||||
<EnableFailback>{if isset($account.16.outbound_proxy_secondary)}1{else}0{/if}</EnableFailback>
|
||||
<FailbackInterval>1800</FailbackInterval>
|
||||
<SignalFailback>0</SignalFailback>
|
||||
<SignalRetryCounts>3</SignalRetryCounts>
|
||||
<SignalCrypto>0</SignalCrypto>
|
||||
<SigCryptoKey></SigCryptoKey>
|
||||
<MediaCrypto>0</MediaCrypto>
|
||||
<MedCryptoKey></MedCryptoKey>
|
||||
@@ -2606,12 +2715,17 @@
|
||||
<SessionTimerT1>500</SessionTimerT1>
|
||||
<SessionTimerT2>4000</SessionTimerT2>
|
||||
<SessionTimerT4>5000</SessionTimerT4>
|
||||
<UnavailableMode>0</UnavailableMode>
|
||||
<TCPUseRetryTimer>0</TCPUseRetryTimer>
|
||||
</line>
|
||||
<p2p>
|
||||
<SIPP2PEnableAutoAnswer>0</SIPP2PEnableAutoAnswer>
|
||||
<SIPP2PAutoAnswerDelay>30</SIPP2PAutoAnswerDelay>
|
||||
<SIPP2PDtmfMode>1</SIPP2PDtmfMode>
|
||||
<SIPP2PSipInfoDtmfMode>0</SIPP2PSipInfoDtmfMode>
|
||||
<SIPP2PEnablePreview>0</SIPP2PEnablePreview>
|
||||
<SIPP2PPreviewMode>0</SIPP2PPreviewMode>
|
||||
<SIPP2PUseVPN>1</SIPP2PUseVPN>
|
||||
</p2p>
|
||||
</sip>
|
||||
<call>
|
||||
@@ -2685,6 +2799,10 @@
|
||||
<ConfDTMFCode></ConfDTMFCode>
|
||||
<DisableDialSearch>0</DisableDialSearch>
|
||||
<CallNumberFilter></CallNumberFilter>
|
||||
<AutoResumeCurrent>0</AutoResumeCurrent>
|
||||
<AlertTimeout>120</AlertTimeout>
|
||||
<RingTimeout>120</RingTimeout>
|
||||
<RingPriority>0</RingPriority>
|
||||
</port>
|
||||
<basic>
|
||||
<DialbyPound>1</DialbyPound>
|
||||
@@ -2765,13 +2883,17 @@
|
||||
<CallLogDisplayType>0</CallLogDisplayType>
|
||||
<EnableRecvSMS>1</EnableRecvSMS>
|
||||
<EnableCallHistory>1</EnableCallHistory>
|
||||
<LineDisplayFormat>$name@$protocol$instance</LineDisplayFormat>
|
||||
<LineDisplayFormat>$name</LineDisplayFormat>
|
||||
<EnableMWITone>0</EnableMWITone>
|
||||
<AllPswdEncryption>0</AllPswdEncryption>
|
||||
<SIPNotifyXML>1</SIPNotifyXML>
|
||||
<BlockXMLWhenCall>1</BlockXMLWhenCall>
|
||||
<XMLUpdateInterval>30</XMLUpdateInterval>
|
||||
<VqmDisplayOrder></VqmDisplayOrder>
|
||||
<EnablePushXMLAuth>0</EnablePushXMLAuth>
|
||||
<PickupVisualAlert>0</PickupVisualAlert>
|
||||
<PickupAudioAlert>0</PickupAudioAlert>
|
||||
<PickupRingType></PickupRingType>
|
||||
<display>
|
||||
<LCDTitle>{$fanvil_greeting}</LCDTitle>
|
||||
<LCDConstrast>5</LCDConstrast>
|
||||
@@ -2800,14 +2922,25 @@
|
||||
<blfLed>
|
||||
<BLFIdleColor>0</BLFIdleColor>
|
||||
<BLFIdleCtl>1</BLFIdleCtl>
|
||||
<BLFIdleText>terminated</BLFIdleText>
|
||||
<BLFRingColor>1</BLFRingColor>
|
||||
<BLFRingCtl>2</BLFRingCtl>
|
||||
<BLFUsingColor>1</BLFUsingColor>
|
||||
<BLFUsingCtl>1</BLFUsingCtl>
|
||||
<BLFRingText>early</BLFRingText>
|
||||
<BLFDialingColor>1</BLFDialingColor>
|
||||
<BLFDialingCtl>0</BLFDialingCtl>
|
||||
<BLFDialingText></BLFDialingText>
|
||||
<BLFTalkingColor>1</BLFTalkingColor>
|
||||
<BLFTalkingCtl>1</BLFTalkingCtl>
|
||||
<BLFTalkingText>confirmed</BLFTalkingText>
|
||||
<BLFHoldColor>1</BLFHoldColor>
|
||||
<BLFHoldCtl>0</BLFHoldCtl>
|
||||
<BLFHoldText></BLFHoldText>
|
||||
<BLFFailedColor>2</BLFFailedColor>
|
||||
<BLFFailedCtl>0</BLFFailedCtl>
|
||||
<BLFFailedText>failed</BLFFailedText>
|
||||
<BLFParkedColor>0</BLFParkedColor>
|
||||
<BLFParkedCtl>3</BLFParkedCtl>
|
||||
<BLFParkedText>parked</BLFParkedText>
|
||||
</blfLed>
|
||||
<volume>
|
||||
<HandsetVol></HandsetVol>
|
||||
@@ -2859,7 +2992,7 @@
|
||||
<ConferenceSoftkey>hold;none;split;end;</ConferenceSoftkey>
|
||||
<WaitingSoftkey>xfer;accept;reject;end;</WaitingSoftkey>
|
||||
<EndingSoftkey>redial;none;none;end;</EndingSoftkey>
|
||||
<DialerPreSoftkey>send;save;delete;exit;</DialerPreSoftkey>
|
||||
<DialerPreSoftkey>send;2aB;delete;exit;</DialerPreSoftkey>
|
||||
<DialerCallSoftkey>send;2aB;delete;exit;</DialerCallSoftkey>
|
||||
<DialerXferSoftkey>delete;xfer;send;exit;</DialerXferSoftkey>
|
||||
<DialerCfwdSoftkey>send;2aB;delete;exit;</DialerCfwdSoftkey>
|
||||
@@ -3105,6 +3238,8 @@
|
||||
<dm>
|
||||
<OnhookTime>120</OnhookTime>
|
||||
<EnableHookflash>0</EnableHookflash>
|
||||
<KeyLongPressTime>2</KeyLongPressTime>
|
||||
<KeyLongLongPressTime>6</KeyLongLongPressTime>
|
||||
</dm>
|
||||
<vqm>
|
||||
<SessionReport>1</SessionReport>
|
||||
@@ -3154,6 +3289,7 @@
|
||||
<NewMissedcallUrl></NewMissedcallUrl>
|
||||
<NewMWIUrl></NewMWIUrl>
|
||||
<NewSMSUrl></NewSMSUrl>
|
||||
<WebAuthChangedUrl></WebAuthChangedUrl>
|
||||
<at></at>
|
||||
</cti>
|
||||
<ateTest>
|
||||
@@ -3225,6 +3361,9 @@
|
||||
<Port>0</Port>
|
||||
<Channel>0</Channel>
|
||||
</addr>
|
||||
<dynamic>
|
||||
<AutoExitExpires>60</AutoExitExpires>
|
||||
</dynamic>
|
||||
</mcast>
|
||||
<dsskey>
|
||||
<SelectDsskeyAction>0</SelectDsskeyAction>
|
||||
@@ -3232,10 +3371,12 @@
|
||||
<FuncKeyPageNum>5</FuncKeyPageNum>
|
||||
<SideKeyPageNum>1</SideKeyPageNum>
|
||||
<DSSHomePage>0</DSSHomePage>
|
||||
<DisplayParkedInfo>0</DisplayParkedInfo>
|
||||
<DSSDIALSwitchMode>0</DSSDIALSwitchMode>
|
||||
<FirstCallWaitTime>16</FirstCallWaitTime>
|
||||
<FirstNumStartTime>360</FirstNumStartTime>
|
||||
<FirstNumEndTime>1080</FirstNumEndTime>
|
||||
<DSSLongPressAction>1</DSSLongPressAction>
|
||||
<Extern1PageBelong>0</Extern1PageBelong>
|
||||
<Extern2PageBelong>0</Extern2PageBelong>
|
||||
<Extern3PageBelong>0</Extern3PageBelong>
|
||||
@@ -3363,7 +3504,7 @@
|
||||
</log>
|
||||
<tr069>
|
||||
<TR069Tone>1</TR069Tone>
|
||||
<CPESerialNumber>00100400FV02001000000c383e43ed5d</CPESerialNumber>
|
||||
<CPESerialNumber></CPESerialNumber>
|
||||
<ACSServerType>1</ACSServerType>
|
||||
<EnableTR069>0</EnableTR069>
|
||||
<ACSURL>0.0.0.0</ACSURL>
|
||||
@@ -3501,6 +3642,7 @@
|
||||
<DHCPOption>66</DHCPOption>
|
||||
<DHCPv6Option>0</DHCPv6Option>
|
||||
<DhcpOption120>0</DhcpOption120>
|
||||
<SaveDHCPOpion>0</SaveDHCPOpion>
|
||||
</opt>
|
||||
</ap>
|
||||
<fwCheck>
|
||||
@@ -3571,5 +3713,27 @@
|
||||
<OtherPopup>1</OtherPopup>
|
||||
<EnablePortMirror>0</EnablePortMirror>
|
||||
<AutoCloseLed>0</AutoCloseLed>
|
||||
<IdleTimeFontColor>0xffffff</IdleTimeFontColor>
|
||||
<CommonTitleFontColor>0xffffff</CommonTitleFontColor>
|
||||
<SoftkeyFontColor>0xffffff</SoftkeyFontColor>
|
||||
<MenuListFontColor>0x262626</MenuListFontColor>
|
||||
<ScrollBarColor>0x5a9dba</ScrollBarColor>
|
||||
<WarnThemeColor>0xc4012f</WarnThemeColor>
|
||||
<InformThemeColor>0x007bb0</InformThemeColor>
|
||||
<FunkeyListFontColor>0xffffff</FunkeyListFontColor>
|
||||
<TalkingFontColor>0x262626</TalkingFontColor>
|
||||
<SidekeyLabelLength>0</SidekeyLabelLength>
|
||||
<AppIconDisplay>1,1,1,1</AppIconDisplay>
|
||||
<DisplayProvisionprompt>0</DisplayProvisionprompt>
|
||||
<DsskeyPage1Type>0</DsskeyPage1Type>
|
||||
<DsskeyPage2Type>0</DsskeyPage2Type>
|
||||
<DsskeyPage3Type>0</DsskeyPage3Type>
|
||||
<DsskeyPage4Type>0</DsskeyPage4Type>
|
||||
<DsskeyPage5Type>0</DsskeyPage5Type>
|
||||
<DsskeyPage1XmlUrl></DsskeyPage1XmlUrl>
|
||||
<DsskeyPage2XmlUrl></DsskeyPage2XmlUrl>
|
||||
<DsskeyPage3XmlUrl></DsskeyPage3XmlUrl>
|
||||
<DsskeyPage4XmlUrl></DsskeyPage4XmlUrl>
|
||||
<DsskeyPage5XmlUrl></DsskeyPage5XmlUrl>
|
||||
</background>
|
||||
</sysConf>
|
||||
|
||||