diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 79cfab7431..3bae7da866 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2020 + Portions created by the Initial Developer are Copyright (C) 2008-2021 the Initial Developer. All Rights Reserved. Contributor(s): @@ -135,6 +135,11 @@ $enabled = $_POST["enabled"]; $description = $_POST["description"]; + //outbound caller id number - only allow numeric and + + if (strlen($outbound_caller_id_number) > 0) { + $outbound_caller_id_number = preg_replace('#[^\+0-9]#', '', $outbound_caller_id_number); + } + $voicemail_id = $extension; if (permission_exists('number_alias') && strlen($number_alias) > 0) { $voicemail_id = $number_alias; @@ -796,6 +801,11 @@ } unset($sql, $parameters, $row); + //outbound caller id number - only allow numeric and + + if (strlen($outbound_caller_id_number) > 0) { + $outbound_caller_id_number = preg_replace('#[^\+0-9]#', '', $outbound_caller_id_number); + } + //get the voicemail data if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) { //get the voicemails