CentOS7.9 安装 okay 的 FreeSWITCH

第一个 shell,更换 yum 源

#!/bin/bash

mkdir /root/repo
mv /etc/yum.repos.d/*.repo /root/repo

cat <<"EOF" > /tmp/ali.repo

[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#released updates 
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

EOF

mv /tmp/ali.repo /etc/yum.repos.d/ali.repo

yum install -y epel-release


cat <<"EOF" > /tmp/okay.repo

[okay]
name=Extra OKay Packages for Enterprise Linux - $basearch
baseurl=http://repo.okay.com.mx/centos/$releasever/$basearch/release
failovermethod=priority
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-OKAY

[okay-debuginfo]
name=Extra OKay Packages for Enterprise Linux - $basearch - Debug
baseurl=http://repo.okay.com.mx/centos/$releasever/$basearch/debug
failovermethod=priority
enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-OKAY
#gpgcheck=1

EOF

mv /tmp/okay.repo /etc/yum.repos.d/okay.repo

先运行这个脚本


现在是第二个脚本,安装 fs:

#!/bin/bash

yum install -y --skip-broken \
	freeswitch \
	freeswitch-application-curl \
	freeswitch-application-db \
	freeswitch-application-hash \
	freeswitch-application-limit \
	freeswitch-application-sms \
	freeswitch-application-voicemail \
    freeswitch-application-callcenter \
    freeswitch-application-conference \
	freeswitch-codec-ilbc \
    freeswitch-codec-bcg729 \
	freeswitch-codec-opus \
	freeswitch-codec-silk \
	freeswitch-codec-vp8 \
    freeswitch-codec-vpx \
    freeswitch-database-mariadb \
    freeswitch-database-pgsql \
	freeswitch-endpoint-verto \
    freeswitch-event-cdr-sqlite \
	freeswitch-format-local-stream \
	freeswitch-format-mod-shout \
	freeswitch-format-native-file \    
    freeswitch-format-tone-stream \
	freeswitch-format-png \
	freeswitch-sounds-en-us-callie \
	freeswitch-xml-curl \
	freeswitch-cli \
	freeswitch-systemd \
    freeswitch-sounds-music-8000 \
	freeswitch-lua
    

运行完第二个脚本之后

接着把 fs 的配置文件复制到 /etc/freeswitch/

或者 yum install -y freeswitch-config-vanilla,安装 fs 的配置文件

运行 freeswitch -nonat, 或者 systemctl restart freeswitch

fs_cli -x 'version'

FreeSWITCH Version 1.10.11-release~64bit (-release 64bit)

freeswitch -x 'global_getvar'

hostname=localhost.localdomain
local_ip_v4=61.164.252.75
local_mask_v4=255.255.255.224
local_ip_v6=::1
base_dir=/usr
recordings_dir=/var/lib/freeswitch/recordings
sounds_dir=/usr/share/freeswitch/sounds
conf_dir=/etc/freeswitch
log_dir=/var/log/freeswitch
run_dir=/var/run/freeswitch
db_dir=/var/lib/freeswitch/db
mod_dir=/usr/lib64/freeswitch/mod
htdocs_dir=/usr/share/freeswitch/htdocs
script_dir=/usr/share/freeswitch/scripts
temp_dir=/tmp
grammar_dir=/usr/share/freeswitch/grammar
fonts_dir=/usr/share/freeswitch/fonts
images_dir=/var/lib/freeswitch/images
certs_dir=/etc/pki/tls
storage_dir=/var/lib/freeswitch/storage
cache_dir=/var/lib/freeswitch/cache
data_dir=/usr/share/freeswitch
localstate_dir=/var/lib/freeswitch
default_password=1234
sound_prefix=/usr/share/freeswitch/sounds/en/us/callie
domain=61.164.252.75
domain_name=61.164.252.75
hold_music=local_stream://moh
use_profile=external
rtp_sdes_suites=AEAD_AES_256_GCM_8|AEAD_AES_128_GCM_8|AES_CM_256_HMAC_SHA1_80|AES_CM_192_HMAC_SHA1_80|AES_CM_128_HMAC_SHA1_80|AES_CM_256_HMAC_SHA1_32|AES_CM_192_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_32|AES_CM_128_NULL_AUTH
global_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8
outbound_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8
xmpp_client_profile=xmppc
xmpp_server_profile=xmpps
bind_server_ip=auto
external_rtp_ip=61.164.252.75
external_sip_ip=61.164.252.75
unroll_loops=true
outbound_caller_name=FreeSWITCH
outbound_caller_id=0000000000
call_debug=false
console_loglevel=info
default_areacode=918
default_country=US
presence_privacy=false
au-ring=%(400,200,383,417);%(400,2000,383,417)
be-ring=%(1000,3000,425)
ca-ring=%(2000,4000,440,480)
cn-ring=%(1000,4000,450)
cy-ring=%(1500,3000,425)
cz-ring=%(1000,4000,425)
de-ring=%(1000,4000,425)
dk-ring=%(1000,4000,425)
dz-ring=%(1500,3500,425)
eg-ring=%(2000,1000,475,375)
es-ring=%(1500,3000,425)
fi-ring=%(1000,4000,425)
fr-ring=%(1500,3500,440)
hk-ring=%(400,200,440,480);%(400,3000,440,480)
hu-ring=%(1250,3750,425)
il-ring=%(1000,3000,400)
in-ring=%(400,200,425,375);%(400,2000,425,375)
jp-ring=%(1000,2000,420,380)
ko-ring=%(1000,2000,440,480)
pk-ring=%(1000,2000,400)
pl-ring=%(1000,4000,425)
ro-ring=%(1850,4150,475,425)
rs-ring=%(1000,4000,425)
ru-ring=%(800,3200,425)
sa-ring=%(1200,4600,425)
tr-ring=%(2000,4000,450)
uk-ring=%(400,200,400,450);%(400,2000,400,450)
us-ring=%(2000,4000,440,480)
bong-ring=v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1400,0,350,440)
beep=%(1000,0,640)
sit=%(274,0,913.8);%(274,0,1370.6);%(380,0,1776.7)
df_us_ssn=(?!219099999|078051120)(?!666|000|9\d{2})\d{3}(?!00)\d{2}(?!0{4})\d{4}
df_luhn=?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|6(?:011|5[0-9]{2})[0-9]{12}|(?:2131|1800|35\d{3})\d{11}
default_provider=example.com
default_provider_username=joeuser
default_provider_password=password
default_provider_from_domain=example.com
default_provider_register=false
default_provider_contact=5000
sip_tls_version=tlsv1,tlsv1.1,tlsv1.2
sip_tls_ciphers=ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH
internal_auth_calls=true
internal_sip_port=5060
internal_tls_port=5061
internal_ssl_enable=false
external_auth_calls=false
external_sip_port=5080
external_tls_port=5081
external_ssl_enable=false
rtp_video_max_bandwidth_in=3mb
rtp_video_max_bandwidth_out=3mb
suppress_cng=true
rtp_liberal_dtmf=true
video_mute_png=/var/lib/freeswitch/images/default-mute.png
video_no_avatar_png=/var/lib/freeswitch/images/default-avatar.png
AT_EPENT1=0 0 0 -1 -1 0 -1 0 -1 -1 0 -1
AT_EPENT2=1 1 1 -1 -1 1 -1 1 -1 -1 1 -1
AT_CPENT1=0 -1 -1 0 -1 0 0 0 -1 -1 0 -1
AT_CPENT2=1 -1 -1 1 -1 1 1 1 -1 -1 1 -1
AT_CMAJ1=0 -1 0 0 -1 0 -1 0 0 -1 0 -1
AT_CMAJ2=1 -1 1 1 -1 1 -1 1 1 -1 1 -1
AT_BBLUES=1 -1 1 -1 -1 1 -1 1 1 1 -1 -1
ATGPENT2=-1 1 -1 1 -1 1 -1 -1 1 -1 1 -1
core_uuid=44586862-c134-4660-abfa-2a342c00d0c6
 


如此安装,简单明快

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值