load-net

asterisk_18

Jun 27th, 2021 (edited)
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.05 KB | None | 0 0
  1. https://apihost.ru/voice
  2. https://osdn.net/projects/android-x86/downloads/68670/cm-x86-14.1-r5.iso/
  3. http://linux.mixed-spb.ru/asterisk/sounds_russian.php
  4.  
  5. При настройке с помощью chan_sip
  6. no — Не выполняйте обработку NAT, отличную от RFC 3581.
  7. force_rport — Если параметр rport отсутствует, все равно отправьте ответы на исходный IP-адрес и порт, как если бы присутствовал параметр rport.
  8. comedia — Отправьте медиа на адрес и порт, с которого Asterisk получил его, независимо от того, где SDP указывает, что его следует отправить.
  9. auto_force_rport — Автоматически разрешить отправку ответов на исходный IP-адрес и порт, как если бы присутствовал rport, если Asterisk обнаружит NAT. По умолчанию.
  10. auto_comedia — Автоматически отправлять носитель на порт, с которого Asterisk получил его, независимо от того, где SDP указывает, что его следует отправить, если Asterisk обнаружит NAT.
  11.  
  12. В chan_pjsip параметры конечной точки , которые управляют поведением NAT:
  13. rtp_symmetric — отправляет носитель на адрес и порт, с которого Asterisk получает его, независимо от того, где SDP указывает, что его следует отправить
  14. force_rport — отправлять ответы на исходный IP-адрес и порт, как если бы порт присутствовал, даже если это не так
  15. rewrite_contact — переписать SIP. Контакт с адресом источника и портом запроса, чтобы последующие запросы перешли на этот адрес и порт.
  16.  
  17. timedatectl set-timezone Asia/Yekaterinburg
  18. timedatectl set-ntp yes
  19.  
  20. !
  21.  
  22. Защита ключем !!!!!
  23. puttygen.exe
  24. rsa
  25. generate
  26. Копируем содержимое из окна Public key pasting into OpenSSH autorized_kes file:
  27. И втсавляем его в файл
  28. Вот пример
  29.  
  30. mkdir -p ~/.ssh
  31. echo ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA6BU1usFtvHK9rupAKA5TcHM5gB7d8dqFsiV8W7b3h63pEqGRXvYM/tsPLzwHWVsm6D5HGyHQnLHR9pgsG9m6Pb7ZDGjIhh4t2aKm5Qf06F6lqoIZOovsj4asaO7ScpsHqVgNq0J+NkxFnuGZsH0lj5Z+2sYQ0/ixNkteagGdI+pCoQ0LUrqoAdutx60+v1OdS1uMRqjl3S2nzLYCZKFZXrVCpJAl1EmPPW/upiDfL2yPrXOz3oYhR6sTACvLXgUQ9sonpedgoRIQTGMGZ2TxFwxPt1PfYfzn81IHfFDWgMqOO3Ji0PHt5t0Gt1i7FDgjs3FQCKOXLlX8KZ93Xvu9gQ== rsa-key-20210510 >> ~/.ssh/authorized_keys
  32. И сохранием приватный ключ
  33. File-Save private key - В любую папку
  34.  
  35. Настройка Putty
  36. Putty - Connection - SSH - Auth + Private key file for authentication: Нажимаем Browse... И вибираем сохраненный файл с расширением .ppk
  37.  
  38. Putty - Connection - Auto-login username - root
  39.  
  40. Session - Host Name (or IP address) вставляем IP (Узнать IP командой - ip addr show)
  41.  
  42. Saved Session Любое имя например Server1 нажимем Save
  43. Кликаем пару раз на сохраненное название Server1
  44.  
  45.  
  46. mcedit /etc/selinux/config
  47. SELINUX=disabled
  48. reboot
  49. service firewalld stop
  50. systemctl stop firewalld
  51. systemctl disable firewalld
  52. dnf -y install ncurses-devel make pcre-devel openssl-devel git gcc autoconf automake git wget mc tar libsrtp
  53. dnf --enablerepo=powertools install libpcap-devel
  54. dnf --enablerepo=powertools install libedit-devel
  55. dnf --enablerepo=powertools install libsrtp-devel
  56.  
  57.  
  58. cd /usr/src
  59. git clone https://github.com/irontec/sngrep
  60. cd sngrep
  61. ./bootstrap.sh
  62. ./configure && make && make install
  63.  
  64. cd /usr/src
  65. wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-19.0.0.tar.gz
  66. tar xfz asterisk-19.0.0.tar.gz
  67. cd /usr/src/asterisk-19.0.0
  68. contrib/scripts/install_prereq install
  69. contrib/scripts/get_mp3_source.sh
  70. ./configure --libdir=/usr/lib64 --with-crypto --with-ssl=ssl --with-srtp
  71. ./configure --libdir=/usr/lib64
  72. make menuselect
  73. make && make install && make samples && make config && ldconfig
  74.  
  75. groupadd asterisk
  76. useradd -r -d /var/lib/asterisk -g asterisk asterisk
  77. usermod -aG audio,dialout asterisk
  78. chown -R asterisk.asterisk /etc/asterisk /var/{lib,log,spool}/asterisk /usr/lib64/asterisk
  79.  
  80. mcedit /etc/sysconfig/asterisk
  81. AST_USER="asterisk"
  82. AST_GROUP="asterisk"
  83.  
  84. mcedit /etc/asterisk/asterisk.conf
  85. runuser = asterisk
  86. rungroup = asterisk
  87.  
  88. systemctl start asterisk
  89. systemctl enable asterisk
  90. systemctl restart asterisk
  91. core show version
  92.  
  93. cd /usr/src
  94. wget https://repo.mysql.com/yum/mysql-connectors-community/el/8/x86_64/mysql-connector-odbc-8.0.26-1.el8.x86_64.rpm
  95. rpm -Uvh mysql-connector-odbc-8.0.26-1.el8.x86_64.rpm
  96.  
  97. https://www.cyberciti.biz/faq/how-to-install-mariadb-on-centos-8/
  98.  
  99. dnf install mariadb-server
  100. systemctl enable mariadb.service
  101. systemctl restart mariadb.service
  102. mysql_secure_installation
  103. 123456!@#$%^Qq
  104. mysql -u root -p
  105. 123456!@#$%^Qq
  106.  
  107. CREATE DATABASE asterisk DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
  108. GRANT ALL PRIVILEGES ON asterisk.* TO 'asterisk'@'localhost' IDENTIFIED BY 'sdfJHGVhj5g7jghjv$g';
  109. use asterisk
  110. source /usr/src/asterisk-18.4.0/contrib/realtime/mysql/mysql_cdr.sql
  111. source /usr/src/asterisk-18.4.0/contrib/realtime/mysql/mysql_config.sql
  112.  
  113. mysql -u root -p
  114. 123456!@#$%^Qq
  115. use asterisk
  116. SHOW TABLES;
  117.  
  118.  
  119. #########################################################
  120.  
  121. mcedit /etc/odbcinst.ini
  122.  
  123. [MySQL]
  124. Description=ODBC for MySQL
  125. Driver=/usr/lib64/libmyodbc8a.so
  126. Setup=/usr/lib64/libodbcmyS.so
  127. FileUsage=1
  128.  
  129. ######################################################
  130. mcedit /etc/odbc.ini
  131.  
  132. [MariaDB-asteriskcdrdb]
  133. Description=MySQL connection to Asterisk
  134. Trace = Yes
  135. TraceFile = /tmp/odbc.log
  136. Driver=MySQL
  137. Server=localhost
  138. User=asterisk
  139. Password=sdfJHGVhj5g7jghjv$g
  140. Database=asterisk
  141. Port=3306
  142. Socket=/var/lib/mysql/mysql.sock
  143. Option=3
  144. Charset=utf8
  145.  
  146. #######################################################
  147.  
  148. mcedit /etc/asterisk/res_odbc.conf
  149. [ENV]
  150. [asterisk]
  151. enabled=>yes
  152. dsn=>MariaDB-asteriskcdrdb
  153. ;pooling=>no
  154. limit=>1
  155. pre-connect=>yes
  156. username=>asterisk
  157. password=>sdfJHGVhj5g7jghjv$g
  158.  
  159. #####################################################
  160. isql MariaDB-asteriskcdrdb
  161. #####################################################
  162. mcedit /etc/asterisk/cdr_adaptive_odbc.conf
  163.  
  164. [asterisk]
  165. connection=asterisk
  166. table=cdr
  167. usegmtime=no
  168.  
  169.  
  170. alias start => calldate
  171. alias realdst => realdst
  172. alias remoteip => remoteip
  173. alias start => calldate
  174. alias hangupcause => hangupcause
  175. alias peerip => peerip
  176. alias recvip => recvip
  177. alias fromuri => fromuri
  178. alias useragent => useragent
  179. alias filename => filename
  180. alias realsrc => realsrc
  181.  
  182.  
  183. #################################################
  184.  
  185. mcedit /etc/asterisk/cel_odbc.conf
  186. [cel]
  187. connection=asterisk
  188. loguniqueid=yes
  189. table=cel
  190.  
  191. ###############################################
  192.  
  193. mcedit /etc/asterisk/cdr_odbc.conf
  194.  
  195. [global]
  196. dsn=MariaDB-asteriskcdrdb
  197. loguniqueid=yes
  198. dispositionstring=yes
  199. table=cdr
  200. usegmtime=no
  201. hrtime=yes
  202. newcdrcolumns=yes
  203. username=asterisk
  204. password=sdfJHGVhj5g7jghjv$g
  205.  
  206.  
  207. #########################################
  208. odbcinst -q -d
  209.  
  210. mcedit /etc/asterisk/extconfig.conf
  211.  
  212. [settings]
  213.  
  214. ps_aors => odbc,asterisk
  215. ps_asterisk_publications => odbc,asterisk
  216. ps_auths => odbc,asterisk
  217. ps_contacts => odbc,asterisk
  218. ps_domain_aliases => odbc,asterisk
  219. ps_endpoint_id_ips => odbc,asterisk
  220. ps_endpoints => odbc,asterisk
  221. ps_globals => odbc,asterisk
  222. ps_inbound_publications => odbc,asterisk
  223. ps_outbound_publishes => odbc,asterisk
  224. ps_registrations => odbc,asterisk
  225. ps_transports => odbc,asterisk
  226. queues => odbc,asterisk
  227. queue_members => odbc,asterisk
  228. musiconhold => odbc,asterisk;
  229. musiconhold_entry => odbc,asterisk
  230.  
  231.  
  232.  
  233. #######################################################
  234. #######################################################
  235. mysql -u root -p
  236. 123456!@#$%^Qq
  237. use asterisk
  238.  
  239.  
  240. INSERT INTO ps_aors (id, max_contacts) VALUES (103, 1);
  241. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (103, 'userpass', 'dkls45jmj86778t#5b', 103);
  242. 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');
  243.  
  244. INSERT INTO ps_aors (id, max_contacts) VALUES (104, 1);
  245. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (104, 'userpass', 'dklsearg6778t#5b', 104);
  246. 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');
  247.  
  248. INSERT INTO ps_aors (id, max_contacts) VALUES (105, 1);
  249. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (105, 'userpass', '1dfg32', 105);
  250. 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');
  251.  
  252. INSERT INTO ps_aors (id, max_contacts) VALUES (106, 1);
  253. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (106, 'userpass', '1rtg3rtg2', 106);
  254. 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');
  255.  
  256. INSERT INTO ps_aors (id, max_contacts) VALUES (107, 1);
  257. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (107, 'userpass', 'cnm13rtg21', 107);
  258. 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');
  259.  
  260. INSERT INTO ps_aors (id, max_contacts) VALUES (102, 1);
  261. INSERT INTO ps_auths (id, auth_type, password, username) VALUES (102, 'userpass', '1fjfjfgj3211', 102);
  262. 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');
  263.  
  264.  
  265.  
  266. ctrl+c выйти
  267.  
  268. pjsip show endpoints
  269.  
  270.  
  271.  
  272. mcedit /etc/asterisk/pjsip.conf
  273.  
  274. [system]
  275. type = system
  276. timer_t1 = 200
  277. timer_t2 = 1500
  278.  
  279. [global]
  280. ttype = global
  281. disable_multi_domain = yes
  282. ;debug = yes
  283. taskprocessor_overload_trigger = global
  284. unidentified_request_count=5
  285. unidentified_request_period=5
  286. unidentified_request_prune_interval=30
  287. endpoint_identifier_order=username,ip,anonymous
  288. canreinvite=no
  289. insecure=port,invite
  290.  
  291. ;
  292. [transport-udp-nat]
  293. type=transport
  294. protocol=udp
  295. bind=0.0.0.0
  296. local_net=10.10.50.0/24
  297. external_media_address=load.sytes.net
  298. external_signaling_address=load.sytes.net
  299.  
  300. [acl]
  301. type=acl
  302. deny=0.0.0.0/0.0.0.0
  303. permit=176.58.0.0/15
  304. permit=10.0.0.0/8
  305. permit=83.102.160.66
  306. permit=109.105.165.0/24
  307. permit=37.139.38.0/24
  308. permi =185.45.152.128/28
  309. permit=185.45.152.160/27
  310.  
  311. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  312. [555629]
  313. type=registration
  314. transport=transport-udp-nat ;transport-udp
  315. outbound_auth=555629_auth
  316. server_uri=sip:sip.zadarma.com
  317. client_uri=sip:[email protected]
  318. retry_interval=60
  319. fatal_retry_interval=30
  320. forbidden_retry_interval=30
  321. max_retries=10000
  322. expiration=120
  323. contact_user=555629
  324. line=yes
  325. endpoint=555629
  326. auth_rejection_permanent=no
  327. contact_user=555629
  328. server_uri=sip:sip.zadarma.com
  329. client_uri=sip:[email protected]
  330.  
  331. [555629_auth]
  332. type=auth
  333. auth_type=userpass
  334. password=van1hrD38X
  335. username=555629
  336.  
  337. [555629]
  338. type=aor
  339. qualify_frequency=60
  340. contact=sip:sip.zadarma.com
  341.  
  342. [555629]
  343. type=endpoint
  344. transport=transport-udp-nat ;udp-transport
  345. context=zadarma-in
  346. disallow=all
  347. allow=alaw
  348. allow=ulaw
  349. outbound_auth=555629_auth
  350. aors=555629
  351. send_connected_line=false
  352. language=ru
  353. from_domain=sip.zadarma.com
  354. from_user=555629
  355. contact_user=555629
  356. user_eq_phone=no
  357. t38_udptl=no
  358. t38_udptl_ec=none
  359. fax_detect=no
  360. trust_id_inbound=no
  361. t38_udptl_nat=no
  362. direct_media=no
  363. rtp_symmetric=yes
  364. dtmf_mode=auto
  365. from_user=555629
  366. from_domain=sip.zadarma.com
  367. direct_media=no
  368.  
  369.  
  370. [555629]
  371. type=identify
  372. endpoint=555629
  373. match=sip.zadarma.com
  374. match=sip.zadarma.com
  375. match=sipurifr.zadarma.com
  376. match=sipurims.zadarma.com
  377. match=sipuriny.zadarma.com
  378. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  379. [959977]
  380. type=registration
  381. transport=transport-udp-nat ;transport-udp
  382. outbound_auth=959977_auth
  383. server_uri=sip:sip.zadarma.com
  384. client_uri=sip:[email protected]
  385. retry_interval=60
  386. fatal_retry_interval=30
  387. forbidden_retry_interval=30
  388. max_retries=10000
  389. expiration=120
  390. contact_user=959977
  391. line=yes
  392. endpoint=959977
  393. auth_rejection_permanent=no
  394. contact_user=959977
  395. server_uri=sip:sip.zadarma.com
  396. client_uri=sip:[email protected]
  397.  
  398. [959977_auth]
  399. type=auth
  400. auth_type=userpass
  401. password=6agDUjm8x9
  402. username=959977
  403.  
  404. [959977]
  405. type=aor
  406. qualify_frequency=60
  407. contact=sip:sip.zadarma.com
  408.  
  409.  
  410. [959977]
  411. type=endpoint
  412. transport=transport-udp-nat ;udp-transport
  413. context=zadarma-in
  414. disallow=all
  415. allow=alaw
  416. allow=ulaw
  417. outbound_auth=959977_auth
  418. aors=959977
  419. send_connected_line=false
  420. language=ru
  421. from_domain=sip.zadarma.com
  422. from_user=959977
  423. contact_user=959977
  424. user_eq_phone=no
  425. t38_udptl=no
  426. t38_udptl_ec=none
  427. fax_detect=no
  428. trust_id_inbound=no
  429. t38_udptl_nat=no
  430. direct_media=no
  431. rtp_symmetric=yes
  432. dtmf_mode=auto
  433. from_user=959977
  434. from_domain=sip.zadarma.com
  435. direct_media=no
  436.  
  437. [959977]
  438. type=identify
  439. endpoint=959977
  440. match=sip.zadarma.com
  441. match=sip.zadarma.com
  442. match=sipurifr.zadarma.com
  443. match=sipurims.zadarma.com
  444. match=sipuriny.zadarma.com
  445.  
  446.  
  447. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  448.  
  449. [endpoint-template](!)
  450. type = endpoint
  451. transport = transport-udp-nat
  452. context = from-internal
  453. dtmf_mode = rfc4733
  454. disallow = all
  455. allow = ulaw
  456. allow = alaw
  457.  
  458. [auth-template-userpass](!)
  459. type = auth
  460. auth_type = userpass;
  461.  
  462. [aor-template-single-reg](!)
  463. type = aor
  464. max_contacts = 1
  465.  
  466.  
  467.  
  468. ;;;;;;;;;;;users;;;;;;;;;;;;;;;;;;;;;
  469.  
  470. [108](endpoint-template)
  471. auth = auth108
  472. aors = 108
  473. callerid = man 108;
  474.  
  475. [auth108](auth-template-userpass)
  476. username = 108
  477. password = 1JKHKJjj23
  478.  
  479. [108](aor-template-single-reg)
  480.  
  481. ;;;;;;;;;;;;;;;;109;;;;;;;;;;;;;;;;;;;;;
  482.  
  483. [109](endpoint-template)
  484. auth = auth109
  485. aors = 109
  486. callerid = man 109;
  487.  
  488. [auth109](auth-template-userpass)
  489. username = 109
  490. password = 123dsvHGuill
  491.  
  492. [109](aor-template-single-reg)
  493.  
  494.  
  495. ################################################################
  496. mcedit /etc/asterisk/sorcery.conf
  497. [test_sorcery_section]
  498. test=memory
  499.  
  500. [test_sorcery_cache]
  501. test/cache=test
  502. test=memory
  503. ; The following object mapping is the default mapping of external MWI mailbox
  504. ; objects to give persistence to the message counts.
  505. ;
  506. ;[res_mwi_external]
  507. ;mailboxes=astdb,mwi_external
  508.  
  509. ;
  510. ; The following object mappings set PJSIP objects to use realtime database mappings from extconfig
  511. ; with the table names used when automatically generating configuration from the alembic script.
  512. ;
  513. [res_pjsip]
  514. endpoint=realtime,ps_endpoints
  515. endpoint=config,pjsip.conf,criteria=type=endpoint
  516. auth=realtime,ps_auths
  517. auth=config,pjsip.conf,criteria=type=auth
  518. aor=realtime,ps_aors
  519. aor=config,pjsip.conf,criteria=type=aor
  520. ;transport=config,pjsip.conf,criteria=type=transport
  521. ;domain_alias=realtime,ps_domain_aliases
  522. contact=realtime,ps_contacts
  523.  
  524. [res_pjsip_endpoint_identifier_ip]
  525. identify=realtime,ps_endpoint_id_ips
  526.  
  527. [res_pjsip_outbound_publish]
  528. outbound-publish=realtime,ps_outbound_publishes
  529.  
  530. [res_pjsip_pubsub]
  531. inbound-publication=realtime,ps_inbound_publications
  532.  
  533. [res_pjsip_publish_asterisk]
  534. asterisk-publication=realtime,ps_asterisk_publications
  535.  
  536.  
  537. *********************************************************************
  538. asterisk -rvvvvvvvvvvvvvvvvvv
  539. odbc show all
  540. *****************************************************************
  541. Debian
  542. https://computingforgeeks.com/install-phpmyadmin-with-apache-on-debian/
  543.  
  544.  
  545. Centos
  546. https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-centos-8-quickstart-ru
  547.  
  548. dnf install httpd
  549. systemctl start httpd
  550. systemctl enable httpd
  551.  
  552. yum install -y wget php php-pdo php-pecl-zip php-json php-common php-fpm php-mbstring php-cli php-mysqlnd php-xml php-json php-mbstring
  553.  
  554. cd /usr/src
  555. wget https://files.phpmyadmin.net/phpMyAdmin/5.1.0/phpMyAdmin-5.1.0-all-languages.tar.gz
  556. tar -zxvf phpMyAdmin-5.1.0-all-languages.tar.gz
  557. mv phpMyAdmin-5.1.0-all-languages/ /usr/share/phpMyAdmin
  558. cp -pr /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php
  559.  
  560. mcedit /usr/share/phpMyAdmin/config.inc.php
  561. $cfg['blowfish_secret'] = 'bo95yavJ;Vcas,1PzSlxyFwtyMJ}WmG98-6'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
  562.  
  563. #######################################################################
  564. mcedit /etc/httpd/conf.d/phpMyAdmin.conf
  565.  
  566. Alias /phpMyAdmin /usr/share/phpMyAdmin
  567. Alias /phpmyadmin /usr/share/phpMyAdmin
  568.  
  569. <Directory /usr/share/phpMyAdmin/>
  570. AddDefaultCharset UTF-8
  571.  
  572. <IfModule mod_authz_core.c>
  573. # Apache 2.4
  574. <RequireAny>
  575. Require all granted
  576. </RequireAny>
  577. </IfModule>
  578. <IfModule !mod_authz_core.c>
  579. # Apache 2.2
  580. Order Deny,Allow
  581. Deny from All
  582. Allow from 127.0.0.1
  583. Allow from ::1
  584. </IfModule>
  585. </Directory>
  586.  
  587. <Directory /usr/share/phpMyAdmin/setup/>
  588. <IfModule mod_authz_core.c>
  589. # Apache 2.4
  590. <RequireAny>
  591. Require all granted
  592. </RequireAny>
  593. </IfModule>
  594. <IfModule !mod_authz_core.c>
  595. # Apache 2.2
  596. Order Deny,Allow
  597. Deny from All
  598. Allow from 127.0.0.1
  599. Allow from ::1
  600. </IfModule>
  601. </Directory>
  602.  
  603. #############################################################
  604. mkdir /usr/share/phpMyAdmin/tmp
  605. chmod 777 /usr/share/phpMyAdmin/tmp
  606. chown -R apache:apache /usr/share/phpMyAdmin
  607. systemctl restart httpd
  608.  
  609.  
  610. Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: xml
  611. dnf install php-xml
  612.  
  613. ########################################################################
  614.  
  615.  
  616.  
  617. asterisk
  618. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  619. mcedit /etc/asterisk/pjsip.conf
  620.  
  621. [transport-udp-nat]
  622. type=transport
  623. protocol=udp
  624. bind=0.0.0.0
  625. local_net=10.10.50.0/24
  626. external_media_address=109.105.165.107
  627. external_signaling_address=109.105.165.107
  628.  
  629. [acl]
  630. type=acl
  631. deny=0.0.0.0/0.0.0.0
  632. permit=176.59.192.0-176.59.223.255
  633. permit=10.0.0.0/8
  634. permit=83.102.160.66
  635. permit=109.105.165.0/24
  636.  
  637. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  638. mcedit /etc/asterisk/extensions.conf
  639. [zadarma-in]
  640. exten => 620465,1,Set(CHANNEL(accountcode)=277)
  641. same => n,Goto(lk_620465_pbx,620465,1)
  642. same => n,Hangup
  643.  
  644.  
  645. [zadarma-out]
  646. exten => _XXX,1,Dial(PJSIP/${EXTEN}) ; звонки на трехзначные внутренние номера aстериска
  647. exten => _XXX.,1,Dial(PJSIP/${EXTEN}@620465) ; звонки на номера в которых четрые и более цифр через транк 620465
  648.  
  649. ;exten => _XXX,1,Gosub(sub-devstate,${EXTEN},1)
  650. ;exten => _XXX,n,Dial(SIP/${EXTEN},90,trm)
  651. ;exten => _XXX,n,Hangup()
  652.  
  653.  
  654. exten => 101,1,Gosub(sub-devstate,${EXTEN},1)
  655. same => n,Mixmonitor(/home/${EXTEN}n_.${UNIQUEID}.wav,b)
  656. same => n(local_out),Dial(PJSIP/101,3,rt)
  657. same => n,GotoIfTime(18:00-08:00,mon-fri,*,*?local_out)
  658. same => n,Set(CALLERID(num)=00000000)
  659. same => n,Dial(PJSIP/241247@620465)
  660.  
  661. exten => 1,1,Set(CHANNEL(accountcode)=549)
  662. same => n,Answer
  663. same => n,MixMonitor(/home/${EXTEN}n_.${UNIQUEID}.wav,b)
  664. same => n,Queue(test_all,rt)
  665.  
  666. exten => 2,1,Set(CDR(description)=ivr:${EXTEN})
  667. same => n,MixMonitor(/home/${EXTEN}n_.${UNIQUEID}.wav,b)
  668. same => n,Dial(PJSIP/102,20,rt)
  669. ; same => n,Dial(PJSIP/101,20,rt)
  670. same => n,GotoIfTime(*,*,28-31,jul?weekend2)
  671. same => n,GotoIfTime(*,*,1-20,jan?weekend2)
  672. same => n,Dial(PJSIP/101,15,rt)
  673. same => n,Set(CALLERID(num)=73452999999)
  674. same => n,Goto(exten,1,1)
  675. same => n,Hangup
  676. same => n(weekend2),Dial(PJSIP/241247@620465,,rt)
  677. same => n,Hangup
  678.  
  679.  
  680. [sub-devstate]
  681. exten => _X.,1,Log(NOTICE, "${EXTEN} has DEVICE STATE ${DEVICE_STATE(SIP/${EXTEN})}")
  682. exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "BUSY"]?s-BUSY,1)
  683. exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "INUSE"]?s-BUSY,1)
  684. exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "INVALID"]?s-INVALID,1)
  685. exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "UNAVAILABLE"]?s-UNAVAILABLE,1)
  686. exten => _X.,n,Return()
  687. exten => s-BUSY,1,NoOp(Абонент ${EXTEN} в данный момент разговаривает)
  688. exten => s-BUSY,n,Playback(extension-is-busy)
  689. exten => s-BUSY,n,Hangup(17)
  690. exten => s-INVALID,1,NoOp(Абонент ${EXTEN} не существует)
  691. exten => s-INVALID,n,Goto(no-number,${EXTEN},1)
  692. exten => s-INVALID,n,Hangup(1)
  693. exten => s-UNAVAILABLE,1,NoOp(Абонент ${EXTEN} не доступен)
  694. exten => s-UNAVAILABLE,n,Playback(ss-noservice)
  695. exten => s-UNAVAILABLE,n,Wait(2)
  696. exten => s-UNAVAILABLE,n,Hangup(18)
  697. [no-number]
  698. exten => _X.,1,NoOp(Статус набора - ${DIALSTATUS})
  699. exten => _X.,n,Goto(invalid-number,1)
  700. exten => invalid-number,1,NoOp(Неверно набран номер)
  701. exten => invalid-number,n,Set(CDR(userfield)=No Number)
  702. exten => invalid-number,n,Playback(pbx-invalid)
  703. exten => invalid-number,n,Wait(1)
  704. exten => invalid-number,n,Hangup()
  705. exten => t,1,Playback(vm-goodbye)
  706. exten => t,n,Hangup()
  707.  
  708. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  709. mcedit /etc/asterisk/queue.conf
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716. /////////////////////////////////////////////////////////////////////////////////////////
  717.  
  718.  
  719. dnf install iptables-services
  720. systemctl enable iptables
  721.  
  722. mcedit /etc/asterisk/logger.conf
  723. security => security
  724. console => notice,warning,error
  725. console => notice,warning,error,debug
  726. messages => notice,warning,error
  727. full => notice,warning,error,debug,verbose,dtmf,fax
  728.  
  729. dnf install fail2ban
  730.  
  731.  
  732.  
  733.  
  734.  
  735. fail2ban-client unban 10.10.50.16
  736. fail2ban-client unban 37.139.38.15
  737.  
  738.  
  739. iptables -nL --line-numbers
  740. iptables -L -n
  741. fail2ban-client reload
  742. mcedit /etc/fail2ban/jail.conf
  743. iptables -D f2b-asterisk-tcp 1
  744. iptables -D f2b-asterisk-udp 1
  745.  
  746.  
  747.  
  748. pjsip show channels
  749.  
  750. ############## Звонок из консоли #########################
  751. channel originate local/107@from-internal application echo
  752.  
  753. rasterisk -x "core show channels verbose"
  754.  
  755.  
  756. ################## Заметки ##############################
  757. watch "asterisk -vvvvvrx 'core show channels' | grep channels"
  758. watch "asterisk -vvvvvrx 'core show channels' | grep calls"
  759. watch "asterisk -vvvvvrx 'core show channels verbose'"
  760.  
  761. watch "asterisk -vvvvvrx 'core show channels verbose'"
  762. watch -n 2 "rasterisk -x 'queue show q560010_all'"
  763. watch -n 2 "rasterisk -x 'queue show que_560050'"
  764.  
  765. watch "asterisk -vvvvvrx 'core show channels' | egrep \"(call|channel)\""
  766. asterisk -rx 'core show channels' | grep -m1 "call" | cut -d' ' -f1
  767. asterisk -rx "core show calls" | grep "active" | cut -d' ' -f1
  768. watch "asterisk -vvvvvrx 'core show channels verbose'"
  769. watch -n 5 "asterisk -rx 'core show calls' | grep active"
  770. watch -n 1 "asterisk -vvvvvrx 'core show channels' | grep call"
  771.  
  772. rasterisk -x "sip show peers" | grep 10.20.101. | sort -t . -k 3,3n -k 4,4n
  773.  
  774. Снять с паузы
  775. rasterisk -x 'queue unpause member SIP/lk_gp1_g-237 queue q560050_1_norobot'
  776.  
  777. rasterisk -x "database show REDIRECT "
  778. rasterisk -x "database put REDIRECT 2222 89324823365"
  779. rasterisk -x "database del REDIRECT 2222"
  780.  
  781. rasterisk -x "sip show peers" | grep 85.15.190 | wc -l
  782.  
  783.  
  784. 1xx
  785. 8[2-9]xxxxxxxxx
  786. [2-79]xxxxx
  787. 0x
  788.  
  789. “sun” | “mon” | “tue” | “wed” | “thu” | “fri” | “sat”
  790. “jan” | “feb” | “mar” | “apr” | “may” | “jun” | “jul” | “aug” | “sep” | “oct” | “nov” | “dec”
  791. same => n(start),GotoIfTime(08:00-20:00,mon-fri,*,*?ok1:)
  792. same => n(start),GotoIfTime(08:00-20:00,sat-sun,*,*?ok1:)
  793.  
  794. rasterisk -x "dialplan reload"
  795. rasterisk -x "sip reload"
  796. rasterisk -x "queue reload all"
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806. Изменить цветность в консоле mc
  807. wget http://..............asterisk.syntax -P /usr/share/mc/syntax/
  808. mcedit /usr/share/mc/syntax/Syntax
  809.  
  810. куда угодно можно, лишь бы перед последними двумя.
  811.  
  812. file .\* unknown
  813. include asterisk.syntax
  814.  
  815. file .\* unknown
  816. include unknown.syntax
  817.  
  818. ##########################Сохранит как asterisk.syntax ####################################################
  819. # Description : Syntax rules for Asterisk dialplan language
  820. # Author : Rozes "Ramzes" Alexander
  821. # Date : 2017-04-06
  822. # Usage : Add following lines at Syntax file
  823. # file extensions.\*\\.conf$ Asterisk\sdialplan
  824. # include asterisk.syntax
  825.  
  826. context default
  827. keyword whole \{Aa\}dd\{Qq\}ueue\{Mm\}ember brightmagenta
  828. keyword whole \{Aa\}\{Dd\}\{Ss\}\{Ii\}\{Pp\}rog brightmagenta
  829. keyword whole \{Aa\}gent\{Ll\}ogin brightmagenta
  830. keyword whole \{Aa\}gent\{Rr\}equest brightmagenta
  831. keyword whole \{Aa\}\{Gg\}\{Ii\} brightmagenta
  832. keyword whole \{Aa\}larm\{Rr\}eceiver brightmagenta
  833. keyword whole \{Aa\}\{Mm\}\{Dd\} brightmagenta
  834. keyword whole \{Aa\}nswer brightmagenta
  835. keyword whole \{Aa\}uthenticate brightmagenta
  836. keyword whole \{Bb\}ack\{Gg\}round brightmagenta
  837. keyword whole \{Bb\}ackground\{Dd\}etect brightmagenta
  838. keyword whole \{Bb\}ridge brightmagenta
  839. keyword whole \{Bb\}ridge\{Ww\}ait brightmagenta
  840. keyword whole \{Bb\}usy brightmagenta
  841. keyword whole \{Cc\}all\{Cc\}ompletion\{Cc\}ancel brightmagenta
  842. keyword whole \{Cc\}all\{Cc\}ompletion\{Rr\}equest brightmagenta
  843. keyword whole \{Cc\}\{Ee\}\{Ll\}\{Gg\}en\{Uu\}ser\{Ee\}vent brightmagenta
  844. keyword whole \{Cc\}hange\{Mm\}onitor brightmagenta
  845. keyword whole \{Cc\}han\{Ii\}s\{Aa\}vail brightmagenta
  846. keyword whole \{Cc\}hannel\{Rr\}edirect brightmagenta
  847. keyword whole \{Cc\}han\{Ss\}py brightmagenta
  848. keyword whole \{Cc\}lear\{Hh\}ash brightmagenta
  849. keyword whole \{Cc\}onf\{Bb\}ridge brightmagenta
  850. keyword whole \{Cc\}ongestion brightmagenta
  851. keyword whole \{Cc\}ontinue\{Ww\}hile brightmagenta
  852. keyword whole \{Cc\}ontrol\{Pp\}layback brightmagenta
  853. keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Rr\}\{Aa\}\{Ss\} brightmagenta
  854. keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Ss\}can brightmagenta
  855. keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Ss\}end\{Cc\}allrerouting\{Ff\}acility brightmagenta
  856. keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Ss\}end\{Kk\}eypad\{Ff\}acility brightmagenta
  857. keyword whole \{Dd\}ate\{Tt\}ime brightmagenta
  858. keyword whole \{Dd\}\{Bb\}del brightmagenta
  859. keyword whole \{Dd\}\{Bb\}deltree brightmagenta
  860. keyword whole \{Dd\}ead\{Aa\}\{Gg\}\{Ii\} brightmagenta
  861. keyword whole \{Dd\}ial brightmagenta
  862. keyword whole \{Dd\}ictate brightmagenta
  863. keyword whole \{Dd\}irectory brightmagenta
  864. keyword whole \{Dd\}\{Ii\}\{Ss\}\{Aa\} brightmagenta
  865. keyword whole \{Dd\}ump\{Cc\}han brightmagenta
  866. keyword whole \{Ee\}\{Aa\}\{Gg\}\{Ii\} brightmagenta
  867. keyword whole \{Ee\}cho brightmagenta
  868. keyword whole \{Ee\}ndWhile brightmagenta
  869. keyword whole \{Ee\}xec brightmagenta
  870. keyword whole \{Ee\}xec\{Ii\}f brightmagenta
  871. keyword whole \{Ee\}xec\{Ii\}f\{Tt\}ime brightmagenta
  872. keyword whole \{Ee\}xit\{Ww\}hile brightmagenta
  873. keyword whole \{Ee\}xten\{Ss\}py brightmagenta
  874. keyword whole \{Ee\}xternal\{Ii\}\{Vv\}\{Rr\} brightmagenta
  875. keyword whole \{Ff\}estival brightmagenta
  876. keyword whole \{Ff\}lash brightmagenta
  877. keyword whole \{Ff\}ollow\{Mm\}e brightmagenta
  878. keyword whole \{Ff\}ork\{Cc\}\{Dd\}\{Rr\} brightmagenta
  879. keyword whole \{Gg\}et\{Cc\}\{Pp\}\{Ee\}\{Ii\}\{Dd\} brightmagenta
  880. keyword whole \{Gg\}o\{Ss\}ub brightmagenta
  881. keyword whole \{Gg\}o\{Ss\}ub\{Ii\}f brightmagenta
  882. keyword whole \{Gg\}o\{Tt\}o brightmagenta
  883. keyword whole \{Gg\}oto\{Ii\}f brightmagenta
  884. keyword whole \{Gg\}oto\{Ii\}f\{Tt\}ime brightmagenta
  885. keyword whole \{Hh\}angup brightmagenta
  886. keyword whole \{Hh\}angup\{Cc\}ause\{Cc\}lear brightmagenta
  887. keyword whole \{Ii\}\{Aa\}\{Xx\}2\{Pp\}rovision brightmagenta
  888. keyword whole \{Ii\}\{Cc\}\{Ee\}\{Ss\} brightmagenta
  889. keyword whole \{Ii\}mport\{Vv\}ar brightmagenta
  890. keyword whole \{Ii\}ncomplete brightmagenta
  891. keyword whole \{Ii\}\{Vv\}\{Rr\}\{Dd\}emo brightmagenta
  892. keyword whole \{Jj\}abber\{Jj\}oin brightmagenta
  893. keyword whole \{Jj\}abber\{Ll\}eave brightmagenta
  894. keyword whole \{Jj\}abber\{Ss\}end brightmagenta
  895. keyword whole \{Jj\}abber\{Ss\}end\{Gg\}roup brightmagenta
  896. keyword whole \{Jj\}abber\{Ss\}tatus brightmagenta
  897. keyword whole \{Ll\}og brightmagenta
  898. keyword whole \{Mm\}acro brightmagenta
  899. keyword whole \{Mm\}acro\{Ee\}xclusive brightmagenta
  900. keyword whole \{Mm\}acro\{Ee\}xit brightmagenta
  901. keyword whole \{Mm\}acro\{Ii\}f brightmagenta
  902. keyword whole \{Mm\}acro\{Rr\}eturn brightmagenta
  903. keyword whole \{Mm\}ailbox\{Ee\}xists brightmagenta
  904. keyword whole \{Mm\}eet\{Mm\}e brightmagenta
  905. keyword whole \{Mm\}eet\{Mm\}e\{Aa\}dmin brightmagenta
  906. keyword whole \{Mm\}eet\{Mm\}e\{Cc\}hannel\{Aa\}dmin brightmagenta
  907. keyword whole \{Mm\}eet\{Mm\}e\{Cc\}ount brightmagenta
  908. keyword whole \{Mm\}essage\{Ss\}end brightmagenta
  909. keyword whole \{Mm\}illiwatt brightmagenta
  910. keyword whole \{Mm\}inivm\{Aa\}cc\{Mm\}ess brightmagenta
  911. keyword whole \{Mm\}inivm\{Dd\}elete brightmagenta
  912. keyword whole \{Mm\}inivm\{Gg\}reet brightmagenta
  913. keyword whole \{Mm\}inivm\{Mm\}\{Ww\}\{Ii\} brightmagenta
  914. keyword whole \{Mm\}inivm\{Nn\}otify brightmagenta
  915. keyword whole \{Mm\}inivm\{Rr\}ecord brightmagenta
  916. keyword whole \{Mm\}ix\{Mm\}onitor brightmagenta
  917. keyword whole \{Mm\}onitor brightmagenta
  918. keyword whole \{Mm\}orsecode brightmagenta
  919. keyword whole \{Mm\}\{Pp\}3\{Pp\}layer brightmagenta
  920. keyword whole \{Mm\}\{Ss\}et brightmagenta
  921. keyword whole \{Mm\}usic\{Oo\}n\{Hh\}old brightmagenta
  922. keyword whole \{Nn\}\{Bb\}\{Ss\}cat brightmagenta
  923. keyword whole \{Nn\}o\{Cc\}\{Dd\}\{Rr\} brightmagenta
  924. keyword whole \{Nn\}o\{Oo\}\{Pp\} brightmagenta
  925. keyword whole \{Oo\}\{Dd\}\{Bb\}\{Cc\}_\{Cc\}ommit brightmagenta
  926. keyword whole \{Oo\}\{Dd\}\{Bb\}\{Cc\}_\{Rr\}ollback brightmagenta
  927. keyword whole \{Oo\}\{Dd\}\{Bb\}\{Cc\}\{Ff\}inish brightmagenta
  928. keyword whole \{Oo\}riginate brightmagenta
  929. keyword whole \{Pp\}age brightmagenta
  930. keyword whole \{Pp\}ark brightmagenta
  931. keyword whole \{Pp\}ark\{Aa\}nd\{Aa\}nnounce brightmagenta
  932. keyword whole \{Pp\}arked\{Cc\}all brightmagenta
  933. keyword whole \{Pp\}ause\{Mm\}onitor brightmagenta
  934. keyword whole \{Pp\}ause\{Qq\}ueue\{Mm\}ember brightmagenta
  935. keyword whole \{Pp\}ickup brightmagenta
  936. keyword whole \{Pp\}ickup\{Cc\}han brightmagenta
  937. keyword whole \{Pp\}layback brightmagenta
  938. keyword whole \{Pp\}lay\{Tt\}ones brightmagenta
  939. keyword whole \{Pp\}rivacy\{Mm\}anager brightmagenta
  940. keyword whole \{Pp\}roceeding brightmagenta
  941. keyword whole \{Pp\}rogress brightmagenta
  942. keyword whole \{Qq\}ueue brightmagenta
  943. keyword whole \{Qq\}ueue\{Ll\}og brightmagenta
  944. keyword whole \{Rr\}aise\{Ee\}xception brightmagenta
  945. keyword whole \{Rr\}ead brightmagenta
  946. keyword whole \{Rr\}ead\{Ee\}xten brightmagenta
  947. keyword whole \{Rr\}eceive\{Ff\}\{Aa\}\{Xx\} brightmagenta
  948. keyword whole \{Rr\}ecord brightmagenta
  949. keyword whole \{Rr\}emove\{Qq\}ueue\{Mm\}ember brightmagenta
  950. keyword whole \{Rr\}eset\{Cc\}\{Dd\}\{Rr\} brightmagenta
  951. keyword whole \{Rr\}etry\{Dd\}ial brightmagenta
  952. keyword whole \{Rr\}eturn brightmagenta
  953. keyword whole \{Rr\}inging brightmagenta
  954. keyword whole \{Ss\}ay\{Aa\}lpha brightmagenta
  955. keyword whole \{Ss\}ay\{Aa\}lpha\{Cc\}ase brightmagenta
  956. keyword whole \{Ss\}ay\{Cc\}ounted\{Aa\}dj brightmagenta
  957. keyword whole \{Ss\}ay\{Cc\}ounted\{Nn\}oun brightmagenta
  958. keyword whole \{Ss\}ay\{Dd\}igits brightmagenta
  959. keyword whole \{Ss\}ay\{Nn\}umber brightmagenta
  960. keyword whole \{Ss\}ay\{Pp\}honetic brightmagenta
  961. keyword whole \{Ss\}ay\{Uu\}nix\{Tt\}ime brightmagenta
  962. keyword whole \{Ss\}end\{Dd\}\{Tt\}\{Mm\}\{Ff\} brightmagenta
  963. keyword whole \{Ss\}end\{Ff\}\{Aa\}\{Xx\} brightmagenta
  964. keyword whole \{Ss\}end\{Ii\}mage brightmagenta
  965. keyword whole \{Ss\}end\{Tt\}ext brightmagenta
  966. keyword whole \{Ss\}end\{Uu\}\{Rr\}\{Ll\} brightmagenta
  967. keyword whole \{Ss\}et brightmagenta
  968. keyword whole \{Ss\}et\{Vv\}ar brightmagenta
  969. keyword whole \{Ss\}et\{Aa\}\{Mm\}\{Aa\}\{Ff\}lags brightmagenta
  970. keyword whole \{Ss\}\{Ii\}\{Pp\}\{Aa\}dd\{Hh\}eader brightmagenta
  971. keyword whole \{Ss\}\{Ii\}\{Pp\}\{Dd\}\{Tt\}\{Mm\}\{Ff\}\{Mm\}ode brightmagenta
  972. keyword whole \{Ss\}\{Ii\}\{Pp\}\{Rr\}emove\{Hh\}eader brightmagenta
  973. keyword whole \{Ss\}kel\{Gg\}uess\{Nn\}umber brightmagenta
  974. keyword whole \{Ss\}\{Ll\}\{Aa\}\{Ss\}tation brightmagenta
  975. keyword whole \{Ss\}\{Ll\}\{Aa\}\{Tt\}runk brightmagenta
  976. keyword whole \{Ss\}\{Mm\}\{Ss\} brightmagenta
  977. keyword whole \{Ss\}oft\{Hh\}angup brightmagenta
  978. keyword whole \{Ss\}peech\{Aa\}ctivate\{Gg\}rammar brightmagenta
  979. keyword whole \{Ss\}peech\{Bb\}ackground brightmagenta
  980. keyword whole \{Ss\}peech\{Cc\}reate brightmagenta
  981. keyword whole \{Ss\}peech\{Dd\}eactivate\{Gg\}rammar brightmagenta
  982. keyword whole \{Ss\}peech\{Dd\}estroy brightmagenta
  983. keyword whole \{Ss\}peech\{Ll\}oad\{Gg\}rammar brightmagenta
  984. keyword whole \{Ss\}peech\{Pp\}rocessing\{Ss\}ound brightmagenta
  985. keyword whole \{Ss\}peech\{Ss\}tart brightmagenta
  986. keyword whole \{Ss\}peech\{Uu\}nload\{Gg\}rammar brightmagenta
  987. keyword whole \{Ss\}tack\{Pp\}op brightmagenta
  988. keyword whole \{Ss\}tart\{Mm\}usic\{Oo\}n\{Hh\}old brightmagenta
  989. keyword whole \{Ss\}tasis brightmagenta
  990. keyword whole \{Ss\}top\{Mm\}ix\{Mm\}onitor brightmagenta
  991. keyword whole \{Ss\}top\{Mm\}onitor brightmagenta
  992. keyword whole \{Ss\}top\{Mm\}usic\{Oo\}n\{Hh\}old brightmagenta
  993. keyword whole \{Ss\}top\{Pp\}lay\{Tt\}ones brightmagenta
  994. keyword whole \{Ss\}ystem brightmagenta
  995. keyword whole \{Tt\}est\{Cc\}lient brightmagenta
  996. keyword whole \{Tt\}est\{Ss\}erver brightmagenta
  997. keyword whole \{Tt\}ransfer brightmagenta
  998. keyword whole \{Tt\}ry\{Ee\}xec brightmagenta
  999. keyword whole \{Tt\}ry\{Ss\}ystem brightmagenta
  1000. keyword whole \{Uu\}npause\{Mm\}onitor brightmagenta
  1001. keyword whole \{Uu\}npause\{Qq\}ueue\{Mm\}ember brightmagenta
  1002. keyword whole \{Uu\}ser\{Ee\}vent brightmagenta
  1003. keyword whole \{Vv\}erbose brightmagenta
  1004. keyword whole \{Vv\}\{Mm\}\{Aa\}uthenticate brightmagenta
  1005. keyword whole \{Vv\}\{Mm\}\{Ss\}ay\{Nn\}ame brightmagenta
  1006. keyword whole \{Vv\}oice\{Mm\}ail brightmagenta
  1007. keyword whole \{Vv\}oice\{Mm\}ail\{Mm\}ain brightmagenta
  1008. keyword whole \{Vv\}oice\{Mm\}ail\{Pp\}lay\{Mm\}sg brightmagenta
  1009. keyword whole \{Ww\}ait brightmagenta
  1010. keyword whole \{Ww\}ait\{Ee\}xten brightmagenta
  1011. keyword whole \{Ww\}ait\{Ff\}or\{Nn\}oise brightmagenta
  1012. keyword whole \{Ww\}ait\{Ff\}or\{Rr\}ing brightmagenta
  1013. keyword whole \{Ww\}ait\{Ff\}or\{Ss\}ilence brightmagenta
  1014. keyword whole \{Ww\}ait\{Uu\}ntil brightmagenta
  1015. keyword whole \{Ww\}hile brightmagenta
  1016. keyword whole \{Zz\}apateller brightmagenta
  1017.  
  1018. keyword whole AES_DECRYPT yellow
  1019. keyword whole AES_ENCRYPT yellow
  1020. keyword whole AGC yellow
  1021. keyword whole AGENT yellow
  1022. keyword whole AMI_CLIENT yellow
  1023. keyword whole ARRAY yellow
  1024. keyword whole AST_CONFIG yellow
  1025. keyword whole AST_SORCERY yellow
  1026. keyword whole AUDIOHOOK_INHERIT yellow
  1027. keyword whole BASE64_DECODE yellow
  1028. keyword whole BASE64_ENCODE yellow
  1029. keyword whole BLACKLIST yellow
  1030. keyword whole CALENDAR_BUSY yellow
  1031. keyword whole CALENDAR_EVENT yellow
  1032. keyword whole CALENDAR_QUERY yellow
  1033. keyword whole CALENDAR_QUERY_RESUL yellow
  1034. keyword whole CALENDAR_WRITE yellow
  1035. keyword whole CALLCOMPLETION yellow
  1036. keyword whole CALLERID yellow
  1037. keyword whole CALLERPRES yellow
  1038. keyword whole CDR yellow
  1039. keyword whole CDR_PROP yellow
  1040. keyword whole CHANNEL yellow
  1041. keyword whole CHANNELS yellow
  1042. keyword whole CHECKSIPDOMAIN yellow
  1043. keyword whole CONFBRIDGE yellow
  1044. keyword whole CONFBRIDGE_INFO yellow
  1045. keyword whole CONNECTEDLINE yellow
  1046. keyword whole CSV_QUOTE yellow
  1047. keyword whole CURL yellow
  1048. keyword whole CURLOPT yellow
  1049. keyword whole CUT yellow
  1050. keyword whole DB yellow
  1051. keyword whole DB_DELETE yellow
  1052. keyword whole DB_EXISTS yellow
  1053. keyword whole DB_KEYS yellow
  1054. keyword whole DEC yellow
  1055. keyword whole DENOISE yellow
  1056. keyword whole DEVICE_STATE yellow
  1057. keyword whole DIALGROUP yellow
  1058. keyword whole DIALPLAN_EXISTS yellow
  1059. keyword whole DUNDILOOKUP yellow
  1060. keyword whole DUNDIQUERY yellow
  1061. keyword whole DUNDIRESULT yellow
  1062. keyword whole ENUMLOOKUP yellow
  1063. keyword whole ENUMQUERY yellow
  1064. keyword whole ENUMRESULT yellow
  1065. keyword whole ENV yellow
  1066. keyword whole EVAL yellow
  1067. keyword whole EXCEPTION yellow
  1068. keyword whole EXISTS yellow
  1069. keyword whole EXTENSION_STATE yellow
  1070. keyword whole FAXOPT yellow
  1071. keyword whole FEATURE yellow
  1072. keyword whole FEATUREMAP yellow
  1073. keyword whole FIELDNUM yellow
  1074. keyword whole FIELDQTY yellow
  1075. keyword whole FILE yellow
  1076. keyword whole FILE_COUNT_LINE yellow
  1077. keyword whole FILE_FORMAT yellow
  1078. keyword whole FILTER yellow
  1079. keyword whole FRAME_TRACE yellow
  1080. keyword whole GLOBAL yellow
  1081. keyword whole GROUP yellow
  1082. keyword whole GROUP_COUNT yellow
  1083. keyword whole GROUP_LIST yellow
  1084. keyword whole GROUP_MATCH_COUNT yellow
  1085. keyword whole HANGUPCAUSE yellow
  1086. keyword whole HANGUPCAUSE_KEYS yellow
  1087. keyword whole HASH yellow
  1088. keyword whole HASHKEYS yellow
  1089. keyword whole HINT yellow
  1090. keyword whole HOLD_INTERCEPT yellow
  1091. keyword whole IAXPEER yellow
  1092. keyword whole IAXVAR yellow
  1093. keyword whole ICONV yellow
  1094. keyword whole IF yellow
  1095. keyword whole IFMODULE yellow
  1096. keyword whole IFTIME yellow
  1097. keyword whole IMPORT yellow
  1098. keyword whole INC yellow
  1099. keyword whole ISNULL yellow
  1100. keyword whole JABBER_RECEIVE yellow
  1101. keyword whole JABBER_STATUS yellow
  1102. keyword whole JITTERBUFFER yellow
  1103. keyword whole KEYPADHASH yellow
  1104. keyword whole LEN yellow
  1105. keyword whole LISTFILTER yellow
  1106. keyword whole LOCAL yellow
  1107. keyword whole LOCAL_PEEK yellow
  1108. keyword whole LOCK yellow
  1109. keyword whole MAILBOX_EXISTS yellow
  1110. keyword whole MASTER_CHANNEL yellow
  1111. keyword whole MATH yellow
  1112. keyword whole MD5 yellow
  1113. keyword whole MEETME_INFO yellow
  1114. keyword whole MESSAGE yellow
  1115. keyword whole MESSAGE_DATA yellow
  1116. keyword whole MINIVMACCOUNT yellow
  1117. keyword whole MINIVMCOUNTER yellow
  1118. keyword whole MIXMONITOR yellow
  1119. keyword whole MUTEAUDIO yellow
  1120. keyword whole ODBC yellow
  1121. keyword whole ODBC_ANTIGF yellow
  1122. keyword whole ODBC_FETCH yellow
  1123. keyword whole ODBC_PRESENCE yellow
  1124. keyword whole ODBC_SQL yellow
  1125. keyword whole PASSTHRU yellow
  1126. keyword whole PERIODIC_HOOK yellow
  1127. keyword whole PITCH_SHIFT yellow
  1128. keyword whole POP yellow
  1129. keyword whole PP_EACH_EXTENSION yellow
  1130. keyword whole PP_EACH_USER yellow
  1131. keyword whole PRESENCE_STATE yellow
  1132. keyword whole PUSH yellow
  1133. keyword whole QUEUE_EXISTS yellow
  1134. keyword whole QUEUE_MEMBER yellow
  1135. keyword whole QUEUE_MEMBER_COUNT yellow
  1136. keyword whole QUEUE_MEMBER_LIST yellow
  1137. keyword whole QUEUE_MEMBER_PENALTY yellow
  1138. keyword whole QUEUE_VARIABLES yellow
  1139. keyword whole QUEUE_WAITING_COUNT yellow
  1140. keyword whole QUOTE yellow
  1141. keyword whole RAND yellow
  1142. keyword whole REALTIME yellow
  1143. keyword whole REALTIME_DESTROY yellow
  1144. keyword whole REALTIME_FIELD yellow
  1145. keyword whole REALTIME_HASH yellow
  1146. keyword whole REALTIME_STORE yellow
  1147. keyword whole REDIRECTING yellow
  1148. keyword whole REGEX yellow
  1149. keyword whole REPLACE yellow
  1150. keyword whole SET yellow
  1151. keyword whole SHA1 yellow
  1152. keyword whole SHARED yellow
  1153. keyword whole SHELL yellow
  1154. keyword whole SHIFT yellow
  1155. keyword whole SIPPEER yellow
  1156. keyword whole SIP_HEADER yellow
  1157. keyword whole SMDI_MSG yellow
  1158. keyword whole SMDI_MSG_RETRIEVE yellow
  1159. keyword whole SORT yellow
  1160. keyword whole SPEECH yellow
  1161. keyword whole SPEECH_ENGINE yellow
  1162. keyword whole SPEECH_GRAMMAR yellow
  1163. keyword whole SPEECH_RESULTS_TYPE yellow
  1164. keyword whole SPEECH_SCORE yellow
  1165. keyword whole SPEECH_TEXT yellow
  1166. keyword whole SPRINTF yellow
  1167. keyword whole SQL_ESC yellow
  1168. keyword whole SRVQUERY yellow
  1169. keyword whole SRVRESULT yellow
  1170. keyword whole STACK_PEEK yellow
  1171. keyword whole STAT yellow
  1172. keyword whole STRFTIME yellow
  1173. keyword whole STRPTIME yellow
  1174. keyword whole STRREPLACE yellow
  1175. keyword whole SYSINFO yellow
  1176. keyword whole TALK_DETECT yellow
  1177. keyword whole TESTTIME yellow
  1178. keyword whole TIMEOUT yellow
  1179. keyword whole TOLOWER yellow
  1180. keyword whole TOUPPER yellow
  1181. keyword whole TRYLOCK yellow
  1182. keyword whole TXTCIDNAME yellow
  1183. keyword whole UNLOCK yellow
  1184. keyword whole UNSHIFT yellow
  1185. keyword whole URIDECODE yellow
  1186. keyword whole URIENCODE yellow
  1187. keyword whole VALID_EXTEN yellow
  1188. keyword whole VERSION yellow
  1189. keyword whole VMCOUNT yellow
  1190. keyword whole VM_INFO yellow
  1191. keyword whole VOLUME yellow
  1192.  
  1193. # Request from Andy
  1194. keyword whole CBMysql brightmagenta
  1195. keyword whole MYSQL brightmagenta
  1196.  
  1197. keyword $[*] brightgreen
  1198. keyword ${*} brightgreen
  1199.  
  1200. keyword whole \#include brightred
  1201. keyword whole \#exec brightred
  1202. keyword whole include\s*=> brightblue
  1203. keyword whole exten\s*=> brightblue
  1204. keyword whole same\s*=> brightblue
  1205. keyword whole include=> brightblue
  1206. keyword whole exten=> brightblue
  1207. keyword whole same=> brightblue
  1208.  
  1209. keyword , brightcyan
  1210. keyword ( brightcyan
  1211. keyword ) brightcyan
  1212. keyword : brightcyan
  1213. keyword ? brightcyan
  1214.  
  1215. keyword --; brown
  1216.  
  1217. context ;--\n --; brown
  1218.  
  1219. context linestart [ ] yellow
  1220.  
  1221. context ; \n brown
  1222.  
  1223. context exclusive \#exec \n brightgreen
  1224.  
  1225. context exclusive \#include \n brightgreen
  1226.  
  1227. context exclusive include\s=> \n yellow
  1228.  
  1229. context exclusive include=> \n yellow
  1230.  
  1231. context exclusive n( ), yellow
  1232.  
  1233. context exclusive verbose ) white
  1234. keyword ( brightcyan
  1235. keyword $[*] brightgreen
  1236. keyword ${*} brightgreen
  1237.  
  1238. context exclusive Verbose ) white
  1239. keyword ( brightcyan
  1240. keyword $[*] brightgreen
  1241. keyword ${*} brightgreen
  1242.  
  1243. context exclusive No\{Oo\}\{Pp\} ) white
  1244. keyword ( brightcyan
  1245. keyword $[*] brightgreen
  1246. keyword ${*} brightgreen
  1247.  
  1248. context exclusive no\{Oo\}\{Pp\} ) white
  1249. keyword ( brightcyan
  1250. keyword $[*] brightgreen
  1251. keyword ${*} brightgreen
  1252.  
  1253.  
  1254.  
  1255.  
  1256. ########################## До сюда ####################################################
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262. ----------------------Тут пропишем банер ------------------------
  1263.  
  1264. mcedit /etc/issue.net
  1265.  
  1266. mcedit /etc/ssh/sshd_config
  1267. найти изаменить
  1268. Banner /etc/issue.net
  1269.  
  1270. mcedit /etc/motd
  1271.  
  1272. CentOS-Stream-8-x86_64-20210916-boot.iso
  1273. Asterisk asterisk-18.7.0-rc3
  1274. mysql-connector-odbc-8.0.26-1.el8.x86_64.rpm
  1275. username=asterisk
  1276. password=sdfJHGVhj5g7jghjv$g
  1277.  
  1278. mysql -u root -p.
  1279. 123456!@#$%^Qq
  1280. runuser = asterisk
  1281. rungroup = asterisk
  1282.  
  1283. .$$$$$$$$$$$$$$$=..
  1284. .$7$7.. .7$$7:.
  1285. .$$:. ,$7.7
  1286. .$7. 7$$$$ .$$77
  1287. ..$$. $$$$$ .$$$7
  1288. ..7$ .?. $$$$$ .?. 7$$$.
  1289. $.$. .$$$7. $$$$7 .7$$$. .$$$.
  1290. .777. .$$$$$$77$$$77$$$$$7. $$$,
  1291. $$$~ .7$$$$$$$$$$$$$7. .$$$.
  1292. .$$7 .7$$$$$$$7: ?$$$.
  1293. $$$ ?7$$$$$$$$$$I .$$$7
  1294. $$$ .7$$$$$$$$$$$$$$$$ :$$$.
  1295. $$$ $$$$$$7$$$$$$$$$$$$ .$$$.
  1296. $$$ $$$ 7$$$7 .$$$ .$$$.
  1297. $$$$ $$$$7 .$$$.
  1298. 7$$$7 7$$$$ 7$$$
  1299. $$$$$ $$$
  1300. $$$$7. $$
  1301. $$$$$$$. .7$$$$$$ $$
  1302. $$$$$$$$$$$$7$$$$$$$$$.$$$$$$
  1303. $$$$$$$$$$$$$$$$.
  1304.  
  1305. ____________________________________
  1306. / Лучше ничего не делать, чем делать \
  1307. | ничего. |
  1308. | |
  1309. \ -- Л.Н.Толстой /
  1310. ------------------------------------
  1311. \ __------~~-,
  1312. \ ,' ,
  1313. / \
  1314. / :
  1315. | '
  1316. | |
  1317. | |
  1318. | _-- |
  1319. _| =-. .-. ||
  1320. o|/o/ _. |
  1321. / ~ \ |
  1322. (____@) ___~ |
  1323. |_===~~~.` |
  1324. _______.--~ |
  1325. \________ |
  1326. \ |
  1327. __/-___-- -__
  1328. / _ \
  1329.  
  1330.  
  1331. ----------- Вот так будет выглядеть ----------------------
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380. mcedit /etc/asterisk/manager.conf
  1381. Для включения Asterisk AMI откроем файл /etc/asterisk/manager.conf в текстовом редакторе и укажем параметры:
  1382.  
  1383. [general]
  1384. enabled = yes
  1385. port = 5038
  1386. bindaddr = 0.0.0.0
  1387. timestampevents = yes
  1388. displayconnects = yes
  1389. allowmultiplelogin = yes
  1390. webenabled = no
  1391.  
  1392. #include "manager.d/*.conf"
  1393. Теперь создадим файл настроек для первого пользователя:
  1394. mkdir /etc/asterisk/manager.d
  1395. mcedit /etc/asterisk/manager.d/admin.conf
  1396. chown asterisk:asterisk /etc/asterisk/manager.d/admin.conf
  1397. И добавим в него:
  1398.  
  1399. [admin]
  1400. secret = IXNFO
  1401. deny = 0.0.0.0/0.0.0.0
  1402. permit = 127.0.0.1/255.255.255.0
  1403. permit = 192.168.2.2/255.255.255.255
  1404. permit = 192.168.5.5/255.255.255.255
  1405. read = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
  1406. write = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
  1407. #####################################################################################################
  1408. # cd /var/www/html
  1409. # git clone https://github.com/zheltovanton/asteriskgui.git
  1410. # chown asterisk. /var/www/html/asteriskgui -R
  1411. mcedit /var/www/html/asteriskgui/db/config.php
  1412. mcedit /etc/httpd/conf.d/asteriskgui.conf
  1413. <Directory /var/www/html/asteriskgui/>
  1414. AddDefaultCharset UTF-8
  1415.  
  1416. <IfModule mod_authz_core.c>
  1417. # Apache 2.4
  1418. <RequireAny>
  1419. Require all granted
  1420. </RequireAny>
  1421. </IfModule>
  1422. <IfModule !mod_authz_core.c>
  1423. # Apache 2.2
  1424. Order Deny,Allow
  1425. Deny from All
  1426. Allow from 127.0.0.1
  1427. Allow from ::1
  1428. </IfModule>
  1429. </Directory>
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
Add Comment
Please, Sign In to add comment