Ubuntu – asterisk sip port on ubuntu server

asteriskiptablesUbuntu

I am working on Ubuntu server 12.04

I have asterisk working. I set the port 5060 as this:

     iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
        iptables -A INPUT -p udp --dport 5060 -j ACCEPT
   iptables -A FORWARD -o eth0 -p udp --dport 5060 -j ACCEPT

On the client side I have error 408 Registring (Request timeout)

There is no port blocking on the client side.

ON the server side when running

asterisk -vvvvvr , using set sip debug on

there is no message that the server is having a request from a client.

What to do? Need some help. Thank you!

In case you ask:
In sip.conf I did specify:

bindport=5060
bindaddr=0.0.0.0

netstat -plunt

:

...
udp        0      0 0.0.0.0:4520            0.0.0.0:*                           1002/asterisk   
udp        0      0 0.0.0.0:5060            0.0.0.0:*                           1002/asterisk   
udp        0      0 0.0.0.0:4569            0.0.0.0:*                           1002/asterisk   

UPDATE:

When checking with nmap -v -sU IP -p 5060 and I get:

Host is up (0.060s latency).
PORT     STATE         SERVICE
5060/udp open|filtered sip

Ouput rules are:

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  any    lo      anywhere             anywhere            
 3074  938K ACCEPT     all  --  any    any     anywhere             anywhere            state NEW,RELATED,ESTABLISHED 

THE SOLUTION FOR SIP IS THIS:

http://www.voip-info.org/wiki/view/Asterisk+firewall+rules

Best Answer

You should add some port:

Port 5060 TCP and UDP 
Port 5004 UDP 
Port 10000 UDP (sipgate Stun service - usually 3478/9) 
Ports 16348-32768 UDP (RTP, RTCP multimedia streaming)

Your asterisk configuration wrong, refer here for more details.