diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php index 47999566c7..93c112a676 100644 --- a/app/destinations/app_languages.php +++ b/app/destinations/app_languages.php @@ -758,6 +758,27 @@ $text['label-destination_hold_music']['ru-ru'] = "Музыка на Удержа $text['label-destination_hold_music']['sv-se'] = "Vänt-musik"; $text['label-destination_hold_music']['uk-ua'] = ""; +$text['label-destination_distinctive_ring']['en-us'] = "Distinctive Ring"; +$text['label-destination_distinctive_ring']['en-gb'] = "Distinctive Ring"; +$text['label-destination_distinctive_ring']['ar-eg'] = ""; +$text['label-destination_distinctive_ring']['de-at'] = "Individueller Rufton"; //copied from de-de +$text['label-destination_distinctive_ring']['de-ch'] = "Individueller Rufton"; //copied from de-de +$text['label-destination_distinctive_ring']['de-de'] = "Individueller Rufton"; +$text['label-destination_distinctive_ring']['es-cl'] = ""; +$text['label-destination_distinctive_ring']['es-mx'] = ""; +$text['label-destination_distinctive_ring']['fr-ca'] = "Sonnerie Distinctive"; //copied from fr-fr +$text['label-destination_distinctive_ring']['fr-fr'] = "Sonnerie Distinctive"; +$text['label-destination_distinctive_ring']['he-il'] = ""; +$text['label-destination_distinctive_ring']['it-it'] = "Squillo Personalizzato"; +$text['label-destination_distinctive_ring']['nl-nl'] = "Alternatieve beltoon"; +$text['label-destination_distinctive_ring']['pl-pl'] = "Charakterystyczny Sygnał"; +$text['label-destination_distinctive_ring']['pt-br'] = ""; +$text['label-destination_distinctive_ring']['pt-pt'] = ""; +$text['label-destination_distinctive_ring']['ro-ro'] = ""; +$text['label-destination_distinctive_ring']['ru-ru'] = "Отличительный вызов"; +$text['label-destination_distinctive_ring']['sv-se'] = "Distinkt Ringning"; +$text['label-destination_distinctive_ring']['uk-ua'] = ""; + $text['label-destination_record']['en-us'] = "Record"; $text['label-destination_record']['en-gb'] = "Record"; $text['label-destination_record']['ar-eg'] = ""; @@ -1496,6 +1517,27 @@ $text['description-destination_hold_music']['ru-ru'] = "Выберите мел $text['description-destination_hold_music']['sv-se'] = "Välj MOH Kategori här."; $text['description-destination_hold_music']['uk-ua'] = ""; +$text['description-destination_distinctive_ring']['en-us'] = "Select a sound for a distinctive ring."; +$text['description-destination_distinctive_ring']['en-gb'] = "Select a sound for a distinctive ring."; +$text['description-destination_distinctive_ring']['ar-eg'] = ""; +$text['description-destination_distinctive_ring']['de-at'] = "Wählen Sie einen Ton für den individuellen Rufton."; //copied from de-de +$text['description-destination_distinctive_ring']['de-ch'] = "Wählen Sie einen Ton für den individuellen Rufton."; //copied from de-de +$text['description-destination_distinctive_ring']['de-de'] = "Wählen Sie einen Ton für den individuellen Rufton."; +$text['description-destination_distinctive_ring']['es-cl'] = ""; +$text['description-destination_distinctive_ring']['es-mx'] = ""; +$text['description-destination_distinctive_ring']['fr-ca'] = "Sélectionner un son pour une sonnerie distinctive"; //copied from fr-fr +$text['description-destination_distinctive_ring']['fr-fr'] = "Sélectionner un son pour une sonnerie distinctive"; +$text['description-destination_distinctive_ring']['he-il'] = ""; +$text['description-destination_distinctive_ring']['it-it'] = "Selezionare il tono per uno squillo personalizzato."; +$text['description-destination_distinctive_ring']['nl-nl'] = "Kies een geluid voor een afwijkende beltoon."; +$text['description-destination_distinctive_ring']['pl-pl'] = "Wybierz dźwięk dla funkcji charakterystycznego sygnału"; +$text['description-destination_distinctive_ring']['pt-br'] = ""; +$text['description-destination_distinctive_ring']['pt-pt'] = ""; +$text['description-destination_distinctive_ring']['ro-ro'] = ""; +$text['description-destination_distinctive_ring']['ru-ru'] = "Выберите параметры звука для отличительного вызова"; +$text['description-destination_distinctive_ring']['sv-se'] = "Välj ett ljud för den distinkta ringningen."; +$text['description-destination_distinctive_ring']['uk-ua'] = ""; + $text['description-destination_record']['en-us'] = "Save the recording."; $text['description-destination_record']['en-gb'] = "Save the recording."; $text['description-destination_record']['ar-eg'] = ""; diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index ac3c78e4fd..f3d7f0e5ce 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_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-2021 + Portions created by the Initial Developer are Copyright (C) 2008-2022 the Initial Developer. All Rights Reserved. Contributor(s): @@ -111,6 +111,7 @@ $destination_buy = check_float($_POST["destination_buy"]); $currency_buy = $_POST["currency_buy"]; $destination_hold_music = $_POST["destination_hold_music"]; + $destination_distinctive_ring = $_POST["destination_distinctive_ring"]; $destination_record = $_POST["destination_record"]; $destination_accountcode = $_POST["destination_accountcode"]; $destination_type_voice = $_POST["destination_type_voice"]; @@ -401,6 +402,9 @@ if (strlen($destination_hold_music) > 0) { $dialplan["dialplan_xml"] .= " \n"; } + if (strlen($destination_distinctive_ring) > 0) { + $dialplan["dialplan_xml"] .= " \n"; + } if (strlen($destination_accountcode) > 0) { $dialplan["dialplan_xml"] .= " \n"; } @@ -527,6 +531,17 @@ $y++; } + //set the distinctive ring + if (strlen($destination_distinctive_ring) > 0) { + $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "export"; + $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "sip_h_Alert-Info=".$destination_distinctive_ring; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; + $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + } + //add fax detection if (is_uuid($fax_uuid)) { @@ -735,7 +750,12 @@ $array['destinations'][$x]["destination_caller_id_number"] = $destination_caller_id_number; $array['destinations'][$x]["destination_cid_name_prefix"] = $destination_cid_name_prefix; $array['destinations'][$x]["destination_context"] = $destination_context; - $array['destinations'][$x]["destination_hold_music"] = $destination_hold_music; + if (permission_exists("destination_hold_music")) { + $array['destinations'][$x]["destination_hold_music"] = $destination_hold_music; + } + if (permission_exists("destination_distinctive_ring")) { + $array['destinations'][$x]["destination_distinctive_ring"] = $destination_distinctive_ring; + } $array['destinations'][$x]["destination_record"] = $destination_record; $array['destinations'][$x]["destination_accountcode"] = $destination_accountcode; $array['destinations'][$x]["destination_type_voice"] = $destination_type_voice ? 1 : null; @@ -886,6 +906,7 @@ $destination_caller_id_number = $row["destination_caller_id_number"]; $destination_cid_name_prefix = $row["destination_cid_name_prefix"]; $destination_hold_music = $row["destination_hold_music"]; + $destination_distinctive_ring = $row["destination_distinctive_ring"]; $destination_record = $row["destination_record"]; $destination_accountcode = $row["destination_accountcode"]; $destination_type_voice = $row["destination_type_voice"]; @@ -1381,7 +1402,7 @@ echo "\n"; } - if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) { + if (permission_exists("destination_hold_music") && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) { echo "\n"; echo "\n"; echo " ".$text['label-destination_hold_music']."\n"; @@ -1396,6 +1417,19 @@ echo "\n"; } + if (permission_exists("destination_distinctive_ring")) { + echo "\n"; + echo "\n"; + echo " ".$text['label-destination_distinctive_ring']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_distinctive_ring']." \n"; + echo "\n"; + echo "\n"; + } + if (permission_exists("destination_accountcode")) { echo "\n"; echo "\n";