Call Threads waiting for with_next_message() hang indefinitely
Reported by Jay Phillips | August 29th, 2008 @ 02:12 AM
When a dialplan Thread is sleeping due to with_next_message(), a call hangup will NOT kill the Thread. The Thread stays alive for as long as the process does.
For the time being, this can be worked-around by manually catching hangups via AMI and sending a message to the dialplan which causes it to exit gracefully.
The framework-level solution I believe is to subclass the Queue class and use this custom subclass in for Call#inbox(). It will override the Queue#<<() method with an implementation that checks for the :cancel symbol and sets a property in the Queue subclass to disable any further use of with_next_message() by raising an exception. The :cancel message is still passed along to the Queue.
The documentation of with_next_message() (and its supporting methods) should mention that :cancel can be sent at any time.
Comments and changes to this ticket
-
Jay Phillips September 18th, 2008 @ 09:51 PM
- State changed from new to open
- Tag changed from dialplan to dialplan
-
Jay Phillips March 24th, 2009 @ 06:41 PM
- Milestone cleared.
-
Jay Phillips March 29th, 2009 @ 08:24 PM
- Title changed from Call Threads waiting for a message hang indefinitely to Call Threads waiting for with_next_message() hang indefinitely
-
Jay Phillips June 4th, 2009 @ 02:57 AM
This just has to check the socket connections status. When the GServer socket disconnects, it should just update the Call object and put its inbox into the "closed" state.
-
Ben Langfeld September 21st, 2011 @ 04:05 PM
- State changed from open to hold
- Milestone order changed from 0 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป