Tcpenable

Home » Asterisk Users » Tcpenable
Asterisk Users 4 Comments

I am playing with tcpenable… on 13.11.2

so in sip.conf I have

tcpenable=yes tcpbindaddr2.168.1.8:5070

but when I “telnet localhost 5070” I get no connect.

iptables -L -n -v | grep 5070
0 0 ACCEPT tcp — * * 0.0.0.0/0
0.0.0.0/0 state NEW tcp dpt:5070
firewall is good.

Is my syntax not correct above to run on port 5070 for SIP over TCP?

Thanks,

Jerry

4 thoughts on - Tcpenable

  • Hi Steve,

    tcp 0 0 192.168.1.8:5070 0.0.0.0:* LISTEN
    32379/asterisk tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN
    32379/asterisk udp 0 0 0.0.0.0:2727 0.0.0.0:*
    32379/asterisk udp 0 0 0.0.0.0:5000 0.0.0.0:*
    32379/asterisk udp 0 0 192.168.1.8:5060 0.0.0.0:*
    32379/asterisk unix 2 [ ACC ] STREAM LISTENING 78383649 32379/asterisk
    /var/run/asterisk.ctl

    Jerry

  • Jerry Geis wrote:

    You are explicitly binding to 192.168.1.8 port 5070. Trying to connect to localhost won’t work. You will either have to bind to 0.0.0.0 or connect to 192.168.1.8 instead.

  • Or bind to 127.0.0.1 – aka localhost 🙂

    0.0.0.0 means ‘bind to all addresses on the host.’

    The ‘bind’ and the ‘telnet’ need to match. You probably mean to bind to the host’s IP address (slightly more secure) so the ‘telnet’ needs to match that IP address.