asterisk says "hello world",asterisksays


 cd /etc/asterisk  backup the confs
 debian:/usr/src# cd /etc/asterisk


debian:/etc/asterisk# mkdir backup
debian:/etc/asterisk# mv sip.conf backup/
debian:/etc/asterisk# mv extensions.conf backup/
debian:/etc/asterisk#

/etc/asterisk/sip.conf  and enter the following:[6]

[general]
port = 5060
bindaddr = 0.0.0.0
context = others

[2000]
type=friend
context=my-phones
secret=1234
host=dynamic

[2001]
type=friend
context=my-phones
secret=1234
host=dynamic

 

[2002]
type=friend
context=my-phones
secret=1234
host=dynamic


We write a very simple dialplan in /etc/asterisk/extensions.conf:

[others]

[my-phones]
exten => 2000,1,Dial(SIP/2000)
exten => 2001,1,Dial(SIP/2001)

exten => 2001,1,Dial(SIP/2002)

asterisk -c

*CLI> stop now

查看ip地址
 ifconfig | grep Bcast | sed s/Bcast.*//

 

 

SIP extension 2000 must be configured this way:

  • User: 2000

  • Password: 1234

  • SIP-Registrar: IP address of your Asterisk server

  • SIP-Proxy: IP address of your Asterisk server

下载SIP client软件,这儿我用的是x-lite 输入用户密码,服务器用的是asterisk ip地址,接上耳麦就可以拨号开讲 x-lite退出和登录时候,asterisk 会显示信息 - Unregistered SIP '2000'
    -- Registered SIP '2000' at 10.4.1.61 port 45010
    -- Saved useragent "X-Lite release 1002tx stamp 29712" for peer 2000
[Jul 30 11:47:55] NOTICE[26171]: chan_sip.c:15935 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2000
[Jul 30 11:48:18] NOTICE[26171]: chan_sip.c:15935 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2002
[Jul 30 11:48:32] NOTICE[26171]: chan_sip.c:15935 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2001
[Jul 30 11:48:56] NOTICE[26171]: chan_sip.c:15935 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2000



相关内容

    暂无相关文章