This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Цвета | |
| RED='\033[0;31m' | |
| NC='\033[0m' # No Color | |
| # IP первого сетевого интерфейса | |
| LOCAL_IP=$(ip -4 addr show | grep -oP '(?<=inet\s)\d+\.\d+\.\d+\.\d+' | grep -v '^127\.' | head -n 1) | |
| # Имя сервера |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| readonly connections=( | |
| '192.168.1.4/24|tcp|22' | |
| '192.168.1.5/24|tcp|53' | |
| '192.168.1.6/24|tcp|80' | |
| '192.168.1.7/24|tcp|139' | |
| '192.168.1.8/24|tcp|443' | |
| '192.168.1.9/24|tcp|445' | |
| '192.168.1.10/24|tcp|631' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env php | |
| <?php | |
| /*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
| * Скрипт для быстрого создания экстена | |
| * Требуется как минимум 1 аргумент - номер, второй аргумент может служить именем (описанием) | |
| * 2025-03-05 | |
| *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # --- | |
| # Save script as /var/lib/asterisk/bin/wav2mp3.sh and then: | |
| # chown asterisk:asterisk /var/lib/asterisk/bin/wav2mp3.sh | |
| # chmod +x /var/lib/asterisk/bin/wav2mp3.sh | |
| # --- | |
| # Configure FreePBX postrecording script as: /var/lib/asterisk/bin/wav2mp3.sh ^{CALLFILENAME} ^{UNIQUEID} | |
| # --- | |
| # ^{YEAR} ^{MONTH} ^{DAY} ^{CALLFILENAME} ^{MIXMON_FORMAT} ^{MIXMON_DIR} | |
| # Wait 7 seconds before we start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <gs_provision> | |
| <config version="2"> | |
| <item name="account.1"> | |
| <part name="name"></part> | |
| <part name="enable">Yes</part> | |
| </item> | |
| <item name="account.1.call.hidePassword"> | |
| <part name="length">0</part> | |
| </item> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/php -q | |
| <?php | |
| $today = date("Ymd"); | |
| file_get_contents('http://admin:password@192.168.10.210/default/en_US/ussd_info.html', false, stream_context_create([ | |
| 'http' => [ | |
| 'method' => 'POST', | |
| 'header' => "Content-type: application/x-www-form-urlencoded", | |
| 'content' => http_build_query([ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/php -q | |
| <?php | |
| require('phpagi.php'); | |
| $agi = new AGI(); | |
| $stdin = fopen('php://stdin', 'r'); | |
| $stdout = fopen('php://stdout', 'w'); | |
| //Caller's number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/php -q | |
| <?php | |
| require('phpagi.php'); | |
| $agi = new AGI(); | |
| $stdin = fopen('php://stdin', 'r'); | |
| $stdout = fopen('php://stdout', 'w'); | |
| /* | |
| Вынесем отправку в телеграм в отдельную функцию send, последний параметр укажем как необязательный т.к. для тестовых сообщений используются бесплатные прокси – без пароля | |
| */ | |
| function send($token, $chatid, $text){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: starfish | |
| become: yes | |
| vars: | |
| # Используйте это при первом запуске этого скрипта | |
| current_mysql_root_password: "" | |
| updated_mysql_root_password: "asterisk" | |
| current_mysql_asterisk_password: "" | |
| updated_mysql_asterisk_password: "asterisk" | |
| # Закомментируйте вышеизложенное после первого запуска |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: starfish | |
| become: yes | |
| vars: | |
| # Используйте это при первом запуске этого скрипта | |
| current_mysql_root_password: "" | |
| updated_mysql_root_password: "asterisk" | |
| current_mysql_asterisk_password: "" | |
| updated_mysql_asterisk_password: "asterisk" | |
| # Закомментируйте вышеизложенное после первого запуска |
NewerOlder