[Home]

Summary:ASTERISK-01836: Asterisk sometimes hangup call on IAX2 transfer
Reporter:lth (lth)Labels:
Date Opened:2004-06-15 23:56:47Date Closed:2004-09-25 02:40:20
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) debug.tgz
Description:3 Asterisk systems all running CVS HEAD as of June 16, 2004:

a----b----c

All connections between the systems are IAX2 channels.  SIP devices attached to system a and c.

Call from sip device on a to sip device on c.  Asterisk b determines that the system can be transferred so calls go directly from a to c.

Sometimes - say 2 out of 3 calls - when the call is answered it is immediately hung up with the following log entry on the console

WARNING: timestamp is 0?

Immediately after this warning the call us hung up.


****** ADDITIONAL INFORMATION ******

I am not a programmer, but I tried to mess around with chan_iax2.c.  Commenting out the if (!fr->ts) block starting in line 2852 of chan_iax2.c (in CVS as of today) makes the problem go away and call transfer succedes every single time.  I do however not know the cause or if this results in other problems.
Comments:By: lth (lth) 2004-06-16 00:00:09

I can add that this problem can be reproduced no matter what settings of jitterbuffer in iax.conf.  I have tweaked every single thing that can be tweaked (me thinks :) ) but the only thing that makes it work is the before mentioned hack in chan_iax2.c.

By: Mark Spencer (markster) 2004-06-16 08:47:39

The timestamp requirement is outdated.  I've removed the code.

By: lth (lth) 2004-06-23 20:36:01

It may or may not be correct to reopen this bug.  Possibly I should have created a new one, but still - the behaviour description of this one describes the problem.

This bug was completely fixed with CVS revision 1.155 of chan_iax2.c, but the behaviour of the bug (minus the log message - now there's no indication of why it happens) somehow managed to return between this revision and the current HEAD revision of 1.158.  I am not 100 % sure which patch caused the bug, but I would assume it's the 1.157 since this was the only patch that significantly altered chan_iax2.c.

In short - IAX transfer as described in this bug has stopped working in Asterisk unless i roll back to CVS around 2004-06-17.  There is no longer any indication of error - the call is simply hung-up when the "middle" system initiate the transfer.

edited on: 06-23-04 20:22

By: Mark Spencer (markster) 2004-06-23 20:45:21

Can you provide a trace / debugging from the center machine (the one executing the transfer)?

By: lth (lth) 2004-06-23 22:23:05

Sure thing - uploaded as debug.tgz.  A few comments about this one :)  There was nobody around at system "c", so this is actually a call from a SIP client at system "a" to another SIP client at system "a", but all calls are routed via system "b" (since all SIP clients are roaming and in principle could be registered at any of the asterisk systems "a", "b" or "c".

In the debug file - the system vgw01 is system "b" - the central one and dev2 is system "a" the box with the SIP clients.

In this log both asterisk systems actually "hang" after the transfer and no voice passes between the systems.  A stop now command does nothing and I have to kill the asterisk process with a -9 signal.

I can add that rolling back to cvs update -D 2004-06-17 and it works absolutely 100 % perfectly with exactly the same setup.

By: Mark Spencer (markster) 2004-06-25 17:25:26

Have you been able to supply an updated debug of the issue?

By: chrisorme (chrisorme) 2004-07-06 13:11:22

I have 100% repeatability on the same issue.
I have the setup.
PSTN-> *box -IAX2-> *box -SIP -> xpro-client.

When using conferencing (two calls on placed already hold and attempting to reconnect them together with the person who made the calls) the call always drops after 2-3 seconds with the error.
chan_iax2.c:2732: iax2_send: timestamp is 0?

This is using 20 April 2004 CVS.  But I thought it was still relevant.  I haven't had time to retest using CVS HEAD.

I am happy to get some debug if this is helpful if you tell me how to get what you need if you want to look into it? -

Any comments on the hack ? could I ask where the timestamp requirement was patched in CVS / what code is removed so I can do the same in my chan_iax2.c - Thanks loads - C

By: chrisorme (chrisorme) 2004-07-06 13:17:05

I found the removal of the code in the CVS archives and will test that.

By: chrisorme (chrisorme) 2004-07-06 13:26:12

removing the lines noted by Mark in the CVS archives in chan_iax2 as deprecated and ancient for timestamp is 0? in chan_iax2 and recompiling solved my issues with conferencing and hold - the calls don't drop anymore and seem fine.

maybe this is resolved in CVS ?

Chris

By: chrisorme (chrisorme) 2004-07-06 13:29:47

For the record the patch I applied that worked against my april 20 CVS was

http://lists.digium.com/pipermail/asterisk-cvs/2004-June/002450.html

By: Malcolm Davenport (mdavenport) 2004-07-07 13:45:16

Looks like this was resolved in CVS.