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.