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