mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
ARI: Add method to Dial a created channel.
This adds a new ARI method that allows for you to dial a channel that you previously created in ARI. By combining this with the create method for channels, it allows for a workflow where a channel can be created, manipulated, and then dialed. The channel is under control of the ARI application during all stages of the Dial and can even be manipulated based on channel state changes observed within an ARI application. The overarching goal for this is to eventually be able to add a dialed channel to a Stasis bridge earlier than the "Up" state. However, at the moment more work is needed in the Dial and Bridge APIs in order to facilitate that. ASTERISK-25889 #close Change-Id: Ic6c399c791e66c4aa52454222fe4f8b02483a205
This commit is contained in:
committed by
Joshua Colp
parent
dd48d60c5b
commit
abbb2edd4c
@@ -1282,6 +1282,7 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
|
||||
int r;
|
||||
int command_count;
|
||||
RAII_VAR(struct ast_bridge *, last_bridge, NULL, ao2_cleanup);
|
||||
struct ast_dial *dial;
|
||||
|
||||
/* Check to see if a bridge absorbed our hangup frame */
|
||||
if (ast_check_hangup_locked(chan)) {
|
||||
@@ -1291,6 +1292,7 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
|
||||
|
||||
last_bridge = bridge;
|
||||
bridge = ao2_bump(stasis_app_get_bridge(control));
|
||||
dial = stasis_app_get_dial(control);
|
||||
|
||||
if (bridge != last_bridge) {
|
||||
app_unsubscribe_bridge(app, last_bridge);
|
||||
@@ -1299,8 +1301,8 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
|
||||
}
|
||||
}
|
||||
|
||||
if (bridge) {
|
||||
/* Bridge is handling channel frames */
|
||||
if (bridge || dial) {
|
||||
/* Bridge/dial is handling channel frames */
|
||||
control_wait(control);
|
||||
control_dispatch_all(control, chan);
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user