将Asterisk连接到一个SIP提供商

 如果你能从你的 SIP 服务提供商收到呼叫,那么服务提供商一般会要求你的服务器能够注册到他们的服务器上。
为了做到这一点,你必须在  /etc/asterisk/sip.conf  的  [general]  部分中增加注册行: 

 [general]
 register => username:[email protected]

下一步,你需要在sip.conf中为你的服务提供商创建一个入口点,如下图所示:

 [myprovider]
 type = peer
 host = your.provider.ltd
 username = username
 secret = password

  ;Most providers won't authenticate when they send calls to you, so you need this line to just accept their calls. 
  大多数的提供商在他们呼叫你的时候是不需要认证的,所以你仅仅需要将这条线路设置成接收它们的呼叫就行了。
 insecure = invite

 dtmfmode = rfc2833
 disallow = all
 allow = ulaw

现在已经完成了账号定义, 你还必须在extensions.conf的dialplan中增加几行以允许你向服务提供商发起呼叫:  
 exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@myprovider) 

 

你可能感兴趣的:(asterisk,SIP提供商)