bilal ghayyad
2013-Feb-03 23:38 UTC
[asterisk-users] RTP timeout if the asterisk box behind NAT
Dears; I am facing a problem in disconnecting the calls, it is related to the rtptimeout (disconnecting if there is no RTP packets from both sides). My Asterisk Box is behind NAT but there is a static real IP address at the ADSL router. We call from the Mobile to the PSTN analogue numbers which are connected to Asterisk Analogue card (the telephone lines are analoge), and then we dial the overseas number, so the asterisk is sending the call to a VoIP service provider which will route the call to the destination. Sometime the destination is connected while ringing !! And this is a problem from the SIP service provider route, then we hangup our mobile (as no one answering our call) but asterisk is not detecting the hangup (it is because the telephone lines are analoge and this problem is common in analoge lines that some hangup are not detected). In that case, the call will stay open and charging and this is a wrong. This problem was not appearing when Asterisk machine was having static real IP address because I was enabling the rtptimeout paramters. But now as the asterisk box IP address is private and it is behind NATing then it is appearing even I enabled the (rtptimeout=50 and rtpholdtimeout=120). What should I do? Regards Bilal
Chris Bagnall
2013-Feb-04 00:40 UTC
[asterisk-users] RTP timeout if the asterisk box behind NAT
On 3/2/13 11:38 pm, bilal ghayyad wrote:> What should I do?Given that you said:> This problem was not appearing when Asterisk machine was having static real IP address because I was enabling the rtptimeout paramters.I do believe the solution is simple: put it back on a public IP. For what it's worth, we have dozens of clients with boxes on RFC1918 IPs and we don't see this issue, so I wonder if it's something 'special' your NAT router's doing to mess up RTP traffic. It's probably worth trying a different router (ideally different make/model) and see if that's any better. And it's always worth disabling any SIP ALG present in the router - they seem to do nothing but break things. (as a random aside, has anyone *ever* come across a scenario where a SIP ALG in a consumer router has actually helped?) Kind regards, Chris -- This email is made from 100% recycled electrons
Stelios Koroneos
2013-Feb-04 07:17 UTC
[asterisk-users] RTP timeout if the asterisk box behind NAT
On Sun, 2013-02-03 at 15:38 -0800, bilal ghayyad wrote:> Dears; > > I am facing a problem in disconnecting the calls, it is related to the rtptimeout (disconnecting if there is no RTP packets from both sides). > > My Asterisk Box is behind NAT but there is a static real IP address at the ADSL router. We call from the Mobile to the PSTN analogue numbers which are connected to Asterisk Analogue card (the telephone lines are analoge), and then we dial the overseas number, so the asterisk is sending the call to a VoIP service provider which will route the call to the destination. Sometime the destination is connected while ringing !! And this is a problem from the SIP service provider route, then we hangup our mobile (as no one answering our call) but asterisk is not detecting the hangup (it is because the telephone lines are analoge and this problem is common in analoge lines that some hangup are not detected). In that case, the call will stay open and charging and this is a wrong. > > This problem was not appearing when Asterisk machine was having static real IP address because I was enabling the rtptimeout paramters. But now as the asterisk box IP address is private and it is behind NATing then it is appearing even I enabled the (rtptimeout=50 and rtpholdtimeout=120). > > What should I do? >My advice is to first try to fix your pstn hangup detection problem. Relying on rtptimeout assumes that the voip side has hanged up and the voip provider has also terminated the call and no rtp is coming. Which means that if your pstn caller terminates the call and the voip side does not (for any reason) you will still be charging the pstn caller. To see why rtptimeout does not work get a wireshark capture and see if there is still traffic going on -- Stelios S. Koroneos
Seemingly Similar Threads
- DAHDI: How to know since when it is used? How to shutdown after max time?
- Timeout between digits for fxs station
- Two Asterisks behind NAT and need to link them using IAX trunk
- Sending calls from behind NAT
- Automatic jump from line to line for incoming calls and the problem in DAHDI