Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apt install mc -y
- ;;;; Если нету папки создаем
- mkdir /root/.ssh/
- ;;;; Прописываем ключ доступа
- mcedit /root/.ssh/authorized_keys
- touch ~/.ssh/authorized_keys
- echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxEF2/HTfPe1wWu7413uqRRCb76RIIUzWYmCUXm80WF+B7P1WLFFtdWhIrNnNgxxF+wB6cszFPoj4PFH6XzqqQEDx7TuZfISTwMfKcNQRM8ydZRg7uWOFNzlq2OPqP+QFNlw/5/oHUsmUU2grd6c4Efz1s8Cwa+zHhdVGNH4FdjVZGyNqPFThQUOx1knXKar5EFRKaMJwECZAF/w5gsiu9u3z/lJIWyEUIKPyK72gIMgR0RXJBYBJ9+tIJwj3jvGmo6ETI3KvfLUQdbj7kJQ2wgCK2jZkvRsV3NYdHUhGkJTCdUOfNlCAwwEPqf3adND6C7voFqwSfvVGtR9aocNCt rsa-key-20240202 >> ~/.ssh/authorized_keys
- ;;;Убираем авторизацию по паролю;;;
- sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
- systemctl restart ssh
- ;;;;;;;ASTERISK INSTALL;;;;;;;;;;;;
- cd /usr/src
- wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz
- tar xzvf asterisk-20-current.tar.gz
- cd asterisk-20.6.0/
- contrib/scripts/install_prereq install
- ./configure --with-pjproject-bundled
- make menuselect
- make -j4 && make install && make samples && make config && ldconfig
- ;Дадим права
- adduser --system --group --home /var/lib/asterisk --no-create-home --gecos "Asterisk" asterisk
- usermod -a -G dialout,audio asterisk
- chown -R asterisk: /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk
- ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ./configure --libdir=/usr/lib64 --with-crypto --with-ssl=ssl --with-srtp --with-pjproject-bundled
- make menuselect
- make -j4 && make install && make samples && make config && ldconfig
- ;Дадим права
- adduser --system --group --home /usr/lib64/asterisk --no-create-home --gecos "Asterisk" asterisk
- usermod -a -G dialout,audio asterisk
- chown -R asterisk: /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk /home/load/rec
- ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;; второй метод;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- sed -i 's/;runuser = asterisk/runuser = asterisk/' /etc/asterisk/asterisk.conf
- sed -i 's/;rungroup = asterisk/rungroup = asterisk/' /etc/asterisk/asterisk.conf
- sed -i '/^;\[radius\]/ s/^;//' /etc/asterisk/cdr.conf
- sed -i '/^;radiuscfg =>/ s/^;//' /etc/asterisk/cdr.conf
- sed -i '/^;full.log => n/ s/^;//' /etc/asterisk/logger.conf
- systemctl enable asterisk
- systemctl stop asterisk && systemctl start asterisk && systemctl status asterisk
- asterisk -rvvvvvv
- ;;;;Добавьте следующую строку в конец файла, чтобы при входе в терминал автоматически открывалась папка;;;;;
- sed -i -e '$a\' -e 'cd /etc/asterisk/' ~/.bashrc
- export CDPATH="/etc/asterisk/"
- --------------------------------------------
- ;;;;; Логи нужно архивировать а то закончится место на диске ;;;
- apt install -y rsyslog
- mcedit /etc/logrotate.d/rsyslog
- /var/log/mail.log
- /var/log/daemon.log
- /var/log/kern.log
- /var/log/auth.log
- /var/log/user.log
- /var/log/lpr.log
- /var/log/cron.log
- /var/log/debug
- /var/log/alternatives.log
- /var/log/aptitude
- /var/log/auth.log
- /var/log/btmp
- /var/log/cron.log
- /var/log/crowdsec_api.log
- /var/log/crowdsec.log
- /var/log/dpkg.log
- /var/log/faillog
- /var/log/fontconfig.log
- /var/log/asterisk/queue_log
- /var/log/asterisk/messages.log
- /var/log/asterisk/full.log
- {
- rotate 6
- size 20M
- missingok
- notifempty
- compress
- delaycompress
- sharedscripts
- postrotate
- /usr/lib/rsyslog/rsyslog-rotate
- endscript
- }
- ------------------------------------------------------------------
- service rsyslog restart
- ------------------------------------------------------------------
- crontab -e
- * * * * * /usr/sbin/logrotate /etc/logrotate.conf
- В конце нужно сделать дополнительную пустую строку
- -----------------------------------------------------------------
- tail -f /var/log/syslog | grep CRON
- -----------------------------------------------------------------
- ls -lh /var/log/syslog
- ls -lh /var/log/asterisk/
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- --------------------------------------------
- apt install dirmngr ca-certificates software-properties-common apt-transport-https curl -y
- wget https://mariadb.org/mariadb_release_signing_key.asc
- chmod -c 644 mariadb_release_signing_key.asc
- mv -vi mariadb_release_signing_key.asc /etc/apt/trusted.gpg.d/
- echo "deb [arch=amd64,arm64,ppc64el] \
- https://ftp.ubuntu-tw.org/mirror/mariadb/repo/11.3.1/debian \
- bookworm main" | tee /etc/apt/sources.list.d/mariadb.list
- --------------------------------------------
- apt update
- apt install mariadb-server -y
- mariadb --version
- systemctl start mariadb && systemctl enable mariadb && systemctl status mariadb
- mysql_secure_installation
- jklmMkNnai6y7
- ;;;; Будут спрашиват отвечай так ;;;;;
- Switch to unix_socket authentication [Y/n] y
- Change the root password? [Y/n] n
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] n
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y
- Thanks for using MariaDB!
- ;;;; ------- ;;;;;
- mysql -u root -p
- jklmMkNnai6y7
- SHOW DATABASES;
- EXIT;
- -----------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------
- mysql
- CREATE USER 'load-mysql'@'localhost' IDENTIFIED BY '123456';
- GRANT ALL PRIVILEGES ON * . * TO 'load-mysql'@'localhost';
- FLUSH PRIVILEGES;
- CREATE DATABASE asterisk DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
- GRANT ALL PRIVILEGES ON asterisk.* TO 'asterisk'@'localhost' IDENTIFIED BY 'sdfJHGVhj5g7jghjv$g';
- FLUSH PRIVILEGES;
- use asterisk
- source /usr/src/asterisk-20.6.0/contrib/realtime/mysql/mysql_cdr.sql
- source /usr/src/asterisk-20.6.0/contrib/realtime/mysql/mysql_config.sql
- source /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_cdr.sql
- source /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_config.sql
- mysql -u root -p
- jklmMkNnai6y7
- use asterisk
- SHOW TABLES;
- psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_cdr.sql
- psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_config.sql
- cdr_pgsql.so
- find / -name cdr_pgsql.so -print
- *************************************************************************************
- ***************postgresql**********************************
- ***************postgresql**********************************
- *************************************************************************************
- apt install -y mc
- apt install -y odbc-postgresql unixodbc
- odbcinst -q -d
- odbcinst -q -d -n 'PostgreSQL Unicode'
- mcedit /etc/odbcinst.ini
- mcedit /etc/odbc.ini
- mcedit /etc/asterisk/cdr_adaptive_odbc.conf
- mcedit /etc/asterisk/res_odbc.conf
- mcedit /etc/asterisk/cel_odbc.conf
- mcedit /etc/asterisk/cdr_odbc.conf
- mcedit /etc/odbcinst.ini
- [PostgreSQL Unicode]
- Description=PostgreSQL ODBC driver (Unicode version)
- Debug=1
- CommLog=1
- Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
- Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
- Driver64 = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
- Setup64 = /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
- UsageCount = 2
- mcedit /etc/odbc.ini
- [mypostgresqldb]
- Description=My Postgresql sample database
- Driver=PostgreSQL Unicode
- #Description = PostgreSQL database 1
- Driver = postgresql
- #CommLog = /tmp/sql.log
- Username = postgres
- Password = 1234566
- # Name of Server. IP or DNS
- Servername = 10.20.7.123
- # Database name
- Database = aster117
- # Postmaster listening port
- Port = 5432
- # Database is read only
- # Whether the datasource will allow updates.
- ReadOnly = No
- # PostgreSQL backend protocol
- # Note that when using SSL connections this setting is ignored.
- # 7.4+: Use the 7.4(V3) protocol. This is only compatible with 7.4 and higher backends.
- Protocol = 7.4+
- # Includes the OID in SQLColumns
- ShowOidColumn = No
- # Fakes a unique index on OID
- FakeOidIndex = No
- # Row Versioning
- # Allows applications to detect whether data has been modified by other users
- # while you are attempting to update a row.
- # It also speeds the update process since every single column does not need to be specified in the where clause to update a row.
- RowVersioning = No
- # Show SystemTables
- # The driver will treat system tables as regular tables in SQLTables. This is good for Access so you can see system tables.
- ShowSystemTables = No
- # If true, the driver automatically uses declare cursor/fetch to handle SELECT statements and keeps 100 rows in a cache.
- Fetch = Yes
- # Bools as Char
- # Bools are mapped to SQL_CHAR, otherwise to SQL_BIT.
- BoolsAsChar = Yes
- # SSL mode
- SSLmode = disable
- # Send to backend on connection
- ConnSettings =
- mcedit /etc/asterisk/cdr_adaptive_odbc.conf
- [mypostgresqldb]
- connection=aster117
- table=cdr
- loguniqueid=yes
- usegmtime=no
- alias start => calldate
- alias realdst => realdst
- alias remoteip => remoteip
- alias start => calldate
- alias hangupcause => hangupcause
- alias peerip => peerip
- alias recvip => recvip
- alias fromuri => fromuri
- alias useragent => useragent
- alias filename => filename
- mcedit /etc/asterisk/res_odbc.conf
- [ENV]
- [aster117]
- enabled=>yes
- dsn=>mypostgresqldb
- max_connections => 1
- pre-connect=>yes
- username=>postgres
- password=>1234566
- database=>aster117
- mcedit /etc/asterisk/cdr_odbc.conf
- [global]
- dsn=mypostgresqldb
- loguniqueid=yes
- dispositionstring=yes
- table=cdr
- usegmtime=no
- hrtime=yes
- newcdrcolumns=yes
- hrtime=yes
- username=postgres
- password=1234566
- #####################################################################
- mcedit ~/.odbc.ini
- [mypostgresqldb]
- Description=My Postgresql sample database
- Driver=PostgreSQL Unicode
- #Description = PostgreSQL database 1
- Driver = postgresql
- #CommLog = /tmp/sql.log
- Username = postgres
- Password = 1234566
- # Name of Server. IP or DNS
- Servername = 10.20.7.123
- # Database name
- Database = postgres
- # Postmaster listening port
- Port = 5432
- # Database is read only
- # Whether the datasource will allow updates.
- ReadOnly = No
- # PostgreSQL backend protocol
- # Note that when using SSL connections this setting is ignored.
- # 7.4+: Use the 7.4(V3) protocol. This is only compatible with 7.4 and higher backends.
- Protocol = 7.4+
- # Includes the OID in SQLColumns
- ShowOidColumn = No
- # Fakes a unique index on OID
- FakeOidIndex = No
- # Row Versioning
- # Allows applications to detect whether data has been modified by other users
- # while you are attempting to update a row.
- # It also speeds the update process since every single column does not need to be specified in the where clause to update a row.
- RowVersioning = No
- # Show SystemTables
- # The driver will treat system tables as regular tables in SQLTables. This is good for Access so you can see system tables.
- ShowSystemTables = No
- # If true, the driver automatically uses declare cursor/fetch to handle SELECT statements and keeps 100 rows in a cache.
- Fetch = Yes
- # Bools as Char
- # Bools are mapped to SQL_CHAR, otherwise to SQL_BIT.
- BoolsAsChar = Yes
- # SSL mode
- SSLmode = disable
- # Send to backend on connection
- ConnSettings =
- #######################################################################################
- ########################################################################################
- ########################################################################################
- echo "select 1" | isql -v mypostgresqldb postgres 1234566
- #################Если нужно експортировать на удаленной тачке ###################
- apt install postgresql-client
- export PGPASSWORD=1234566
- psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_cdr.sql
- psql -h 10.20.7.123 -U postgres aster117 DROP TABLE IF EXISTS alembic_version;
- psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_config.sql
- psql -h 10.20.7.123 -U postgres aster117 DROP TABLE IF EXISTS alembic_version;
- psql -h 10.20.7.123 -U postgres aster117 < /usr/src/asterisk-20.6.0/contrib/realtime/postgresql/postgresql_queue_log.sql
- ########### Всех активных дроп
- SELECT pg_terminate_backend(pid)
- FROM pg_stat_activity
- WHERE datname = 'aster117';
- ######### Базу дроп
- DROP DATABASE IF EXISTS aster117;
- ########
- CREATE DATABASE aster117;
- #######################################################################################
- DROP TABLE IF EXISTS alembic_version;
- ########################################################################################
- ########################################################################################
- *************************************************************************************
- systemctl stop asterisk && systemctl start asterisk && systemctl status asterisk
- mcedit /etc/odbcinst.ini
- mcedit /etc/odbc.ini
- mcedit /etc/asterisk/res_odbc.conf
- mcedit ~/.odbc.ini
- mcedit /etc/asterisk/cdr_adaptive_odbc.conf
- mcedit /etc/asterisk/cdr_odbc.conf
- mcedit /etc/asterisk/extconfig.conf
- mcedit /etc/asterisk/sorcery.conf
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- -----------------------------------------------------------------------------------
- УСТАНОВКА phpmyadmin
- apt install phpmyadmin -y
- В процессе установки указать использование apach и пароль установить
- systemctl restart apache2
- -----------------------------------------------------------------------------------------------------------
- apt-get install -y unixodbc unixodbc-dev libcppdb-odbc0 odbcinst git checkinstall cmake build-essential libssl-dev cmake
- Установка клиенткой библиотеки MariaDB
- Этот пакет необходим для сборки драйвера unixODBC. Он накладывается на libmariadb-dev, но предоставляет дополнительные заголовочные файлы, которые отсутствуют в Debian 10.
- cd /usr/src/
- git clone https://github.com/load-net/mariadb-connector-odbc.git
- cmake ../mariadb-connector-odbc/ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONC_WITH_UNIT_TESTS=Off -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_SSL=OPENSSL
- cmake --build . --config RelWithDebInfo
- make install
- mcedit /etc/odbcinst.ini
- mcedit /etc/odbc.ini
- mcedit /etc/asterisk/cdr_adaptive_odbc.conf
- mcedit /etc/asterisk/res_odbc.conf
- mcedit /etc/asterisk/cel_odbc.conf
- mcedit /etc/asterisk/cdr_odbc.conf
- ;;;;;; Ошибка [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
- ;;;;;;;;;;;;;;;;;;;;
- 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
- tar xzvf mariadb-connector-odbc-2.0.10-ga-linux-x86_64.tar.gz
- mv mariadb-connector-odbc-2.0.10-ga-linux-x86_64/lib64/libmaodbc.so /usr/lib64/
- ;;;;;;;;;;;;;;;;;;;;
- mcedit /etc/odbcinst.ini
- [mariadb]
- Description = ODBC for MariaDB
- Driver = /usr/lib64/libmaodbc.so
- odbcinst -q -d
- [MariaDB]
- mcedit /etc/odbc.ini
- [MariaDB-asteriskcdrdb]
- Description=MySQL connection to Asterisk
- Trace = Yes
- TraceFile = /tmp/odbc.log
- Driver=MariaDB
- Server=localhost
- User=asterisk
- Password=sdfJHGVhj5g7jghjv$g
- Database=asterisk
- Port=3306
- Socket=/var/run/mysqld/mysqld.sock
- Option=3
- Charset=utf8
- Не забудьте изменить значения:
- Server=localhost
- User=your_asterisk_user
- Password=your_asterisk_user_password
- Database=asteriskcdrdb
- на свои.
- mcedit /etc/asterisk/cdr_adaptive_odbc.conf
- [asterisk]
- connection=asterisk
- table=cdr
- loguniqueid=yes
- usegmtime=no
- alias start => calldate
- alias realdst => realdst
- alias remoteip => remoteip
- alias start => calldate
- alias hangupcause => hangupcause
- alias peerip => peerip
- alias recvip => recvip
- alias fromuri => fromuri
- alias useragent => useragent
- alias filename => filename
- mcedit /etc/asterisk/res_odbc.conf
- [ENV]
- [asterisk]
- enabled=>yes
- dsn=>MariaDB-asteriskcdrdb
- ;pooling=>no
- ;limit=>1
- pre-connect=>yes
- username=>asterisk
- password=>sdfJHGVhj5g7jghjv$g
- Не забудьте изменить значения:
- username=your_asterisk_user
- password=your_asterisk_user_password
- на свои.
- mcedit /etc/asterisk/cel_odbc.conf
- [cel]
- connection=asterisk
- loguniqueid=yes
- table=cel
- mcedit /etc/asterisk/cdr_odbc.conf
- [global]
- dsn=MariaDB-asteriskcdrdb
- loguniqueid=yes
- dispositionstring=yes
- table=cdr
- usegmtime=no
- hrtime=yes
- newcdrcolumns=yes
- hrtime=yes
- username=asterisk
- password=sdfJHGVhj5g7jghjv$g
- mcedit /etc/asterisk/extconfig.conf
- [settings]
- ps_aors => odbc,aster117
- ps_asterisk_publications => odbc,aster117
- ps_auths => odbc,aster117
- ps_contacts => odbc,aster117
- ps_domain_aliases => odbc,aster117
- ps_endpoint_id_ips => odbc,aster117
- ps_endpoints => odbc,aster117
- ps_globals => odbc,aster117
- ps_inbound_publications => odbc,aster117
- ps_outbound_publishes => odbc,aster117
- ps_registrations => odbc,aster117
- ps_transports => odbc,aster117
- queues => odbc,aster117
- queue_members => odbc,aster117
- queue_log => odbc,aster117
- musiconhold => odbc,aster117;
- musiconhold_entry => odbc,aster117
- #########################################
- #########################################
- #########################################
- mysql -u root -p
- jklmMkNnai6y7
- use asterisk
- -----------------------------------------------------------------------------------
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- **************************************************************************************************************************************************************************
- INSERT INTO ps_aors (id, max_contacts) VALUES (103, 1);
- INSERT INTO ps_auths (id, auth_type, password, username) VALUES (103, 'userpass', 'd103', 103);
- 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');
- INSERT INTO ps_aors (id, max_contacts) VALUES (104, 1);
- INSERT INTO ps_auths (id, auth_type, password, username) VALUES (104, 'userpass', 'd104', 104);
- 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');
- INSERT INTO ps_aors (id, max_contacts) VALUES (105, 1);
- INSERT INTO ps_auths (id, auth_type, password, username) VALUES (105, 'userpass', '1dfg32', 105);
- 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');
- INSERT INTO ps_aors (id, max_contacts) VALUES (106, 1);
- INSERT INTO ps_auths (id, auth_type, password, username) VALUES (106, 'userpass', '1rtg3rtg2', 106);
- 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');
- INSERT INTO ps_aors (id, max_contacts) VALUES (107, 1);
- INSERT INTO ps_auths (id, auth_type, password, username) VALUES (107, 'userpass', 'cnm13rtg21', 107);
- 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');
- INSERT INTO ps_aors (id, max_contacts) VALUES (102, 1);
- INSERT INTO ps_auths (id, auth_type, password, username) VALUES (102, 'userpass', '1fjfjfgj3211', 102);
- 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');
- ctrl+c выйти
- pjsip show endpoints
- mcedit /etc/asterisk/pjsip.conf
- [system]
- type = system
- timer_t1 = 200
- timer_t2 = 1500
- [global]
- ttype = global
- disable_multi_domain = yes
- ;debug = yes
- taskprocessor_overload_trigger = global
- unidentified_request_count=5
- unidentified_request_period=5
- unidentified_request_prune_interval=30
- endpoint_identifier_order=username,ip,anonymous
- canreinvite=no
- insecure=port,invite
- ;
- [transport-udp-nat]
- type=transport
- protocol=udp
- bind=0.0.0.0
- local_net=10.20.7.0/24
- external_media_address=load.sytes.net
- external_signaling_address=load.sytes.net
- [acl]
- type=acl
- deny=0.0.0.0/0.0.0.0
- permit=176.58.0.0/15
- permit=10.0.0.0/8
- permit=83.102.160.66
- permit=109.105.165.0/24
- permit=37.139.38.0/24
- permi =185.45.152.128/28
- permit=185.45.152.160/27
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- [555629]
- type=registration
- transport=transport-udp-nat ;transport-udp
- outbound_auth=555629_auth
- server_uri=sip:sip.zadarma.com
- client_uri=sip:[email protected]
- retry_interval=60
- fatal_retry_interval=30
- forbidden_retry_interval=30
- max_retries=10000
- expiration=120
- contact_user=555629
- line=yes
- endpoint=555629
- auth_rejection_permanent=no
- contact_user=555629
- server_uri=sip:sip.zadarma.com
- client_uri=sip:[email protected]
- [555629_auth]
- type=auth
- auth_type=userpass
- password=van1hrD38X
- username=555629
- [555629]
- type=aor
- qualify_frequency=60
- contact=sip:sip.zadarma.com
- [555629]
- type=endpoint
- transport=transport-udp-nat ;udp-transport
- context=zadarma-in
- disallow=all
- allow=alaw
- allow=ulaw
- outbound_auth=555629_auth
- aors=555629
- send_connected_line=false
- language=ru
- from_domain=sip.zadarma.com
- from_user=555629
- contact_user=555629
- user_eq_phone=no
- t38_udptl=no
- t38_udptl_ec=none
- fax_detect=no
- trust_id_inbound=no
- t38_udptl_nat=no
- direct_media=no
- rtp_symmetric=yes
- dtmf_mode=auto
- from_user=555629
- from_domain=sip.zadarma.com
- direct_media=no
- [555629]
- type=identify
- endpoint=555629
- match=sip.zadarma.com
- match=sip.zadarma.com
- match=sipurifr.zadarma.com
- match=sipurims.zadarma.com
- match=sipuriny.zadarma.com
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- [959977]
- type=registration
- transport=transport-udp-nat ;transport-udp
- outbound_auth=959977_auth
- server_uri=sip:sip.zadarma.com
- client_uri=sip:[email protected]
- retry_interval=60
- fatal_retry_interval=30
- forbidden_retry_interval=30
- max_retries=10000
- expiration=120
- contact_user=959977
- line=yes
- endpoint=959977
- auth_rejection_permanent=no
- contact_user=959977
- server_uri=sip:sip.zadarma.com
- client_uri=sip:[email protected]
- [959977_auth]
- type=auth
- auth_type=userpass
- password=6agDUjm8x9
- username=959977
- [959977]
- type=aor
- qualify_frequency=60
- contact=sip:sip.zadarma.com
- [959977]
- type=endpoint
- transport=transport-udp-nat ;udp-transport
- context=zadarma-in
- disallow=all
- allow=alaw
- allow=ulaw
- outbound_auth=959977_auth
- aors=959977
- send_connected_line=false
- language=ru
- from_domain=sip.zadarma.com
- from_user=959977
- contact_user=959977
- user_eq_phone=no
- t38_udptl=no
- t38_udptl_ec=none
- fax_detect=no
- trust_id_inbound=no
- t38_udptl_nat=no
- direct_media=no
- rtp_symmetric=yes
- dtmf_mode=auto
- from_user=959977
- from_domain=sip.zadarma.com
- direct_media=no
- [959977]
- type=identify
- endpoint=959977
- match=sip.zadarma.com
- match=sip.zadarma.com
- match=sipurifr.zadarma.com
- match=sipurims.zadarma.com
- match=sipuriny.zadarma.com
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- [endpoint-template](!)
- type = endpoint
- transport = transport-udp-nat
- context = from-internal
- dtmf_mode = rfc4733
- disallow = all
- allow = ulaw
- allow = alaw
- [auth-template-userpass](!)
- type = auth
- auth_type = userpass;
- [aor-template-single-reg](!)
- type = aor
- max_contacts = 1
- ;;;;;;;;;;;users;;;;;;;;;;;;;;;;;;;;;
- [108](endpoint-template)
- auth = auth108
- aors = 108
- callerid = man 108;
- [auth108](auth-template-userpass)
- username = 108
- password = 1JKHKJjj23
- [108](aor-template-single-reg)
- ;;;;;;;;;;;;;;;;109;;;;;;;;;;;;;;;;;;;;;
- [109](endpoint-template)
- auth = auth109
- aors = 109
- callerid = man 109;
- [auth109](auth-template-userpass)
- username = 109
- password = 123dsvHGuill
- [109](aor-template-single-reg)
- ################################################################
- mcedit /etc/asterisk/sorcery.conf
- [test_sorcery_section]
- test=memory
- [test_sorcery_cache]
- test/cache=test
- test=memory
- ; The following object mapping is the default mapping of external MWI mailbox
- ; objects to give persistence to the message counts.
- ;
- ;[res_mwi_external]
- ;mailboxes=astdb,mwi_external
- ;
- ; The following object mappings set PJSIP objects to use realtime database mappings from extconfig
- ; with the table names used when automatically generating configuration from the alembic script.
- ;
- [res_pjsip]
- endpoint=realtime,ps_endpoints
- endpoint=config,pjsip.conf,criteria=type=endpoint
- auth=realtime,ps_auths
- auth=config,pjsip.conf,criteria=type=auth
- aor=realtime,ps_aors
- aor=config,pjsip.conf,criteria=type=aor
- ;transport=config,pjsip.conf,criteria=type=transport
- ;domain_alias=realtime,ps_domain_aliases
- contact=realtime,ps_contacts
- [res_pjsip_endpoint_identifier_ip]
- identify=realtime,ps_endpoint_id_ips
- [res_pjsip_outbound_publish]
- outbound-publish=realtime,ps_outbound_publishes
- [res_pjsip_pubsub]
- inbound-publication=realtime,ps_inbound_publications
- [res_pjsip_publish_asterisk]
- asterisk-publication=realtime,ps_asterisk_publications
- *********************************************************************
- asterisk -rvvvvvvvvvvvvvvvvvv
- odbc show all
- *****************************************************************
- #######################################################################
- mcedit /etc/httpd/conf.d/phpMyAdmin.conf
- Alias /phpMyAdmin /usr/share/phpMyAdmin
- Alias /phpmyadmin /usr/share/phpMyAdmin
- <Directory /usr/share/phpMyAdmin/>
- AddDefaultCharset UTF-8
- <IfModule mod_authz_core.c>
- # Apache 2.4
- <RequireAny>
- Require all granted
- </RequireAny>
- </IfModule>
- <IfModule !mod_authz_core.c>
- # Apache 2.2
- Order Deny,Allow
- Deny from All
- Allow from 127.0.0.1
- Allow from ::1
- </IfModule>
- </Directory>
- <Directory /usr/share/phpMyAdmin/setup/>
- <IfModule mod_authz_core.c>
- # Apache 2.4
- <RequireAny>
- Require all granted
- </RequireAny>
- </IfModule>
- <IfModule !mod_authz_core.c>
- # Apache 2.2
- Order Deny,Allow
- Deny from All
- Allow from 127.0.0.1
- Allow from ::1
- </IfModule>
- </Directory>
- #############################################################
- mkdir /usr/share/phpMyAdmin/tmp
- chmod 777 /usr/share/phpMyAdmin/tmp
- chown -R apache:apache /usr/share/phpMyAdmin
- systemctl restart httpd
- Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: xml
- dnf install php-xml
- ########################################################################
- asterisk
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- mcedit /etc/asterisk/pjsip.conf
- [transport-udp-nat]
- type=transport
- protocol=udp
- bind=0.0.0.0
- local_net=10.10.50.0/24
- external_media_address=109.105.165.107
- external_signaling_address=109.105.165.107
- [acl]
- type=acl
- deny=0.0.0.0/0.0.0.0
- permit=176.59.192.0-176.59.223.255
- permit=10.0.0.0/8
- permit=83.102.160.66
- permit=109.105.165.0/24
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- mcedit /etc/asterisk/extensions.conf
- [zadarma-in]
- exten => 620465,1,Set(CHANNEL(accountcode)=277)
- same => n,Goto(lk_620465_pbx,620465,1)
- same => n,Hangup
- [zadarma-out]
- exten => _XXX,1,Dial(PJSIP/${EXTEN}) ; звонки на трехзначные внутренние номера aстериска
- exten => _XXX.,1,Dial(PJSIP/${EXTEN}@620465) ; звонки на номера в которых четрые и более цифр через транк 620465
- ;exten => _XXX,1,Gosub(sub-devstate,${EXTEN},1)
- ;exten => _XXX,n,Dial(SIP/${EXTEN},90,trm)
- ;exten => _XXX,n,Hangup()
- exten => 101,1,Gosub(sub-devstate,${EXTEN},1)
- same => n,Mixmonitor(/home/${EXTEN}n_.${UNIQUEID}.wav,b)
- same => n(local_out),Dial(PJSIP/101,3,rt)
- same => n,GotoIfTime(18:00-08:00,mon-fri,*,*?local_out)
- same => n,Set(CALLERID(num)=00000000)
- same => n,Dial(PJSIP/241247@620465)
- exten => 1,1,Set(CHANNEL(accountcode)=549)
- same => n,Answer
- same => n,MixMonitor(/home/${EXTEN}n_.${UNIQUEID}.wav,b)
- same => n,Queue(test_all,rt)
- exten => 2,1,Set(CDR(description)=ivr:${EXTEN})
- same => n,MixMonitor(/home/${EXTEN}n_.${UNIQUEID}.wav,b)
- same => n,Dial(PJSIP/102,20,rt)
- ; same => n,Dial(PJSIP/101,20,rt)
- same => n,GotoIfTime(*,*,28-31,jul?weekend2)
- same => n,GotoIfTime(*,*,1-20,jan?weekend2)
- same => n,Dial(PJSIP/101,15,rt)
- same => n,Set(CALLERID(num)=73452999999)
- same => n,Goto(exten,1,1)
- same => n,Hangup
- same => n(weekend2),Dial(PJSIP/241247@620465,,rt)
- same => n,Hangup
- [sub-devstate]
- exten => _X.,1,Log(NOTICE, "${EXTEN} has DEVICE STATE ${DEVICE_STATE(SIP/${EXTEN})}")
- exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "BUSY"]?s-BUSY,1)
- exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "INUSE"]?s-BUSY,1)
- exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "INVALID"]?s-INVALID,1)
- exten => _X.,n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "UNAVAILABLE"]?s-UNAVAILABLE,1)
- exten => _X.,n,Return()
- exten => s-BUSY,1,NoOp(Абонент ${EXTEN} в данный момент разговаривает)
- exten => s-BUSY,n,Playback(extension-is-busy)
- exten => s-BUSY,n,Hangup(17)
- exten => s-INVALID,1,NoOp(Абонент ${EXTEN} не существует)
- exten => s-INVALID,n,Goto(no-number,${EXTEN},1)
- exten => s-INVALID,n,Hangup(1)
- exten => s-UNAVAILABLE,1,NoOp(Абонент ${EXTEN} не доступен)
- exten => s-UNAVAILABLE,n,Playback(ss-noservice)
- exten => s-UNAVAILABLE,n,Wait(2)
- exten => s-UNAVAILABLE,n,Hangup(18)
- [no-number]
- exten => _X.,1,NoOp(Статус набора - ${DIALSTATUS})
- exten => _X.,n,Goto(invalid-number,1)
- exten => invalid-number,1,NoOp(Неверно набран номер)
- exten => invalid-number,n,Set(CDR(userfield)=No Number)
- exten => invalid-number,n,Playback(pbx-invalid)
- exten => invalid-number,n,Wait(1)
- exten => invalid-number,n,Hangup()
- exten => t,1,Playback(vm-goodbye)
- exten => t,n,Hangup()
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- mcedit /etc/asterisk/queue.conf
- /////////////////////////////////////////////////////////////////////////////////////////
- apt-get install fail2ban
- systemctl enable iptables
- mcedit /etc/asterisk/logger.conf
- security => security
- console => notice,warning,error
- console => notice,warning,error,debug
- messages => notice,warning,error
- full => notice,warning,error,debug,verbose,dtmf,fax
- apt-get install fail2ban
- fail2ban-client unban 10.10.50.16
- fail2ban-client unban 37.139.38.15
- iptables -nL --line-numbers
- iptables -L -n
- fail2ban-client reload
- mcedit /etc/fail2ban/jail.conf
- iptables -D f2b-asterisk-tcp 1
- iptables -D f2b-asterisk-udp 1
- pjsip show channels
- ############## Звонок из консоли #########################
- channel originate local/107@from-internal application echo
- rasterisk -x "core show channels verbose"
- ################## Заметки ##############################
- watch "asterisk -vvvvvrx 'core show channels' | grep channels"
- watch "asterisk -vvvvvrx 'core show channels' | grep calls"
- watch "asterisk -vvvvvrx 'core show channels verbose'"
- watch "asterisk -vvvvvrx 'core show channels verbose'"
- watch -n 2 "rasterisk -x 'queue show q560010_all'"
- watch -n 2 "rasterisk -x 'queue show que_560050'"
- watch "asterisk -vvvvvrx 'core show channels' | egrep \"(call|channel)\""
- asterisk -rx 'core show channels' | grep -m1 "call" | cut -d' ' -f1
- asterisk -rx "core show calls" | grep "active" | cut -d' ' -f1
- watch "asterisk -vvvvvrx 'core show channels verbose'"
- watch -n 5 "asterisk -rx 'core show calls' | grep active"
- watch -n 1 "asterisk -vvvvvrx 'core show channels' | grep call"
- rasterisk -x "sip show peers" | grep 10.20.101. | sort -t . -k 3,3n -k 4,4n
- Снять с паузы
- rasterisk -x 'queue unpause member SIP/lk_gp1_g-237 queue q560050_1_norobot'
- rasterisk -x "database show REDIRECT "
- rasterisk -x "database put REDIRECT 2222 89324823365"
- rasterisk -x "database del REDIRECT 2222"
- rasterisk -x "sip show peers" | grep 85. | wc -l
- 1xx
- 8[2-9]xxxxxxxxx
- [2-79]xxxxx
- 0x
- “sun” | “mon” | “tue” | “wed” | “thu” | “fri” | “sat”
- “jan” | “feb” | “mar” | “apr” | “may” | “jun” | “jul” | “aug” | “sep” | “oct” | “nov” | “dec”
- same => n(start),GotoIfTime(08:00-20:00,mon-fri,*,*?ok1:)
- same => n(start),GotoIfTime(08:00-20:00,sat-sun,*,*?ok1:)
- rasterisk -x "dialplan reload"
- rasterisk -x "sip reload"
- rasterisk -x "queue reload all"
- Изменить цветность в консоле mc
- wget http://..............asterisk.syntax -P /usr/share/mc/syntax/
- mcedit /usr/share/mc/syntax/Syntax
- куда угодно можно, лишь бы перед последними двумя.
- file .\* unknown
- include asterisk.syntax
- file .\* unknown
- include unknown.syntax
- ##########################Сохранит как asterisk.syntax ####################################################
- # Description : Syntax rules for Asterisk dialplan language
- # Author : Rozes "Ramzes" Alexander
- # Date : 2017-04-06
- # Usage : Add following lines at Syntax file
- # file extensions.\*\\.conf$ Asterisk\sdialplan
- # include asterisk.syntax
- context default
- keyword whole \{Aa\}dd\{Qq\}ueue\{Mm\}ember brightmagenta
- keyword whole \{Aa\}\{Dd\}\{Ss\}\{Ii\}\{Pp\}rog brightmagenta
- keyword whole \{Aa\}gent\{Ll\}ogin brightmagenta
- keyword whole \{Aa\}gent\{Rr\}equest brightmagenta
- keyword whole \{Aa\}\{Gg\}\{Ii\} brightmagenta
- keyword whole \{Aa\}larm\{Rr\}eceiver brightmagenta
- keyword whole \{Aa\}\{Mm\}\{Dd\} brightmagenta
- keyword whole \{Aa\}nswer brightmagenta
- keyword whole \{Aa\}uthenticate brightmagenta
- keyword whole \{Bb\}ack\{Gg\}round brightmagenta
- keyword whole \{Bb\}ackground\{Dd\}etect brightmagenta
- keyword whole \{Bb\}ridge brightmagenta
- keyword whole \{Bb\}ridge\{Ww\}ait brightmagenta
- keyword whole \{Bb\}usy brightmagenta
- keyword whole \{Cc\}all\{Cc\}ompletion\{Cc\}ancel brightmagenta
- keyword whole \{Cc\}all\{Cc\}ompletion\{Rr\}equest brightmagenta
- keyword whole \{Cc\}\{Ee\}\{Ll\}\{Gg\}en\{Uu\}ser\{Ee\}vent brightmagenta
- keyword whole \{Cc\}hange\{Mm\}onitor brightmagenta
- keyword whole \{Cc\}han\{Ii\}s\{Aa\}vail brightmagenta
- keyword whole \{Cc\}hannel\{Rr\}edirect brightmagenta
- keyword whole \{Cc\}han\{Ss\}py brightmagenta
- keyword whole \{Cc\}lear\{Hh\}ash brightmagenta
- keyword whole \{Cc\}onf\{Bb\}ridge brightmagenta
- keyword whole \{Cc\}ongestion brightmagenta
- keyword whole \{Cc\}ontinue\{Ww\}hile brightmagenta
- keyword whole \{Cc\}ontrol\{Pp\}layback brightmagenta
- keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Rr\}\{Aa\}\{Ss\} brightmagenta
- keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Ss\}can brightmagenta
- keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Ss\}end\{Cc\}allrerouting\{Ff\}acility brightmagenta
- keyword whole \{Dd\}\{Aa\}\{Hh\}\{Dd\}\{Ii\}\{Ss\}end\{Kk\}eypad\{Ff\}acility brightmagenta
- keyword whole \{Dd\}ate\{Tt\}ime brightmagenta
- keyword whole \{Dd\}\{Bb\}del brightmagenta
- keyword whole \{Dd\}\{Bb\}deltree brightmagenta
- keyword whole \{Dd\}ead\{Aa\}\{Gg\}\{Ii\} brightmagenta
- keyword whole \{Dd\}ial brightmagenta
- keyword whole \{Dd\}ictate brightmagenta
- keyword whole \{Dd\}irectory brightmagenta
- keyword whole \{Dd\}\{Ii\}\{Ss\}\{Aa\} brightmagenta
- keyword whole \{Dd\}ump\{Cc\}han brightmagenta
- keyword whole \{Ee\}\{Aa\}\{Gg\}\{Ii\} brightmagenta
- keyword whole \{Ee\}cho brightmagenta
- keyword whole \{Ee\}ndWhile brightmagenta
- keyword whole \{Ee\}xec brightmagenta
- keyword whole \{Ee\}xec\{Ii\}f brightmagenta
- keyword whole \{Ee\}xec\{Ii\}f\{Tt\}ime brightmagenta
- keyword whole \{Ee\}xit\{Ww\}hile brightmagenta
- keyword whole \{Ee\}xten\{Ss\}py brightmagenta
- keyword whole \{Ee\}xternal\{Ii\}\{Vv\}\{Rr\} brightmagenta
- keyword whole \{Ff\}estival brightmagenta
- keyword whole \{Ff\}lash brightmagenta
- keyword whole \{Ff\}ollow\{Mm\}e brightmagenta
- keyword whole \{Ff\}ork\{Cc\}\{Dd\}\{Rr\} brightmagenta
- keyword whole \{Gg\}et\{Cc\}\{Pp\}\{Ee\}\{Ii\}\{Dd\} brightmagenta
- keyword whole \{Gg\}o\{Ss\}ub brightmagenta
- keyword whole \{Gg\}o\{Ss\}ub\{Ii\}f brightmagenta
- keyword whole \{Gg\}o\{Tt\}o brightmagenta
- keyword whole \{Gg\}oto\{Ii\}f brightmagenta
- keyword whole \{Gg\}oto\{Ii\}f\{Tt\}ime brightmagenta
- keyword whole \{Hh\}angup brightmagenta
- keyword whole \{Hh\}angup\{Cc\}ause\{Cc\}lear brightmagenta
- keyword whole \{Ii\}\{Aa\}\{Xx\}2\{Pp\}rovision brightmagenta
- keyword whole \{Ii\}\{Cc\}\{Ee\}\{Ss\} brightmagenta
- keyword whole \{Ii\}mport\{Vv\}ar brightmagenta
- keyword whole \{Ii\}ncomplete brightmagenta
- keyword whole \{Ii\}\{Vv\}\{Rr\}\{Dd\}emo brightmagenta
- keyword whole \{Jj\}abber\{Jj\}oin brightmagenta
- keyword whole \{Jj\}abber\{Ll\}eave brightmagenta
- keyword whole \{Jj\}abber\{Ss\}end brightmagenta
- keyword whole \{Jj\}abber\{Ss\}end\{Gg\}roup brightmagenta
- keyword whole \{Jj\}abber\{Ss\}tatus brightmagenta
- keyword whole \{Ll\}og brightmagenta
- keyword whole \{Mm\}acro brightmagenta
- keyword whole \{Mm\}acro\{Ee\}xclusive brightmagenta
- keyword whole \{Mm\}acro\{Ee\}xit brightmagenta
- keyword whole \{Mm\}acro\{Ii\}f brightmagenta
- keyword whole \{Mm\}acro\{Rr\}eturn brightmagenta
- keyword whole \{Mm\}ailbox\{Ee\}xists brightmagenta
- keyword whole \{Mm\}eet\{Mm\}e brightmagenta
- keyword whole \{Mm\}eet\{Mm\}e\{Aa\}dmin brightmagenta
- keyword whole \{Mm\}eet\{Mm\}e\{Cc\}hannel\{Aa\}dmin brightmagenta
- keyword whole \{Mm\}eet\{Mm\}e\{Cc\}ount brightmagenta
- keyword whole \{Mm\}essage\{Ss\}end brightmagenta
- keyword whole \{Mm\}illiwatt brightmagenta
- keyword whole \{Mm\}inivm\{Aa\}cc\{Mm\}ess brightmagenta
- keyword whole \{Mm\}inivm\{Dd\}elete brightmagenta
- keyword whole \{Mm\}inivm\{Gg\}reet brightmagenta
- keyword whole \{Mm\}inivm\{Mm\}\{Ww\}\{Ii\} brightmagenta
- keyword whole \{Mm\}inivm\{Nn\}otify brightmagenta
- keyword whole \{Mm\}inivm\{Rr\}ecord brightmagenta
- keyword whole \{Mm\}ix\{Mm\}onitor brightmagenta
- keyword whole \{Mm\}onitor brightmagenta
- keyword whole \{Mm\}orsecode brightmagenta
- keyword whole \{Mm\}\{Pp\}3\{Pp\}layer brightmagenta
- keyword whole \{Mm\}\{Ss\}et brightmagenta
- keyword whole \{Mm\}usic\{Oo\}n\{Hh\}old brightmagenta
- keyword whole \{Nn\}\{Bb\}\{Ss\}cat brightmagenta
- keyword whole \{Nn\}o\{Cc\}\{Dd\}\{Rr\} brightmagenta
- keyword whole \{Nn\}o\{Oo\}\{Pp\} brightmagenta
- keyword whole \{Oo\}\{Dd\}\{Bb\}\{Cc\}_\{Cc\}ommit brightmagenta
- keyword whole \{Oo\}\{Dd\}\{Bb\}\{Cc\}_\{Rr\}ollback brightmagenta
- keyword whole \{Oo\}\{Dd\}\{Bb\}\{Cc\}\{Ff\}inish brightmagenta
- keyword whole \{Oo\}riginate brightmagenta
- keyword whole \{Pp\}age brightmagenta
- keyword whole \{Pp\}ark brightmagenta
- keyword whole \{Pp\}ark\{Aa\}nd\{Aa\}nnounce brightmagenta
- keyword whole \{Pp\}arked\{Cc\}all brightmagenta
- keyword whole \{Pp\}ause\{Mm\}onitor brightmagenta
- keyword whole \{Pp\}ause\{Qq\}ueue\{Mm\}ember brightmagenta
- keyword whole \{Pp\}ickup brightmagenta
- keyword whole \{Pp\}ickup\{Cc\}han brightmagenta
- keyword whole \{Pp\}layback brightmagenta
- keyword whole \{Pp\}lay\{Tt\}ones brightmagenta
- keyword whole \{Pp\}rivacy\{Mm\}anager brightmagenta
- keyword whole \{Pp\}roceeding brightmagenta
- keyword whole \{Pp\}rogress brightmagenta
- keyword whole \{Qq\}ueue brightmagenta
- keyword whole \{Qq\}ueue\{Ll\}og brightmagenta
- keyword whole \{Rr\}aise\{Ee\}xception brightmagenta
- keyword whole \{Rr\}ead brightmagenta
- keyword whole \{Rr\}ead\{Ee\}xten brightmagenta
- keyword whole \{Rr\}eceive\{Ff\}\{Aa\}\{Xx\} brightmagenta
- keyword whole \{Rr\}ecord brightmagenta
- keyword whole \{Rr\}emove\{Qq\}ueue\{Mm\}ember brightmagenta
- keyword whole \{Rr\}eset\{Cc\}\{Dd\}\{Rr\} brightmagenta
- keyword whole \{Rr\}etry\{Dd\}ial brightmagenta
- keyword whole \{Rr\}eturn brightmagenta
- keyword whole \{Rr\}inging brightmagenta
- keyword whole \{Ss\}ay\{Aa\}lpha brightmagenta
- keyword whole \{Ss\}ay\{Aa\}lpha\{Cc\}ase brightmagenta
- keyword whole \{Ss\}ay\{Cc\}ounted\{Aa\}dj brightmagenta
- keyword whole \{Ss\}ay\{Cc\}ounted\{Nn\}oun brightmagenta
- keyword whole \{Ss\}ay\{Dd\}igits brightmagenta
- keyword whole \{Ss\}ay\{Nn\}umber brightmagenta
- keyword whole \{Ss\}ay\{Pp\}honetic brightmagenta
- keyword whole \{Ss\}ay\{Uu\}nix\{Tt\}ime brightmagenta
- keyword whole \{Ss\}end\{Dd\}\{Tt\}\{Mm\}\{Ff\} brightmagenta
- keyword whole \{Ss\}end\{Ff\}\{Aa\}\{Xx\} brightmagenta
- keyword whole \{Ss\}end\{Ii\}mage brightmagenta
- keyword whole \{Ss\}end\{Tt\}ext brightmagenta
- keyword whole \{Ss\}end\{Uu\}\{Rr\}\{Ll\} brightmagenta
- keyword whole \{Ss\}et brightmagenta
- keyword whole \{Ss\}et\{Vv\}ar brightmagenta
- keyword whole \{Ss\}et\{Aa\}\{Mm\}\{Aa\}\{Ff\}lags brightmagenta
- keyword whole \{Ss\}\{Ii\}\{Pp\}\{Aa\}dd\{Hh\}eader brightmagenta
- keyword whole \{Ss\}\{Ii\}\{Pp\}\{Dd\}\{Tt\}\{Mm\}\{Ff\}\{Mm\}ode brightmagenta
- keyword whole \{Ss\}\{Ii\}\{Pp\}\{Rr\}emove\{Hh\}eader brightmagenta
- keyword whole \{Ss\}kel\{Gg\}uess\{Nn\}umber brightmagenta
- keyword whole \{Ss\}\{Ll\}\{Aa\}\{Ss\}tation brightmagenta
- keyword whole \{Ss\}\{Ll\}\{Aa\}\{Tt\}runk brightmagenta
- keyword whole \{Ss\}\{Mm\}\{Ss\} brightmagenta
- keyword whole \{Ss\}oft\{Hh\}angup brightmagenta
- keyword whole \{Ss\}peech\{Aa\}ctivate\{Gg\}rammar brightmagenta
- keyword whole \{Ss\}peech\{Bb\}ackground brightmagenta
- keyword whole \{Ss\}peech\{Cc\}reate brightmagenta
- keyword whole \{Ss\}peech\{Dd\}eactivate\{Gg\}rammar brightmagenta
- keyword whole \{Ss\}peech\{Dd\}estroy brightmagenta
- keyword whole \{Ss\}peech\{Ll\}oad\{Gg\}rammar brightmagenta
- keyword whole \{Ss\}peech\{Pp\}rocessing\{Ss\}ound brightmagenta
- keyword whole \{Ss\}peech\{Ss\}tart brightmagenta
- keyword whole \{Ss\}peech\{Uu\}nload\{Gg\}rammar brightmagenta
- keyword whole \{Ss\}tack\{Pp\}op brightmagenta
- keyword whole \{Ss\}tart\{Mm\}usic\{Oo\}n\{Hh\}old brightmagenta
- keyword whole \{Ss\}tasis brightmagenta
- keyword whole \{Ss\}top\{Mm\}ix\{Mm\}onitor brightmagenta
- keyword whole \{Ss\}top\{Mm\}onitor brightmagenta
- keyword whole \{Ss\}top\{Mm\}usic\{Oo\}n\{Hh\}old brightmagenta
- keyword whole \{Ss\}top\{Pp\}lay\{Tt\}ones brightmagenta
- keyword whole \{Ss\}ystem brightmagenta
- keyword whole \{Tt\}est\{Cc\}lient brightmagenta
- keyword whole \{Tt\}est\{Ss\}erver brightmagenta
- keyword whole \{Tt\}ransfer brightmagenta
- keyword whole \{Tt\}ry\{Ee\}xec brightmagenta
- keyword whole \{Tt\}ry\{Ss\}ystem brightmagenta
- keyword whole \{Uu\}npause\{Mm\}onitor brightmagenta
- keyword whole \{Uu\}npause\{Qq\}ueue\{Mm\}ember brightmagenta
- keyword whole \{Uu\}ser\{Ee\}vent brightmagenta
- keyword whole \{Vv\}erbose brightmagenta
- keyword whole \{Vv\}\{Mm\}\{Aa\}uthenticate brightmagenta
- keyword whole \{Vv\}\{Mm\}\{Ss\}ay\{Nn\}ame brightmagenta
- keyword whole \{Vv\}oice\{Mm\}ail brightmagenta
- keyword whole \{Vv\}oice\{Mm\}ail\{Mm\}ain brightmagenta
- keyword whole \{Vv\}oice\{Mm\}ail\{Pp\}lay\{Mm\}sg brightmagenta
- keyword whole \{Ww\}ait brightmagenta
- keyword whole \{Ww\}ait\{Ee\}xten brightmagenta
- keyword whole \{Ww\}ait\{Ff\}or\{Nn\}oise brightmagenta
- keyword whole \{Ww\}ait\{Ff\}or\{Rr\}ing brightmagenta
- keyword whole \{Ww\}ait\{Ff\}or\{Ss\}ilence brightmagenta
- keyword whole \{Ww\}ait\{Uu\}ntil brightmagenta
- keyword whole \{Ww\}hile brightmagenta
- keyword whole \{Zz\}apateller brightmagenta
- keyword whole AES_DECRYPT yellow
- keyword whole AES_ENCRYPT yellow
- keyword whole AGC yellow
- keyword whole AGENT yellow
- keyword whole AMI_CLIENT yellow
- keyword whole ARRAY yellow
- keyword whole AST_CONFIG yellow
- keyword whole AST_SORCERY yellow
- keyword whole AUDIOHOOK_INHERIT yellow
- keyword whole BASE64_DECODE yellow
- keyword whole BASE64_ENCODE yellow
- keyword whole BLACKLIST yellow
- keyword whole CALENDAR_BUSY yellow
- keyword whole CALENDAR_EVENT yellow
- keyword whole CALENDAR_QUERY yellow
- keyword whole CALENDAR_QUERY_RESUL yellow
- keyword whole CALENDAR_WRITE yellow
- keyword whole CALLCOMPLETION yellow
- keyword whole CALLERID yellow
- keyword whole CALLERPRES yellow
- keyword whole CDR yellow
- keyword whole CDR_PROP yellow
- keyword whole CHANNEL yellow
- keyword whole CHANNELS yellow
- keyword whole CHECKSIPDOMAIN yellow
- keyword whole CONFBRIDGE yellow
- keyword whole CONFBRIDGE_INFO yellow
- keyword whole CONNECTEDLINE yellow
- keyword whole CSV_QUOTE yellow
- keyword whole CURL yellow
- keyword whole CURLOPT yellow
- keyword whole CUT yellow
- keyword whole DB yellow
- keyword whole DB_DELETE yellow
- keyword whole DB_EXISTS yellow
- keyword whole DB_KEYS yellow
- keyword whole DEC yellow
- keyword whole DENOISE yellow
- keyword whole DEVICE_STATE yellow
- keyword whole DIALGROUP yellow
- keyword whole DIALPLAN_EXISTS yellow
- keyword whole DUNDILOOKUP yellow
- keyword whole DUNDIQUERY yellow
- keyword whole DUNDIRESULT yellow
- keyword whole ENUMLOOKUP yellow
- keyword whole ENUMQUERY yellow
- keyword whole ENUMRESULT yellow
- keyword whole ENV yellow
- keyword whole EVAL yellow
- keyword whole EXCEPTION yellow
- keyword whole EXISTS yellow
- keyword whole EXTENSION_STATE yellow
- keyword whole FAXOPT yellow
- keyword whole FEATURE yellow
- keyword whole FEATUREMAP yellow
- keyword whole FIELDNUM yellow
- keyword whole FIELDQTY yellow
- keyword whole FILE yellow
- keyword whole FILE_COUNT_LINE yellow
- keyword whole FILE_FORMAT yellow
- keyword whole FILTER yellow
- keyword whole FRAME_TRACE yellow
- keyword whole GLOBAL yellow
- keyword whole GROUP yellow
- keyword whole GROUP_COUNT yellow
- keyword whole GROUP_LIST yellow
- keyword whole GROUP_MATCH_COUNT yellow
- keyword whole HANGUPCAUSE yellow
- keyword whole HANGUPCAUSE_KEYS yellow
- keyword whole HASH yellow
- keyword whole HASHKEYS yellow
- keyword whole HINT yellow
- keyword whole HOLD_INTERCEPT yellow
- keyword whole IAXPEER yellow
- keyword whole IAXVAR yellow
- keyword whole ICONV yellow
- keyword whole IF yellow
- keyword whole IFMODULE yellow
- keyword whole IFTIME yellow
- keyword whole IMPORT yellow
- keyword whole INC yellow
- keyword whole ISNULL yellow
- keyword whole JABBER_RECEIVE yellow
- keyword whole JABBER_STATUS yellow
- keyword whole JITTERBUFFER yellow
- keyword whole KEYPADHASH yellow
- keyword whole LEN yellow
- keyword whole LISTFILTER yellow
- keyword whole LOCAL yellow
- keyword whole LOCAL_PEEK yellow
- keyword whole LOCK yellow
- keyword whole MAILBOX_EXISTS yellow
- keyword whole MASTER_CHANNEL yellow
- keyword whole MATH yellow
- keyword whole MD5 yellow
- keyword whole MEETME_INFO yellow
- keyword whole MESSAGE yellow
- keyword whole MESSAGE_DATA yellow
- keyword whole MINIVMACCOUNT yellow
- keyword whole MINIVMCOUNTER yellow
- keyword whole MIXMONITOR yellow
- keyword whole MUTEAUDIO yellow
- keyword whole ODBC yellow
- keyword whole ODBC_ANTIGF yellow
- keyword whole ODBC_FETCH yellow
- keyword whole ODBC_PRESENCE yellow
- keyword whole ODBC_SQL yellow
- keyword whole PASSTHRU yellow
- keyword whole PERIODIC_HOOK yellow
- keyword whole PITCH_SHIFT yellow
- keyword whole POP yellow
- keyword whole PP_EACH_EXTENSION yellow
- keyword whole PP_EACH_USER yellow
- keyword whole PRESENCE_STATE yellow
- keyword whole PUSH yellow
- keyword whole QUEUE_EXISTS yellow
- keyword whole QUEUE_MEMBER yellow
- keyword whole QUEUE_MEMBER_COUNT yellow
- keyword whole QUEUE_MEMBER_LIST yellow
- keyword whole QUEUE_MEMBER_PENALTY yellow
- keyword whole QUEUE_VARIABLES yellow
- keyword whole QUEUE_WAITING_COUNT yellow
- keyword whole QUOTE yellow
- keyword whole RAND yellow
- keyword whole REALTIME yellow
- keyword whole REALTIME_DESTROY yellow
- keyword whole REALTIME_FIELD yellow
- keyword whole REALTIME_HASH yellow
- keyword whole REALTIME_STORE yellow
- keyword whole REDIRECTING yellow
- keyword whole REGEX yellow
- keyword whole REPLACE yellow
- keyword whole SET yellow
- keyword whole SHA1 yellow
- keyword whole SHARED yellow
- keyword whole SHELL yellow
- keyword whole SHIFT yellow
- keyword whole SIPPEER yellow
- keyword whole SIP_HEADER yellow
- keyword whole SMDI_MSG yellow
- keyword whole SMDI_MSG_RETRIEVE yellow
- keyword whole SORT yellow
- keyword whole SPEECH yellow
- keyword whole SPEECH_ENGINE yellow
- keyword whole SPEECH_GRAMMAR yellow
- keyword whole SPEECH_RESULTS_TYPE yellow
- keyword whole SPEECH_SCORE yellow
- keyword whole SPEECH_TEXT yellow
- keyword whole SPRINTF yellow
- keyword whole SQL_ESC yellow
- keyword whole SRVQUERY yellow
- keyword whole SRVRESULT yellow
- keyword whole STACK_PEEK yellow
- keyword whole STAT yellow
- keyword whole STRFTIME yellow
- keyword whole STRPTIME yellow
- keyword whole STRREPLACE yellow
- keyword whole SYSINFO yellow
- keyword whole TALK_DETECT yellow
- keyword whole TESTTIME yellow
- keyword whole TIMEOUT yellow
- keyword whole TOLOWER yellow
- keyword whole TOUPPER yellow
- keyword whole TRYLOCK yellow
- keyword whole TXTCIDNAME yellow
- keyword whole UNLOCK yellow
- keyword whole UNSHIFT yellow
- keyword whole URIDECODE yellow
- keyword whole URIENCODE yellow
- keyword whole VALID_EXTEN yellow
- keyword whole VERSION yellow
- keyword whole VMCOUNT yellow
- keyword whole VM_INFO yellow
- keyword whole VOLUME yellow
- # Request from Andy
- keyword whole CBMysql brightmagenta
- keyword whole MYSQL brightmagenta
- keyword $[*] brightgreen
- keyword ${*} brightgreen
- keyword whole \#include brightred
- keyword whole \#exec brightred
- keyword whole include\s*=> brightblue
- keyword whole exten\s*=> brightblue
- keyword whole same\s*=> brightblue
- keyword whole include=> brightblue
- keyword whole exten=> brightblue
- keyword whole same=> brightblue
- keyword , brightcyan
- keyword ( brightcyan
- keyword ) brightcyan
- keyword : brightcyan
- keyword ? brightcyan
- keyword --; brown
- context ;--\n --; brown
- context linestart [ ] yellow
- context ; \n brown
- context exclusive \#exec \n brightgreen
- context exclusive \#include \n brightgreen
- context exclusive include\s=> \n yellow
- context exclusive include=> \n yellow
- context exclusive n( ), yellow
- context exclusive verbose ) white
- keyword ( brightcyan
- keyword $[*] brightgreen
- keyword ${*} brightgreen
- context exclusive Verbose ) white
- keyword ( brightcyan
- keyword $[*] brightgreen
- keyword ${*} brightgreen
- context exclusive No\{Oo\}\{Pp\} ) white
- keyword ( brightcyan
- keyword $[*] brightgreen
- keyword ${*} brightgreen
- context exclusive no\{Oo\}\{Pp\} ) white
- keyword ( brightcyan
- keyword $[*] brightgreen
- keyword ${*} brightgreen
- ########################## До сюда ####################################################
- ----------------------Тут пропишем банер ------------------------
- mcedit /etc/issue.net
- mcedit /etc/ssh/sshd_config
- найти изаменить
- Banner /etc/issue.net
- mcedit /etc/motd
- debian-11.2.0-amd64-netinst.iso
- Asterisk asterisk-19.1.0
- username=asterisk
- password=sdfJHGVhj5g7jghjv$g
- mysql -u root -p.
- 123456
- runuser = asterisk
- rungroup = asterisk
- .$$$$$$$$$$$$$$$=..
- .$7$7.. .7$$7:.
- .$$:. ,$7.7
- .$7. 7$$$$ .$$77
- ..$$. $$$$$ .$$$7
- ..7$ .?. $$$$$ .?. 7$$$.
- $.$. .$$$7. $$$$7 .7$$$. .$$$.
- .777. .$$$$$$77$$$77$$$$$7. $$$,
- $$$~ .7$$$$$$$$$$$$$7. .$$$.
- .$$7 .7$$$$$$$7: ?$$$.
- $$$ ?7$$$$$$$$$$I .$$$7
- $$$ .7$$$$$$$$$$$$$$$$ :$$$.
- $$$ $$$$$$7$$$$$$$$$$$$ .$$$.
- $$$ $$$ 7$$$7 .$$$ .$$$.
- $$$$ $$$$7 .$$$.
- 7$$$7 7$$$$ 7$$$
- $$$$$ $$$
- $$$$7. $$
- $$$$$$$. .7$$$$$$ $$
- $$$$$$$$$$$$7$$$$$$$$$.$$$$$$
- $$$$$$$$$$$$$$$$.
- ____________________________________
- / Лучше ничего не делать, чем делать \
- | ничего. |
- | |
- \ -- Л.Н.Толстой /
- ------------------------------------
- \ __------~~-,
- \ ,' ,
- / \
- / :
- | '
- | |
- | |
- | _-- |
- _| =-. .-. ||
- o|/o/ _. |
- / ~ \ |
- (____@) ___~ |
- |_===~~~.` |
- _______.--~ |
- \________ |
- \ |
- __/-___-- -__
- / _ \
- ----------- Вот так будет выглядеть ----------------------
- mcedit /etc/asterisk/manager.conf
- Для включения Asterisk AMI откроем файл /etc/asterisk/manager.conf в текстовом редакторе и укажем параметры:
- [general]
- enabled = yes
- port = 5038
- bindaddr = 0.0.0.0
- timestampevents = yes
- displayconnects = yes
- allowmultiplelogin = yes
- webenabled = no
- #include "manager.d/*.conf"
- Теперь создадим файл настроек для первого пользователя:
- mkdir /etc/asterisk/manager.d
- mcedit /etc/asterisk/manager.d/admin.conf
- chown asterisk:asterisk /etc/asterisk/manager.d/admin.conf
- И добавим в него:
- [admin]
- secret = IXNFO
- deny = 0.0.0.0/0.0.0.0
- permit = 127.0.0.1/255.255.255.0
- permit = 192.168.2.2/255.255.255.255
- permit = 192.168.5.5/255.255.255.255
- read = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
- write = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
- #####################################################################################################
- # cd /var/www/html
- # git clone https://github.com/zheltovanton/asteriskgui.git
- # chown asterisk. /var/www/html/asteriskgui -R
- mcedit /var/www/html/asteriskgui/db/config.php
- mcedit /etc/httpd/conf.d/asteriskgui.conf
- <Directory /var/www/html/asteriskgui/>
- AddDefaultCharset UTF-8
- <IfModule mod_authz_core.c>
- # Apache 2.4
- <RequireAny>
- Require all granted
- </RequireAny>
- </IfModule>
- <IfModule !mod_authz_core.c>
- # Apache 2.2
- Order Deny,Allow
- Deny from All
- Allow from 127.0.0.1
- Allow from ::1
- </IfModule>
- </Directory>
- 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
- 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
- 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
- apt-get install -y haveged odbcinst
- --------------------------------------------------------------------------------------------------
- apt update && apt upgrade -y
- sudo whoami
- root
- su
- apt update
- apt upgrade
- apt install software-properties-common dirmngr
Add Comment
Please, Sign In to add comment