diff --git a/app/extensions/app_config.php b/app/extensions/app_config.php index a92f71a31a..5e245014b3 100644 --- a/app/extensions/app_config.php +++ b/app/extensions/app_config.php @@ -132,6 +132,10 @@ $y++; $apps[$x]['permissions'][$y]['name'] = "extension_registered"; $y++; + $apps[$x]['permissions'][$y]['name'] = "extension_force_ping"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; //schema details @@ -413,7 +417,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "force_ping"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $y = 1; //table array index diff --git a/app/extensions/app_languages.php b/app/extensions/app_languages.php index 8e9fd9f063..a7bcd6e3db 100644 --- a/app/extensions/app_languages.php +++ b/app/extensions/app_languages.php @@ -390,6 +390,19 @@ $text['label-absolute_codec_string']['ro'] = ""; $text['label-absolute_codec_string']['ar-eg'] = ""; $text['label-absolute_codec_string']['he'] = ""; +$text['label-force_ping']['en-us'] = "Force ping"; +$text['label-force_ping']['es-cl'] = ""; +$text['label-force_ping']['pt-pt'] = ""; +$text['label-force_ping']['fr-fr'] = ""; +$text['label-force_ping']['pt-br'] = ""; +$text['label-force_ping']['pl'] = ""; +$text['label-force_ping']['uk'] = ""; +$text['label-force_ping']['sv-se'] = ""; +$text['label-force_ping']['de-at'] = ""; +$text['label-force_ping']['ro'] = ""; +$text['label-force_ping']['ar-eg'] = ""; +$text['label-force_ping']['he'] = ""; + $text['label-rewrite_tls_contact_port']['en-us'] = "Rewrite TLS Contact Port"; $text['label-rewrite_tls_contact_port']['es-cl'] = "Reescribir Contacto Puerto TLS"; $text['label-rewrite_tls_contact_port']['pt-pt'] = "Reescreva Contacto Porto TLS"; @@ -1261,6 +1274,19 @@ $text['description-absolute_codec_string']['ro'] = ""; $text['description-absolute_codec_string']['ar-eg'] = ""; $text['description-absolute_codec_string']['he'] = ""; +$text['description-force_ping']['en-us'] = "Use OPTIONS to detect if extension is reacheable"; +$text['description-force_ping']['es-cl'] = ""; +$text['description-force_ping']['pt-pt'] = ""; +$text['description-force_ping']['fr-fr'] = ""; +$text['description-force_ping']['pt-br'] = ""; +$text['description-force_ping']['pl'] = ""; +$text['description-force_ping']['uk'] = ""; +$text['description-force_ping']['sv-se'] = ""; +$text['description-force_ping']['de-at'] = ""; +$text['description-force_ping']['ro'] = ""; +$text['description-force_ping']['ar-eg'] = ""; +$text['description-force_ping']['he'] = ""; + $text['description-missed_call']['en-us'] = "Select the notification type, and enter the appropriate destination."; $text['description-missed_call']['es-cl'] = "Seleccione el tipo de notificación, y entrar en el destino apropiado."; $text['description-missed_call']['pt-pt'] = "Selecione o tipo de notificação e digite o destino apropriado."; diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 632fce45c5..07f5f92b87 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -136,6 +136,7 @@ else { $mwi_account = check_str($_POST["mwi_account"]); $sip_bypass_media = check_str($_POST["sip_bypass_media"]); $absolute_codec_string = check_str($_POST["absolute_codec_string"]); + $force_ping = check_str($_POST["force_ping"]); $dial_string = check_str($_POST["dial_string"]); $enabled = check_str($_POST["enabled"]); $description = check_str($_POST["description"]); @@ -468,6 +469,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (permission_exists('extension_absolute_codec_string')) { $sql .= "absolute_codec_string, "; } + if (permission_exists('extension_force_ping')) { + $sql .= "force_ping, "; + } if (permission_exists('extension_dial_string')) { $sql .= "dial_string, "; } @@ -538,6 +542,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (permission_exists('extension_absolute_codec_string')) { $sql .= "'$absolute_codec_string', "; } + if (permission_exists('extension_force_ping')) { + $sql .= "'$force_ping', "; + } if (permission_exists('extension_dial_string')) { $sql .= "'$dial_string', "; } @@ -698,6 +705,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (permission_exists('extension_absolute_codec_string')) { $sql .= "absolute_codec_string = '$absolute_codec_string', "; } + if (permission_exists('extension_force_ping')) { + $sql .= "force_ping = '$force_ping', "; + } if (permission_exists('extension_dial_string')) { $sql .= "dial_string = '$dial_string', "; } @@ -864,6 +874,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $mwi_account = $row["mwi_account"]; $sip_bypass_media = $row["sip_bypass_media"]; $absolute_codec_string = $row["absolute_codec_string"]; + $force_ping = $row["force_ping"]; $dial_string = $row["dial_string"]; $enabled = $row["enabled"]; $description = $row["description"]; @@ -1943,6 +1954,38 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; } + if (permission_exists('extension_force_ping')) { + echo "