OS:centos5 on WAN is static ip
installed successful asterisk 1.6.2 from asterisk.org/downloads/yum
"Installing Asterisk With Yum"
configure sip.conf as below
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
bindport=5060
qualify=yes
nat=yes
[101]
type=friend
secret=101
host=dynamic
context=internal
username=101
callgroup=1
pickupgroup=1
[102]
type=friend
secret=102
host=dynamic
context=internal
username=102
callgroup=1
pickupgroup=1
extensions.conf
[default]
[internal]
exten=>101,1,Dial(SIP/101,20) ;20 is timeout
exten=>102,1,Dial(SIP/102,20)
========
i use x-lite registration asterisk server,but return timeout 408
also asterrisk CLI shows nothing
i guess firewall reason,so i add udp 5060,10000-20000 port to iptables
use command below:
iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT
then save and restart iptables.
#iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 acctboth all – 0.0.0.0/0 0.0.0.0/0
2 ACCEPT udp – 0.0.0.0/0 0.0.0.0/0 udp dpt:5060
3 ACCEPT udp – 0.0.0.0/0 0.0.0.0/0 udp dpts:10000:20000
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
1 acctboth all – 0.0.0.0/0 0.0.0.0/0
Chain acctboth (2 references)
num target prot opt source destination
1 tcp – 116.12.55.124 0.0.0.0/0 tcp dpt:80
2 tcp – 0.0.0.0/0 116.12.55.124 tcp spt:80
3 tcp – 116.12.55.124 0.0.0.0/0 tcp dpt:25
4 tcp – 0.0.0.0/0 116.12.55.124 tcp spt:25
5 tcp – 116.12.55.124 0.0.0.0/0 tcp dpt:110
6 tcp – 0.0.0.0/0 116.12.55.124 tcp spt:110
7 icmp – 116.12.55.124 0.0.0.0/0
8 icmp – 0.0.0.0/0 116.12.55.124
9 tcp – 116.12.55.124 0.0.0.0/0
10 tcp – 0.0.0.0/0 116.12.55.124
11 udp – 116.12.55.124 0.0.0.0/0
12 udp – 0.0.0.0/0 116.12.55.124
13 all – 116.12.55.124 0.0.0.0/0
next,i try x-lite registration to astersik server again,but return time out 408 also CLI shows nothing.
why, please help me. anyidea?
thanks
=================================
i use command “netstat -an -p” get asterisk network status below
udp 0 0 0.0.0.0:2727 0.0.0.0:* 24374/asterisk
udp 0 0 0.0.0.0:4520 0.0.0.0:* 24374/asterisk
udp 0 0 0.0.0.0:4569 0.0.0.0:* 24374/asterisk
udp 0 0 0.0.0.0:5000 0.0.0.0:* 24374/asterisk
udp 0 0 0.0.0.0:5060 0.0.0.0:* 24374/asterisk