[Home]

Summary:ASTERISK-11971: Possible deadlock between chan_sip and app_meetme
Reporter:Diego Viola (diegoviola)Labels:
Date Opened:2008-06-08 23:29:14Date Closed:2011-06-07 14:08:03
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_meetme
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Hi

I noticed that after a call finishes in asterisk, I do "show channels" in the CLI and I still see the channel is open, and the only way to clear it is restarting it.

Also, why does asterisk open more than one channel per call?

Thanks,

Diego
Comments:By: Russell Bryant (russell) 2008-06-09 08:17:12

There is absolutely no information here that could be used to fix this problem.  There is such little information here, I don't even know what to ask for.  However, console output showing the channels that shouldn't be there would be a good start.



By: Diego Viola (diegoviola) 2008-06-17 10:46:24

After 1 week of use, I do "core show channels" and this is what I see:

However no one is using it, or on the call.


dev2*CLI> core show channels
Channel              Location             State   Application(Data)
SIP/jose.torres-16bc 99997@default:1      Up      MeetMe(99997|PiM|123456)
SIP/jose.torres-16b7 99997@default:1      Up      MeetMe(99997|PiM|123456)
SIP/jose.torres-16b8 99997@default:1      Up      MeetMe(99997|PiM|123456)
Zap/pseudo-173576458 s@default:1          Rsrvd   (None)
4 active channels
3 active calls

By: Diego Viola (diegoviola) 2008-06-17 12:04:40

I had to do a "restart now" to clean up that.



By: David Woolley (davidw) 2008-06-17 12:10:14

The channels are staying open because they are connected to a conference and the clear for them has been lost.  As the conference is the machine, there is no human other party to clear the call.  One way this can happen is if you switch the phone off whilst it is in the conference.  The phone then forgets that it was in the call, but Asterisk is never told that it has gone away.  There have been issues in about the last month that more directly address the problem of SIP calls that are orphaned because one side is the machine, and the other side has forgotten the call.

A normal phone call needs two channels.  One for the callee and one for the caller.  A conference will have a channel for each line it thinks is connected.

I can't tell from your example whether the SIP connection is a trunk, but even a single phone can have multiple calls on it.  I suspect, though, that it is a phone that thinks it is only making one call at a time.

If you are sure the phone wasn't powered down mid-conference, you should look for messages indicating that Asterisk failed to understand a request, by the phone, to clear the call.

ASTERISK-12036 and ASTERISK-12127 are other examples of losing track of a SIP phone.



By: Diego Viola (diegoviola) 2008-06-17 13:40:52

Thanks for your answer.

And why does Asterisk opens more than 1 channel for a single call.

I.e. in my example... "4 active channels for 3 active calls"

By: Tilghman Lesher (tilghman) 2008-06-17 14:02:34

Because a channel is a call leg.  A call that connects two parties (as opposed to just connecting a party to a backend application, like MeetMe or Voicemail) uses two channels.

I suggest that you set rtptimeout in sip.conf to something reasonable, like 60.  Asterisk will then hangup all calls for which it does not receive RTP for 60 seconds.  This should clear up these problems when the phone is disconnected for whatever reason (phone reboot, cable disconnect, switch reboot, power outage, etc.)

By: David Woolley (davidw) 2008-06-17 15:10:40

There are three call to the conference bridge here, each using one channel.  The fourth channel is a special one, used to provide timing for conferences.

By: Diego Viola (diegoviola) 2008-06-17 15:36:25

I see, what about if you use app_confbridge, does this requires an extra channel too?



By: Diego Viola (diegoviola) 2008-06-24 11:53:52

I have rtptimeout=60 in sip.conf, under [general]

But when I do "core show channels" I see this:

Channel              Location             State   Application(Data)
SIP/kannan.ramakrish 1000@default:3       Up      VoiceMail(1000@default|u)
1 active channel
1 active call

And when I do:

[root@dev2 ~]# asterisk -rx "sip show peers" | grep kannan
kannan.ramakrishnan/kanna  (Unspecified)    D   N      0        Unmonitored

I see the user is not registered...

How is this possible... even if I have rtptimeout=60 in sip.conf. I don't want to do "restart now" all the time to clean out the channels in asterisk.

By: Diego Viola (diegoviola) 2008-06-24 12:15:48

Here is some conversation I had with this person that was supposedly using voicemail:

--

[12:57:53] Diego Viola: hi kannan
[12:57:58] … are you using voicemail?
[13:16:24] Kannan Ramakrishnan: hey diego... sorry was out for dinner
[13:16:30] … nope am not using voicemail yet

By: Diego Viola (diegoviola) 2008-06-24 13:43:17

Seriously guys, WTF?

By: Tilghman Lesher (tilghman) 2008-06-24 13:48:20

The only other thing I can think of that might be doing this is a lock.  So while this is occurring, run:
asterisk -rx 'core show locks'

By: Diego Viola (diegoviola) 2008-06-24 13:59:14

[root@dev2 ~]# asterisk -rx "core show locks"
No such command 'core show locks' (type 'help core show' for other possible commands)

Asterisk 1.4.21 here...

By: Tilghman Lesher (tilghman) 2008-06-24 14:30:30

Enable DONT_OPTIMIZE and DEBUG_THREADS.

By: Diego Viola (diegoviola) 2008-06-24 20:43:46

I had to restart asterisk... so there isn't any locks now:

dev2*CLI> core show locks
dev2*CLI>
=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=======================================================================

dev2*CLI>



By: Tilghman Lesher (tilghman) 2008-06-25 09:54:59

Diego: there is no need to post a new comment every day.  There is not some magical phrase you can post that will enable us to figure out this issue independently of you posting the requested debug information.

By: Brett Bryant (bbryant) 2008-07-11 14:35:14

diegoviola, please attach extensions.conf, and the output of "core show channels" and "core show locks" when this happens.

By: Russell Bryant (russell) 2008-08-25 19:38:44

After leaving many comments on my web site (and others) telling me how much I suck and how we are a worthless development team, the reporter has also indicated that he is no longer using Asterisk.  So, there is no reason to keep this issue open.