为移动设备调优 asterisk-1.8.0-rc2

标签: tcpcodecvmwaresecuritylinuxcommand
2447人阅读 评论(0) 收藏 举报
分类:

参考文档:http://www.venturevoip.com/How-to-asterisk.1.8_SRTPTLS_snom300_pgsm.pdf


Edit file /etc/Asterisk/codecs.conf
1. nano /etc/Asterisk/codecs.conf
Add the following at the end of the file
[amr]
octet-aligned=1
;codec_amr: Must be one of MR475, MR515, MR59, MR67, MR74, MR795, MR102, MR122, MRDTX
mode = MR475
dtx=0
cng = 1
vad = 0


SIP Timers
edit sip.conf in [general] sections :
timert1=3000 ; Default T1 timer


Disable SIP Session Timers
On Asterisk those must be disabled as follow:
edit sip.conf in [general] section: 加入一行
session-timers=refuse




Reduce RTP timeout
edit sip.conf in [general] section:
rtptimeout=15






Audio buffer tuning
Edit sip.conf and put the following value in [general] section:
jbenable = yes
jbforce = no
jbmaxsize = 200
jbresyncthreshold = 1200
jbimpl = fixed






Disable TCP keepalive
每次Linux启动,这个参数都要重新设置一下
On Linux you can disable TCP keepalive with the following command:
echo 0 > /proc/sys/net/ipv4/tcp_keepalive_probes

省事的办法:

vi /etc/rc.local

加入这一行

echo 0 > /proc/sys/net/ipv4/tcp_keepalive_probes


====================================================================
注册用户:
编辑sip.conf,添加下面一行把sip_additional.conf里面定义的用户添加进来
#include sip_additional.conf


编辑sip_additional.conf,添加下面两行


[501]
deny=0.0.0.0/0.0.0.0
type=friend
secret=501
qualify=yes
port=5060
pickupgroup=
permit=0.0.0.0/0.0.0.0
nat=yes
mailbox=501@device
host=dynamic
dtmfmode=rfc2833
dial=SIP/501
context=from-internal
canreinvite=no
callgroup=
callerid=device <501>
accountcode=
call-limit=50




[502]
deny=0.0.0.0/0.0.0.0
type=friend
secret=502
qualify=yes
port=5060
pickupgroup=
permit=0.0.0.0/0.0.0.0
nat=yes
mailbox=502@device
host=dynamic
dtmfmode=rfc2833
dial=SIP/502
context=from-internal
canreinvite=no
callgroup=
callerid=device <502>
accountcode=
call-limit=50




====================================================================




x-lite客户端一直都连接不上,
  asterisk控制台没有任何信息显示
  怀疑是网络问题


1)-----------------
编辑sip.conf以监听 tcp 5060端口
tcpenable=yes 


netstat -na |grep 5060显示监 tcp 听5060端口了




telnet 192.168.158.134 5060
可以了,但是有点慢,怀疑是DNS resolve配置还有改进


2)-----------------
执行命令seutp
在Firewall configuration设置Security level为disable


重新启动vmware,xlite可以登录了,但是不能给别人打电话,应该是电话路由有问题。


====================================================================
下一步:
需要一套方便管理的asterisk的后台,那么我个人freepbx是非常好的一套管理软件


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:2475336次
    • 积分:33169
    • 等级:
    • 排名:第149名
    • 原创:741篇
    • 转载:197篇
    • 译文:18篇
    • 评论:290条
    最新评论