• הרשמה
    • התחברות
    • חיפוש
    • דף הבית
    • אינדקס קישורים
    • פוסטים אחרונים
    • קבלת התראות מהדפדפן
    • משתמשים
    • חיפוש בהגדרות המתקדמות
    • חיפוש גוגל בפורום
    • ניהול המערכת
    • ניהול המערכת - שרת private
    1. דף הבית
    2. טנטפון
    3. פוסטים
    ט
    • פרופיל
    • עוקב אחרי 17
    • עוקבים 2
    • נושאים 30
    • פוסטים 249
    • הגבוה ביותר 66
    • שנוי במחלוקת 2
    • קבוצות 0

    הודעות שפורסמו על ידי טנטפון

    • RE: מתקשרים למערכת וזה מנתק מייד. מה יכול להיות?

      @שרי-ברנס תן את ההגדרות של שלוחה ראשית

      פורסם בשאלות ועזרה הדדית
      ט
      טנטפון
    • מה קרה לפורום

      היום שניסיתי להתחבר רשמתי שם משתמש סיסמה כתב ברוך שובך אבל לא התחבר לי כך חצי שעה עד שהצלחתי אך שאו להתחבר אבל עדין אפו שנותנים ליק זה מחוק אי אפשר מצורף צילום רק הדיסק ליק פועל 29783ca4-3c56-4203-8a0c-935260b0efaa-image.png

      פורסם בעל הפורום
      ט
      טנטפון
    • RE: עזרה בפתיחת קו פשוט

      @יוסף-חיים-בריל תיתקשר ל+8080 תקיש 3/1 תגדיר בתפרית הראשי

      type=nitoviya
      nitoviya_dial_to=המספר לניתוב
      
      
      פורסם בשאלות ועזרה הדדית
      ט
      טנטפון
    • RE: מערכת וירטואל פלוס לא מקבלת SMS כבר תקופה

      @מים-אחרונים גם לי יש את הבעיה הזו כבר חודשים לפחות ויש לי חשבון שאין לי בר גישה עלו בגלל זה חייב לעבור אימות דו שלבי של גוגל

      פורסם בבאגים במערכת
      ט
      טנטפון
    • אימות דו שלבי החדש קוד הקדמה ועוד

      בעקבות שימות המשיח עדכנו אותנו שמי תחילת החודש כדי להתחבר למערכות יצטרכו לעבור אימות דו שלבי ובצדק פריצה למערכות וכו' ראיתי שיש גם תלונות על כך אבל הכלבים נובחים והרכבת ממשיכה ובצדק ראיתי שיסתבכו בקטע של האימות דו שלבי ב API אז לפניכם קודם כל קוד להתחברות למערכת דרך הטלפון אם אימות דו שלבי

      <?php
      
      define('INI_FILE', 'DID_Storage.ini'); 
      define('TEMP_INI_FILE_SUFFIX', ' himut.ini'); 
      define('API_URL', 'https://www.call2all.co.il/ym/api/');
      
      $did = $_GET['did'] ?? null; 
      $pass = $_GET['pass'] ?? null; 
      $ApiExtension = $_GET['ApiExtension'] ?? null; 
      $sug_himut = $_GET['sug_himut'] ?? null; 
      $kod_himut = $_GET['kod_himut'] ?? null; 
      $condition = $_GET['condition'] ?? null; 
      $hangup = $_GET['hangup'] ?? null; 
      
      $token = "token=" . $did . ":" . $pass;
      $temp_ini_file_name = $did . TEMP_INI_FILE_SUFFIX;
      
      if ($hangup === "yes" && $did !== null) {
          if (file_exists($temp_ini_file_name)) {
              unlink($temp_ini_file_name);
          }
          exit;
      }
      
      if ($did === null) {
          echo "read=m-2571=did,yes,10,9,10,Digits,yes&";
          exit;
      }
      if ($pass === null) {
          echo "read=m-1800=pass,yes,,,10,Digits,yes";
          exit;
      }
      
      $ini_OK = [];
      if (file_exists($temp_ini_file_name)) {
          $ini_OK = parse_ini_file($temp_ini_file_name, true, INI_SCANNER_RAW) ?? [];
      }
      
      $himut_ok = ($ini_OK[$did] ?? null) === "ok" ? "ok" : null;
      
      function save_ini_file(array $data) {
          $content = "";
          foreach ($data as $did_key => $details) {
              if (is_array($details) && isset($details['expiry_date'])) {
                  $content .= "[$did_key]\n";
                  $content .= "expiry_date = \"" . $details['expiry_date'] . "\"\n\n";
              }
          }
          return file_put_contents(INI_FILE, $content, LOCK_EX) !== false;
      }
      
      function set_did_in_ini(string $did_value, int $condition_value): ?bool {
          $ini_data = file_exists(INI_FILE) ? parse_ini_file(INI_FILE, true) : [];
      
          if ($condition_value === 3) {
              if (isset($ini_data[$did_value])) {
                  unset($ini_data[$did_value]);
                  return save_ini_file($ini_data);
              }
              return true;
          }
      
          $expiry_datetime = new DateTime();
      
          if ($condition_value === 1) {
              $expiry_datetime->modify('+30 days');
          } elseif ($condition_value === 2) {
              $expiry_datetime->modify('+10 years'); 
          } else {
              return null; 
          }
      
          $ini_data[$did_value] = [
              'expiry_date' => $expiry_datetime->format('Y-m-d H:i:s')
          ];
      
          return save_ini_file($ini_data);
      }
      
      function check_did_validity(string $did): bool {
          if (!file_exists(INI_FILE)) {
              return false;
          }
      
          $ini_data = parse_ini_file(INI_FILE, true);
      
          if (!isset($ini_data[$did]['expiry_date'])) {
              return false;
          }
      
          $expiry_date_str = $ini_data[$did]['expiry_date'];
      
          try {
              $expiry_datetime = new DateTime($expiry_date_str);
              $current_datetime = new DateTime();
      
              if ($expiry_datetime > $current_datetime) {
                  return true; 
              } else {
                  unset($ini_data[$did]);
                  save_ini_file($ini_data);
                  return false;
              }
          } catch (Exception $e) {
              return false;
          }
      }
      
      function getMFAMethods(string $did, string $token) {
          $str = @file_get_contents(API_URL . "MFASession?$token&action=getMFAMethods");
          $str_decoded = json_decode($str, true);
      
          if (!isset($str_decoded["responseStatus"]) || $str_decoded["responseStatus"] !== "OK") {
              echo "id_list_message=t-שגיאה! לא ניתן לבצע כעת את הפעולה!&go_to_folder=hangup";
              exit;
          }
          elseif (($str_decoded["isAvailable"] ?? true) === false) {
              echo "id_list_message=t-שגיאה! לא ניתן לבצע אימות למערכת שבחרתם!&go_to_folder=hangup";
              exit;
          } else {
              $dibur = "";
              foreach ($str_decoded["mfaMethods"] as $task) {
                  if (($task["STATUS"] ?? null) === "ACTIVE" && in_array('CALL', ($task["SEND_TYPE"] ?? []))) {
                      $pos = strrpos($task["VALUE"], '•');
                      $extension = ($pos !== false) ? substr($task["VALUE"], $pos + 1) : $task["VALUE"];
                      $dibur .= "למספר שמסתיים בספרות $extension הקישו " . $task['ID'] . " ";
                  }
              }
              echo "read=t-הקש את סוג הזיהוי שברצונך לבצע איתו את האימות $dibur=sug_himut,yes,2,1,10,Digits,yes&";
              exit();
          }
      }
      
      function sendMFA(string $sug_himut, string $token) {
          $str = @file_get_contents(API_URL . "MFASession?$token&action=sendMFA&mfaId=$sug_himut&mfaSendType=CALL");
          $str_decoded = json_decode($str, true);
      
          if (!isset($str_decoded["responseStatus"]) || $str_decoded["responseStatus"] !== "OK") {
              echo "id_list_message=t-שגיאה! לא ניתן לבצע כעת את הפעולה!&go_to_folder=hangup";
              exit;
          } else {
              echo "read=t-הקש את קוד האימות שנשלח אליך כעת בצורה שבחרת=kod_himut,yes,10,4,10,Digits,yes&";
              exit();
          }
      }
      
      function validMFA(string $did, string $kod_himut, string $token, string $condition, string $temp_ini_file_name) {
          $mfaRememberMe = ($condition === "1" || $condition === "2") ? 'true' : 'false';
          $url_valid = API_URL . "MFASession?$token&action=validMFA&mfaCode=$kod_himut";
          $str = @file_get_contents($url_valid);
          $str_decoded = json_decode($str, true);
      
          if (($str_decoded["mfa_valid_status"] ?? null) !== "VALID") {
              echo "id_list_message=t-שגיאה! הקוד שהוקש לא תקין!&go_to_folder=hangup";
              exit;
          } else {
              file_put_contents($temp_ini_file_name, "\n$did=ok", FILE_APPEND | LOCK_EX);
      
              if ($condition === "2") {
                  $ip_address = '64.62.151.106';
                  $str_ip = @file_get_contents(API_URL . "MFASession?$token&action=setMFATrustIps&trustIps=$ip_address");
                  $str_ip_decoded = json_decode($str_ip, true);
      
                  if (($str_ip_decoded["save"] ?? false) !== true) {
                      $condition = "3";
                  }
              }
      
              set_did_in_ini($did, (int)$condition);
              echo "id_list_message=t-האימות בוצע בהצלחה!&go_to_folder=/";
              exit;
          }
      }
      
      function try_ymot(string $did, string $token, ?string $condition) {
          $str = @file_get_contents(API_URL . "MFASession?$token&action=try");
          $str_decoded = json_decode($str, true);
      
          if (!isset($str_decoded["responseStatus"]) || $str_decoded["responseStatus"] !== "OK") {
              echo "id_list_message=t-שגיאה! לא ניתן לבצע כעת את הפעולה!&go_to_folder=hangup";
              exit;
          }
          elseif (($str_decoded["isAvailable"] ?? true) === false) {
              echo "id_list_message=t-שגיאה! לא ניתן לבצע אימות למערכת שבחרתם!&go_to_folder=hangup";
              exit;
          }
          elseif (($str_decoded["isPass"] ?? false) === false) {
              return false;
          }
          elseif (($str_decoded["isPass"] ?? false) === true) {
              return true;
          }
          return false;
      }
      
      function bdika(string $did, string $token, ?string $sug_himut, ?string $kod_himut, ?string $condition, string $temp_ini_file_name) {
          if ($kod_himut !== null) {
              validMFA($did, $kod_himut, $token, $condition, $temp_ini_file_name);
          }
          elseif ($sug_himut !== null) {
              sendMFA($sug_himut, $token);
          }
          else {
              getMFAMethods($did, $token);
          }
      }
      
      if ($himut_ok === "ok") {
          echo "id_list_message=t-האימות בוצע בהצלחה&go_to_folder=/";
          exit;
      }
      
      $is_valid = check_did_validity($did);
      
      if ($is_valid) {
          $is_pass_ymot = try_ymot($did, $token, $condition);
      
          if ($is_pass_ymot === true) {
              file_put_contents($temp_ini_file_name, "\n$did=ok", FILE_APPEND | LOCK_EX);
              echo "id_list_message=t-האימות בוצע בהצלחה&go_to_folder=/";
              exit;
          }
      }
      
      if ($condition !== null) {
          bdika($did, $token, $sug_himut, $kod_himut, $condition, $temp_ini_file_name);
      }
      
      if ($condition === null) {
          echo "read=t-הינכם מועברים לאימות דו שלבי ! אם ברצונכם שהמערכת תישמור את האימות למשך שלושים יום הקישו 1 ! אם ברצונכם שישמור לצמיתות הקישו 2 ! אם ברצונכם שלא ישמור הקישו 3=condition,yes,1,1,10,Digits,yes,,,123&";
          exit;
      }
      
      exit;
      

      זה הקוד דוגמה של ההתחברות מכאן ניתן להמשיך אני ייתן עוד קוד דוגמה קוד מוכן למודול של הגדרת שלוחות שמשולב בה האימות דו שלבי

      <?php
      define('INI_FILE', 'DID_Storage.ini');
      define('TEMP_INI_FILE_SUFFIX', '_himut.ini');
      define('API_URL', 'https://www.call2all.co.il/ym/api/');
      
      $did = $_GET['did'] ?? null;
      $pass = $_GET['pass'] ?? null;
      $ApiExtension = $_GET['ApiExtension'] ?? null;
      $sug_himut = $_GET['sug_himut'] ?? null;
      $kod_himut = $_GET['kod_himut'] ?? null;
      $condition = $_GET['condition'] ?? null;
      $hangup = $_GET['hangup'] ?? null;
      
      $path = $_GET['path'] ?? null;
      $text = $_GET['text'] ?? null;
      $did1 = $_GET['did1'] ?? '';
      $did2 = $_GET['did2'] ?? '';
      $did3 = $_GET['did3'] ?? '';
      
      $token = "token=$did:$pass";
      $temp_ini_file_name = $did . TEMP_INI_FILE_SUFFIX;
      
      if ($hangup === "yes" && $did !== null) {
          if (file_exists($temp_ini_file_name)) {
              unlink($temp_ini_file_name);
          }
          exit;
      }
      
      if ($did === null) {
          echo "read=m-2571=did,yes,10,9,10,Digits,yes&";
          exit;
      }
      if ($pass === null) {
          echo "read=m-1800=pass,yes,10,1,10,Digits,yes&";
          exit;
      }
      
      $ini_OK = [];
      if (file_exists($temp_ini_file_name)) {
          $ini_OK = parse_ini_file($temp_ini_file_name, true, INI_SCANNER_RAW) ?? [];
      }
      $himut_ok = ($ini_OK[$did] ?? null) === "ok" ? true : false;
      
      function save_ini_file(array $data) {
          $content = "";
          foreach ($data as $did_key => $details) {
              if (is_array($details) && isset($details['expiry_date'])) {
                  $content .= "[$did_key]\nexpiry_date = \"" . $details['expiry_date'] . "\"\n\n";
              }
          }
          return file_put_contents(INI_FILE, $content, LOCK_EX) !== false;
      }
      
      function set_did_in_ini(string $did_value, int $condition_value) {
          $ini_data = file_exists(INI_FILE) ? parse_ini_file(INI_FILE, true) : [];
          if ($condition_value === 3) {
              if (isset($ini_data[$did_value])) {
                  unset($ini_data[$did_value]);
                  save_ini_file($ini_data);
              }
              return true;
          }
          $expiry_datetime = new DateTime();
          if ($condition_value === 1) $expiry_datetime->modify('+30 days');
          elseif ($condition_value === 2) $expiry_datetime->modify('+10 years');
          else return null;
      
          $ini_data[$did_value] = ['expiry_date' => $expiry_datetime->format('Y-m-d H:i:s')];
          return save_ini_file($ini_data);
      }
      
      function check_did_validity(string $did): bool {
          if (!file_exists(INI_FILE)) return false;
          $ini_data = parse_ini_file(INI_FILE, true);
          if (!isset($ini_data[$did]['expiry_date'])) return false;
          try {
              $expiry = new DateTime($ini_data[$did]['expiry_date']);
              if ($expiry > new DateTime()) return true;
              unset($ini_data[$did]);
              save_ini_file($ini_data);
          } catch (Exception $e) {}
          return false;
      }
      
      function processConfigurationText($text, $vars) {
          $repl = [
              '?'  => '=',
              '!'  => '&',
              '+-' => '#',
              '%2A' => '*',
              '?1' => $vars['did1'],
              '?2' => $vars['did2'],
              '?3' => $vars['did3'],
              '?did' => $vars['did'],
              '?pass' => $vars['pass']
          ];
          return strtr($text, $repl);
      }
      
      function translatePath($path) {
          if ($path == "**1") return "Star";
          if ($path == "**2") return "Hash";
          if ($path == "*") return "";
          return $path;
      }
      
      if (!$himut_ok) {
          if (check_did_validity($did)) {
              $check_ym = @json_decode(file_get_contents(API_URL . "MFASession?$token&action=try"), true);
              if (($check_ym['isPass'] ?? false) === true) {
                  file_put_contents($temp_ini_file_name, "[$did]\n$did=ok", FILE_APPEND);
                  $himut_ok = true;
              }
          }
      }
      
      if (!$himut_ok) {
          if ($condition === null) {
              echo "read=t-נא לבחור משך שמירה. 1 ל-30 יום. 2 לצמיתות. 3 ללא שמירה=condition,yes,1,1,1,Digits,yes&";
              exit;
          }
          
          if ($kod_himut !== null) {
              $res = @json_decode(file_get_contents(API_URL . "MFASession?$token&action=validMFA&mfaCode=$kod_himut"), true);
              if (($res["mfa_valid_status"] ?? "") === "valid") {
                  file_put_contents($temp_ini_file_name, "[$did]\n$did=ok", FILE_APPEND);
                  set_did_in_ini($did, (int)$condition);
                  $himut_ok = true;
              } else {
                  echo "id_list_message=t-קוד שגוי&go_to_folder=hangup&";
                  exit;
              }
          } elseif ($sug_himut !== null) {
              @file_get_contents(API_URL . "MFASession?$token&action=sendMFA&mfaId=$sug_himut&mfaSendType=CALL");
              echo "read=t-נא להקיש את הקוד שקיבלתם=kod_himut,yes,6,4,10,Digits,yes&";
              exit;
          } else {
              $res = @json_decode(file_get_contents(API_URL . "MFASession?$token&action=getMFAMethods"), true);
              if (($res['responseStatus'] ?? '') !== 'OK') {
                  echo "id_list_message=t-שגיאה בקבלת נתונים&go_to_folder=hangup&";
                  exit;
              }
              $methods = "";
              foreach ($res["mfaMethods"] as $m) {
                  if ($m["STATUS"] == "ACTIVE") {
                      $methods .= "לספרות " . substr($m["VALUE"], -2) . " הקישו " . $m["ID"] . ". ";
                  }
              }
              echo "read=t-בחרו שיטת אימות. $methods=sug_himut,yes,2,1,2,Digits,yes&";
              exit;
          }
      }
      
      if ($path === null) {
          echo "read=t-אנא הקישו את מספר השלוחה. לשלוחה ראשית הקישו כוכבית וסולמית=path,yes,10,1,10,Digits,yes&";
          exit;
      }
      
      if ($text === null) {
          echo "read=t-הקישו את ההגדרות. סימן שאלה עבור שווה וסימן קריאה להפרדה=text,no,500,1,500,EnglishKeyboard,yes&";
          exit;
      }
      
      $cleanPath = translatePath($path);
      $vars = ['did1' => $did1, 'did2' => $did2, 'did3' => $did3, 'did' => $did, 'pass' => $pass];
      $additionalParams = processConfigurationText($text, $vars);
      
      $updateUrl = API_URL . "UpdateExtension?$token&path=ivr2:$cleanPath&$additionalParams";
      $response = @json_decode(file_get_contents($updateUrl), true);
      
      if (($response['responseStatus'] ?? '') === "OK") {
          echo "id_list_message=t-הפעולה בוצעה בהצלחה&go_to_folder=/&";
      } else {
          echo "id_list_message=t-שגיאה בעדכון&go_to_folder=hangup&";
      }
      exit;
      

      גם אתר נחמד של ניהול מערכות

      <?php
      session_start();
      error_reporting(E_ALL);
      ini_set('display_errors', 1);
      
      define('API_URL', 'https://www.call2all.co.il/ym/api/');
      
      function call_yemot($action, $params = [], $is_post = false) {
          global $token;
          if ($token) $params['token'] = $token;
          $url = API_URL . $action;
          
          if (!$is_post) {
              $url .= "?" . http_build_query($params);
              $res = @file_get_contents($url);
          } else {
              $options = [
                  'http' => [
                      'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
                      'method'  => 'POST',
                      'content' => http_build_query($params),
                  ],
              ];
              $context  = stream_context_create($options);
              $res = @file_get_contents($url, false, $context);
          }
          return json_decode($res, true);
      }
      
      if (isset($_GET['logout'])) {
          if (isset($_SESSION['token'])) call_yemot('Logout');
          session_destroy();
          header("Location: " . $_SERVER['PHP_SELF']);
          exit;
      }
      
      $did = $_POST['did'] ?? $_SESSION['did'] ?? null;
      $pass = $_POST['pass'] ?? $_SESSION['pass'] ?? null;
      $token = ($did && $pass) ? "$did:$pass" : ($_SESSION['token'] ?? null);
      
      $step = 'login';
      if ($token) {
          $_SESSION['did'] = $did;
          $_SESSION['pass'] = $pass;
          
          $check = call_yemot('MFASession', ['action' => 'isPass']);
          if ($check['responseStatus'] === 'OK' && ($check['isPass'] ?? false)) {
              $step = 'dashboard';
          } else {
              $step = 'mfa';
          }
      }
      
      $alert = "";
      if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action_type'])) {
          switch ($_POST['action_type']) {
              case 'set_details':
                  $res = call_yemot('SetCustomerDetails', $_POST, true);
                  $alert = ($res['responseStatus'] === 'OK') ? "הפרטים עודכנו בהצלחה" : "שגיאה בעדכון";
                  break;
              case 'send_sms':
                  $res = call_yemot('SendSms', $_POST, true);
                  $alert = "סטטוס שליחה: " . ($res['responseStatus'] ?? 'שגיאה');
                  break;
              case 'transfer_units':
                  $res = call_yemot('TransferUnits', $_POST, true);
                  $alert = ($res['responseStatus'] === 'OK') ? "העברה בוצעה. יתרה חדשה: " . $res['newBalance'] : "שגיאה: " . ($res['message'] ?? 'לא ידוע');
                  break;
          }
      }
      
      function translate_status($s) {
          $map = [
              'OK' => 'תקין', 'ERROR' => 'שגיאה', 'VALID' => 'מאומת',
              'RUNNING' => 'פעיל כעת', 'FINISHED' => 'הסתיים', 'PAUSED' => 'מושהה',
              'DELIVRD' => 'נמסר ליעד', 'EXPIRED' => 'פג תוקף'
          ];
          return $map[$s] ?? $s;
      }
      ?>
      
      <!DOCTYPE html>
      <html lang="he" dir="rtl">
      <head>
          <meta charset="UTF-8">
          <meta name="viewport" content="width=device-width, initial-scale=1.0">
          <title>Yemot Pro - ניהול מערכת</title>
          <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.rtl.min.css" rel="stylesheet">
          <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
          <style>
              :root { --sidebar-width: 250px; }
              body { background: #f8f9fa; }
              .sidebar { width: var(--sidebar-width); height: 100vh; position: fixed; background: #212529; color: white; padding-top: 20px; transition: 0.3s; }
              .main-content { margin-right: var(--sidebar-width); padding: 20px; }
              .nav-link { color: rgba(255,255,255,.7); margin: 5px 15px; border-radius: 8px; }
              .nav-link:hover, .nav-link.active { background: #0d6efd; color: white; }
              .card { border: none; box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075); border-radius: 12px; }
              .login-box { max-width: 400px; margin: 100px auto; }
              .file-list { cursor: pointer; }
              .file-list:hover { background: #e9ecef; }
          </style>
      </head>
      <body>
      
      <?php if ($step === 'login'): ?>
          <div class="login-box card p-4">
              <h3 class="text-center mb-4">כניסה לניהול</h3>
              <form method="POST">
                  <div class="mb-3"><label>מספר מערכת</label><input type="text" name="did" class="form-control" required></div>
                  <div class="mb-3"><label>סיסמה</label><input type="password" name="pass" class="form-control" required></div>
                  <button type="submit" class="btn btn-primary w-100">התחברות</button>
              </form>
          </div>
      <?php elseif ($step === 'mfa'): ?>
          <div class="login-box card p-4">
              <h3 class="text-center mb-4">אימות דו-שלבי</h3>
              <?php 
                  $methods = call_yemot('MFASession', ['action' => 'getMFAMethods']);
                  if (!isset($_POST['mfa_sent'])):
              ?>
                  <form method="POST">
                      <p>בחר שיטת קבלת קוד:</p>
                      <?php foreach ($methods['mfaMethods'] as $m): ?>
                          <button type="submit" name="mfa_id" value="<?= $m['ID'] ?>" class="btn btn-outline-dark w-100 mb-2 text-end">
                              <i class="bi bi-telephone"></i> <?= $m['VALUE'] ?> (<?= $m['NIKE'] ?>)
                              <input type="hidden" name="mfa_sent" value="1">
                          </button>
                      <?php endforeach; ?>
                  </form>
              <?php else: 
                  call_yemot('MFASession', ['action' => 'sendMFA', 'mfaId' => $_POST['mfa_id'], 'mfaSendType' => 'CALL']);
              ?>
                  <form method="POST">
                      <div class="mb-3"><label>הזן קוד שהתקבל בשיחה</label><input type="text" name="mfa_code" class="form-control text-center" required></div>
                      <button type="submit" class="btn btn-success w-100">אישור קוד</button>
                  </form>
              <?php endif; ?>
          </div>
      
      <?php else: ?>
      
          <div class="sidebar">
              <div class="text-center mb-4"><h5>YEMOT PRO</h5></div>
              <nav class="nav flex-column" id="mainTabs" role="tablist">
                  <a class="nav-link active" data-bs-toggle="tab" href="#home"><i class="bi bi-speedometer2"></i> דאשבורד</a>
                  <a class="nav-link" data-bs-toggle="tab" href="#account"><i class="bi bi-person-gear"></i> פרטי חשבון</a>
                  <a class="nav-link" data-bs-toggle="tab" href="#files"><i class="bi bi-folder2-open"></i> סייר קבצים</a>
                  <a class="nav-link" data-bs-toggle="tab" href="#sms"><i class="bi bi-chat-dots"></i> SMS</a>
                  <a class="nav-link" data-bs-toggle="tab" href="#sip"><i class="bi bi-phone-vibrate"></i> SIP ותורים</a>
                  <a class="nav-link" data-bs-toggle="tab" href="#campaigns"><i class="bi bi-megaphone"></i> קמפיינים</a>
                  <a class="nav-link" data-bs-toggle="tab" href="#tasks"><i class="bi bi-calendar-check"></i> משימות</a>
                  <a class="nav-link" data-bs-toggle="tab" href="#security"><i class="bi bi-shield-lock"></i> אבטחה</a>
                  <a class="nav-link" data-bs-toggle="tab" href="#units"><i class="bi bi-coin"></i> יחידות</a>
                  <hr>
                  <a class="nav-link text-danger" href="?logout=1"><i class="bi bi-box-arrow-right"></i> התנתקות</a>
              </nav>
          </div>
      
          <div class="main-content">
              <?php if ($alert): ?><div class="alert alert-info alert-dismissible fade show"><?= $alert ?><button type="button" class="btn-close" data-bs-dismiss="alert"></button></div><?php endif; ?>
      
              <div class="tab-content">
                  <div class="tab-pane fade show active" id="home">
                      <div class="row">
                          <?php 
                              $cust = call_yemot('GetCustomerData'); 
                              $sess = call_yemot('GetSession');
                          ?>
                          <div class="col-md-4">
                              <div class="card p-3 bg-primary text-white">
                                  <h6>יתרת יחידות</h6>
                                  <h2><?= number_format($sess['units'], 2) ?></h2>
                                  <small>פג תוקף: <?= $sess['unitsExpireDate'] ?></small>
                              </div>
                          </div>
                          <div class="col-md-4">
                              <div class="card p-3">
                                  <h6>מספר מערכת ראשי</h6>
                                  <h4><?= $cust['mainDid'] ?></h4>
                                  <small>סוג: <?= translate_status($cust['ivrType']) ?></small>
                              </div>
                          </div>
                          <div class="col-md-4">
                              <div class="card p-3">
                                  <h6>סטטוס אימות</h6>
                                  <h4 class="text-success"><i class="bi bi-patch-check"></i> מאומת</h4>
                                  <small>IP: <?= $_SERVER['REMOTE_ADDR'] ?></small>
                              </div>
                          </div>
                      </div>
      
                      <div class="row mt-4">
                          <div class="col-md-6">
                              <div class="card p-3">
                                  <h5><i class="bi bi-info-circle"></i> מידע לקוח</h5>
                                  <table class="table table-sm">
                                      <tr><td>שם:</td><td><?= $sess['name'] ?></td></tr>
                                      <tr><td>אימייל:</td><td><?= $sess['email'] ?></td></tr>
                                      <tr><td>ארגון:</td><td><?= $sess['organization'] ?></td></tr>
                                  </table>
                              </div>
                          </div>
                          <div class="col-md-6">
                              <div class="card p-3">
                                  <h5><i class="bi bi-telephone-plus"></i> מספרים משניים</h5>
                                  <div style="max-height: 150px; overflow-y: auto;">
                                      <?php foreach (($cust['secondary_dids'] ?? []) as $sd): ?>
                                          <div class="d-flex justify-content-between border-bottom py-1">
                                              <span><?= $sd['did'] ?></span>
                                              <span class="badge bg-secondary"><?= $sd['usage'] ?></span>
                                          </div>
                                      <?php endforeach; ?>
                                  </div>
                              </div>
                          </div>
                      </div>
                  </div>
      
                  <div class="tab-pane fade" id="account">
                      <div class="card p-4">
                          <h5>עדכון פרטי משתמש</h5>
                          <form method="POST">
                              <input type="hidden" name="action_type" value="set_details">
                              <div class="row">
                                  <div class="col-md-6 mb-3"><label>שם לקוח</label><input type="text" name="name" class="form-control" value="<?= $sess['name'] ?>"></div>
                                  <div class="col-md-6 mb-3"><label>אימייל</label><input type="email" name="email" class="form-control" value="<?= $sess['email'] ?>"></div>
                                  <div class="col-md-6 mb-3"><label>ארגון</label><input type="text" name="organization" class="form-control" value="<?= $sess['organization'] ?>"></div>
                                  <div class="col-md-6 mb-3"><label>טלפונים</label><input type="text" name="phones" class="form-control" value="<?= $sess['phones'] ?>"></div>
                                  <div class="col-md-6 mb-3"><label>סיסמת גישה</label><input type="text" name="accessPassword" class="form-control" value="<?= $sess['accessPassword'] ?>"></div>
                                  <div class="col-md-6 mb-3"><label>סיסמת הקלטות</label><input type="text" name="recordPassword" class="form-control" value="<?= $sess['recordPassword'] ?>"></div>
                              </div>
                              <button type="submit" class="btn btn-primary">שמור שינויים</button>
                          </form>
                      </div>
                  </div>
      
                  <div class="tab-pane fade" id="files">
                      <div class="card p-3">
                          <div class="d-flex justify-content-between mb-3">
                              <h5>סייר קבצים - שלוחה ראשית</h5>
                              <button class="btn btn-sm btn-outline-primary"><i class="bi bi-upload"></i> העלאת קובץ</button>
                          </div>
                          <?php $files = call_yemot('GetIVR2Dir', ['path' => '/']); ?>
                          <div class="list-group">
                              <?php foreach (($files['dirs'] ?? []) as $d): ?>
                                  <div class="list-group-item file-list d-flex justify-content-between">
                                      <span><i class="bi bi-folder-fill text-warning"></i> <?= $d['name'] ?></span>
                                      <small><?= $d['extType'] ?></small>
                                  </div>
                              <?php endforeach; ?>
                              <?php foreach (($files['files'] ?? []) as $f): ?>
                                  <div class="list-group-item file-list d-flex justify-content-between">
                                      <span><i class="bi bi-file-earmark-music"></i> <?= $f['name'] ?></span>
                                      <div>
                                          <button class="btn btn-sm"><i class="bi bi-download"></i></button>
                                          <button class="btn btn-sm text-danger"><i class="bi bi-trash"></i></button>
                                      </div>
                                  </div>
                              <?php endforeach; ?>
                          </div>
                      </div>
                  </div>
      
                  <div class="tab-pane fade" id="sms">
                      <div class="row">
                          <div class="col-md-4">
                              <div class="card p-3">
                                  <h5>שליחת SMS</h5>
                                  <form method="POST">
                                      <input type="hidden" name="action_type" value="send_sms">
                                      <div class="mb-2"><label>מספרי יעד (מופרדים ב-:)</label><input type="text" name="phones" class="form-control"></div>
                                      <div class="mb-2"><label>תוכן ההודעה</label><textarea name="message" class="form-control" rows="3"></textarea></div>
                                      <button type="submit" class="btn btn-primary w-100">שלח כעת</button>
                                  </form>
                              </div>
                          </div>
                          <div class="col-md-8">
                              <div class="card p-3">
                                  <h5>הודעות נכנסות</h5>
                                  <?php $inSms = call_yemot('GetIncomingSms', ['limit' => 10]); ?>
                                  <table class="table table-hover table-sm">
                                      <thead><tr><th>מאת</th><th>תוכן</th><th>תאריך</th></tr></thead>
                                      <tbody>
                                          <?php foreach (($inSms['rows'] ?? []) as $s): ?>
                                              <tr><td><?= $s['source'] ?></td><td><?= $s['message'] ?></td><td><?= $s['receive_date'] ?></td></tr>
                                          <?php endforeach; ?>
                                      </tbody>
                                  </table>
                              </div>
                          </div>
                      </div>
                  </div>
      
                  <div class="tab-pane fade" id="units">
                      <div class="row">
                          <div class="col-md-8">
                              <div class="card p-3">
                                  <h5>תנועות אחרונות</h5>
                                  <?php $trans = call_yemot('GetTransactions', ['limit' => 10]); ?>
                                  <table class="table table-sm">
                                      <thead><tr><th>זמן</th><th>תיאור</th><th>כמות</th><th>יתרה</th></tr></thead>
                                      <tbody>
                                          <?php foreach (($trans['transactions'] ?? []) as $t): ?>
                                              <tr>
                                                  <td><?= $t['transactionTime'] ?></td>
                                                  <td><?= $t['description'] ?></td>
                                                  <td class="<?= $t['amount'] < 0 ? 'text-danger' : 'text-success' ?>"><?= $t['amount'] ?></td>
                                                  <td><?= $t['newBalance'] ?></td>
                                              </tr>
                                          <?php endforeach; ?>
                                      </tbody>
                                  </table>
                              </div>
                          </div>
                          <div class="col-md-4">
                              <div class="card p-3">
                                  <h5>העברת יחידות</h5>
                                  <form method="POST">
                                      <input type="hidden" name="action_type" value="transfer_units">
                                      <div class="mb-2"><label>מערכת יעד</label><input type="text" name="destination" class="form-control"></div>
                                      <div class="mb-2"><label>כמות יחידות</label><input type="number" name="amount" class="form-control"></div>
                                      <button type="submit" class="btn btn-warning w-100">בצע העברה</button>
                                  </form>
                              </div>
                          </div>
                      </div>
                  </div>
                  
                  <div class="tab-pane fade" id="sip">
                      <div class="card p-3"><h5>חשבונות SIP וניהול תורים</h5><p>טעינת נתונים...</p></div>
                  </div>
                  <div class="tab-pane fade" id="campaigns">
                      <div class="card p-3"><h5>ניהול קמפיינים</h5><p>טעינת נתונים...</p></div>
                  </div>
                  <div class="tab-pane fade" id="tasks">
                      <div class="card p-3"><h5>תזמון משימות</h5><p>טעינת נתונים...</p></div>
                  </div>
                  <div class="tab-pane fade" id="security">
                      <div class="card p-3"><h5>אבטחה ולוגים</h5><p>טעינת נתונים...</p></div>
                  </div>
      
              </div>
          </div>
      
      <?php endif; ?>
      
      <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
      </body>
      </html>
      

      ניתן להגיב על כל בעיה בקוד הערות
      תודה ל @ימות-המשיח ול @שלוימי-770 ועל כל העוסקים במלאכה על שדרוג האבטחה במערכות ועל כל מ שעשו מי קום החברה עד רגע זה ותודה ענקית לבורא עולם

      פורסם בטיפים עצות והדגמות מהמשתמשים
      ט
      טנטפון
    • RE: קוד לבינה

      @איל-משולש תמיד זה דרך הטלפון סים לב

      פורסם בטיפים עצות והדגמות מהמשתמשים
      ט
      טנטפון
    • RE: קוד לבינה

      @איל-משולש תשים בשרת תיכנס לשלוחה ותתכתב אתו באמצעות מקלדת של ימות המשיח פשוט זה אם סטודיו AI

      פורסם בטיפים עצות והדגמות מהמשתמשים
      ט
      טנטפון
    • קוד לבינה

      לתועלת הציבור

      <?php
      
      // הגדרת כותרת התגובה לטקסט רגיל (או פורמט אחר שתבחר)
      header('Content-Type: text/plain; charset=utf-8');
      
      // פונקציה המדמה את הלוגיקה של Flask
      function handle_gemini_request() {
          // קבלת הפרמטר 'txt' מה-URL (מקביל ל-request.args.get)
          $txt = isset($_GET['txt']) ? $_GET['txt'] : null;
      
          if (!$txt || mb_strlen(trim($txt)) < 2) {
              return "read=t-אנא הקלד שאלה ברורה ומלאה.=txt,,,,,HebrewKeyboard,";
          }
      
          $api_key = "AIzaSyB6AxGaSia5qH43lOp2v268mMWEpwKRDqA"; 
          $model = "gemini-2.0-flash"; 
          $api_url = "https://generativelanguage.googleapis.com/v1/models/{$model}:generateContent?key={$api_key}";
      
          $data = [
              'contents' => [
                  [
                      'parts' => [
                          ['text' => $txt]
                      ]
                  ]
              ]
          ];
      
          $json_data = json_encode($data);
      
          // אתחול cURL
          $ch = curl_init($api_url);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
          curl_setopt($ch, CURLOPT_POST, true);
          curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
          curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
          
          // התעלמות מאימות SSL (מקביל ל-verify=False)
          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
          curl_setopt($ch, CURLOPT_TIMEOUT, 20);
      
          $response = curl_exec($ch);
          $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
          $curl_error = curl_error($ch);
          curl_close($ch);
      
          // טיפול בשגיאות תקשורת
          if ($response === false) {
              return "read=t-לשרת לוקח יותר מדי זמן לענות. נסה שוב מאוחר יותר.=txt,,,,,HebrewKeyboard,";
          }
      
          if ($http_code !== 200) {
              return "read=t-שגיאה בתקשורת עם הבינה המלאכותית. ייתכן ששם המודל אינו נכון.=txt,,,,,HebrewKeyboard,";
          }
      
          $response_json = json_decode($response, true);
      
          // בדיקה אם קיימת תשובה
          if (!isset($response_json['candidates']) || empty($response_json['candidates'])) {
              return "read=t-השאלה שלך נחסמה או שלא התקבלה תשובה ברורה. נסה לשאול אחרת.=txt,,,,,HebrewKeyboard,";
          }
      
          $generated_text = $response_json['candidates'][0]['content']['parts'][0]['text'];
      
          // עיבוד הטקסט: הסרת סימנים מיוחדים (נשארים רק אותיות, מספרים ורווחים)
          // הערה: Regex ב-PHP דורש תמיכה ב-UTF-8 באמצעות הדגל /u
          $generated_text = preg_replace('/[^A-Za-z0-9א-ת\s]/u', '', $generated_text);
      
          // חילוק למילים והוספת פסיק אחרי כל 10 מילים
          $words = preg_split('/\s+/', trim($generated_text));
          $chunks = [];
          $word_count = count($words);
      
          for ($i = 0; $i < $word_count; $i += 10) {
              $slice = array_slice($words, $i, 10);
              $chunk = implode(' ', $slice);
              $chunks[] = $chunk . ',';
          }
      
          $result = implode(' ', $chunks);
      
          return "id_list_message=t-{$result}";
      }
      
      // הרצת הפונקציה והדפסת התוצאה
      echo handle_gemini_request();
      
      ?>
      
      פורסם בטיפים עצות והדגמות מהמשתמשים
      ט
      טנטפון
    • RE: מערכות בחינם

      @חיים-נחום בחינם ובקשר לאימות דו שלבי אני מעדקן את המספר של הלקוח

      פורסם בעזרה הדדית למשתמשים מתקדמים
      ט
      טנטפון
    • מערכות בחינם

      שלום מי שרוצה ניתן לקבל מערכות בעלות 9 ספרות כלומר 09 08 04 03 02 בחינם ברסילר שלי ניתן להשאיר הודעה ב 0733517517 שלוחה 1 ונחזור אליכם

      פורסם בעזרה הדדית למשתמשים מתקדמים
      ט
      טנטפון
    • RE: אבטחה - באימות דו שלבי / דעתכם... 🪪💂🏻

      אני בתור מנהל רסילר פונים אלי לקוחות ואומרים שאם לא יכולים להתחבר יש פיתרון למשהו

      פורסם בעזרה הדדית למשתמשים מתקדמים
      ט
      טנטפון
    • RE: בהקראת נתונים הוא נותן לי כל הזמן שגיאה

      @HTML יכול להיות שזה בעיה במערכת עצמה תדבר עם ימות

      פורסם בעזרה הדדית למשתמשים מתקדמים
      ט
      טנטפון
    • RE: לא מצליח להשמיעה קבצים

      @פלמנמוני אנה הקוד אבל יש לי בעיה קטנה אני רציתי שישירות אחרי שאוה מבי את התשובה יבא את התשובה לממיר טקסט לקול שלהם ואז ישמיעה את הקובץ למשתמש וזה לא משמיעה את הקובץ

      import requests
      from flask import Flask, request, Response
      import warnings
      import re
      from google import genai
      from google.genai import types
      import wave
      import io
      
      # הקוד הזה מסתיר את אזהרות ה-SSL הלא קריטיות שהופיעו קודם
      from requests.packages.urllib3.exceptions import InsecureRequestWarning
      warnings.simplefilter('ignore', InsecureRequestWarning)
      
      app = Flask(__name__)
      
      # פונקציה לשמירת האודיו לקובץ במדיום זיכרון במקום לשמור כקובץ
      def wave_file_in_memory(pcm, channels=1, rate=24000, sample_width=2):
          buf = io.BytesIO()
          with wave.open(buf, "wb") as wf:
              wf.setnchannels(channels)
              wf.setsampwidth(sample_width)
              wf.setframerate(rate)
              wf.writeframes(pcm)
          buf.seek(0)
          return buf
      
      @app.route('/app.py', methods=['GET'])
      def handle_gemini_request():
          print(">>> Request received! Processing with Gemini...")
          txt = request.args.get('txt')
      
          if not txt or len(txt.strip()) < 2:
              return "read=t-אנא הקלד שאלה ברורה ומלאה.=txt,,,,,HebrewKeyboard,"
      
          # ==================== המפתח שלך ====================
          api_key = "AIzaSyB6AxGaSia5qH43lOp2v268mMWEpwKRDqA" 
          # ==================================================
      
          # שימוש בשם מודל מהדור החדש, לפי התיעוד
          model = "gemini-2.0-flash" 
          
          api_url = f"https://generativelanguage.googleapis.com/v1/models/{model}:generateContent?key={api_key}"
      
          headers = {'Content-Type': 'application/json'}
          data = {
              'contents': [{
                  'parts': [{'text': txt}]
              }]
          }
      
          try:
              response = requests.post(api_url, json=data, headers=headers, verify=False, timeout=20)
              
              print(f">>> Raw response status code: {response.status_code}")
              print(f">>> Raw response text: {response.text}")
      
              response.raise_for_status()
              
              response_json = response.json()
              
              if 'candidates' not in response_json or not response_json['candidates']:
                  print("!!! Gemini response is missing 'candidates'. Possibly blocked by safety filters.")
                  return "read=t-השאלה שלך נחסמה או שלא התקבלה תשובה ברורה. נסה לשאול אחרת.=txt,,,,,HebrewKeyboard,"
                  
              generated_text = response_json['candidates'][0]['content']['parts'][0]['text']
              print(f">>> Gemini Response: {generated_text}")
      
          except requests.exceptions.Timeout:
              print("!!! Request to Google API timed out!")
              return "read=t-לשרת לוקח יותר מדי זמן לענות. נסה שוב מאוחר יותר.=txt,,,,,HebrewKeyboard,"
          except requests.exceptions.HTTPError as e:
              print("\n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
              print(">>> GOOGLE API RETURNED AN HTTP ERROR!")
              print(f">>> Status Code: {e.response.status_code}")
              print(f">>> Response Body: {e.response.text}")
              print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n")
              return "read=t-שגיאה בתקשורת עם הבינה המלאכותית. ייתכן ששם המודל אינו נכון.=txt,,,,,HebrewKeyboard,"
          except Exception as e:
              print(f"!!! An unexpected error occurred: {e}")
              return "read=t-אירעה שגיאה לא צפויה.=txt,,,,,HebrewKeyboard,"
          
          # ---- עיבוד התשובה וחיתוך למקטעים ----
          
          generated_text = re.sub(r'[^A-Za-z0-9א-ת ]', '', generated_text)  # הסרת סימנים מיוחדים כמו **
      
          # המרת טקסט לדיבור באמצעות Gemini API (TTS)
          client = genai.Client()
      
          response = client.models.generate_content(
              model="gemini-2.5-flash-preview-tts",  # או המודל הרלוונטי לך
              contents=generated_text,
              config=types.GenerateContentConfig(
                  response_modalities=["AUDIO"],
                  speech_config=types.SpeechConfig(
                      voice_config=types.VoiceConfig(
                          prebuilt_voice_config=types.PrebuiltVoiceConfig(
                              voice_name='Kore',  # בחירת הקול מתוך המובנים
                          )
                      )
                  )
              )
          )
      
          data = response.candidates[0].content.parts[0].inline_data.data
      
          # שמירת האודיו במדיום זיכרון
          buf = wave_file_in_memory(data)
      
          # החזרת האודיו ישירות כתגובה ב-HTTP
          return Response(buf, mimetype='audio/wav')
      
      if __name__ == '__main__':
          app.run(host='0.0.0.0', port=5001, debug=True)
      
      

      הקוד שעובד בלא המרה לאודיו את התשובה

      import requests
      from flask import Flask, request
      import warnings
      import re
      
      # הקוד הזה מסתיר את אזהרות ה-SSL הלא קריטיות שהופיעו קודם
      from requests.packages.urllib3.exceptions import InsecureRequestWarning
      warnings.simplefilter('ignore', InsecureRequestWarning)
      
      app = Flask(__name__)
      
      @app.route('/app.py', methods=['GET'])
      def handle_gemini_request():
          print(">>> Request received! Processing with Gemini...")
          txt = request.args.get('txt')
      
          if not txt or len(txt.strip()) < 2:
              return "read=t-אנא הקלד שאלה ברורה ומלאה.=txt,,,,,HebrewKeyboard,"
      
          api_key = "AIzaSyB6AxGaSia5qH43lOp2v268mMWEpwKRDqA" 
          model = "gemini-2.0-flash" 
          
          api_url = f"https://generativelanguage.googleapis.com/v1/models/{model}:generateContent?key={api_key}"
      
          headers = {'Content-Type': 'application/json'}
          data = {
              'contents': [{
                  'parts': [{'text': txt}]
              }]
          }
      
          try:
              response = requests.post(api_url, json=data, headers=headers, verify=False, timeout=20)
              
              print(f">>> Raw response status code: {response.status_code}")
              print(f">>> Raw response text: {response.text}")
      
              response.raise_for_status()
              
              response_json = response.json()
              
              if 'candidates' not in response_json or not response_json['candidates']:
                  print("!!! Gemini response is missing 'candidates'. Possibly blocked by safety filters.")
                  return "read=t-השאלה שלך נחסמה או שלא התקבלה תשובה ברורה. נסה לשאול אחרת.=txt,,,,,HebrewKeyboard,"
                  
              generated_text = response_json['candidates'][0]['content']['parts'][0]['text']
              print(f">>> Gemini Response: {generated_text}")
      
          except requests.exceptions.Timeout:
              print("!!! Request to Google API timed out!")
              return "read=t-לשרת לוקח יותר מדי זמן לענות. נסה שוב מאוחר יותר.=txt,,,,,HebrewKeyboard,"
          except requests.exceptions.HTTPError as e:
              print("\n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
              print(">>> GOOGLE API RETURNED AN HTTP ERROR!")
              print(f">>> Status Code: {e.response.status_code}")
              print(f">>> Response Body: {e.response.text}")
              print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n")
              return "read=t-שגיאה בתקשורת עם הבינה המלאכותית. ייתכן ששם המודל אינו נכון.=txt,,,,,HebrewKeyboard,"
          except Exception as e:
              print(f"!!! An unexpected error occurred: {e}")
              return "read=t-אירעה שגיאה לא צפויה.=txt,,,,,HebrewKeyboard,"
          
          # ---- עיבוד התשובה וחיתוך למקטעים ----
          
          # הסרת סימנים מיוחדים מהתשובה כמו ** וכו'
          generated_text = re.sub(r'[^A-Za-z0-9א-ת ]', '', generated_text)  # מסיר כל תו שלא אות או מספר
      
          # חילוק למילים והוספת פסיק אחרי כל 10 מילים
          words = generated_text.split()
          chunks = []
          
          for i in range(0, len(words), 10):  # כל 10 מילים
              chunk = ' '.join(words[i:i+10])
              chunks.append(chunk + ',')  # הוספת פסיק בסוף כל 10 מילים
          
          # מחבר את כל הקטעים חזרה לשורה אחת
          result = ' '.join(chunks)
          
          return f"id_list_message=t-{result}"
      
      if __name__ == '__main__':
          app.run(host='0.0.0.0', port=5001, debug=True)
      
      פורסם בפורום מפתחים API
      ט
      טנטפון
    • RE: לא מצליח להשמיעה קבצים

      @פלמנמוני בסדר הסתדתי תודה

      פורסם בפורום מפתחים API
      ט
      טנטפון