修改:sip_general_additional.conf
- ; do not edit this file, this is an auto-generated file by freepbx
- ; all modifications must be done from the web gui
- vmexten=*97
- bindport=5060
- #使用×××时修改该地方,IP为asterisk主机的内部IP
- bindaddr=192.168.1.10
- #这里增加asterisk所支持的编码
- #也可增加至sip.conf中
- disallow=all
- allow=ulaw
- allow=alaw
- context=from-sip-external
- callerid=Unknown
- notifyringing=yes
- notifyhold=yes
- limitonpeers=yes
- tos_sip=cs3
- tos_audio=ef
- tos_video=af41
如果以上设置后拨入无法拨通则修改sip_nat.conf
- externip = 62.69.4.121 # 该处为asterisk 机的外部IP
- localnet=192.168.0.0/255.255.0.0
修改 zapata.conf
增加以下三项如果该三项不存在的话
- echocancel=yes
- echocancelwhenbridged=yes
- echotraining=yes
使用 ztmonitor <channel num> -vv 该命令查看 rxgain/txgain 的变化 根据变化的值适当调整 rxgain/txgain 的值
ztmontor 中的<channel num>的指你当前通话的通道编号 如 zap/32-xxxxx , 32则为 channel num 该命令一定要在你测试的通话经行过程中使用 运行如下- [root@elastix ~]# ztmonitor 32 -vv
- Visual Audio Levels.
- --------------------
- Use zapata.conf file to adjust the gains if needed.
- ( # = Audio Level * = Max Audio Hit )
- <----------------(RX <----------------(TX
- Rx: 0 ( 0) Tx: 0 ( 0)
以下为我的asterisk中的配置文件:
- [trunkgroups]
- [channels]
- context=from-pstn
- signalling=fxs_ks
- rxwink=300 ; Atlas seems to use long (250ms) winks
- usecallerid=yes
- hidecallerid=no
- callwaiting=yes
- usecallingpres=yes
- callwaitingcallerid=yes
- threewaycalling=yes
- transfer=yes
- canpark=yes
- cancallforward=yes
- callreturn=yes
- echocancel=yes
- echocancelwhenbridged=yes
- faxdetect=incoming
- echotraining=yes
- hanguponpolarityswitch=yes ;拆线
- answeronpolarityswitch=yes ;对端应答(用于计费)
- rxgain=-6.3 #该处为修改后的值
- txgain=5.3 #该处为修改后的值
- callgroup=1
- pickupgroup=1
- ;Uncomment these lines if you have problems with the disconection of your analog lines
- ;busydetect=yes
- ;busycount=3
- immediate=no
- #include zapata_additional.conf
- #include zapata-channels.conf
可参考: Asterisk卡常见问题汇总
转载于:https://blog.51cto.com/strugglelinux/590633