星号中继SIP

我有一个与中继SIP问题,当我连接我的星号我的提供商和互联网连接丢失,中继SIP将无法访问,问题组成是所有本地扩展都断开,直到互联网连接将启动或我停用中继。

第二个问题是,有时候,互联网连接将会继续,而中继线仍然下降,直到我做asterisk -rx "reload"

如果我重新启动系统,检测到同样的问题,只有当我重新加载星号时,中继才可以访问。

任何解决这个问题?

注意:我的星号版本是1.8.15(证书版本)

 [general] vmexten=*97 faxdetect=yes context=from-sip-external callerid=Unknown notifyringing=yes notifyhold=yes tos_sip=cs3 tos_audio=ef tos_video=af41 alwaysauthreject=yes useragent=MyIPBX disallow=all allow=ulaw allow=alaw allow=gsm language=fr jbenable=no rtptimeout=30 maxexpiry=3600 allowguest=yes defaultexpiry=120 minexpiry=60 srvlookup=no registerattempts=0 registertimeout=20 notifyhold=yes g726nonstandard=no t38pt_udptl=yes videosupport=no maxcallbitrate=384 canreinvite=no rtpholdtimeout=300 rtpkeepalive=0 checkmwi=10 notifyringing=yes register=myippiuser:[email protected] [100] secret=pass100 dtmfmode=rfc2833 canreinvite=no context=from-internal host=dynamic type=friend nat=yes port=5060 qualify=yes dial=SIP/100 mailbox=100@default permit=0.0.0.0/0.0.0.0 callcounter=yes faxdetect=no [101] secret=pass101 dtmfmode=rfc2833 canreinvite=no context=from-internal host=dynamic type=friend nat=yes port=5060 qualify=yes dial=SIP/101 mailbox=101@default permit=0.0.0.0/0.0.0.0 callcounter=yes faxdetect=no [ippi_trunk] username=myippiuser type=peer secret=myippisecret qualify=yes nat=yes insecure=invite,port host=ippi.fr fromuser=myippiuser fromdomain=ippi.fr dtmfmode=rfc2833 context=from-trunk canreinvite=no authname=myippiuser 

如果因特网连接断开,因为服务器无法通过DNSparsing中继主机名称地址,则Asterisk将被阻止,所有sip端点都closures。

这是Asterisk 1.8中的一个已知错误,解决方法是在主机文件中添加提供程序的ip地址,如果互联网连接已经启动,则首先使用dns给出parsing主机名的优先级,否则使用hosts文件parsing名称。

 # /etc/hosts # I have added this line ip_provider dns_name_provider 

然后我改变了hosts:的顺序hosts:在nsswitch.conf文件中选项:

 #/etc/nsswitch.conf # Just I changed the order of dns files . . . hosts: dns files