====== Install ====== # yum install yum-priorities # cat /etc/yum/pluginconf.d/priorities.conf [main] enabled = 1 # cat /etc/yum.repos.d/CentOS-Base.repo [base] [...] priority=1 #released updates [updates] [...] priority=1 #additional packages that may be useful [extras] [...] priority=1 #additional packages that extend functionality of existing packages [centosplus] [...] priority=2 # yum install epel-release # cat /etc/yum.repos.d/epel.repo [epel] [...] priority=10 [epel-debuginfo] [...] priority=10 [epel-source] [...] priority=10 # cd /etc/yum.repos.d/ # wget https://ast.tucny.com/repo/tucny-asterisk.repo # vim /etc/yum.repos.d/tucny-asterisk.repo [asterisk-common] name=Asterisk Common Requirement Packages @ tucny.com #baseurl=https://ast.tucny.com/repo/asterisk-common/el$releasever/$basearch/ mirrorlist=https://ast.tucny.com/mirrorlist.php?release=$releasever&arch=$basearch&repo=asterisk-common enabled=1 gpgcheck=1 gpgkey=https://ast.tucny.com/repo/RPM-GPG-KEY-dtucny priority=5 [...] [asterisk-16] name=Asterisk 16 Packages @ tucny.com #baseurl=https://ast.tucny.com/repo/asterisk-16/el$releasever/$basearch/ mirrorlist=https://ast.tucny.com/mirrorlist.php?release=$releasever&arch=$basearch&repo=asterisk-16 enabled=1 gpgcheck=1 gpgkey=https://ast.tucny.com/repo/RPM-GPG-KEY-dtucny priority=5 # rpm --import https://ast.tucny.com/repo/RPM-GPG-KEY-dtucny # yum install asterisk # rpm -qil asterisk # yum install asterisk-voicemail # mkdir /usr/share/asterisk/sounds/pt_BR # cd /usr/local/src # wget https://www.asterisksounds.org/pt-br/download/asterisk-sounds-core-pt-BR-sln16.zip # wget https://www.asterisksounds.org/pt-br/download/asterisk-sounds-extra-pt-BR-sln16.zip # unzip /usr/local/src/asterisk-sounds-core-pt-BR-sln16.zip -d /usr/share/asterisk/sounds/pt_BR/ # unzip /usr/local/src/asterisk-sounds-extra-pt-BR-sln16.zip -d /usr/share/asterisk/sounds/pt_BR/ # chmod 644 /usr/share/asterisk/sounds/pt_BR/* -R # find /usr/share/asterisk/sounds/pt_BR -type d -exec chmod 0755 {} \; # vim asterisk-sound-convert #!/bin/bash cd /usr/share/asterisk/sounds/pt_BR for a in $(find . -name '*.sln16'); do sox -t raw -e signed-integer -b 16 -c 1 -r 16k $a -t gsm -r 8k `echo $a|sed "s/.sln16/.gsm/"`;\ sox -t raw -e signed-integer -b 16 -c 1 -r 16k $a -t raw -r 8k -e a-law `echo $a|sed "s/.sln16/.alaw/"`;\ sox -t raw -e signed-integer -b 16 -c 1 -r 16k $a -t raw -r 8k -e mu-law `echo $a|sed "s/.sln16/.ulaw/"`;\ done # bash asterisk-sound-convert # firewall-cmd --add-port=5060/udp --permanent # firewall-cmd --add-port=5060/tcp --permanent # firewall-cmd --add-port=5061/udp --permanent # firewall-cmd --add-port=5061/tcp --permanent # firewall-cmd --add-port=4569/udp --permanent # firewall-cmd --add-port=5038/tcp --permanent # firewall-cmd --add-port=10000-20000/udp --permanent # firewall-cmd --reload # cd /etc/asterisk/ # mkdir unused # mv *.conf *.adsi ./unused # cd unused/ # cp -p indications.conf asterisk.conf modules.conf extensions.conf musiconhold.conf features.conf res_parking.conf voicemail.conf /etc/asterisk/ # yum install asterisk-iax2 # rpm -qil asterisk-iax2 # yum install asterisk-pjsip # rpm -qil asterisk-pjsip # vim indications.conf [...] [general] ;country=us ; default location country=br ; default location [...] # systemctl start asterisk.service # systemctl enable asterisk.service # systemctl status asterisk.service -l ===== Codec G729 ===== [[http://asterisk.hosting.lv/|g729]] # cd /usr/local/src # wget http://asterisk.hosting.lv/bin/codec_g729-ast160-gcc4-glibc-x86_64-pentium4.so # cp codec_g729-ast160-gcc4-glibc-x86_64-pentium4.so /usr/lib64/asterisk/modules/codec_g729.so # chmod +x /usr/lib64/asterisk/modules/codec_g729.so # asterisk -rx "module load codec_g729.so" *CLI> module load codec_g729.so *CLI> core reload