mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
pbx: Add helper function to execute applications.
Finding an application and executing it if found is a common task throughout Asterisk. This adds a helper function around pbx_exec to do this, to eliminate redundant code and make it easier for modules to substitute variables and execute applications by name. ASTERISK-30061 #close Change-Id: Ifee4d2825df7545fb515d763d393065675140c84
This commit is contained in:
committed by
Kevin Harwell
parent
d052418b94
commit
4a11ae7ecf
@@ -504,12 +504,7 @@ static void bridge_check_monitor(struct ast_channel *chan, struct ast_channel *p
|
||||
ast_channel_unlock(peer);
|
||||
}
|
||||
if (monitor_chan) {
|
||||
struct ast_app *monitor_app;
|
||||
|
||||
monitor_app = pbx_findapp("Monitor");
|
||||
if (monitor_app) {
|
||||
pbx_exec(monitor_chan, monitor_app, monitor_args);
|
||||
}
|
||||
ast_pbx_exec_application(monitor_chan, "Monitor", monitor_args);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user