I have been using Exetel VoIP with Asterisk for over 12 months, but just recently all incoming calls have been dropping after 20 seconds(errors listed at bottom of post).
This started happening after a recent blackout, although I cannot pick anything that would have changed. I have double-checked the ports Asterisk is configured for SIP and RTP and they are appropriately port-forwarded in the modem.
Internal calls work fine. Calls out through Exetel work fine, only incoming calls from Exetel are giving this problem.
A packet capture shows RTP packets in both directions with the occasional SIP and RTCP packet, then after a while my end rejects incoming RTP packets with "ICMP - Port unreachable", then Exetel continues to send RTP packets for a while while I send nothing back.
I have noticed that one of the SIP packets from Exetel includes "sip:1.2.3.4:1024" (where 1.2.3.4 is my IP address). According to Wireshark this is referring to port 1024, which is not forwarded on my modem (and was never forwarded, even for the long period that VoIP worked). Is this a problem? If so, how do I make it use the configured ports in sip.conf and rtp.conf?
--- Errors from Asterisk console.
[Sep 14 20:30:58] WARNING[4909]: chan_sip.c:2794 retrans_pkt: Maximum retries exceeded on transmission call-F1AEC1FF-69A2-2D10-020F-9EB27@58.96.1.1 for seqno 1 (Critical Response) -- See doc/sip-retransmit.txt.
[Sep 14 20:30:58] WARNING[4909]: chan_sip.c:2821 retrans_pkt: Hanging up call call-F1AEC1FF-69A2-2D10-020F-9EB27@58.96.1.1 - no reply to our critical packet (see doc/sip-retransmit.txt).
Incoming VoIP calls drop after 20 seconds - Asterisk
Re: Incoming VoIP calls drop after 20 seconds - Asterisk
maestro wrote:I have been using Exetel VoIP with Asterisk for over 12 months, but just recently all incoming calls have been dropping after 20 seconds(errors listed at bottom of post).
This started happening after a recent blackout, although I cannot pick anything that would have changed. I have double-checked the ports Asterisk is configured for SIP and RTP and they are appropriately port-forwarded in the modem.
Internal calls work fine. Calls out through Exetel work fine, only incoming calls from Exetel are giving this problem.
A packet capture shows RTP packets in both directions with the occasional SIP and RTCP packet, then after a while my end rejects incoming RTP packets with "ICMP - Port unreachable", then Exetel continues to send RTP packets for a while while I send nothing back.
I have noticed that one of the SIP packets from Exetel includes "sip:1.2.3.4:1024" (where 1.2.3.4 is my IP address). According to Wireshark this is referring to port 1024, which is not forwarded on my modem (and was never forwarded, even for the long period that VoIP worked). Is this a problem? If so, how do I make it use the configured ports in sip.conf and rtp.conf?
--- Errors from Asterisk console.
[Sep 14 20:30:58] WARNING[4909]: chan_sip.c:2794 retrans_pkt: Maximum retries exceeded on transmission call-F1AEC1FF-69A2-2D10-020F-9EB27@58.96.1.1 for seqno 1 (Critical Response) -- See doc/sip-retransmit.txt.
[Sep 14 20:30:58] WARNING[4909]: chan_sip.c:2821 retrans_pkt: Hanging up call call-F1AEC1FF-69A2-2D10-020F-9EB27@58.96.1.1 - no reply to our critical packet (see doc/sip-retransmit.txt).
HI maestro
what port range have you define in rtp.conf ?
Is it 10000-20000 ?
this is default value define in rtp.conf
You also have to allow incoming UDP trafffic define in this range on your router/modem firewall.
normally OUT going traffic allowed by default in any firewall unless you specifically block.
asterisk pickups RTP ports on fly on the given range. It won't use the same port for all calls, It will be going in a incremental manner therefore you have to allow a PORT range in your firewall device.
Re: Incoming VoIP calls drop after 20 seconds - Asterisk
Thank you for your response, the answers to your questions are below.
rtpstart=16384
rtpend=16482
From my sip.conf
bindport=5060
Protocol Port Start Port End Port Map
TCP,UDP 5060 5061 5060
TCP,UDP 16384 16482 16384
From my rtp.conf...pasanm wrote: what port range have you define in rtp.conf ?
Is it 10000-20000 ?
this is default value define in rtp.conf
rtpstart=16384
rtpend=16482
From my sip.conf
bindport=5060
From my modem's "port forwarding" setup page...pasanm wrote: You also have to allow incoming UDP trafffic define in this range on your router/modem firewall.
normally OUT going traffic allowed by default in any firewall unless you specifically block.
Protocol Port Start Port End Port Map
TCP,UDP 5060 5061 5060
TCP,UDP 16384 16482 16384
OK, I have the SIP and RTP ports forwarded, is there anything I missed? (is there another config file that it could be getting this port 1024 from?)pasanm wrote: asterisk pickups RTP ports on fly on the given range. It won't use the same port for all calls, It will be going in a incremental manner therefore you have to allow a PORT range in your firewall device.
Re: Incoming VoIP calls drop after 20 seconds - Asterisk
Hey maestro,maestro wrote:Thank you for your response, the answers to your questions are below.
From my rtp.conf...pasanm wrote: what port range have you define in rtp.conf ?
Is it 10000-20000 ?
this is default value define in rtp.conf
rtpstart=16384
rtpend=16482
From my sip.conf
bindport=5060
From my modem's "port forwarding" setup page...pasanm wrote: You also have to allow incoming UDP trafffic define in this range on your router/modem firewall.
normally OUT going traffic allowed by default in any firewall unless you specifically block.
Protocol Port Start Port End Port Map
TCP,UDP 5060 5061 5060
TCP,UDP 16384 16482 16384
OK, I have the SIP and RTP ports forwarded, is there anything I missed? (is there another config file that it could be getting this port 1024 from?)pasanm wrote: asterisk pickups RTP ports on fly on the given range. It won't use the same port for all calls, It will be going in a incremental manner therefore you have to allow a PORT range in your firewall device.
I'm not sure what this 1024 port came from it could be your end point port ( IP Phone) that attached to asterisk . I can't clearly state that as I'm not fully aware of your setup . Just for testing allow the whole UDP range from the firewall and see whether it resolve the problem. If you have set canreinvite=yes or directrtpsetup=yes (in sip.conf) asterisk will try to direct RTP streams directly between our switch and your end IP Phone.
You might need to do some logging and later on allow the specific UDP range from firewall.
Re: Incoming VoIP calls drop after 20 seconds - Asterisk
OK, I didn't have "canreinvite" set at all for the Exetel connection in sip.conf. I have now added "canreinvite=no" and have made a successful call.pasanm wrote:If you have set canreinvite=yes or directrtpsetup=yes (in sip.conf) asterisk will try to direct RTP streams directly between our switch and your end IP Phone.
I have checked my backed up config files and none of them had specified "canreinvite=no" so I am absolutely stumped as to why it suddenly stopped working after going for so long without issue.
Thank you for your help. I sure hope that I won't need to ask anything else about this.
Thanks again.