TCP enable phone's stop working

When I try to enable tcp on Asterisk

tcpenable=yes
tcpbindaddr=0.0.0.0
transport=tcp

All of the phones stop working. When I run a netstat on port 5060 it shows both UDP and TCP also TCP shows LISTEN.

The problem is the new Cisco fireware uses TCP and all of our older models use UDP. Can someone point me in the direction needed so UDP and TCP both run on 5060

It’s not the same port, TCP sockets and UDP datagrams are different protocol. They can certainly run in the same collision domain (assuming you are using Ethernet).

I understand the difference in protocol. What I cannot seem to figure out is why when I enable tcp (tcpenable=yes) the server stops listening for UDP traffic.

I need to have both listening due to new firmware on Cisco 7945.

transport=tcp,udp

or

transport=udp,tcp

the first one will be used if available.

I have tried transport=udp,tcp and transport=udp

It does not make a difference. The one thing concerning me is when I enable TCP it always shows LISTEN in the netstat. Is there a way to remove that LISTEN on TCP or add LISTEN on UDP.

transport=udp,tcp,tls

You can choose any or all of these transports if your asterisk supports them prioritized as previously noted. I don’t know why your UDP is notworking, IWFM try specifically setting the transport on the relevant extension perhaps.

UDP is “connectionless” there is no concept of listening like in TCP, if a server is running on that port it will simply exchange data with the other end without checking whether the data was received and is good that is the job of the service itself, in this case asterisk.

If a TCP server is running it will always show LISTEN in netstat and also show connections to other devices when those connections are made.

Sorry I was associating LISTEN with something other than the connection/connectionless

Under sip_custom.conf I made these changes:

tcpenable=yes
tcpbindaddr=0.0.0.0
transport=udp,tcp

After making these changes we can call internally but not externally

netstat -tlpn
tcp 0 0 0.0.0.0:5060 0.0.0.0:* LISTEN 3592/asterisk

netstat -ulpn
udp 0 0 0.0.0.0:5060 0.0.0.0:* 3592/asterisk

Once I remove tcpenable=yes everything starts working again.

Any ideas or any information I can provide let me know

I am sure I am missing something simple but I cannot seem to find it.

Your netstat issue shows that asterisk is active on both tcp/5060 and udp/5060, this is good, you can “sip set debug on” at the asterisk cli to see what protocol is being attempted on your external calls, you can add transport=udp to a trunk if it is “half assed” and accepts tcp initially but does not transport it.