asterisk SIP中继配置: IP中继对接
IP对接即IP认证,适用于系统拥有固定IP的情况,落地端会要求提供系统的IP,并提供落地端的IP和端口,在asterCC系统中,IP对接的配置如下,详情中填写
host=192.168.1.170 post=5060
其中192.168.1.170为对方IP地址(也可以使用域名),5060为端口号
对应的asterisk中sip.conf中的相应配置如下
[siptoE170] host=192.168.1.70 port=5060 type=friend insecure=port,invite directmedia=no qualify=yes context=hosted-dialin disallow=all allow=ulaw
asterisk SIP中继配置: 用户名密码对接
使用用户名密码对接时,分为呼入和呼出两部分,呼出配置,asterCC中配置如图所示
相对应的asterisk中sip.conf中相应的配置如下
[siptoE170] host=192.168.1.70 username=myusername secret=mysecret port=5060 type=friend insecure=port,invite directmedia=no context=hosted-dialin dtmfmode=rfc2833 qualify=yes disallow=all allow=ulaw,alaw,gsm,g729
部分中继要求指定的From Header,因此需要设置fromuser和fromdomain

相对应的asterisk中sip配置如下
[siptoE170] host=192.168.1.70 fromdomain=192.168.1.70 username=myusername fromuser=myusername secret=mysecret port=5060 type=friend insecure=port,invite directmedia=no context=hosted-dialin dtmfmode=rfc2833 qualify=yes disallow=all allow=ulaw,alaw,gsm,g729
中继注册
如果该中继还用于接受呼叫(呼入),对于使用用户名密码的中继需要填写注册串,IP认证的中继则不需要,asterCC中配置如图所示

格式为 username:password@ip:port
相对应的asterisk中sip.conf中配置如下,注意要写在所有自定义section之前
register=myusername:mysecret@192.168.1.70:5060



