Summary:ASTERISK-11261: Existing Channels are reported as Not Existing
Reporter:Antonis Psaras (apsaras)Labels:
Date Opened:2008-01-18 15:58:51.000-0600Date Closed:2011-06-07 14:02:40
Versions:Frequency of
Environment:Attachments:( 0) managertrace.txt
( 1) showlocks-20080124.txt
( 2) showlocks-20080210.txt
Description:We have a script connecting to Manager API which monitors the channels that are on MusicOnHold. If some criteria are full field the script transfers the call to a SIP phone. In most of the cases the script works fine, in few cases asterisk manager reports that the channel tried to be transferred does not exist which is not actually true because the caller keep listening Music and when the caller Hangs Up the hang up shows the same channel name. This is happening ONLY to SIP channels and occur daily at 1% of the incoming calls.

Please advice on what information do you require in order to trace the problem and how to obtain them.

Comments:By: Tilghman Lesher (tilghman) 2008-01-18 16:27:22.000-0600

We'd need to see a log of the interaction where it shows you that it doesn't exist, including all lines going both ways across the manager connection.

By: Antonis Psaras (apsaras) 2008-01-23 09:22:44.000-0600

The file uploaded contains asterisk manager trace info as recorded by our fastagi script. We added some comments to make things more clear. As you will see this trace is on Zap channel so the problem is not only on SIP channels as we initially thought. More over the problem exists to 1.2 installations as well as to 1.4.

By: Tilghman Lesher (tilghman) 2008-01-23 09:37:25.000-0600

If you activate debug in logger.conf, you should probably see some errors of the type: Failure, could not lock '%p' after %d retries!

Please recompile Asterisk with DEBUG_THREADS and DONT_OPTIMIZE and get a 'core show locks' output when this happens, and upload the output of 'core show locks' as a file to the file upload area.

By: Antonis Psaras (apsaras) 2008-01-25 00:55:03.000-0600

Please find attached the showlocks file produced exactly after failure of the manager originate command

By: Antonis Psaras (apsaras) 2008-01-31 09:43:58.000-0600

Any news? Do you need an other information? We have 10 calls each day so we can provide you with more logs if necessary.


By: Joshua C. Colp (jcolp) 2008-01-31 11:23:42.000-0600

This is an issue with the way channel locks are handled and can definitely be seen on systems with load... the code will try to get the channel a few times and if it can't, it fails and makes it seem as though the channel isn't there.

By: Antonis Psaras (apsaras) 2008-02-01 13:45:13.000-0600

The server is not loaded. The specific server has 5 to 10 concurrent calls. Is there any work around? Is there any possibility to get the channel if we send after a while a new redirect manager command?

By: Antonis Psaras (apsaras) 2008-02-10 08:14:09.000-0600

The file uploaded (showlocks-20080210) is an other lock we show during the same process.

We was able to overcome the problem by requesting again the channel so the locking is temporal.

By: Mark Michelson (mmichelson) 2008-04-18 15:01:07

I see there has been no activity on this bug in months. Is this issue still happening? If the problem has to do with the number of times a lock is attempted to be acquired, this may be resolved as of SVN revision 114117 since we now make more attempts to get the channel lock.

By: Tilghman Lesher (tilghman) 2008-05-12 12:30:30

No response from reporter.