Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
After Bridge Execution API. More...
Go to the source code of this file.
Typedefs | |
typedef void(* | ast_bridge_after_cb) (struct ast_channel *chan, void *data) |
After bridge callback function. More... | |
typedef void(* | ast_bridge_after_cb_failed) (enum ast_bridge_after_cb_reason reason, void *data) |
After bridge callback failed. More... | |
Functions | |
const char * | ast_bridge_after_cb_reason_string (enum ast_bridge_after_cb_reason reason) |
Get a string representation of an after bridge callback reason. More... | |
void | ast_bridge_discard_after_callback (struct ast_channel *chan, enum ast_bridge_after_cb_reason reason) |
Run discarding any after bridge callbacks. More... | |
void | ast_bridge_discard_after_goto (struct ast_channel *chan) |
Discard channel after bridge goto location. More... | |
void | ast_bridge_read_after_goto (struct ast_channel *chan, char *buffer, size_t buf_size) |
Read after bridge goto if it exists. More... | |
void | ast_bridge_run_after_callback (struct ast_channel *chan) |
Run any after bridge callback. More... | |
void | ast_bridge_run_after_goto (struct ast_channel *chan) |
Run a PBX on any after bridge goto location. More... | |
int | ast_bridge_set_after_callback (struct ast_channel *chan, ast_bridge_after_cb callback, ast_bridge_after_cb_failed failed, void *data) |
Setup an after bridge callback for when the channel leaves the bridging system. More... | |
void | ast_bridge_set_after_go_on (struct ast_channel *chan, const char *context, const char *exten, int priority, const char *parseable_goto) |
Set channel to go on in the dialplan after the bridge. More... | |
void | ast_bridge_set_after_goto (struct ast_channel *chan, const char *context, const char *exten, int priority) |
Set channel to goto specific location after the bridge. More... | |
void | ast_bridge_set_after_h (struct ast_channel *chan, const char *context) |
Set channel to run the h exten after the bridge. More... | |
int | ast_bridge_setup_after_goto (struct ast_channel *chan) |
Setup any after bridge goto location to begin execution. More... | |
typedef void(* ast_bridge_after_cb) (struct ast_channel *chan, void *data) |
After bridge callback function.
chan | Channel just leaving bridging system. |
data | Extra data what setup the callback wanted to pass. |
Definition at line 194 of file bridge_after.h.
typedef void(* ast_bridge_after_cb_failed) (enum ast_bridge_after_cb_reason reason, void *data) |
After bridge callback failed.
reason | Reason callback is failing. |
data | Extra data what setup the callback wanted to pass. |
Definition at line 185 of file bridge_after.h.
Reason the after bridge callback will not be called.
Definition at line 37 of file bridge_after.h.
const char * ast_bridge_after_cb_reason_string | ( | enum ast_bridge_after_cb_reason | reason | ) |
Get a string representation of an after bridge callback reason.
reason | The reason to interpret to a string |
NULL | Unrecognized reason |
non-NULL | String representation of reason |
Definition at line 288 of file bridge_after.c.
References AST_BRIDGE_AFTER_CB_REASON_DEPART, AST_BRIDGE_AFTER_CB_REASON_DESTROY, AST_BRIDGE_AFTER_CB_REASON_IMPART_FAILED, AST_BRIDGE_AFTER_CB_REASON_MASQUERADE, AST_BRIDGE_AFTER_CB_REASON_REMOVED, AST_BRIDGE_AFTER_CB_REASON_REPLACED, and after_bridge_cb_node::reason.
Referenced by after_bridge_move_channel_fail(), agent_after_bridge_cb_failed(), bridge_after_cb_failed(), and internal_bridge_after_cb().
void ast_bridge_discard_after_callback | ( | struct ast_channel * | chan, |
enum ast_bridge_after_cb_reason | reason | ||
) |
Run discarding any after bridge callbacks.
chan | Channel to run after bridge callback. |
reason |
Definition at line 239 of file bridge_after.c.
References after_bridge_cb_find(), and after_bridge_cb_run_discard().
Referenced by ast_bridge_impart(), and bridge_channel_depart_thread().
void ast_bridge_discard_after_goto | ( | struct ast_channel * | chan | ) |
Discard channel after bridge goto location.
chan | Channel to discard after bridge goto location. |
Definition at line 384 of file bridge_after.c.
References after_bridge_goto_remove(), and ast_datastore_free().
Referenced by __after_bridge_set_goto(), after_bridge_goto_fixup(), bridge_channel_depart_thread(), feature_blind_transfer(), and func_channel_write_real().
void ast_bridge_read_after_goto | ( | struct ast_channel * | chan, |
char * | buffer, | ||
size_t | buf_size | ||
) |
Read after bridge goto if it exists.
chan | Channel to read the after bridge goto parseable goto string from |
buffer | Buffer to write the after bridge goto data to |
buf_size | size of the buffer being written to |
Definition at line 394 of file bridge_after.c.
References after_bridge_goto_info, ast_channel_datastore_find(), ast_strlen_zero(), after_bridge_goto_ds::context, ast_datastore::data, after_bridge_goto_ds::exten, lock, NULL, after_bridge_goto_ds::parseable_goto, after_bridge_goto_ds::priority, after_bridge_goto_ds::run_h_exten, and SCOPED_CHANNELLOCK.
Referenced by func_channel_read().
void ast_bridge_run_after_callback | ( | struct ast_channel * | chan | ) |
Run any after bridge callback.
chan | Channel to run after bridge callback. |
Definition at line 212 of file bridge_after.c.
References after_bridge_cb_failed(), after_bridge_cb_find(), ast_free, AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, after_bridge_cb_ds::callbacks, after_bridge_cb_node::list, and NULL.
Referenced by ast_bridge_join(), and bridge_channel_ind_thread().
void ast_bridge_run_after_goto | ( | struct ast_channel * | chan | ) |
Run a PBX on any after bridge goto location.
chan | Channel to execute after bridge goto location. |
Pull off any after bridge goto location datastore and run a PBX at that location.
Definition at line 525 of file bridge_after.c.
References ast_bridge_setup_after_goto(), ast_hangup(), and ast_pbx_run().
Referenced by bridge_channel_ind_thread().
int ast_bridge_set_after_callback | ( | struct ast_channel * | chan, |
ast_bridge_after_cb | callback, | ||
ast_bridge_after_cb_failed | failed, | ||
void * | data | ||
) |
Setup an after bridge callback for when the channel leaves the bridging system.
chan | Channel to setup an after bridge callback on. |
callback | Function to call when the channel leaves the bridging system. |
failed | Function to call when it will not be calling the callback. |
data | Extra data to pass with the callback. |
0 | on success. |
-1 | on error. |
Definition at line 251 of file bridge_after.c.
References after_bridge_cb_setup(), ast_assert, AST_BRIDGE_AFTER_CB_REASON_REPLACED, ast_calloc, AST_LIST_INSERT_TAIL, AST_LIST_LAST, AST_LIST_LOCK, AST_LIST_UNLOCK, after_bridge_cb_node::callback, after_bridge_cb_ds::callbacks, after_bridge_cb_node::data, after_bridge_cb_node::failed, after_bridge_cb_node::list, NULL, and after_bridge_cb_node::reason.
Referenced by add_to_dial_bridge(), bridge_agent_hold_push(), bridge_channel_attended_transfer(), bridge_stasis_push(), control_swap_channel_in_bridge(), and stasis_app_bridge_playback_channel_add().
void ast_bridge_set_after_go_on | ( | struct ast_channel * | chan, |
const char * | context, | ||
const char * | exten, | ||
int | priority, | ||
const char * | parseable_goto | ||
) |
Set channel to go on in the dialplan after the bridge.
chan | Channel to setup after bridge goto location. |
context | Current context of the caller channel. |
exten | Current exten of the caller channel. |
priority | Current priority of the caller channel |
parseable_goto | User specified goto string from dialplan. |
Add a channel datastore to setup the goto location when the channel leaves the bridge and run a PBX from there.
If parseable_goto then use the given context/exten/priority as the relative position for the parseable_goto. Else goto the given context/exten/priority+1.
Definition at line 622 of file bridge_after.c.
References __after_bridge_set_goto(), ast_replace_subargument_delimiter(), ast_strdupa, ast_strlen_zero(), voicemailpwcheck::context, after_bridge_goto_ds::exten, NULL, after_bridge_goto_ds::parseable_goto, and priority.
Referenced by bridge_exec(), feature_blind_transfer(), func_channel_write_real(), and setup_peer_after_bridge_goto().
void ast_bridge_set_after_goto | ( | struct ast_channel * | chan, |
const char * | context, | ||
const char * | exten, | ||
int | priority | ||
) |
Set channel to goto specific location after the bridge.
chan | Channel to setup after bridge goto location. |
context | Context to goto after bridge. |
exten | Exten to goto after bridge. |
priority | Priority to goto after bridge. |
Add a channel datastore to setup the goto location when the channel leaves the bridge and run a PBX from there.
Definition at line 612 of file bridge_after.c.
References __after_bridge_set_goto(), voicemailpwcheck::context, after_bridge_goto_ds::exten, NULL, and priority.
Referenced by action_bridge().
void ast_bridge_set_after_h | ( | struct ast_channel * | chan, |
const char * | context | ||
) |
Set channel to run the h exten after the bridge.
chan | Channel to setup after bridge goto location. |
context | Context to goto after bridge. |
Add a channel datastore to setup the goto location when the channel leaves the bridge and run a PBX from there.
Definition at line 617 of file bridge_after.c.
References __after_bridge_set_goto(), voicemailpwcheck::context, and NULL.
Referenced by setup_peer_after_bridge_goto().
int ast_bridge_setup_after_goto | ( | struct ast_channel * | chan | ) |
Setup any after bridge goto location to begin execution.
chan | Channel to setup after bridge goto location. |
Pull off any after bridge goto location datastore and setup for dialplan execution there.
0 | on success. The goto location is set for a PBX to run it. |
non-zero | on error or no goto location. |
Definition at line 435 of file bridge_after.c.
References after_bridge_goto_remove(), ast_channel_caller(), ast_channel_clear_flag(), ast_channel_clear_softhangup(), ast_channel_context(), ast_channel_context_set(), ast_channel_exten(), ast_channel_exten_set(), ast_channel_flags(), ast_channel_priority(), ast_channel_priority_set(), ast_channel_set_unbridged(), ast_channel_softhangup_internal_flag(), ast_check_hangup(), ast_datastore_free(), ast_debug, ast_exists_extension(), ast_explicit_goto(), AST_FLAG_IN_AUTOLOOP, AST_FLAG_OUTGOING, ast_goto_if_exists(), ast_parseable_goto(), ast_pbx_h_exten_run(), AST_SOFTHANGUP_ASYNCGOTO, ast_strdupa, ast_strlen_zero(), ast_test_flag, voicemailpwcheck::context, after_bridge_goto_ds::context, ast_datastore::data, after_bridge_goto_ds::exten, NULL, after_bridge_goto_ds::parseable_goto, priority, after_bridge_goto_ds::priority, after_bridge_goto_ds::run_h_exten, S_COR, and after_bridge_goto_ds::specific.
Referenced by app_control_dial(), ast_bridge_join(), ast_bridge_run_after_goto(), bridge_failed_peer_goto(), dial_exec_full(), and internal_bridge_after_cb().