diff --git a/app/dialplan_outbound/app_config.php b/app/dialplan_outbound/app_config.php index 631f7f92b1..349c59d868 100644 --- a/app/dialplan_outbound/app_config.php +++ b/app/dialplan_outbound/app_config.php @@ -5,7 +5,7 @@ $apps[$x]['uuid'] = "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3"; $apps[$x]['category'] = "Switch"; $apps[$x]['subcategory'] = ""; - $apps[$x]['version'] = "1.0"; + $apps[$x]['version'] = "1.1"; $apps[$x]['license'] = "Mozilla Public License 1.1"; $apps[$x]['url'] = "http://www.fusionpbx.com"; $apps[$x]['description']['en-us'] = "Outbound dialplans have one or more conditions that are matched to attributes of a call. When a call matches the conditions the call is then routed to the gateway."; @@ -52,8 +52,9 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['description'] = "Add outbound routes for any gateways on any domain."; $y++; - $apps[$x]['permissions'][$y]['name'] = "outbound_route_pin_numbers"; + $apps[$x]['permissions'][$y]['name'] = "outbound_route_pin_number"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "outbound_route_pin_database"; + $y++; -?> diff --git a/app/dialplan_outbound/app_languages.php b/app/dialplan_outbound/app_languages.php index 8acf3b2beb..9bcc53c140 100644 --- a/app/dialplan_outbound/app_languages.php +++ b/app/dialplan_outbound/app_languages.php @@ -162,32 +162,59 @@ $text['label-toll_allow']['zh-cn'] = "通行费允许"; $text['label-toll_allow']['ja-jp'] = "有料通行許可"; $text['label-toll_allow']['ko-kr'] = "통행료 허용"; -$text['label-pin_numbers']['en-us'] = "PIN Numbers"; -$text['label-pin_numbers']['en-gb'] = "PIN Numbers"; -$text['label-pin_numbers']['ar-eg'] = "أرقام PIN"; -$text['label-pin_numbers']['de-at'] = "PIN-Nummern"; -$text['label-pin_numbers']['de-ch'] = "PIN-Nummern"; -$text['label-pin_numbers']['de-de'] = "PIN-Nummern"; -$text['label-pin_numbers']['el-gr'] = "Αριθμοί PIN"; -$text['label-pin_numbers']['es-cl'] = "Números de PIN"; -$text['label-pin_numbers']['es-mx'] = "Números de PIN"; -$text['label-pin_numbers']['fr-ca'] = "Numéros de pin"; -$text['label-pin_numbers']['fr-fr'] = "Numéros de pin"; -$text['label-pin_numbers']['he-il'] = "מספרים"; -$text['label-pin_numbers']['it-it'] = "PIN Numeri"; -$text['label-pin_numbers']['ka-ge'] = "PIN-კოდი"; -$text['label-pin_numbers']['nl-nl'] = "PIN code"; -$text['label-pin_numbers']['pl-pl'] = "Numer PIN"; -$text['label-pin_numbers']['pt-br'] = "Números de PIN"; -$text['label-pin_numbers']['pt-pt'] = "Números de PIN"; -$text['label-pin_numbers']['ro-ro'] = "Numerele PIN"; -$text['label-pin_numbers']['ru-ru'] = "числа"; -$text['label-pin_numbers']['sv-se'] = "PIN-nummer"; -$text['label-pin_numbers']['uk-ua'] = "PIN Кількість"; -$text['label-pin_numbers']['tr-tr'] = "PIN Numaraları"; -$text['label-pin_numbers']['zh-cn'] = "密码"; -$text['label-pin_numbers']['ja-jp'] = "PIN番号"; -$text['label-pin_numbers']['ko-kr'] = "PIN 번호"; +$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-Code"; +$text['label-pin_number']['de-ch'] = "PIN-Code"; +$text['label-pin_number']['de-de'] = "PIN-Code"; +$text['label-pin_number']['el-gr'] = "Αριθμός PIN"; +$text['label-pin_number']['es-cl'] = "Número PIN"; +$text['label-pin_number']['es-mx'] = "Número PIN"; +$text['label-pin_number']['fr-ca'] = "Numéro PIN"; +$text['label-pin_number']['fr-fr'] = "Numéro PIN"; +$text['label-pin_number']['he-il'] = "מספר PIN"; +$text['label-pin_number']['it-it'] = "Numero PIN"; +$text['label-pin_number']['ka-ge'] = "PIN კოდი"; +$text['label-pin_number']['nl-nl'] = "PIN-code"; +$text['label-pin_number']['pl-pl'] = "Numer PIN"; +$text['label-pin_number']['pt-br'] = "Número PIN"; +$text['label-pin_number']['pt-pt'] = "Número PIN"; +$text['label-pin_number']['ro-ro'] = "Număr PIN"; +$text['label-pin_number']['ru-ru'] = "PIN-код"; +$text['label-pin_number']['sv-se'] = "PIN-kod"; +$text['label-pin_number']['uk-ua'] = "PIN-код"; +$text['label-pin_number']['tr-tr'] = "PIN Numarası"; +$text['label-pin_number']['zh-cn'] = "PIN码"; +$text['label-pin_number']['ja-jp'] = "PIN番号"; +$text['label-pin_number']['ko-kr'] = "PIN 번호"; + +$text['label-pin_database']['en-us'] = "PIN Database"; +$text['label-pin_database']['en-gb'] = "PIN Database"; +$text['label-pin_database']['ar-eg'] = "قاعدة بيانات الرمز السري"; +$text['label-pin_database']['de-at'] = "PIN-Datenbank"; +$text['label-pin_database']['de-ch'] = "PIN-Datenbank"; +$text['label-pin_database']['de-de'] = "PIN-Datenbank"; +$text['label-pin_database']['el-gr'] = "Βάση Δεδομένων PIN"; +$text['label-pin_database']['es-cl'] = "Base de Datos de PIN"; +$text['label-pin_database']['es-mx'] = "Base de Datos de PIN"; +$text['label-pin_database']['fr-ca'] = "Base de données de PIN"; +$text['label-pin_database']['fr-fr'] = "Base de données de PIN"; +$text['label-pin_database']['he-il'] = "בסיס הנתונים של PIN"; +$text['label-pin_database']['it-it'] = "Database PIN"; +$text['label-pin_database']['ka-ge'] = "PIN-ის დათბობა"; +$text['label-pin_database']['nl-nl'] = "PIN-database"; +$text['label-pin_database']['pl-pl'] = "Baza danych PIN"; +$text['label-pin_database']['pt-br'] = "Banco de Dados de PIN"; +$text['label-pin_database']['pt-pt'] = "Base de Dados de PIN"; +$text['label-pin_database']['ro-ro'] = "Baza de date PIN"; +$text['label-pin_database']['ru-ru'] = "База данных PIN"; +$text['label-pin_database']['sv-se'] = "PIN-databas"; +$text['label-pin_database']['uk-ua'] = "База даних PIN"; +$text['label-pin_database']['tr-tr'] = "PIN Veritabanı"; +$text['label-pin_database']['zh-cn'] = "PIN数据库"; +$text['label-pin_database']['ja-jp'] = "PINデータベース"; +$text['label-pin_database']['ko-kr'] = "PIN 데이터베이스"; $text['label-sip-gateway']['en-us'] = "SIP Gateways"; $text['label-sip-gateway']['en-gb'] = "SIP Gateways"; @@ -1593,32 +1620,86 @@ $text['description-enabled']['zh-cn'] = "选择启用或禁用出站路由。"; $text['description-enabled']['ja-jp'] = "アウトバウンドルートを有効にするか無効にするかを選択します。"; $text['description-enabled']['ko-kr'] = "아웃바운드 경로를 활성화 또는 비활성화하도록 선택합니다."; -$text['description-enable-toll_allow']['en-us'] = "Set to true to enable toll allow"; -$text['description-enable-toll_allow']['en-gb'] = "Set to true to enable toll allow"; -$text['description-enable-toll_allow']['ar-eg'] = "أن تكون صحيحة للتمكين من السماح"; -$text['description-enable-toll_allow']['de-at'] = "Setzen Sie den Wert auf Ein, um kostenpflichtige Anrufe zu erlauben."; -$text['description-enable-toll_allow']['de-ch'] = "Setzen Sie den Wert auf Ein, um kostenpflichtige Anrufe zu erlauben."; -$text['description-enable-toll_allow']['de-de'] = "Setzen Sie den Wert auf Ein, um kostenpflichtige Anrufe zu erlauben."; -$text['description-enable-toll_allow']['el-gr'] = "Ορίστε το σε true για να ενεργοποιήσετε το δικαίωμα διοδίων"; -$text['description-enable-toll_allow']['es-cl'] = "Seleccione verdadero para activar permitir Tarifas Especiales"; -$text['description-enable-toll_allow']['es-mx'] = "Seleccione verdadero para activar permitir Tarifas Especiales"; -$text['description-enable-toll_allow']['fr-ca'] = "Choisir Oui pour activer droits"; -$text['description-enable-toll_allow']['fr-fr'] = "Choisir Oui pour activer droits"; -$text['description-enable-toll_allow']['he-il'] = "להגדיר את האמת כדי לאפשר"; -$text['description-enable-toll_allow']['it-it'] = "Imposta a Vero per attivare Destinazioni Abilitate"; -$text['description-enable-toll_allow']['ka-ge'] = "დააყენეთ ჭეშმარიტზე, რომ ჩაირთოს TOLL ნომრები"; -$text['description-enable-toll_allow']['nl-nl'] = "Kies aan om betaal gesprekken toe te staan."; -$text['description-enable-toll_allow']['pl-pl'] = "Wybierz TAK aby zezwolić na połaczenia specjalne (toll-free)."; -$text['description-enable-toll_allow']['pt-br'] = "scolha 'sim' para activar permissões"; -$text['description-enable-toll_allow']['pt-pt'] = "scolha 'sim' para activar permissões"; -$text['description-enable-toll_allow']['ro-ro'] = "Setați la adevărat pentru a activa permisiunea de taxare"; -$text['description-enable-toll_allow']['ru-ru'] = "Установите значение Да, чтобы разрешить ВСЕ"; -$text['description-enable-toll_allow']['sv-se'] = "Ändra till sann för att tillåta betalsamtal."; -$text['description-enable-toll_allow']['uk-ua'] = "Встановіть 'Так' щоб дозволити номери TOLL"; -$text['description-enable-toll_allow']['tr-tr'] = "Ücretli geçiş iznini etkinleştirmek için doğru olarak ayarlayın"; -$text['description-enable-toll_allow']['zh-cn'] = "设置为 true 以启用收费允许"; -$text['description-enable-toll_allow']['ja-jp'] = "有料通話許可を有効にするには true に設定します"; -$text['description-enable-toll_allow']['ko-kr'] = "통행료 허용을 활성화하려면 true로 설정하십시오."; +$text['description-toll_allow']['en-us'] = "Set to the toll allow name."; +$text['description-toll_allow']['en-gb'] = "Set to the toll allow name."; +$text['description-toll_allow']['ar-eg'] = "إعداد اسم السماح بالرسوم."; +$text['description-toll_allow']['de-at'] = "Hier den Namen für die Mautfreigabe eingeben."; +$text['description-toll_allow']['de-ch'] = "Hier den Namen für die Mautfreigabe eingeben."; +$text['description-toll_allow']['de-de'] = "Hier den Namen für die Mautfreigabe eingeben."; +$text['description-toll_allow']['el-gr'] = "Ορίστε το όνομα της άδειας χρεώσεων."; +$text['description-toll_allow']['es-cl'] = "Establezca el nombre de la autorización de peaje."; +$text['description-toll_allow']['es-mx'] = "Establezca el nombre de la autorización de peaje."; +$text['description-toll_allow']['fr-ca'] = "Définissez le nom de l'autorisation de péage."; +$text['description-toll_allow']['fr-fr'] = "Définissez le nom de l'autorisation de péage."; +$text['description-toll_allow']['he-il'] = "הגדר את שם הרשות למיסי דרכים."; +$text['description-toll_allow']['it-it'] = "Impostare il nome dell'autorizzazione pedaggio."; +$text['description-toll_allow']['ka-ge'] = "მაუტის ნებართვის სახელის დადგმა."; +$text['description-toll_allow']['nl-nl'] = "Stel de naam van de tolvrijstelling in."; +$text['description-toll_allow']['pl-pl'] = "Ustaw nazwę zezwolenia na opłaty autostradowe."; +$text['description-toll_allow']['pt-br'] = "Defina o nome da autorização de pedágio."; +$text['description-toll_allow']['pt-pt'] = "Defina o nome da autorização de portagem."; +$text['description-toll_allow']['ro-ro'] = "Setați numele autorizației de taxă de drum."; +$text['description-toll_allow']['ru-ru'] = "Установите имя разрешения на оплату платы за проезд."; +$text['description-toll_allow']['sv-se'] = "Ange namn på tillstånd för vägavgift."; +$text['description-toll_allow']['uk-ua'] = "Вкажіть ім'я дозволу на оплату мита."; +$text['description-toll_allow']['tr-tr'] = "Ücret izni adı ayarlanır."; +$text['description-toll_allow']['zh-cn'] = "设置通行费允许名称。"; +$text['description-toll_allow']['ja-jp'] = "通行料許可の名前を設定します。"; +$text['description-toll_allow']['ko-kr'] = "통행료 허용 이름을 설정하세요."; + +$text['description-pin_number']['en-us'] = "Require a PIN number."; +$text['description-pin_number']['en-gb'] = "Require a PIN number."; +$text['description-pin_number']['ar-eg'] = "يطلب رقم PIN."; +$text['description-pin_number']['de-at'] = "PIN-Nummer erforderlich."; +$text['description-pin_number']['de-ch'] = "PIN-Nummer erforderlich."; +$text['description-pin_number']['de-de'] = "PIN-Nummer erforderlich."; +$text['description-pin_number']['el-gr'] = "Απαιτείται κωδικός PIN."; +$text['description-pin_number']['es-cl'] = "Se requiere número PIN."; +$text['description-pin_number']['es-mx'] = "Se requiere número PIN."; +$text['description-pin_number']['fr-ca'] = "Un numéro de PIN est requis."; +$text['description-pin_number']['fr-fr'] = "Un numéro de PIN est requis."; +$text['description-pin_number']['he-il'] = "נדרש מספר PIN."; +$text['description-pin_number']['it-it'] = "È richiesto un numero PIN."; +$text['description-pin_number']['ka-ge'] = "პინ ნომრის მოთხოვნა."; +$text['description-pin_number']['nl-nl'] = "PIN-nummer vereist."; +$text['description-pin_number']['pl-pl'] = "Wymagany jest numer PIN."; +$text['description-pin_number']['pt-br'] = "Número PIN exigido."; +$text['description-pin_number']['pt-pt'] = "Número PIN exigido."; +$text['description-pin_number']['ro-ro'] = "Este necesară introducerea unui număr PIN."; +$text['description-pin_number']['ru-ru'] = "Требуется ввод PIN-кода."; +$text['description-pin_number']['sv-se'] = "PIN-nummer krävs."; +$text['description-pin_number']['uk-ua'] = "Вимагається введення PIN-коду."; +$text['description-pin_number']['tr-tr'] = "PIN numarası gereklidir."; +$text['description-pin_number']['zh-cn'] = "需要输入PIN号码。"; +$text['description-pin_number']['ja-jp'] = "PIN番号が必要です。"; +$text['description-pin_number']['ko-kr'] = "PIN 번호가 필요합니다."; + +$text['description-pin_database']['en-us'] = "Require a PIN Number from the database."; +$text['description-pin_database']['en-gb'] = "Require a PIN Number from the database."; +$text['description-pin_database']['ar-eg'] = "تطلب رقم PIN من قاعدة البيانات."; +$text['description-pin_database']['de-at'] = "PIN-Nummer aus der Datenbank anfordern."; +$text['description-pin_database']['de-ch'] = "PIN-Nummer aus der Datenbank anfordern."; +$text['description-pin_database']['de-de'] = "PIN-Nummer aus der Datenbank anfordern."; +$text['description-pin_database']['el-gr'] = "Απαιτείται κωδικός PIN από τη βάση δεδομένων."; +$text['description-pin_database']['es-cl'] = "Requiere un número de PIN desde la base de datos."; +$text['description-pin_database']['es-mx'] = "Requiere un número de PIN de la base de datos."; +$text['description-pin_database']['fr-ca'] = "Exiger un numéro de PIN de la base de données."; +$text['description-pin_database']['fr-fr'] = "Exiger un numéro de PIN depuis la base de données."; +$text['description-pin_database']['he-il'] = "דרוש מספר PIN מהבסיס הנתונים."; +$text['description-pin_database']['it-it'] = "Richiede un numero PIN dal database."; +$text['description-pin_database']['ka-ge'] = "დATABASE-დან PIN ნომრის მოთხოვნა."; +$text['description-pin_database']['nl-nl'] = "Vraag een PIN-nummer aan uit de database."; +$text['description-pin_database']['pl-pl'] = "Wymaga numeru PIN z bazy danych."; +$text['description-pin_database']['pt-br'] = "Exige um número de PIN do banco de dados."; +$text['description-pin_database']['pt-pt'] = "Exige um número PIN do banco de dados."; +$text['description-pin_database']['ro-ro'] = "Cerere un număr PIN din baza de date."; +$text['description-pin_database']['ru-ru'] = "Требуется PIN-код из базы данных."; +$text['description-pin_database']['sv-se'] = "Kräver ett PIN-nummer från databasen."; +$text['description-pin_database']['uk-ua'] = "Вимагає PIN-код з бази даних."; +$text['description-pin_database']['tr-tr'] = "Veritabanından bir PIN numarası gerektirir."; +$text['description-pin_database']['zh-cn'] = "要求从数据库中提供PIN号码."; +$text['description-pin_database']['ja-jp'] = "データベースからPIN番号を要求します。"; +$text['description-pin_database']['ko-kr'] = "데이터베이스에서 PIN 번호를 요구합니다."; $text['description-accountcode']['en-us'] = "Enter the accountcode."; $text['description-accountcode']['en-gb'] = "Enter the accountcode."; @@ -1647,4 +1728,3 @@ $text['description-accountcode']['zh-cn'] = "输入帐户代码。"; $text['description-accountcode']['ja-jp'] = "アカウントコードを入力します。"; $text['description-accountcode']['ko-kr'] = "계정코드를 입력하세요."; -?> diff --git a/app/dialplan_outbound/dialplan_outbound_add.php b/app/dialplan_outbound/dialplan_outbound_add.php index 90b9e9fbcd..b236a8a86c 100644 --- a/app/dialplan_outbound/dialplan_outbound_add.php +++ b/app/dialplan_outbound/dialplan_outbound_add.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-2025 + Portions created by the Initial Developer are Copyright (C) 2008-2026 the Initial Developer. All Rights Reserved. Contributor(s): @@ -71,9 +71,21 @@ $limit = $_POST["limit"] ?? ''; $accountcode = $_POST["accountcode"] ?? ''; $toll_allow = $_POST["toll_allow"] ?? ''; - $pin_numbers_enable = $_POST["pin_numbers_enabled"] ?? null; - $pin_numbers_enable = (empty($pin_numbers_enable) ? 'false' : 'true'); - $limit_enable = (empty($limit) ? 'false' : 'true'); + $pin_number = $_POST["pin_number"] ?? ''; + $pin_database = $_POST["pin_database"] ?? 'false'; + + //process the pin number + if (!empty($pin_number)) { + if ($pin_number == 'database') { + $pin_database = 'true'; + } + elseif (!is_numeric($pin_number)) { + $pin_number = ''; + } + } + + //determine the limit enable value + $limit_enable = (!empty($limit)) ? 'true' : 'false'; //set the default type $gateway_type = 'gateway'; @@ -760,29 +772,26 @@ $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true'; } - if ($pin_numbers_enable == "true") { - $y++; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_uuid'] = uuid(); - $array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'action'; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = 'set'; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_data'] = 'pin_number=database'; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $y * 10; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = '0'; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true'; - - $y++; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_uuid'] = uuid(); - $array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'action'; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = 'lua'; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_data'] = 'pin_number.lua'; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $y * 10; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = '0'; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true'; - } + $y++; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_uuid'] = uuid(); + $array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'action'; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = 'set'; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_data'] = ($pin_database == 'true') ? 'pin_number=database' : "pin_number=".$pin_number; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $y * 10; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = '0'; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = ($pin_database == 'true' || is_numeric($pin_number)) ? 'true' : 'false'; + $y++; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_uuid'] = uuid(); + $array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'action'; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = 'lua'; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_data'] = 'pin_number.lua'; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $y * 10; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = '0'; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = ($pin_database == 'true' || is_numeric($pin_number)) ? 'true' : 'false'; if (strlen($prefix_number) > 2) { $y++; @@ -797,13 +806,12 @@ $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true'; } - if ($gateway_type == "transfer") { $dialplan_detail_type = 'transfer'; } else { $dialplan_detail_type = 'bridge'; } $y++; $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_uuid'] = uuid(); $array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid; $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid; $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'action'; - $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = $dialplan_detail_type; + $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = ($gateway_type == "transfer") ? 'transfer' : 'bridge';; $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_data'] = $bridge_data; $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $y * 10; $array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = '0'; @@ -1307,20 +1315,20 @@ function type_onchange(dialplan_detail_type) { echo "\n"; echo " \n"; echo "
\n"; - echo $text['description-enable-toll_allow']."\n"; + echo $text['description-toll_allow']."\n"; echo "\n"; echo "\n"; - if (permission_exists('outbound_route_pin_numbers')) { + if (permission_exists('outbound_route_pin_database')) { echo "\n"; echo "\n"; - echo " ".$text['label-pin_numbers']."\n"; + echo " ".$text['label-pin_database']."\n"; echo "\n"; echo "\n"; if ($input_toggle_style_switch) { echo " \n"; } - echo " \n"; echo " \n"; echo " \n"; echo " \n"; @@ -1329,7 +1337,19 @@ function type_onchange(dialplan_detail_type) { echo " \n"; } echo "
\n"; - //echo $text['description-enable-pin_numbers']."\n"; + echo $text['description-pin_database']."\n"; + echo "\n"; + echo "\n"; + } + elseif (permission_exists('outbound_route_pin_number')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-pin_number']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-pin_number']."\n"; echo "\n"; echo "\n"; }