diff --git a/app/gateways/app_config.php b/app/gateways/app_config.php index 049daf4f95..672be36cc3 100644 --- a/app/gateways/app_config.php +++ b/app/gateways/app_config.php @@ -189,6 +189,11 @@ $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'] = "hostname"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(255)"; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "enabled"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; diff --git a/app/gateways/app_languages.php b/app/gateways/app_languages.php index 414807c343..4af02a678b 100644 --- a/app/gateways/app_languages.php +++ b/app/gateways/app_languages.php @@ -442,6 +442,15 @@ $text['label-expire_seconds']['de-at'] = "Expire Seconds"; $text['label-expire_seconds']['ar-eg'] = ""; $text['label-expire_seconds']['he'] = ""; +$text['label-hostname']['en-us'] = "Hostname"; +$text['label-hostname']['pt-pt'] = "Hostname"; +$text['label-hostname']['fr-fr'] = "Nom d'hôte"; +$text['label-hostname']['pt-br'] = "Hostname"; +$text['label-hostname']['pl'] = "Nazwa hosta"; +$text['label-hostname']['sv-se'] = "Hostname"; +$text['label-hostname']['uk'] = "Назва хоста"; +$text['label-hostname']['de-at'] = "Hostname"; + $text['label-enabled']['en-us'] = "Enabled"; $text['label-enabled']['es-cl'] = "Activado"; $text['label-enabled']['pt-pt'] = "Habilitado"; @@ -870,6 +879,15 @@ $text['description-expire_seconds']['de-at'] = "Geben Sie an, nach wie vielen Se $text['description-expire_seconds']['ar-eg'] = ""; $text['description-expire_seconds']['he'] = ""; +$text['description-hostname']['en-us'] = "Enter the hostname / switchname."; +$text['description-hostname']['pt-pt'] = "Introduza o hostname"; +$text['description-hostname']['fr-fr'] = "Entrer le nom de l'hôte / du switch."; +$text['description-hostname']['pt-br'] = "Insira o hostname"; +$text['description-hostname']['pl'] = "Wprowadź nazwę hosta / PBXu."; +$text['description-hostname']['sv-se'] = "Fyll i hostname / switchname."; +$text['description-hostname']['uk'] = "Введіть назву хоста / switchname."; +$text['description-hostname']['de-at'] = "Geben Sie den Hostnamen / Switchnamen an."; + $text['description-enabled']['en-us'] = "Enable or Disable the Gateway"; $text['description-enabled']['es-cl'] = "Activar o Desactivar la Pasarela"; $text['description-enabled']['pt-pt'] = "Habilitar ou Desabilitar o Gateway"; diff --git a/app/gateways/gateway_edit.php b/app/gateways/gateway_edit.php index 0ddb0a4f9a..a60a801163 100644 --- a/app/gateways/gateway_edit.php +++ b/app/gateways/gateway_edit.php @@ -95,6 +95,7 @@ else { $extension_in_contact = check_str($_POST["extension_in_contact"]); $context = check_str($_POST["context"]); $profile = check_str($_POST["profile"]); + $hostname = check_str($_POST["hostname"]); $enabled = check_str($_POST["enabled"]); $description = check_str($_POST["description"]); } @@ -198,6 +199,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "extension_in_contact, "; $sql .= "context, "; $sql .= "profile, "; + $sql .= "hostname, "; $sql .= "enabled, "; $sql .= "description "; $sql .= ")"; @@ -232,6 +234,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "'$extension_in_contact', "; $sql .= "'$context', "; $sql .= "'$profile', "; + if (strlen($hostname) == 0) { + $sql .= "null, "; + } + else { + $sql .= "'$hostname', "; + } $sql .= "'$enabled', "; $sql .= "'$description' "; $sql .= ")"; @@ -278,6 +286,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { else { $sql .= "domain_uuid = '$domain_uuid', "; } + if (strlen($hostname) == 0) { + $sql .= "hostname = null, "; + } + else { + $sql .= "hostname = '$hostname', "; + } $sql .= "enabled = '$enabled', "; $sql .= "description = '$description' "; $sql .= "where gateway_uuid = '$gateway_uuid'"; @@ -374,6 +388,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $extension_in_contact = $row["extension_in_contact"]; $context = $row["context"]; $profile = $row["profile"]; + $hostname = $row["hostname"]; $enabled = $row["enabled"]; $description = $row["description"]; } @@ -871,6 +886,17 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; + echo "