load-net

asterisk20-install

Feb 22nd, 2024 (edited)
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 59.83 KB | None | 0 0
  1. apt install mc -y
  2. ;;;; Если нету папки создаем
  3. mkdir /root/.ssh/
  4.  
  5. ;;;; Прописываем ключ доступа
  6. mcedit /root/.ssh/authorized_keys
  7. touch ~/.ssh/authorized_keys
  8.  
  9. echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxEF2/HTfPe1wWu7413uqRRCb76RIIUzWYmCUXm80WF+B7P1WLFFtdWhIrNnNgxxF+wB6cszFPoj4PFH6XzqqQEDx7TuZfISTwMfKcNQRM8ydZRg7uWOFNzlq2OPqP+QFNlw/5/oHUsmUU2grd6c4Efz1s8Cwa+zHhdVGNH4FdjVZGyNqPFThQUOx1knXKar5EFRKaMJwECZAF/w5gsiu9u3z/lJIWyEUIKPyK72gIMgR0RXJBYBJ9+tIJwj3jvGmo6ETI3KvfLUQdbj7kJQ2wgCK2jZkvRsV3NYdHUhGkJTCdUOfNlCAwwEPqf3adND6C7voFqwSfvVGtR9aocNCt rsa-key-20240202 >> ~/.ssh/authorized_keys
  10.  
  11. ;;;Убираем авторизацию по паролю;;;
  12.  
  13. sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
  14. systemctl restart ssh
  15.  
  16. ;;;;;;;ASTERISK INSTALL;;;;;;;;;;;;
  17.  
  18. cd /usr/src
  19. wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz
  20. tar xzvf asterisk-20-current.tar.gz
  21. cd asterisk-20.6.0/
  22. contrib/scripts/install_prereq install
  23. ./configure --with-pjproject-bundled
  24. make menuselect
  25. make -j4 && make install && make samples && make config && ldconfig
  26. ;Дадим права
  27. adduser --system --group --home /var/lib/asterisk --no-create-home --gecos "Asterisk" asterisk
  28. usermod -a -G dialout,audio asterisk
  29. chown -R asterisk: /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk
  30.  
  31.  
  32. ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  33. ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  34. ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  35. ./configure --libdir=/usr/lib64 --with-crypto --with-ssl=ssl --with-srtp --with-pjproject-bundled
  36. make menuselect
  37. make -j4 && make install && make samples && make config && ldconfig
  38. ;Дадим права
  39. adduser --system --group --home /usr/lib64/asterisk --no-create-home --gecos "Asterisk" asterisk
  40. usermod -a -G dialout,audio asterisk
  41. chown -R asterisk: /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk /home/load/rec
  42. ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  43. ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  44. ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  45.  
  46.  
  47.  
  48. sed -i 's/;runuser = asterisk/runuser = asterisk/' /etc/asterisk/asterisk.conf
  49. sed -i 's/;rungroup = asterisk/rungroup = asterisk/' /etc/asterisk/asterisk.conf
  50. sed -i '/^;\[radius\]/ s/^;//' /etc/asterisk/cdr.conf
  51. sed -i '/^;radiuscfg =>/ s/^;//' /etc/asterisk/cdr.conf
  52. sed -i '/^;full.log => n/ s/^;//' /etc/asterisk/logger.conf
  53.  
  54. systemctl enable asterisk
  55. systemctl stop asterisk && systemctl start asterisk && systemctl status asterisk
  56. asterisk -rvvvvvv
  57.  
  58. ;;;;Добавьте следующую строку в конец файла, чтобы при входе в терминал автоматически открывалась папка;;;;;
  59.  
  60. sed -i -e '$a\' -e 'cd /etc/asterisk/' ~/.bashrc
  61. export CDPATH="/etc/asterisk/"
  62.  
  63. --------------------------------------------
  64. ;;;;; Логи нужно архивировать а то закончится место на диске ;;;
  65.  
  66. apt install -y rsyslog
  67.  
  68. mcedit /etc/logrotate.d/rsyslog
  69.  
  70. /var/log/mail.log
  71. /var/log/daemon.log
  72. /var/log/kern.log
  73. /var/log/auth.log
  74. /var/log/user.log
  75. /var/log/lpr.log
  76. /var/log/cron.log
  77. /var/log/debug
  78. /var/log/alternatives.log
  79. /var/log/aptitude
  80. /var/log/auth.log
  81. /var/log/btmp
  82. /var/log/cron.log
  83. /var/log/crowdsec_api.log
  84. /var/log/crowdsec.log
  85. /var/log/dpkg.log
  86. /var/log/faillog
  87. /var/log/fontconfig.log
  88.  
  89.  
  90. /var/log/asterisk/queue_log
  91. /var/log/asterisk/messages.log
  92. /var/log/asterisk/full.log
  93.  
  94. {
  95. rotate 6
  96. size 20M
  97. missingok
  98. notifempty
  99. compress
  100. delaycompress
  101. sharedscripts
  102. postrotate
  103. /usr/lib/rsyslog/rsyslog-rotate
  104. endscript
  105. }
  106.  
  107.  
  108.  
  109.  
  110.  
  111. ------------------------------------------------------------------
  112. service rsyslog restart
  113. ------------------------------------------------------------------
  114.  
  115. crontab -e
  116.  
  117. * * * * * /usr/sbin/logrotate /etc/logrotate.conf
  118.  
  119. В конце нужно сделать дополнительную пустую строку
  120. -----------------------------------------------------------------
  121. tail -f /var/log/syslog | grep CRON
  122. -----------------------------------------------------------------
  123. ls -lh /var/log/syslog
  124.  
  125. ls -lh /var/log/asterisk/
  126.  
  127. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  128. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  146.  
  147.  
  148. --------------------------------------------
  149. apt install dirmngr ca-certificates software-properties-common apt-transport-https curl -y
  150.  
  151. wget https://mariadb.org/mariadb_release_signing_key.asc
  152. chmod -c 644 mariadb_release_signing_key.asc
  153. mv -vi mariadb_release_signing_key.asc /etc/apt/trusted.gpg.d/
  154.  
  155.  
  156. echo "deb [arch=amd64,arm64,ppc64el] \
  157. https://ftp.ubuntu-tw.org/mirror/mariadb/repo/11.3.1/debian \
  158. bookworm main" | tee /etc/apt/sources.list.d/mariadb.list
  159.  
  160. --------------------------------------------
  161.  
  162. apt update
  163. apt install mariadb-server -y
  164.  
  165.  
  166. mariadb --version
  167. systemctl start mariadb && systemctl enable mariadb && systemctl status mariadb
  168.  
  169. mysql_secure_installation
  170. jklmMkNnai6y7
  171.  
  172. ;;;; Будут спрашиват отвечай так ;;;;;
  173. Switch to unix_socket authentication [Y/n] y
  174. Change the root password? [Y/n] n
  175. Remove anonymous users? [Y/n] y
  176. Disallow root login remotely? [Y/n] n
  177. Remove test database and access to it? [Y/n] y
  178. Reload privilege tables now? [Y/n] y
  179.  
  180. Thanks for using MariaDB!
  181. ;;;; ------- ;;;;;
  182.  
  183. mysql -u root -p
  184. jklmMkNnai6y7
  185. SHOW DATABASES;
  186. EXIT;
  187.  
  188.  
  189. -----------------------------------------------------------------------------------
  190. -----------------------------------------------------------------------------------
  191. -----------------------------------------------------------------------------------
  192. -----------------------------------------------------------------------------------
  193.  
  194.  
  195. mysql
  196. CREATE USER 'load-mysql'@'localhost' IDENTIFIED BY '123456';
  197. GRANT ALL PRIVILEGES ON * . * TO 'load-mysql'@'localhost';
  198. FLUSH PRIVILEGES;
  199.  
  200. CREATE DATABASE asterisk DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
  201. GRANT ALL PRIVILEGES ON asterisk.* TO 'asterisk'@'localhost' IDENTIFIED BY 'sdfJHGVhj5g7jghjv$g';
  202. FLUSH PRIVILEGES;
  203.  
  204.  
  205.  
  206. use asterisk
  207. source /usr/src/asterisk-20.6.0/contrib/realtime/mysql/mysql_cdr.sql
  208. source /usr/src/asterisk-20.6.0/contrib/realtime/mysql/mysql_config.sql
  209.  
  210.  
  211. source /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_cdr.sql
  212. source /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_config.sql
  213.  
  214. mysql -u root -p
  215. jklmMkNnai6y7
  216. use asterisk
  217. SHOW TABLES;
  218.  
  219.  
  220.  
  221. psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_cdr.sql
  222. psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_config.sql
  223.  
  224. cdr_pgsql.so
  225. find / -name cdr_pgsql.so -print
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240. *************************************************************************************
  241. ***************postgresql**********************************
  242. ***************postgresql**********************************
  243. *************************************************************************************
  244. apt install -y mc
  245.  
  246. apt install -y odbc-postgresql unixodbc
  247. odbcinst -q -d
  248. odbcinst -q -d -n 'PostgreSQL Unicode'
  249.  
  250. mcedit /etc/odbcinst.ini
  251. mcedit /etc/odbc.ini
  252. mcedit /etc/asterisk/cdr_adaptive_odbc.conf
  253. mcedit /etc/asterisk/res_odbc.conf
  254. mcedit /etc/asterisk/cel_odbc.conf
  255. mcedit /etc/asterisk/cdr_odbc.conf
  256.  
  257.  
  258. mcedit /etc/odbcinst.ini
  259.  
  260. [PostgreSQL Unicode]
  261. Description=PostgreSQL ODBC driver (Unicode version)
  262. Debug=1
  263. CommLog=1
  264. Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
  265. Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
  266. Driver64 = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
  267. Setup64 = /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
  268. UsageCount = 2
  269.  
  270.  
  271. mcedit /etc/odbc.ini
  272. [mypostgresqldb]
  273. Description=My Postgresql sample database
  274. Driver=PostgreSQL Unicode
  275.  
  276. #Description = PostgreSQL database 1
  277. Driver = postgresql
  278. #CommLog = /tmp/sql.log
  279. Username = postgres
  280. Password = 1234566
  281. # Name of Server. IP or DNS
  282. Servername = 10.20.7.123
  283. # Database name
  284. Database = aster117
  285. # Postmaster listening port
  286. Port = 5432
  287. # Database is read only
  288. # Whether the datasource will allow updates.
  289. ReadOnly = No
  290. # PostgreSQL backend protocol
  291. # Note that when using SSL connections this setting is ignored.
  292. # 7.4+: Use the 7.4(V3) protocol. This is only compatible with 7.4 and higher backends.
  293. Protocol = 7.4+
  294. # Includes the OID in SQLColumns
  295. ShowOidColumn = No
  296. # Fakes a unique index on OID
  297. FakeOidIndex = No
  298. # Row Versioning
  299. # Allows applications to detect whether data has been modified by other users
  300. # while you are attempting to update a row.
  301. # It also speeds the update process since every single column does not need to be specified in the where clause to update a row.
  302. RowVersioning = No
  303. # Show SystemTables
  304. # The driver will treat system tables as regular tables in SQLTables. This is good for Access so you can see system tables.
  305. ShowSystemTables = No
  306. # If true, the driver automatically uses declare cursor/fetch to handle SELECT statements and keeps 100 rows in a cache.
  307. Fetch = Yes
  308. # Bools as Char
  309. # Bools are mapped to SQL_CHAR, otherwise to SQL_BIT.
  310. BoolsAsChar = Yes
  311. # SSL mode
  312. SSLmode = disable
  313. # Send to backend on connection
  314. ConnSettings =
  315.  
  316.  
  317. mcedit /etc/asterisk/cdr_adaptive_odbc.conf
  318. [mypostgresqldb]
  319. connection=aster117
  320. table=cdr
  321. loguniqueid=yes
  322. usegmtime=no
  323. alias start => calldate
  324. alias realdst => realdst
  325. alias remoteip => remoteip
  326. alias start => calldate
  327. alias hangupcause => hangupcause
  328. alias peerip => peerip
  329. alias recvip => recvip
  330. alias fromuri => fromuri
  331. alias useragent => useragent
  332. alias filename => filename
  333.  
  334.  
  335. mcedit /etc/asterisk/res_odbc.conf
  336. [ENV]
  337. [aster117]
  338. enabled=>yes
  339. dsn=>mypostgresqldb
  340. max_connections => 1
  341. pre-connect=>yes
  342. username=>postgres
  343. password=>1234566
  344. database=>aster117
  345.  
  346.  
  347.  
  348.  
  349. mcedit /etc/asterisk/cdr_odbc.conf
  350. [global]
  351. dsn=mypostgresqldb
  352. loguniqueid=yes
  353. dispositionstring=yes
  354. table=cdr
  355. usegmtime=no
  356. hrtime=yes
  357. newcdrcolumns=yes
  358. hrtime=yes
  359. username=postgres
  360. password=1234566
  361.  
  362. #####################################################################
  363.  
  364.  
  365.  
  366.  
  367. mcedit ~/.odbc.ini
  368.  
  369. [mypostgresqldb]
  370. Description=My Postgresql sample database
  371. Driver=PostgreSQL Unicode
  372.  
  373. #Description = PostgreSQL database 1
  374. Driver = postgresql
  375. #CommLog = /tmp/sql.log
  376. Username = postgres
  377. Password = 1234566
  378. # Name of Server. IP or DNS
  379. Servername = 10.20.7.123
  380. # Database name
  381. Database = postgres
  382. # Postmaster listening port
  383. Port = 5432
  384. # Database is read only
  385. # Whether the datasource will allow updates.
  386. ReadOnly = No
  387. # PostgreSQL backend protocol
  388. # Note that when using SSL connections this setting is ignored.
  389. # 7.4+: Use the 7.4(V3) protocol. This is only compatible with 7.4 and higher backends.
  390. Protocol = 7.4+
  391. # Includes the OID in SQLColumns
  392. ShowOidColumn = No
  393. # Fakes a unique index on OID
  394. FakeOidIndex = No
  395. # Row Versioning
  396. # Allows applications to detect whether data has been modified by other users
  397. # while you are attempting to update a row.
  398. # It also speeds the update process since every single column does not need to be specified in the where clause to update a row.
  399. RowVersioning = No
  400. # Show SystemTables
  401. # The driver will treat system tables as regular tables in SQLTables. This is good for Access so you can see system tables.
  402. ShowSystemTables = No
  403. # If true, the driver automatically uses declare cursor/fetch to handle SELECT statements and keeps 100 rows in a cache.
  404. Fetch = Yes
  405. # Bools as Char
  406. # Bools are mapped to SQL_CHAR, otherwise to SQL_BIT.
  407. BoolsAsChar = Yes
  408. # SSL mode
  409. SSLmode = disable
  410. # Send to backend on connection
  411. ConnSettings =
  412.  
  413.  
  414. #######################################################################################
  415. ########################################################################################
  416. ########################################################################################
  417.  
  418. echo "select 1" | isql -v mypostgresqldb postgres 1234566
  419.  
  420. #################Если нужно експортировать на удаленной тачке ###################
  421. apt install postgresql-client
  422. export PGPASSWORD=1234566
  423. psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_cdr.sql
  424. psql -h 10.20.7.123 -U postgres aster117 DROP TABLE IF EXISTS alembic_version;
  425. psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_config.sql
  426. psql -h 10.20.7.123 -U postgres aster117 DROP TABLE IF EXISTS alembic_version;
  427. psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_queue_log.sql
  428.  
  429. ########### Всех активных дроп
  430. SELECT pg_terminate_backend(pid)
  431. FROM pg_stat_activity
  432. WHERE datname = 'aster117';
  433. ######### Базу дроп
  434. DROP DATABASE IF EXISTS aster117;
  435. ########
  436. CREATE DATABASE aster117;
  437. #######################################################################################
  438. DROP TABLE IF EXISTS alembic_version;
  439. ########################################################################################
  440. ########################################################################################
  441.  
  442. *************************************************************************************
  443. systemctl stop asterisk && systemctl start asterisk && systemctl status asterisk
  444.  
  445.  
  446. mcedit /etc/odbcinst.ini
  447. mcedit /etc/odbc.ini
  448. mcedit /etc/asterisk/res_odbc.conf
  449. mcedit ~/.odbc.ini
  450.  
  451. mcedit /etc/asterisk/cdr_adaptive_odbc.conf
  452. mcedit /etc/asterisk/cdr_odbc.conf
  453. mcedit /etc/asterisk/extconfig.conf
  454. mcedit /etc/asterisk/sorcery.conf
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463. **************************************************************************************************************************************************************************
  464. **************************************************************************************************************************************************************************
  465. **************************************************************************************************************************************************************************
  466. **************************************************************************************************************************************************************************
  467. **************************************************************************************************************************************************************************
  468. **************************************************************************************************************************************************************************
  469. -----------------------------------------------------------------------------------
  470.  
  471. УСТАНОВКА phpmyadmin
  472. apt install phpmyadmin -y
  473. В процессе установки указать использование apach и пароль установить
  474. systemctl restart apache2
  475.  
  476. -----------------------------------------------------------------------------------------------------------
  477.  
  478. apt-get install -y unixodbc unixodbc-dev libcppdb-odbc0 odbcinst git checkinstall cmake build-essential libssl-dev cmake
  479.  
  480. Установка клиенткой библиотеки MariaDB
  481. Этот пакет необходим для сборки драйвера unixODBC. Он накладывается на libmariadb-dev, но предоставляет дополнительные заголовочные файлы, которые отсутствуют в Debian 10.
  482.  
  483. cd /usr/src/
  484. git clone https://github.com/load-net/mariadb-connector-odbc.git
  485.  
  486. cmake ../mariadb-connector-odbc/ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONC_WITH_UNIT_TESTS=Off -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_SSL=OPENSSL
  487. cmake --build . --config RelWithDebInfo
  488. make install
  489.  
  490.  
  491. mcedit /etc/odbcinst.ini
  492. mcedit /etc/odbc.ini
  493. mcedit /etc/asterisk/cdr_adaptive_odbc.conf
  494. mcedit /etc/asterisk/res_odbc.conf
  495. mcedit /etc/asterisk/cel_odbc.conf
  496. mcedit /etc/asterisk/cdr_odbc.conf
  497.  
  498.  
  499. ;;;;;; Ошибка [Feb 1 05:18:37] WARNING[104444]: res_odbc.c:1083 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmaodbc.so' : file not found
  500.  
  501.  
  502. ;;;;;;;;;;;;;;;;;;;;
  503. wget https://downloads.mariadb.com/Connectors/odbc/connector-odbc-2.0.10/linux_x64-connector-odbc/mariadb-connector-odbc-2.0.10-ga-linux-x86_64.tar.gz
  504. tar xzvf mariadb-connector-odbc-2.0.10-ga-linux-x86_64.tar.gz
  505. mv mariadb-connector-odbc-2.0.10-ga-linux-x86_64/lib64/libmaodbc.so /usr/lib64/
  506. ;;;;;;;;;;;;;;;;;;;;
  507.  
  508. mcedit /etc/odbcinst.ini
  509.  
  510.  
  511. [mariadb]
  512. Description = ODBC for MariaDB
  513. Driver = /usr/lib64/libmaodbc.so
  514.  
  515. odbcinst -q -d
  516.  
  517.  
  518. [MariaDB]
  519.  
  520. mcedit /etc/odbc.ini
  521.  
  522. [MariaDB-asteriskcdrdb]
  523. Description=MySQL connection to Asterisk
  524. Trace = Yes
  525. TraceFile = /tmp/odbc.log
  526. Driver=MariaDB
  527. Server=localhost
  528. User=asterisk
  529. Password=sdfJHGVhj5g7jghjv$g
  530. Database=asterisk
  531. Port=3306
  532. Socket=/var/run/mysqld/mysqld.sock
  533. Option=3
  534. Charset=utf8
  535.  
  536. Не забудьте изменить значения:
  537.  
  538. Server=localhost
  539. User=your_asterisk_user
  540. Password=your_asterisk_user_password
  541. Database=asteriskcdrdb
  542. на свои.
  543.  
  544. mcedit /etc/asterisk/cdr_adaptive_odbc.conf
  545.  
  546. [asterisk]
  547. connection=asterisk
  548. table=cdr
  549. loguniqueid=yes
  550. usegmtime=no
  551. alias start => calldate
  552. alias realdst => realdst
  553. alias remoteip => remoteip
  554. alias start => calldate
  555. alias hangupcause => hangupcause
  556. alias peerip => peerip
  557. alias recvip => recvip
  558. alias fromuri => fromuri
  559. alias useragent => useragent
  560. alias filename => filename
  561.  
  562. mcedit /etc/asterisk/res_odbc.conf
  563.  
  564. [ENV]
  565. [asterisk]
  566. enabled=>yes
  567. dsn=>MariaDB-asteriskcdrdb
  568. ;pooling=>no
  569. ;limit=>1
  570. pre-connect=>yes
  571. username=>asterisk
  572. password=>sdfJHGVhj5g7jghjv$g
  573.  
  574. Не забудьте изменить значения:
  575.  
  576. username=your_asterisk_user
  577. password=your_asterisk_user_password
  578. на свои.
  579.  
  580. mcedit /etc/asterisk/cel_odbc.conf
  581. [cel]
  582. connection=asterisk
  583. loguniqueid=yes
  584. table=cel
  585.  
  586. mcedit /etc/asterisk/cdr_odbc.conf
  587. [global]
  588. dsn=MariaDB-asteriskcdrdb
  589. loguniqueid=yes
  590. dispositionstring=yes
  591. table=cdr
  592. usegmtime=no
  593. hrtime=yes
  594. newcdrcolumns=yes
  595. hrtime=yes
  596. username=asterisk
  597. password=sdfJHGVhj5g7jghjv$g
  598.  
  599. mcedit /etc/asterisk/extconfig.conf
  600.  
  601. [settings]
  602.  
  603. ps_aors => odbc,aster117
  604. ps_asterisk_publications => odbc,aster117
  605. ps_auths => odbc,aster117
  606. ps_contacts => odbc,aster117
  607. ps_domain_aliases => odbc,aster117
  608. ps_endpoint_id_ips => odbc,aster117
  609. ps_endpoints => odbc,aster117
  610. ps_globals => odbc,aster117
  611. ps_inbound_publications => odbc,aster117
  612. ps_outbound_publishes => odbc,aster117
  613. ps_registrations => odbc,aster117
  614. ps_transports => odbc,aster117
  615. queues => odbc,aster117
  616. queue_members => odbc,aster117
  617. queue_log => odbc,aster117
  618. musiconhold => odbc,aster117;
  619. musiconhold_entry => odbc,aster117
  620.  
  621.  
  622.  
  623. #########################################
  624. #########################################
  625. #########################################
  626.  
  627. mysql -u root -p
  628. jklmMkNnai6y7
  629. use asterisk
  630.  
  631. -----------------------------------------------------------------------------------
  632. **************************************************************************************************************************************************************************
  633. **************************************************************************************************************************************************************************
  634. **************************************************************************************************************************************************************************
  635. **************************************************************************************************************************************************************************
  636. **************************************************************************************************************************************************************************
  637. **************************************************************************************************************************************************************************
  638.  
  639.  
  640. INSERT INTO ps_aors (id, max_contacts) VALUES (103, 1);
  641. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (103, 'userpass', 'd103', 103);
  642. INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media) VALUES (103, 'transport-udp-nat', '103', '103', 'from-internal', 'all', 'alaw', 'no');
  643.  
  644. INSERT INTO ps_aors (id, max_contacts) VALUES (104, 1);
  645. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (104, 'userpass', 'd104', 104);
  646. INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media) VALUES (104, 'transport-udp-nat', '104', '104', 'from-internal', 'all', 'alaw', 'no');
  647.  
  648. INSERT INTO ps_aors (id, max_contacts) VALUES (105, 1);
  649. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (105, 'userpass', '1dfg32', 105);
  650. INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media) VALUES (105, 'transport-udp-nat', '105', '105', 'from-internal', 'all', 'alaw', 'no');
  651.  
  652. INSERT INTO ps_aors (id, max_contacts) VALUES (106, 1);
  653. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (106, 'userpass', '1rtg3rtg2', 106);
  654. INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media) VALUES (106, 'transport-udp-nat', '106', '106', 'from-internal', 'all', 'alaw', 'no');
  655.  
  656. INSERT INTO ps_aors (id, max_contacts) VALUES (107, 1);
  657. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (107, 'userpass', 'cnm13rtg21', 107);
  658. INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media) VALUES (107, 'transport-udp-nat', '107', '107', 'from-internal', 'all', 'alaw', 'no');
  659.  
  660. INSERT INTO ps_aors (id, max_contacts) VALUES (102, 1);
  661. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (102, 'userpass', '1fjfjfgj3211', 102);
  662. INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media) VALUES (102, 'transport-udp-nat', '102', '102', 'from-internal', 'all', 'alaw', 'no');
  663.  
  664.  
  665. ctrl+c выйти
  666.  
  667. pjsip show endpoints
  668.  
  669. mcedit /etc/asterisk/pjsip.conf
  670.  
  671. [system]
  672. type = system
  673. timer_t1 = 200
  674. timer_t2 = 1500
  675.  
  676. [global]
  677. ttype = global
  678. disable_multi_domain = yes
  679. ;debug = yes
  680. taskprocessor_overload_trigger = global
  681. unidentified_request_count=5
  682. unidentified_request_period=5
  683. unidentified_request_prune_interval=30
  684. endpoint_identifier_order=username,ip,anonymous
  685. canreinvite=no
  686. insecure=port,invite
  687.  
  688. ;
  689. [transport-udp-nat]
  690. type=transport
  691. protocol=udp
  692. bind=0.0.0.0
  693. local_net=10.20.7.0/24
  694. external_media_address=load.sytes.net
  695. external_signaling_address=load.sytes.net
  696.  
  697. [acl]
  698. type=acl
  699. deny=0.0.0.0/0.0.0.0
  700. permit=176.58.0.0/15
  701. permit=10.0.0.0/8
  702. permit=83.102.160.66
  703. permit=109.105.165.0/24
  704. permit=37.139.38.0/24
  705. permi =185.45.152.128/28
  706. permit=185.45.152.160/27
  707.  
  708. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  709. [555629]
  710. type=registration
  711. transport=transport-udp-nat ;transport-udp
  712. outbound_auth=555629_auth
  713. server_uri=sip:sip.zadarma.com
  714. client_uri=sip:[email protected]
  715. retry_interval=60
  716. fatal_retry_interval=30
  717. forbidden_retry_interval=30
  718. max_retries=10000
  719. expiration=120
  720. contact_user=555629
  721. line=yes
  722. endpoint=555629
  723. auth_rejection_permanent=no
  724. contact_user=555629
  725. server_uri=sip:sip.zadarma.com
  726. client_uri=sip:[email protected]
  727.  
  728. [555629_auth]
  729. type=auth
  730. auth_type=userpass
  731. password=van1hrD38X
  732. username=555629
  733.  
  734. [555629]
  735. type=aor
  736. qualify_frequency=60
  737. contact=sip:sip.zadarma.com
  738.  
  739. [555629]
  740. type=endpoint
  741. transport=transport-udp-nat ;udp-transport
  742. context=zadarma-in
  743. disallow=all
  744. allow=alaw
  745. allow=ulaw
  746. outbound_auth=555629_auth
  747. aors=555629
  748. send_connected_line=false
  749. language=ru
  750. from_domain=sip.zadarma.com
  751. from_user=555629
  752. contact_user=555629
  753. user_eq_phone=no
  754. t38_udptl=no
  755. t38_udptl_ec=none
  756. fax_detect=no
  757. trust_id_inbound=no
  758. t38_udptl_nat=no
  759. direct_media=no
  760. rtp_symmetric=yes
  761. dtmf_mode=auto
  762. from_user=555629
  763. from_domain=sip.zadarma.com
  764. direct_media=no
  765.  
  766.  
  767. [555629]
  768. type=identify
  769. endpoint=555629
  770. match=sip.zadarma.com
  771. match=sip.zadarma.com
  772. match=sipurifr.zadarma.com
  773. match=sipurims.zadarma.com
  774. match=sipuriny.zadarma.com
  775. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  776. [959977]
  777. type=registration
  778. transport=transport-udp-nat ;transport-udp
  779. outbound_auth=959977_auth
  780. server_uri=sip:sip.zadarma.com
  781. client_uri=sip:[email protected]
  782. retry_interval=60
  783. fatal_retry_interval=30
  784. forbidden_retry_interval=30
  785. max_retries=10000
  786. expiration=120
  787. contact_user=959977
  788. line=yes
  789. endpoint=959977
  790. auth_rejection_permanent=no
  791. contact_user=959977
  792. server_uri=sip:sip.zadarma.com
  793. client_uri=sip:[email protected]
  794.  
  795. [959977_auth]
  796. type=auth
  797. auth_type=userpass
  798. password=6agDUjm8x9
  799. username=959977
  800.  
  801. [959977]
  802. type=aor
  803. qualify_frequency=60
  804. contact=sip:sip.zadarma.com
  805.  
  806.  
  807. [959977]
  808. type=endpoint
  809. transport=transport-udp-nat ;udp-transport
  810. context=zadarma-in
  811. disallow=all
  812. allow=alaw
  813. allow=ulaw
  814. outbound_auth=959977_auth
  815. aors=959977
  816. send_connected_line=false
  817. language=ru
  818. from_domain=sip.zadarma.com
  819. from_user=959977
  820. contact_user=959977
  821. user_eq_phone=no
  822. t38_udptl=no
  823. t38_udptl_ec=none
  824. fax_detect=no
  825. trust_id_inbound=no
  826. t38_udptl_nat=no
  827. direct_media=no
  828. rtp_symmetric=yes
  829. dtmf_mode=auto
  830. from_user=959977
  831. from_domain=sip.zadarma.com
  832. direct_media=no
  833.  
  834. [959977]
  835. type=identify
  836. endpoint=959977
  837. match=sip.zadarma.com
  838. match=sip.zadarma.com
  839. match=sipurifr.zadarma.com
  840. match=sipurims.zadarma.com
  841. match=sipuriny.zadarma.com
  842.  
  843.  
  844. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  845.  
  846. [endpoint-template](!)
  847. type = endpoint
  848. transport = transport-udp-nat
  849. context = from-internal
  850. dtmf_mode = rfc4733
  851. disallow = all
  852. allow = ulaw
  853. allow = alaw
  854.  
  855. [auth-template-userpass](!)
  856. type = auth
  857. auth_type = userpass;
  858.  
  859. [aor-template-single-reg](!)
  860. type = aor
  861. max_contacts = 1
  862.  
  863.  
  864.  
  865. ;;;;;;;;;;;users;;;;;;;;;;;;;;;;;;;;;
  866.  
  867. [108](endpoint-template)
  868. auth = auth108
  869. aors = 108
  870. callerid = man 108;
  871.  
  872. [auth108](auth-template-userpass)
  873. username = 108
  874. password = 1JKHKJjj23
  875.  
  876. [108](aor-template-single-reg)
  877.  
  878. ;;;;;;;;;;;;;;;;109;;;;;;;;;;;;;;;;;;;;;
  879.  
  880. [109](endpoint-template)
  881. auth = auth109
  882. aors = 109
  883. callerid = man 109;
  884.  
  885. [auth109](auth-template-userpass)
  886. username = 109
  887. password = 123dsvHGuill
  888.  
  889. [109](aor-template-single-reg)
  890.  
  891.  
  892. ################################################################
  893. mcedit /etc/asterisk/sorcery.conf
  894. [test_sorcery_section]
  895. test=memory
  896.  
  897. [test_sorcery_cache]
  898. test/cache=test
  899. test=memory
  900. ; The following object mapping is the default mapping of external MWI mailbox
  901. ; objects to give persistence to the message counts.
  902. ;
  903. ;[res_mwi_external]
  904. ;mailboxes=astdb,mwi_external
  905.  
  906. ;
  907. ; The following object mappings set PJSIP objects to use realtime database mappings from extconfig
  908. ; with the table names used when automatically generating configuration from the alembic script.
  909. ;
  910. [res_pjsip]
  911. endpoint=realtime,ps_endpoints
  912. endpoint=config,pjsip.conf,criteria=type=endpoint
  913. auth=realtime,ps_auths
  914. auth=config,pjsip.conf,criteria=type=auth
  915. aor=realtime,ps_aors
  916. aor=config,pjsip.conf,criteria=type=aor
  917. ;transport=config,pjsip.conf,criteria=type=transport
  918. ;domain_alias=realtime,ps_domain_aliases
  919. contact=realtime,ps_contacts
  920.  
  921. [res_pjsip_endpoint_identifier_ip]
  922. identify=realtime,ps_endpoint_id_ips
  923.  
  924. [res_pjsip_outbound_publish]
  925. outbound-publish=realtime,ps_outbound_publishes
  926.  
  927. [res_pjsip_pubsub]
  928. inbound-publication=realtime,ps_inbound_publications
  929.  
  930. [res_pjsip_publish_asterisk]
  931. asterisk-publication=realtime,ps_asterisk_publications
  932.  
  933.  
  934. *********************************************************************
  935. asterisk -rvvvvvvvvvvvvvvvvvv
  936. odbc show all
  937. *****************************************************************
  938.  
  939. #######################################################################
  940. mcedit /etc/httpd/conf.d/phpMyAdmin.conf
  941.  
  942. Alias /phpMyAdmin /usr/share/phpMyAdmin
  943. Alias /phpmyadmin /usr/share/phpMyAdmin
  944.  
  945. <Directory /usr/share/phpMyAdmin/>
  946. AddDefaultCharset UTF-8
  947.  
  948. <IfModule mod_authz_core.c>
  949. # Apache 2.4
  950. <RequireAny>
  951. Require all granted
  952. </RequireAny>
  953. </IfModule>
  954. <IfModule !mod_authz_core.c>
  955. # Apache 2.2
  956. Order Deny,Allow
  957. Deny from All
  958. Allow from 127.0.0.1
  959. Allow from ::1
  960. </IfModule>
  961. </Directory>
  962.  
  963. <Directory /usr/share/phpMyAdmin/setup/>
  964. <IfModule mod_authz_core.c>
  965. # Apache 2.4
  966. <RequireAny>
  967. Require all granted
  968. </RequireAny>
  969. </IfModule>
  970. <IfModule !mod_authz_core.c>
  971. # Apache 2.2
  972. Order Deny,Allow
  973. Deny from All
  974. Allow from 127.0.0.1
  975. Allow from ::1
  976. </IfModule>
  977. </Directory>
  978.  
  979. #############################################################
  980. mkdir /usr/share/phpMyAdmin/tmp
  981. chmod 777 /usr/share/phpMyAdmin/tmp
  982. chown -R apache:apache /usr/share/phpMyAdmin
  983. systemctl restart httpd
  984.  
  985.  
  986. Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: xml
  987. dnf install php-xml
  988.  
  989. ########################################################################
  990.  
  991.  
  992.  
  993. asterisk
  994. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  995. mcedit /etc/asterisk/pjsip.conf
  996.  
  997. [transport-udp-nat]
  998. type=transport
  999. protocol=udp
  1000. bind=0.0.0.0
  1001. local_net=10.10.50.0/24
  1002. external_media_address=109.105.165.107
  1003. external_signaling_address=109.105.165.107
  1004.  
  1005. [acl]
  1006. type=acl
  1007. deny=0.0.0.0/0.0.0.0
  1008. permit=176.59.192.0-176.59.223.255
  1009. permit=10.0.0.0/8
  1010. permit=83.102.160.66
  1011. permit=109.105.165.0/24
  1012.  
  1013. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1014. mcedit /etc/asterisk/extensions.conf
  1015. [zadarma-in]
  1016. exten => 620465,1,Set(CHANNEL(accountcode)=277)
  1017. same => n,Goto(lk_620465_pbx,620465,1)
  1018. same => n,Hangup
  1019.  
  1020.  
  1021. [zadarma-out]
  1022. exten => _XXX,1,Dial(PJSIP/${EXTEN}) ; звонки на трехзначные внутренние номера aстериска
  1023. exten => _XXX.,1,Dial(PJSIP/${EXTEN}@620465) ; звонки на номера в которых четрые и более цифр через транк 620465
  1024.  
  1025. ;exten => _XXX,1,Gosub(sub-devstate,${EXTEN},1)
  1026. ;exten => _XXX,n,Dial(SIP/${EXTEN},90,trm)
  1027. ;exten => _XXX,n,Hangup()
  1028.  
  1029.  
  1030. exten => 101,1,Gosub(sub-devstate,${EXTEN},1)
  1031. same => n,Mixmonitor(/home/${EXTEN}n_.${UNIQUEID}.wav,b)
  1032. same => n(local_out),Dial(PJSIP/101,3,rt)
  1033. same => n,GotoIfTime(18:00-08:00,mon-fri,*,*?local_out)
  1034. same => n,Set(CALLERID(num)=00000000)
  1035. same => n,Dial(PJSIP/241247@620465)
  1036.  
  1037. exten => 1,1,Set(CHANNEL(accountcode)=549)
  1038. same => n,Answer
  1039. same => n,MixMonitor(/home/${EXTEN}n_.${UNIQUEID}.wav,b)
  1040. same => n,Queue(test_all,rt)
  1041.  
  1042. exten => 2,1,Set(CDR(description)=ivr:${EXTEN})
  1043. same => n,MixMonitor(/home/${EXTEN}n_.${UNIQUEID}.wav,b)
  1044. same => n,Dial(PJSIP/102,20,rt)
  1045. ; same => n,Dial(PJSIP/101,20,rt)
  1046. same => n,GotoIfTime(*,*,28-31,jul?weekend2)
  1047. same => n,GotoIfTime(*,*,1-20,jan?weekend2)
  1048. same => n,Dial(PJSIP/101,15,rt)
  1049. same => n,Set(CALLERID(num)=73452999999)
  1050. same => n,Goto(exten,1,1)
  1051. same => n,Hangup
  1052. same => n(weekend2),Dial(PJSIP/241247@620465,,rt)
  1053. same => n,Hangup
  1054.  
  1055.  
  1056. [sub-devstate]
  1057. exten => _X.,1,Log(NOTICE, "${EXTEN} has DEVICE STATE ${DEVICE_STATE(SIP/${EXTEN})}")
  1058. exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "BUSY"]?s-BUSY,1)
  1059. exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "INUSE"]?s-BUSY,1)
  1060. exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "INVALID"]?s-INVALID,1)
  1061. exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "UNAVAILABLE"]?s-UNAVAILABLE,1)
  1062. exten => _X.,n,Return()
  1063. exten => s-BUSY,1,NoOp(Абонент ${EXTEN} в данный момент разговаривает)
  1064. exten => s-BUSY,n,Playback(extension-is-busy)
  1065. exten => s-BUSY,n,Hangup(17)
  1066. exten => s-INVALID,1,NoOp(Абонент ${EXTEN} не существует)
  1067. exten => s-INVALID,n,Goto(no-number,${EXTEN},1)
  1068. exten => s-INVALID,n,Hangup(1)
  1069. exten => s-UNAVAILABLE,1,NoOp(Абонент ${EXTEN} не доступен)
  1070. exten => s-UNAVAILABLE,n,Playback(ss-noservice)
  1071. exten => s-UNAVAILABLE,n,Wait(2)
  1072. exten => s-UNAVAILABLE,n,Hangup(18)
  1073. [no-number]
  1074. exten => _X.,1,NoOp(Статус набора - ${DIALSTATUS})
  1075. exten => _X.,n,Goto(invalid-number,1)
  1076. exten => invalid-number,1,NoOp(Неверно набран номер)
  1077. exten => invalid-number,n,Set(CDR(userfield)=No Number)
  1078. exten => invalid-number,n,Playback(pbx-invalid)
  1079. exten => invalid-number,n,Wait(1)
  1080. exten => invalid-number,n,Hangup()
  1081. exten => t,1,Playback(vm-goodbye)
  1082. exten => t,n,Hangup()
  1083.  
  1084. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1085. mcedit /etc/asterisk/queue.conf
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092. /////////////////////////////////////////////////////////////////////////////////////////
  1093.  
  1094.  
  1095. apt-get install fail2ban
  1096. systemctl enable iptables
  1097.  
  1098. mcedit /etc/asterisk/logger.conf
  1099. security => security
  1100. console => notice,warning,error
  1101. console => notice,warning,error,debug
  1102. messages => notice,warning,error
  1103. full => notice,warning,error,debug,verbose,dtmf,fax
  1104.  
  1105. apt-get install fail2ban
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111. fail2ban-client unban 10.10.50.16
  1112. fail2ban-client unban 37.139.38.15
  1113.  
  1114.  
  1115. iptables -nL --line-numbers
  1116. iptables -L -n
  1117. fail2ban-client reload
  1118. mcedit /etc/fail2ban/jail.conf
  1119. iptables -D f2b-asterisk-tcp 1
  1120. iptables -D f2b-asterisk-udp 1
  1121.  
  1122.  
  1123.  
  1124. pjsip show channels
  1125.  
  1126. ############## Звонок из консоли #########################
  1127. channel originate local/107@from-internal application echo
  1128.  
  1129. rasterisk -x "core show channels verbose"
  1130.  
  1131.  
  1132. ################## Заметки ##############################
  1133. watch "asterisk -vvvvvrx 'core show channels' | grep channels"
  1134. watch "asterisk -vvvvvrx 'core show channels' | grep calls"
  1135. watch "asterisk -vvvvvrx 'core show channels verbose'"
  1136.  
  1137. watch "asterisk -vvvvvrx 'core show channels verbose'"
  1138. watch -n 2 "rasterisk -x 'queue show q560010_all'"
  1139. watch -n 2 "rasterisk -x 'queue show que_560050'"
  1140.  
  1141. watch "asterisk -vvvvvrx 'core show channels' | egrep \"(call|channel)\""
  1142. asterisk -rx 'core show channels' | grep -m1 "call" | cut -d' ' -f1
  1143. asterisk -rx "core show calls" | grep "active" | cut -d' ' -f1
  1144. watch "asterisk -vvvvvrx 'core show channels verbose'"
  1145. watch -n 5 "asterisk -rx 'core show calls' | grep active"
  1146. watch -n 1 "asterisk -vvvvvrx 'core show channels' | grep call"
  1147.  
  1148. rasterisk -x "sip show peers" | grep 10.20.101. | sort -t . -k 3,3n -k 4,4n
  1149.  
  1150. Снять с паузы
  1151. rasterisk -x 'queue unpause member SIP/lk_gp1_g-237 queue q560050_1_norobot'
  1152.  
  1153. rasterisk -x "database show REDIRECT "
  1154. rasterisk -x "database put REDIRECT 2222 89324823365"
  1155. rasterisk -x "database del REDIRECT 2222"
  1156.  
  1157. rasterisk -x "sip show peers" | grep 85. | wc -l
  1158.  
  1159.  
  1160. 1xx
  1161. 8[2-9]xxxxxxxxx
  1162. [2-79]xxxxx
  1163. 0x
  1164.  
  1165. “sun” | “mon” | “tue” | “wed” | “thu” | “fri” | “sat”
  1166. “jan” | “feb” | “mar” | “apr” | “may” | “jun” | “jul” | “aug” | “sep” | “oct” | “nov” | “dec”
  1167. same => n(start),GotoIfTime(08:00-20:00,mon-fri,*,*?ok1:)
  1168. same => n(start),GotoIfTime(08:00-20:00,sat-sun,*,*?ok1:)
  1169.  
  1170. rasterisk -x "dialplan reload"
  1171. rasterisk -x "sip reload"
  1172. rasterisk -x "queue reload all"
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182. Изменить цветность в консоле mc
  1183. wget http://..............asterisk.syntax -P /usr/share/mc/syntax/
  1184. mcedit /usr/share/mc/syntax/Syntax
  1185.  
  1186. куда угодно можно, лишь бы перед последними двумя.
  1187.  
  1188. file .\* unknown
  1189. include asterisk.syntax
  1190.  
  1191. file .\* unknown
  1192. include unknown.syntax
  1193.  
  1194. ##########################Сохранит как asterisk.syntax ####################################################
  1195. # Description : Syntax rules for Asterisk dialplan language
  1196. # Author : Rozes "Ramzes" Alexander
  1197. # Date : 2017-04-06
  1198. # Usage : Add following lines at Syntax file
  1199. # file extensions.\*\\.conf$ Asterisk\sdialplan
  1200. # include asterisk.syntax
  1201.  
  1202. context default
  1203. keyword whole \{Aa\}dd\{Qq\}ueue\{Mm\}ember brightmagenta
  1204. keyword whole \{Aa\}\{Dd\}\{Ss\}\{Ii\}\{Pp\}rog brightmagenta
  1205. keyword whole \{Aa\}gent\{Ll\}ogin brightmagenta
  1206. keyword whole \{Aa\}gent\{Rr\}equest brightmagenta
  1207. keyword whole \{Aa\}\{Gg\}\{Ii\} brightmagenta
  1208. keyword whole \{Aa\}larm\{Rr\}eceiver brightmagenta
  1209. keyword whole \{Aa\}\{Mm\}\{Dd\} brightmagenta
  1210. keyword whole \{Aa\}nswer brightmagenta
  1211. keyword whole \{Aa\}uthenticate brightmagenta
  1212. keyword whole \{Bb\}ack\{Gg\}round brightmagenta
  1213. keyword whole \{Bb\}ackground\{Dd\}etect brightmagenta
  1214. keyword whole \{Bb\}ridge brightmagenta
  1215. keyword whole \{Bb\}ridge\{Ww\}ait brightmagenta
  1216. keyword whole \{Bb\}usy brightmagenta
  1217. keyword whole \{Cc\}all\{Cc\}ompletion\{Cc\}ancel brightmagenta
  1218. keyword whole \{Cc\}all\{Cc\}ompletion\{Rr\}equest brightmagenta
  1219. keyword whole \{Cc\}\{Ee\}\{Ll\}\{Gg\}en\{Uu\}ser\{Ee\}vent brightmagenta
  1220. keyword whole \{Cc\}hange\{Mm\}onitor brightmagenta
  1221. keyword whole \{Cc\}han\{Ii\}s\{Aa\}vail brightmagenta
  1222. keyword whole \{Cc\}hannel\{Rr\}edirect brightmagenta
  1223. keyword whole \{Cc\}han\{Ss\}py brightmagenta
  1224. keyword whole \{Cc\}lear\{Hh\}ash brightmagenta
  1225. keyword whole \{Cc\}onf\{Bb\}ridge brightmagenta
  1226. keyword whole \{Cc\}ongestion brightmagenta
  1227. keyword whole \{Cc\}ontinue\{Ww\}hile brightmagenta
  1228. keyword whole \{Cc\}ontrol\{Pp\}layback brightmagenta
  1229. keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Rr\}\{Aa\}\{Ss\} brightmagenta
  1230. keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Ss\}can brightmagenta
  1231. keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Ss\}end\{Cc\}allrerouting\{Ff\}acility brightmagenta
  1232. keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Ss\}end\{Kk\}eypad\{Ff\}acility brightmagenta
  1233. keyword whole \{Dd\}ate\{Tt\}ime brightmagenta
  1234. keyword whole \{Dd\}\{Bb\}del brightmagenta
  1235. keyword whole \{Dd\}\{Bb\}deltree brightmagenta
  1236. keyword whole \{Dd\}ead\{Aa\}\{Gg\}\{Ii\} brightmagenta
  1237. keyword whole \{Dd\}ial brightmagenta
  1238. keyword whole \{Dd\}ictate brightmagenta
  1239. keyword whole \{Dd\}irectory brightmagenta
  1240. keyword whole \{Dd\}\{Ii\}\{Ss\}\{Aa\} brightmagenta
  1241. keyword whole \{Dd\}ump\{Cc\}han brightmagenta
  1242. keyword whole \{Ee\}\{Aa\}\{Gg\}\{Ii\} brightmagenta
  1243. keyword whole \{Ee\}cho brightmagenta
  1244. keyword whole \{Ee\}ndWhile brightmagenta
  1245. keyword whole \{Ee\}xec brightmagenta
  1246. keyword whole \{Ee\}xec\{Ii\}f brightmagenta
  1247. keyword whole \{Ee\}xec\{Ii\}f\{Tt\}ime brightmagenta
  1248. keyword whole \{Ee\}xit\{Ww\}hile brightmagenta
  1249. keyword whole \{Ee\}xten\{Ss\}py brightmagenta
  1250. keyword whole \{Ee\}xternal\{Ii\}\{Vv\}\{Rr\} brightmagenta
  1251. keyword whole \{Ff\}estival brightmagenta
  1252. keyword whole \{Ff\}lash brightmagenta
  1253. keyword whole \{Ff\}ollow\{Mm\}e brightmagenta
  1254. keyword whole \{Ff\}ork\{Cc\}\{Dd\}\{Rr\} brightmagenta
  1255. keyword whole \{Gg\}et\{Cc\}\{Pp\}\{Ee\}\{Ii\}\{Dd\} brightmagenta
  1256. keyword whole \{Gg\}o\{Ss\}ub brightmagenta
  1257. keyword whole \{Gg\}o\{Ss\}ub\{Ii\}f brightmagenta
  1258. keyword whole \{Gg\}o\{Tt\}o brightmagenta
  1259. keyword whole \{Gg\}oto\{Ii\}f brightmagenta
  1260. keyword whole \{Gg\}oto\{Ii\}f\{Tt\}ime brightmagenta
  1261. keyword whole \{Hh\}angup brightmagenta
  1262. keyword whole \{Hh\}angup\{Cc\}ause\{Cc\}lear brightmagenta
  1263. keyword whole \{Ii\}\{Aa\}\{Xx\}2\{Pp\}rovision brightmagenta
  1264. keyword whole \{Ii\}\{Cc\}\{Ee\}\{Ss\} brightmagenta
  1265. keyword whole \{Ii\}mport\{Vv\}ar brightmagenta
  1266. keyword whole \{Ii\}ncomplete brightmagenta
  1267. keyword whole \{Ii\}\{Vv\}\{Rr\}\{Dd\}emo brightmagenta
  1268. keyword whole \{Jj\}abber\{Jj\}oin brightmagenta
  1269. keyword whole \{Jj\}abber\{Ll\}eave brightmagenta
  1270. keyword whole \{Jj\}abber\{Ss\}end brightmagenta
  1271. keyword whole \{Jj\}abber\{Ss\}end\{Gg\}roup brightmagenta
  1272. keyword whole \{Jj\}abber\{Ss\}tatus brightmagenta
  1273. keyword whole \{Ll\}og brightmagenta
  1274. keyword whole \{Mm\}acro brightmagenta
  1275. keyword whole \{Mm\}acro\{Ee\}xclusive brightmagenta
  1276. keyword whole \{Mm\}acro\{Ee\}xit brightmagenta
  1277. keyword whole \{Mm\}acro\{Ii\}f brightmagenta
  1278. keyword whole \{Mm\}acro\{Rr\}eturn brightmagenta
  1279. keyword whole \{Mm\}ailbox\{Ee\}xists brightmagenta
  1280. keyword whole \{Mm\}eet\{Mm\}e brightmagenta
  1281. keyword whole \{Mm\}eet\{Mm\}e\{Aa\}dmin brightmagenta
  1282. keyword whole \{Mm\}eet\{Mm\}e\{Cc\}hannel\{Aa\}dmin brightmagenta
  1283. keyword whole \{Mm\}eet\{Mm\}e\{Cc\}ount brightmagenta
  1284. keyword whole \{Mm\}essage\{Ss\}end brightmagenta
  1285. keyword whole \{Mm\}illiwatt brightmagenta
  1286. keyword whole \{Mm\}inivm\{Aa\}cc\{Mm\}ess brightmagenta
  1287. keyword whole \{Mm\}inivm\{Dd\}elete brightmagenta
  1288. keyword whole \{Mm\}inivm\{Gg\}reet brightmagenta
  1289. keyword whole \{Mm\}inivm\{Mm\}\{Ww\}\{Ii\} brightmagenta
  1290. keyword whole \{Mm\}inivm\{Nn\}otify brightmagenta
  1291. keyword whole \{Mm\}inivm\{Rr\}ecord brightmagenta
  1292. keyword whole \{Mm\}ix\{Mm\}onitor brightmagenta
  1293. keyword whole \{Mm\}onitor brightmagenta
  1294. keyword whole \{Mm\}orsecode brightmagenta
  1295. keyword whole \{Mm\}\{Pp\}3\{Pp\}layer brightmagenta
  1296. keyword whole \{Mm\}\{Ss\}et brightmagenta
  1297. keyword whole \{Mm\}usic\{Oo\}n\{Hh\}old brightmagenta
  1298. keyword whole \{Nn\}\{Bb\}\{Ss\}cat brightmagenta
  1299. keyword whole \{Nn\}o\{Cc\}\{Dd\}\{Rr\} brightmagenta
  1300. keyword whole \{Nn\}o\{Oo\}\{Pp\} brightmagenta
  1301. keyword whole \{Oo\}\{Dd\}\{Bb\}\{Cc\}_\{Cc\}ommit brightmagenta
  1302. keyword whole \{Oo\}\{Dd\}\{Bb\}\{Cc\}_\{Rr\}ollback brightmagenta
  1303. keyword whole \{Oo\}\{Dd\}\{Bb\}\{Cc\}\{Ff\}inish brightmagenta
  1304. keyword whole \{Oo\}riginate brightmagenta
  1305. keyword whole \{Pp\}age brightmagenta
  1306. keyword whole \{Pp\}ark brightmagenta
  1307. keyword whole \{Pp\}ark\{Aa\}nd\{Aa\}nnounce brightmagenta
  1308. keyword whole \{Pp\}arked\{Cc\}all brightmagenta
  1309. keyword whole \{Pp\}ause\{Mm\}onitor brightmagenta
  1310. keyword whole \{Pp\}ause\{Qq\}ueue\{Mm\}ember brightmagenta
  1311. keyword whole \{Pp\}ickup brightmagenta
  1312. keyword whole \{Pp\}ickup\{Cc\}han brightmagenta
  1313. keyword whole \{Pp\}layback brightmagenta
  1314. keyword whole \{Pp\}lay\{Tt\}ones brightmagenta
  1315. keyword whole \{Pp\}rivacy\{Mm\}anager brightmagenta
  1316. keyword whole \{Pp\}roceeding brightmagenta
  1317. keyword whole \{Pp\}rogress brightmagenta
  1318. keyword whole \{Qq\}ueue brightmagenta
  1319. keyword whole \{Qq\}ueue\{Ll\}og brightmagenta
  1320. keyword whole \{Rr\}aise\{Ee\}xception brightmagenta
  1321. keyword whole \{Rr\}ead brightmagenta
  1322. keyword whole \{Rr\}ead\{Ee\}xten brightmagenta
  1323. keyword whole \{Rr\}eceive\{Ff\}\{Aa\}\{Xx\} brightmagenta
  1324. keyword whole \{Rr\}ecord brightmagenta
  1325. keyword whole \{Rr\}emove\{Qq\}ueue\{Mm\}ember brightmagenta
  1326. keyword whole \{Rr\}eset\{Cc\}\{Dd\}\{Rr\} brightmagenta
  1327. keyword whole \{Rr\}etry\{Dd\}ial brightmagenta
  1328. keyword whole \{Rr\}eturn brightmagenta
  1329. keyword whole \{Rr\}inging brightmagenta
  1330. keyword whole \{Ss\}ay\{Aa\}lpha brightmagenta
  1331. keyword whole \{Ss\}ay\{Aa\}lpha\{Cc\}ase brightmagenta
  1332. keyword whole \{Ss\}ay\{Cc\}ounted\{Aa\}dj brightmagenta
  1333. keyword whole \{Ss\}ay\{Cc\}ounted\{Nn\}oun brightmagenta
  1334. keyword whole \{Ss\}ay\{Dd\}igits brightmagenta
  1335. keyword whole \{Ss\}ay\{Nn\}umber brightmagenta
  1336. keyword whole \{Ss\}ay\{Pp\}honetic brightmagenta
  1337. keyword whole \{Ss\}ay\{Uu\}nix\{Tt\}ime brightmagenta
  1338. keyword whole \{Ss\}end\{Dd\}\{Tt\}\{Mm\}\{Ff\} brightmagenta
  1339. keyword whole \{Ss\}end\{Ff\}\{Aa\}\{Xx\} brightmagenta
  1340. keyword whole \{Ss\}end\{Ii\}mage brightmagenta
  1341. keyword whole \{Ss\}end\{Tt\}ext brightmagenta
  1342. keyword whole \{Ss\}end\{Uu\}\{Rr\}\{Ll\} brightmagenta
  1343. keyword whole \{Ss\}et brightmagenta
  1344. keyword whole \{Ss\}et\{Vv\}ar brightmagenta
  1345. keyword whole \{Ss\}et\{Aa\}\{Mm\}\{Aa\}\{Ff\}lags brightmagenta
  1346. keyword whole \{Ss\}\{Ii\}\{Pp\}\{Aa\}dd\{Hh\}eader brightmagenta
  1347. keyword whole \{Ss\}\{Ii\}\{Pp\}\{Dd\}\{Tt\}\{Mm\}\{Ff\}\{Mm\}ode brightmagenta
  1348. keyword whole \{Ss\}\{Ii\}\{Pp\}\{Rr\}emove\{Hh\}eader brightmagenta
  1349. keyword whole \{Ss\}kel\{Gg\}uess\{Nn\}umber brightmagenta
  1350. keyword whole \{Ss\}\{Ll\}\{Aa\}\{Ss\}tation brightmagenta
  1351. keyword whole \{Ss\}\{Ll\}\{Aa\}\{Tt\}runk brightmagenta
  1352. keyword whole \{Ss\}\{Mm\}\{Ss\} brightmagenta
  1353. keyword whole \{Ss\}oft\{Hh\}angup brightmagenta
  1354. keyword whole \{Ss\}peech\{Aa\}ctivate\{Gg\}rammar brightmagenta
  1355. keyword whole \{Ss\}peech\{Bb\}ackground brightmagenta
  1356. keyword whole \{Ss\}peech\{Cc\}reate brightmagenta
  1357. keyword whole \{Ss\}peech\{Dd\}eactivate\{Gg\}rammar brightmagenta
  1358. keyword whole \{Ss\}peech\{Dd\}estroy brightmagenta
  1359. keyword whole \{Ss\}peech\{Ll\}oad\{Gg\}rammar brightmagenta
  1360. keyword whole \{Ss\}peech\{Pp\}rocessing\{Ss\}ound brightmagenta
  1361. keyword whole \{Ss\}peech\{Ss\}tart brightmagenta
  1362. keyword whole \{Ss\}peech\{Uu\}nload\{Gg\}rammar brightmagenta
  1363. keyword whole \{Ss\}tack\{Pp\}op brightmagenta
  1364. keyword whole \{Ss\}tart\{Mm\}usic\{Oo\}n\{Hh\}old brightmagenta
  1365. keyword whole \{Ss\}tasis brightmagenta
  1366. keyword whole \{Ss\}top\{Mm\}ix\{Mm\}onitor brightmagenta
  1367. keyword whole \{Ss\}top\{Mm\}onitor brightmagenta
  1368. keyword whole \{Ss\}top\{Mm\}usic\{Oo\}n\{Hh\}old brightmagenta
  1369. keyword whole \{Ss\}top\{Pp\}lay\{Tt\}ones brightmagenta
  1370. keyword whole \{Ss\}ystem brightmagenta
  1371. keyword whole \{Tt\}est\{Cc\}lient brightmagenta
  1372. keyword whole \{Tt\}est\{Ss\}erver brightmagenta
  1373. keyword whole \{Tt\}ransfer brightmagenta
  1374. keyword whole \{Tt\}ry\{Ee\}xec brightmagenta
  1375. keyword whole \{Tt\}ry\{Ss\}ystem brightmagenta
  1376. keyword whole \{Uu\}npause\{Mm\}onitor brightmagenta
  1377. keyword whole \{Uu\}npause\{Qq\}ueue\{Mm\}ember brightmagenta
  1378. keyword whole \{Uu\}ser\{Ee\}vent brightmagenta
  1379. keyword whole \{Vv\}erbose brightmagenta
  1380. keyword whole \{Vv\}\{Mm\}\{Aa\}uthenticate brightmagenta
  1381. keyword whole \{Vv\}\{Mm\}\{Ss\}ay\{Nn\}ame brightmagenta
  1382. keyword whole \{Vv\}oice\{Mm\}ail brightmagenta
  1383. keyword whole \{Vv\}oice\{Mm\}ail\{Mm\}ain brightmagenta
  1384. keyword whole \{Vv\}oice\{Mm\}ail\{Pp\}lay\{Mm\}sg brightmagenta
  1385. keyword whole \{Ww\}ait brightmagenta
  1386. keyword whole \{Ww\}ait\{Ee\}xten brightmagenta
  1387. keyword whole \{Ww\}ait\{Ff\}or\{Nn\}oise brightmagenta
  1388. keyword whole \{Ww\}ait\{Ff\}or\{Rr\}ing brightmagenta
  1389. keyword whole \{Ww\}ait\{Ff\}or\{Ss\}ilence brightmagenta
  1390. keyword whole \{Ww\}ait\{Uu\}ntil brightmagenta
  1391. keyword whole \{Ww\}hile brightmagenta
  1392. keyword whole \{Zz\}apateller brightmagenta
  1393.  
  1394. keyword whole AES_DECRYPT yellow
  1395. keyword whole AES_ENCRYPT yellow
  1396. keyword whole AGC yellow
  1397. keyword whole AGENT yellow
  1398. keyword whole AMI_CLIENT yellow
  1399. keyword whole ARRAY yellow
  1400. keyword whole AST_CONFIG yellow
  1401. keyword whole AST_SORCERY yellow
  1402. keyword whole AUDIOHOOK_INHERIT yellow
  1403. keyword whole BASE64_DECODE yellow
  1404. keyword whole BASE64_ENCODE yellow
  1405. keyword whole BLACKLIST yellow
  1406. keyword whole CALENDAR_BUSY yellow
  1407. keyword whole CALENDAR_EVENT yellow
  1408. keyword whole CALENDAR_QUERY yellow
  1409. keyword whole CALENDAR_QUERY_RESUL yellow
  1410. keyword whole CALENDAR_WRITE yellow
  1411. keyword whole CALLCOMPLETION yellow
  1412. keyword whole CALLERID yellow
  1413. keyword whole CALLERPRES yellow
  1414. keyword whole CDR yellow
  1415. keyword whole CDR_PROP yellow
  1416. keyword whole CHANNEL yellow
  1417. keyword whole CHANNELS yellow
  1418. keyword whole CHECKSIPDOMAIN yellow
  1419. keyword whole CONFBRIDGE yellow
  1420. keyword whole CONFBRIDGE_INFO yellow
  1421. keyword whole CONNECTEDLINE yellow
  1422. keyword whole CSV_QUOTE yellow
  1423. keyword whole CURL yellow
  1424. keyword whole CURLOPT yellow
  1425. keyword whole CUT yellow
  1426. keyword whole DB yellow
  1427. keyword whole DB_DELETE yellow
  1428. keyword whole DB_EXISTS yellow
  1429. keyword whole DB_KEYS yellow
  1430. keyword whole DEC yellow
  1431. keyword whole DENOISE yellow
  1432. keyword whole DEVICE_STATE yellow
  1433. keyword whole DIALGROUP yellow
  1434. keyword whole DIALPLAN_EXISTS yellow
  1435. keyword whole DUNDILOOKUP yellow
  1436. keyword whole DUNDIQUERY yellow
  1437. keyword whole DUNDIRESULT yellow
  1438. keyword whole ENUMLOOKUP yellow
  1439. keyword whole ENUMQUERY yellow
  1440. keyword whole ENUMRESULT yellow
  1441. keyword whole ENV yellow
  1442. keyword whole EVAL yellow
  1443. keyword whole EXCEPTION yellow
  1444. keyword whole EXISTS yellow
  1445. keyword whole EXTENSION_STATE yellow
  1446. keyword whole FAXOPT yellow
  1447. keyword whole FEATURE yellow
  1448. keyword whole FEATUREMAP yellow
  1449. keyword whole FIELDNUM yellow
  1450. keyword whole FIELDQTY yellow
  1451. keyword whole FILE yellow
  1452. keyword whole FILE_COUNT_LINE yellow
  1453. keyword whole FILE_FORMAT yellow
  1454. keyword whole FILTER yellow
  1455. keyword whole FRAME_TRACE yellow
  1456. keyword whole GLOBAL yellow
  1457. keyword whole GROUP yellow
  1458. keyword whole GROUP_COUNT yellow
  1459. keyword whole GROUP_LIST yellow
  1460. keyword whole GROUP_MATCH_COUNT yellow
  1461. keyword whole HANGUPCAUSE yellow
  1462. keyword whole HANGUPCAUSE_KEYS yellow
  1463. keyword whole HASH yellow
  1464. keyword whole HASHKEYS yellow
  1465. keyword whole HINT yellow
  1466. keyword whole HOLD_INTERCEPT yellow
  1467. keyword whole IAXPEER yellow
  1468. keyword whole IAXVAR yellow
  1469. keyword whole ICONV yellow
  1470. keyword whole IF yellow
  1471. keyword whole IFMODULE yellow
  1472. keyword whole IFTIME yellow
  1473. keyword whole IMPORT yellow
  1474. keyword whole INC yellow
  1475. keyword whole ISNULL yellow
  1476. keyword whole JABBER_RECEIVE yellow
  1477. keyword whole JABBER_STATUS yellow
  1478. keyword whole JITTERBUFFER yellow
  1479. keyword whole KEYPADHASH yellow
  1480. keyword whole LEN yellow
  1481. keyword whole LISTFILTER yellow
  1482. keyword whole LOCAL yellow
  1483. keyword whole LOCAL_PEEK yellow
  1484. keyword whole LOCK yellow
  1485. keyword whole MAILBOX_EXISTS yellow
  1486. keyword whole MASTER_CHANNEL yellow
  1487. keyword whole MATH yellow
  1488. keyword whole MD5 yellow
  1489. keyword whole MEETME_INFO yellow
  1490. keyword whole MESSAGE yellow
  1491. keyword whole MESSAGE_DATA yellow
  1492. keyword whole MINIVMACCOUNT yellow
  1493. keyword whole MINIVMCOUNTER yellow
  1494. keyword whole MIXMONITOR yellow
  1495. keyword whole MUTEAUDIO yellow
  1496. keyword whole ODBC yellow
  1497. keyword whole ODBC_ANTIGF yellow
  1498. keyword whole ODBC_FETCH yellow
  1499. keyword whole ODBC_PRESENCE yellow
  1500. keyword whole ODBC_SQL yellow
  1501. keyword whole PASSTHRU yellow
  1502. keyword whole PERIODIC_HOOK yellow
  1503. keyword whole PITCH_SHIFT yellow
  1504. keyword whole POP yellow
  1505. keyword whole PP_EACH_EXTENSION yellow
  1506. keyword whole PP_EACH_USER yellow
  1507. keyword whole PRESENCE_STATE yellow
  1508. keyword whole PUSH yellow
  1509. keyword whole QUEUE_EXISTS yellow
  1510. keyword whole QUEUE_MEMBER yellow
  1511. keyword whole QUEUE_MEMBER_COUNT yellow
  1512. keyword whole QUEUE_MEMBER_LIST yellow
  1513. keyword whole QUEUE_MEMBER_PENALTY yellow
  1514. keyword whole QUEUE_VARIABLES yellow
  1515. keyword whole QUEUE_WAITING_COUNT yellow
  1516. keyword whole QUOTE yellow
  1517. keyword whole RAND yellow
  1518. keyword whole REALTIME yellow
  1519. keyword whole REALTIME_DESTROY yellow
  1520. keyword whole REALTIME_FIELD yellow
  1521. keyword whole REALTIME_HASH yellow
  1522. keyword whole REALTIME_STORE yellow
  1523. keyword whole REDIRECTING yellow
  1524. keyword whole REGEX yellow
  1525. keyword whole REPLACE yellow
  1526. keyword whole SET yellow
  1527. keyword whole SHA1 yellow
  1528. keyword whole SHARED yellow
  1529. keyword whole SHELL yellow
  1530. keyword whole SHIFT yellow
  1531. keyword whole SIPPEER yellow
  1532. keyword whole SIP_HEADER yellow
  1533. keyword whole SMDI_MSG yellow
  1534. keyword whole SMDI_MSG_RETRIEVE yellow
  1535. keyword whole SORT yellow
  1536. keyword whole SPEECH yellow
  1537. keyword whole SPEECH_ENGINE yellow
  1538. keyword whole SPEECH_GRAMMAR yellow
  1539. keyword whole SPEECH_RESULTS_TYPE yellow
  1540. keyword whole SPEECH_SCORE yellow
  1541. keyword whole SPEECH_TEXT yellow
  1542. keyword whole SPRINTF yellow
  1543. keyword whole SQL_ESC yellow
  1544. keyword whole SRVQUERY yellow
  1545. keyword whole SRVRESULT yellow
  1546. keyword whole STACK_PEEK yellow
  1547. keyword whole STAT yellow
  1548. keyword whole STRFTIME yellow
  1549. keyword whole STRPTIME yellow
  1550. keyword whole STRREPLACE yellow
  1551. keyword whole SYSINFO yellow
  1552. keyword whole TALK_DETECT yellow
  1553. keyword whole TESTTIME yellow
  1554. keyword whole TIMEOUT yellow
  1555. keyword whole TOLOWER yellow
  1556. keyword whole TOUPPER yellow
  1557. keyword whole TRYLOCK yellow
  1558. keyword whole TXTCIDNAME yellow
  1559. keyword whole UNLOCK yellow
  1560. keyword whole UNSHIFT yellow
  1561. keyword whole URIDECODE yellow
  1562. keyword whole URIENCODE yellow
  1563. keyword whole VALID_EXTEN yellow
  1564. keyword whole VERSION yellow
  1565. keyword whole VMCOUNT yellow
  1566. keyword whole VM_INFO yellow
  1567. keyword whole VOLUME yellow
  1568.  
  1569. # Request from Andy
  1570. keyword whole CBMysql brightmagenta
  1571. keyword whole MYSQL brightmagenta
  1572.  
  1573. keyword $[*] brightgreen
  1574. keyword ${*} brightgreen
  1575.  
  1576. keyword whole \#include brightred
  1577. keyword whole \#exec brightred
  1578. keyword whole include\s*=> brightblue
  1579. keyword whole exten\s*=> brightblue
  1580. keyword whole same\s*=> brightblue
  1581. keyword whole include=> brightblue
  1582. keyword whole exten=> brightblue
  1583. keyword whole same=> brightblue
  1584.  
  1585. keyword , brightcyan
  1586. keyword ( brightcyan
  1587. keyword ) brightcyan
  1588. keyword : brightcyan
  1589. keyword ? brightcyan
  1590.  
  1591. keyword --; brown
  1592.  
  1593. context ;--\n --; brown
  1594.  
  1595. context linestart [ ] yellow
  1596.  
  1597. context ; \n brown
  1598.  
  1599. context exclusive \#exec \n brightgreen
  1600.  
  1601. context exclusive \#include \n brightgreen
  1602.  
  1603. context exclusive include\s=> \n yellow
  1604.  
  1605. context exclusive include=> \n yellow
  1606.  
  1607. context exclusive n( ), yellow
  1608.  
  1609. context exclusive verbose ) white
  1610. keyword ( brightcyan
  1611. keyword $[*] brightgreen
  1612. keyword ${*} brightgreen
  1613.  
  1614. context exclusive Verbose ) white
  1615. keyword ( brightcyan
  1616. keyword $[*] brightgreen
  1617. keyword ${*} brightgreen
  1618.  
  1619. context exclusive No\{Oo\}\{Pp\} ) white
  1620. keyword ( brightcyan
  1621. keyword $[*] brightgreen
  1622. keyword ${*} brightgreen
  1623.  
  1624. context exclusive no\{Oo\}\{Pp\} ) white
  1625. keyword ( brightcyan
  1626. keyword $[*] brightgreen
  1627. keyword ${*} brightgreen
  1628.  
  1629.  
  1630.  
  1631.  
  1632. ########################## До сюда ####################################################
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638. ----------------------Тут пропишем банер ------------------------
  1639.  
  1640. mcedit /etc/issue.net
  1641.  
  1642. mcedit /etc/ssh/sshd_config
  1643. найти изаменить
  1644. Banner /etc/issue.net
  1645.  
  1646. mcedit /etc/motd
  1647.  
  1648. debian-11.2.0-amd64-netinst.iso
  1649. Asterisk asterisk-19.1.0
  1650. username=asterisk
  1651. password=sdfJHGVhj5g7jghjv$g
  1652.  
  1653. mysql -u root -p.
  1654. 123456
  1655. runuser = asterisk
  1656. rungroup = asterisk
  1657.  
  1658. .$$$$$$$$$$$$$$$=..
  1659. .$7$7.. .7$$7:.
  1660. .$$:. ,$7.7
  1661. .$7. 7$$$$ .$$77
  1662. ..$$. $$$$$ .$$$7
  1663. ..7$ .?. $$$$$ .?. 7$$$.
  1664. $.$. .$$$7. $$$$7 .7$$$. .$$$.
  1665. .777. .$$$$$$77$$$77$$$$$7. $$$,
  1666. $$$~ .7$$$$$$$$$$$$$7. .$$$.
  1667. .$$7 .7$$$$$$$7: ?$$$.
  1668. $$$ ?7$$$$$$$$$$I .$$$7
  1669. $$$ .7$$$$$$$$$$$$$$$$ :$$$.
  1670. $$$ $$$$$$7$$$$$$$$$$$$ .$$$.
  1671. $$$ $$$ 7$$$7 .$$$ .$$$.
  1672. $$$$ $$$$7 .$$$.
  1673. 7$$$7 7$$$$ 7$$$
  1674. $$$$$ $$$
  1675. $$$$7. $$
  1676. $$$$$$$. .7$$$$$$ $$
  1677. $$$$$$$$$$$$7$$$$$$$$$.$$$$$$
  1678. $$$$$$$$$$$$$$$$.
  1679.  
  1680. ____________________________________
  1681. / Лучше ничего не делать, чем делать \
  1682. | ничего. |
  1683. | |
  1684. \ -- Л.Н.Толстой /
  1685. ------------------------------------
  1686. \ __------~~-,
  1687. \ ,' ,
  1688. / \
  1689. / :
  1690. | '
  1691. | |
  1692. | |
  1693. | _-- |
  1694. _| =-. .-. ||
  1695. o|/o/ _. |
  1696. / ~ \ |
  1697. (____@) ___~ |
  1698. |_===~~~.` |
  1699. _______.--~ |
  1700. \________ |
  1701. \ |
  1702. __/-___-- -__
  1703. / _ \
  1704.  
  1705.  
  1706. ----------- Вот так будет выглядеть ----------------------
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755. mcedit /etc/asterisk/manager.conf
  1756. Для включения Asterisk AMI откроем файл /etc/asterisk/manager.conf в текстовом редакторе и укажем параметры:
  1757.  
  1758. [general]
  1759. enabled = yes
  1760. port = 5038
  1761. bindaddr = 0.0.0.0
  1762. timestampevents = yes
  1763. displayconnects = yes
  1764. allowmultiplelogin = yes
  1765. webenabled = no
  1766.  
  1767. #include "manager.d/*.conf"
  1768. Теперь создадим файл настроек для первого пользователя:
  1769. mkdir /etc/asterisk/manager.d
  1770. mcedit /etc/asterisk/manager.d/admin.conf
  1771. chown asterisk:asterisk /etc/asterisk/manager.d/admin.conf
  1772. И добавим в него:
  1773.  
  1774. [admin]
  1775. secret = IXNFO
  1776. deny = 0.0.0.0/0.0.0.0
  1777. permit = 127.0.0.1/255.255.255.0
  1778. permit = 192.168.2.2/255.255.255.255
  1779. permit = 192.168.5.5/255.255.255.255
  1780. read = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
  1781. write = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
  1782. #####################################################################################################
  1783. # cd /var/www/html
  1784. # git clone https://github.com/zheltovanton/asteriskgui.git
  1785. # chown asterisk. /var/www/html/asteriskgui -R
  1786. mcedit /var/www/html/asteriskgui/db/config.php
  1787. mcedit /etc/httpd/conf.d/asteriskgui.conf
  1788. <Directory /var/www/html/asteriskgui/>
  1789. AddDefaultCharset UTF-8
  1790.  
  1791. <IfModule mod_authz_core.c>
  1792. # Apache 2.4
  1793. <RequireAny>
  1794. Require all granted
  1795. </RequireAny>
  1796. </IfModule>
  1797. <IfModule !mod_authz_core.c>
  1798. # Apache 2.2
  1799. Order Deny,Allow
  1800. Deny from All
  1801. Allow from 127.0.0.1
  1802. Allow from ::1
  1803. </IfModule>
  1804. </Directory>
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877. apt-get install -y linux-headers-`uname -r` libapache2-mod-log-sql-ssl libfreetype6-dev doxygen yasm nasm gdb cmake build-essential make automake autoconf 'libtool-bin|libtool' python python-dev uuid uuid-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev ccache libpng-dev libopenal-dev libcodec2-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libperl-dev
  1878.  
  1879. apt-get install -y libpq-dev subversion gcc lynx bison flex memcached libshout3-dev libvpx-dev mpg123 libmpg123-dev libmp3lame-dev libncurses5-dev libpng16-16 libxml2-dev libxml2 libcurl4 libnewt-dev sqlite3
  1880.  
  1881. apt-get install -y libasound2-dev sox pkg-config libedit-dev libcppdb-odbc0 unixodbc unixodbc-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp2-1 libspandsp-dev sendmail sendmail-bin sendmail-cf
  1882. apt-get install -y haveged odbcinst
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888. --------------------------------------------------------------------------------------------------
  1889. apt update && apt upgrade -y
  1890. sudo whoami
  1891. root
  1892. su
  1893. apt update
  1894. apt upgrade
  1895. apt install software-properties-common dirmngr
  1896.  
Add Comment
Please, Sign In to add comment