The hangup event and execution of dialplan functions

Dear colleagues, please tell me about a certain nuance that I have never thought about.

If I have the next function of the dialplan and the hangup event occurs, how will its execution continue?
The dialplan command will be interrupted at the time of receiving the event signal, or will it be completed and then the hangup handler will be executed?

For example, I execute the command
same => n,MySQL(Connect connid localhost ...)

If its execution is interrupted, will there be a connection or not? Is it necessary to close the connection in the event handler?


Hangup is a message (AST_CONTROL_HANG),not an event. Each individual dialplan application is responsible for monitoring for that message and handling it appropriate.

A very quick look at the code suggests that MySQL ignores all activity on the channel (which means it really needs to complete quickly), and registers code to destroy the connections when the channel is destroyed, but that is not based on a very detailed look at the code.

Running a test might be easier than a full analysis of the code.

I do not really understand how to simulate such a situation. I need to make a hangup strictly at the time of the execution of this command. I guess that is not very realistic…

Is there a way to prevent a certain team, or from a group, from receiving and processing this message?
But it’s so that the following commands get it and process it.

A hangup at that point will be ignored until the command completes. As I said, it is a message and needs to be read before it has an effect.

Thank you. I understood the main thing - this application will not respond to hangup. And from his side it is very reasonable and even kindly.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.