[Home]

Summary:ASTERISK-11048: "rtptimeout" doesn't terminate channel if RTP is lost during "Echo()"
Reporter:Iñaki Baz Castillo (ibc)Labels:
Date Opened:2007-12-15 08:58:05.000-0600Date Closed:2008-01-09 09:06:28.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-rtptimeout-not-working-ECHO.log
Description:I set rtptimeout=20 in sip.conf and call from a softphone to extension 501:

 exten => 501,1,Answer
 exten => 501,n,Echo

During the call I kill the softphone (RTP ended and SIP BYE never received by Asterisk).

After a while (qualify=yes) softphone peer appears as UNREACHABLE.
Asterisk gets "ICMP host UNREACHABLE" when sending RTP to client.
And 20 seconds after (rtptimeout) nothing occurs, the channel remains open and will never be hangup. Why?
Comments:By: Iñaki Baz Castillo (ibc) 2007-12-15 08:59:51.000-0600

I forgot to say that softphone is behind NAT with:

[user]
type=friend
host=dynamic
qualify=yes
nat=yes
dtmfmode=info
canreinvite=yes

By: Olle Johansson (oej) 2007-12-15 09:57:05.000-0600

Thanks for a detailed bug report. Let's find out why.

By: Iñaki Baz Castillo (ibc) 2007-12-15 12:19:10.000-0600

Ops, I forgot enabling sip debug. Maybe you need it in this case? (I don't think so since there is not SIP signaling when client dies).

By: Digium Subversion (svnbot) 2007-12-17 09:15:53.000-0600

Repository: asterisk
Revision: 93190

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r93190 | file | 2007-12-17 09:15:51 -0600 (Mon, 17 Dec 2007) | 4 lines

Fix usage of rtptimeout. It can be used without rtpkeepalive, and the value can not be accessed directly in the SIP pvt structure. All RTP related timeouts have to be retrieved using the ast_rtp_* function calls.
(closes issue ASTERISK-11048)
Reported by: ibc

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=93190

By: Iñaki Baz Castillo (ibc) 2007-12-17 09:36:07.000-0600

Ok, it works now (after "rtptimeout" the channel is ended).

But it occurs something wrong:

- The softphone calls 501:
  exten => 501,1,Answer
  exten => 501,n,Echo

- During "Echo" the softphone puts on-Hold:
   -- Started music on hold, class 'default', on SIP/200-08200278

- After "rtptimeout" the channel is ended:
check_rtp_timeout: Disconnecting call 'SIP/200-08200278' for lack of RTP activity in 21 seconds
   -- Stopped music on hold on SIP/200-08200278
 == Spawn extension (desde-usuarios, 501, 2) exited non-zero on 'SIP/200-08200278'

Why? shouldn't be applied "rtpholdtimeout" instead of "rtptimeout"?

NOTE: "rtptimeout" was uncommented with value 300 (it occurs the same with the parameter commented).


By: Raj Jain (rjain) 2008-01-05 06:13:27.000-0600

ibc,

You may want to try SIP session-timers:
http://bugs.digium.com/view.php?id=10665

rtptimeout and rtpholdtimeout have certain limitations that do not exist w/ SIP session-timers.

By: Raj Jain (rjain) 2008-01-05 06:13:48.000-0600

ibc,

You may want to try SIP session-timers:
http://bugs.digium.com/view.php?id=10665

rtptimeout and rtpholdtimeout have certain limitations that do not exist w/ SIP session-timers.

By: Iñaki Baz Castillo (ibc) 2008-01-07 02:15:50.000-0600

Yes, but anyway I'm convinced that there is a bug related to "rtpholdtimeout" and "rtptimeout".

By: Joshua C. Colp (jcolp) 2008-01-07 10:34:33.000-0600

Can you please provide a sip debug of this? I was unable to reproduce it but I have a suspicion...

By: Iñaki Baz Castillo (ibc) 2008-01-09 03:06:54.000-0600

Ops, I upgraded to trunk version yesterday (rev 97033) and it works properly, if I put on hold when "Echo()" application then the call is disconnected after "rtpholdtimeout".

Maybe this bug should be closed then?

:)

By: Joshua C. Colp (jcolp) 2008-01-09 09:06:27.000-0600

Closed as it has been confirmed by myself and the reporter that this is now fixed.