### 下载源码包
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
### ./configure
1. configure: error: *** termcap support not found (on modern systems, this typically means the ncurses development package is missing)
解决办法: sudo apt-get install ncurses-dev
2. configure: error: *** uuid support not found (this typically means the uuid development package is missing)
解决办法: sudo apt-get install uuid-dev
3. configure: error: *** JSON support not found (this typically means the libjansson development package is missing)
解决办法: sudo apt-get install libjansson-dev
4. configure: *** The Asterisk menuselect tool requires the 'libxml2' development package.
configure: *** Please install the 'libxml2' development package.
解决办法: sudo apt-get install libxml2-dev
5. configure: error: *** Asterisk now uses SQLite3 for the internal Asterisk database.
解决办法: sudo apt-get install libsqlite3-dev
### make
### sudo make install
### sudo make samples
### 从menuselect安装额外的语音提示
make menuselect
sudo make install
### 配置sip.conf
同时支持IPv4 IPv6
udpbindaddr=::
在文件最后添加上:
[1001]
type=friend
secret=1001
host=dynamic
context=wdl
nat=no ;表示服务器和客户端之间没有NAT设备
secret=1002
host=dynamic
context=wdl
[2001]
type=friend
secret=2001
host=dynamic
context=wdl
[2002]
type=friend
secret=2002
host=dynamic
context=wdl
### 配置extensions.conf
在文件最后添加上:
[wdl]
exten => 1001,1,Dial(SIP/1001)
exten => 1002,1,Dial(SIP/1002)
exten => 2001,1,Dial(SIP/2001)
exten => 2002,1,Dial(SIP/2002)
### debug启动Asterisk
/usr/sbin/asterisk -vvvvcg
### Asterisk管理
登录到Asterisk服务器运行控制台: asterisk -crvvv
查看登录用户: *CLI>sip shwo peers
查看详细记录: *CLI>sip show peer 1001
重新加载拨号方案: *CLI>dialplan reload
重新加载SIP方案: *CLI>sip reload
### Asterisk 自动启动
chkconfig asterisk on
chkconfig --list
### WinXP ipv6
ipv6 setup
关掉dhcp方式:
>netsh interface ipv6 set privacy disabled
设置ipv6地址:
>netsh interface ipv6 add address "本地连接 2" 2001:da8:2015:828::23:35 unicast
>netsh interface ipv6 del address "本地连接" 2001:da8:2015:828::23:35
### Ubuntu 12.04
sudo apt-get update
关闭防火墙:sudo ufw disable
# vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 static
address 2001:da8:2:10d::2
netmask 64
up route -A inet6 add default gw 2001:da8:2:10d::1 dev $IFACE
iface eth0 inet static
address 58.1.4.74
netmask 255.255.255.0
up route add default gw 58.1.4.1 dev $IFACE
### Fedora 10
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=b8:ac:6f:97:ed:c3
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
PEERDNS=yes
NM_CONTROLLED=yes
TYPE=Ethernet
NETMASK=255.255.224.0
IPADDR=172.16.23.168
GATEWAY=172.16.23.200
DNS1=202.103.24.68
DNS2=8.8.8.8
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6ADDR=2001:abc::172:16:23:168/64
# vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
#HOSTNAME=server4
#GATEWAY=202.120.1.254
#IPV6_DEFAULTGW=2001:da8:8003:801::1%eth0
### WinXP
x-lite:
http://counterpath.s3.amazonaws.com/downloads/X-Lite_Win32_4.5.5.2_76432.exe
### Phone support ipv6
linphone: (linux/windows)
http://download-mirror.savannah.gnu.org/releases/linphone/3.8.x/win32/Linphone-3.8.5-win32.exe
kphone
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
### ./configure
1. configure: error: *** termcap support not found (on modern systems, this typically means the ncurses development package is missing)
解决办法: sudo apt-get install ncurses-dev
2. configure: error: *** uuid support not found (this typically means the uuid development package is missing)
解决办法: sudo apt-get install uuid-dev
3. configure: error: *** JSON support not found (this typically means the libjansson development package is missing)
解决办法: sudo apt-get install libjansson-dev
4. configure: *** The Asterisk menuselect tool requires the 'libxml2' development package.
configure: *** Please install the 'libxml2' development package.
解决办法: sudo apt-get install libxml2-dev
5. configure: error: *** Asterisk now uses SQLite3 for the internal Asterisk database.
解决办法: sudo apt-get install libsqlite3-dev
### make
### sudo make install
### sudo make samples
### 从menuselect安装额外的语音提示
make menuselect
sudo make install
### 配置sip.conf
同时支持IPv4 IPv6
udpbindaddr=::
在文件最后添加上:
[1001]
type=friend
secret=1001
host=dynamic
context=wdl
nat=no ;表示服务器和客户端之间没有NAT设备
canreinvite=yes ;允许RTP数据流不经过服务器
; 如果使用了NAT,该项必须设为no,使媒体流经过服务器
[1002]
type=friendsecret=1002
host=dynamic
context=wdl
[2001]
type=friend
secret=2001
host=dynamic
context=wdl
[2002]
type=friend
secret=2002
host=dynamic
context=wdl
### 配置extensions.conf
在文件最后添加上:
[wdl]
exten => 1001,1,Dial(SIP/1001)
exten => 1002,1,Dial(SIP/1002)
exten => 2001,1,Dial(SIP/2001)
exten => 2002,1,Dial(SIP/2002)
### debug启动Asterisk
/usr/sbin/asterisk -vvvvcg
### Asterisk管理
登录到Asterisk服务器运行控制台: asterisk -crvvv
查看登录用户: *CLI>sip shwo peers
查看详细记录: *CLI>sip show peer 1001
重新加载拨号方案: *CLI>dialplan reload
重新加载SIP方案: *CLI>sip reload
### Asterisk 自动启动
chkconfig asterisk on
chkconfig --list
### WinXP ipv6
ipv6 setup
关掉dhcp方式:
>netsh interface ipv6 set privacy disabled
设置ipv6地址:
>netsh interface ipv6 add address "本地连接 2" 2001:da8:2015:828::23:35 unicast
>netsh interface ipv6 del address "本地连接" 2001:da8:2015:828::23:35
### Ubuntu 12.04
sudo apt-get update
关闭防火墙:sudo ufw disable
# vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 static
address 2001:da8:2:10d::2
netmask 64
up route -A inet6 add default gw 2001:da8:2:10d::1 dev $IFACE
iface eth0 inet static
address 58.1.4.74
netmask 255.255.255.0
up route add default gw 58.1.4.1 dev $IFACE
### Fedora 10
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=b8:ac:6f:97:ed:c3
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
PEERDNS=yes
NM_CONTROLLED=yes
TYPE=Ethernet
NETMASK=255.255.224.0
IPADDR=172.16.23.168
GATEWAY=172.16.23.200
DNS1=202.103.24.68
DNS2=8.8.8.8
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6ADDR=2001:abc::172:16:23:168/64
# vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
#HOSTNAME=server4
#GATEWAY=202.120.1.254
#IPV6_DEFAULTGW=2001:da8:8003:801::1%eth0
### WinXP
x-lite:
http://counterpath.s3.amazonaws.com/downloads/X-Lite_Win32_4.5.5.2_76432.exe
### Phone support ipv6
linphone: (linux/windows)
http://download-mirror.savannah.gnu.org/releases/linphone/3.8.x/win32/Linphone-3.8.5-win32.exe
# Check "Allow IPv6"
# Configure SIP Account
kphone