Quantcast
Viewing all articles
Browse latest Browse all 6358

[Asterisk] TCP transport and NAT for Asterisk

I am experiencing a strange problem for Asterisk behind my home router related to TCP transport. I have set port forwarding to make sure the sip ports and rtp ports are forwarded properly. It works fine with UDP, but for TCP, it gives me problem: for my newly compiled Asterisk 14.5, if my cell phone registered on this server outside of my LAN network using TCP, it gives one-way audio and have error message as below and drops the call quickly. I also tried to use older version (Asterisk 11.25), the situation is better, the call has normal audio, but a lot of packets are lost, and the call could not last long. There is no problem if I use UDP for both versions. I tried different clients such as Zoiper, CSipSimple and SipDroid, all are the same. I could not figure out what is wrong with my setting. The sip.conf file is listed below (removed irrelevant lines). It seems that the router's NAT has messed up TCP transport. Can anybody see anything wrong with the sip.conf or other settings? Thanks a lot. 2017-06-14 06:55:01] ERROR[4438]: tcptls.c:1096 ast_tcptls_client_start: Unable to connect SIP socket to xxx.xx.xx.xxx:19639: Connection timed out[2017-06-14 06:55:10] WARNING[4436]: chan_sip.c:4077 retrans_pkt: Retransmission timeout reached on transmission BYj5-7YV8piSPwqWa6S3Rw.. for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+RetransmissionsPacket timed out after 9152ms with no response[2017-06-14 06:55:10] WARNING[4436]: chan_sip.c:4101 retrans_pkt: Hanging up call BYj5-7YV8piSPwqWa6S3Rw.. - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions). Sip.conf [general]context=sip ; Default context for incoming calls.bindport=5080 ; UDP Port to bind to.bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all).tcpenable=yestcpbindaddr=0.0.0.0:5080canreinvite=no ; Whether or not friendsnat=force_rport,comedia ; Whether our devices are behind NAT or not.externhost=xxx.xxx.xxx.xxexternrefresh=15localnet=192.168.1.0/255.255.255.0 [101]type=frienddefaultuser=101transport=tcp,udpsecret=xxxxxxx

Viewing all articles
Browse latest Browse all 6358

Trending Articles