asterisk says "hello world"

 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



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值