summaryrefslogtreecommitdiff
path: root/include/asterisk/bridging.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-06-06 22:46:54 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-06-06 22:46:54 +0000
commitbad8caa8c65ac1937ae1c85a0c5fb45f3e8a7fe4 (patch)
treed077d5d84638645d10508c15bb6f00538e8e1f64 /include/asterisk/bridging.h
parent2dc8a060064f359a17f5ebcd515d85fe5203c019 (diff)
Reimplement bridging and DTMF features related channel variables in the bridging core.
* The channel variable ATTENDED_TRANSFER_COMPLETE_SOUND is no longer channel driver specific. If the channel variable is set on the transferrer channel, the sound will be played to the target of an attended transfer. * The channel variable BRIDGEPEER becomes a comma separated list of peers in a multi-party bridge. The BRIDGEPEER value can have a maximum of 10 peers listed. Any more peers in the bridge will not be included in the list. BRIDGEPEER is not valid in holding bridges like parking since those channels do not talk to each other even though they are in a bridge. * The channel variable BRIDGEPVTCALLID is only valid for two party bridges and will contain a value if the BRIDGEPEER's channel driver supports it. * The channel variable DYNAMIC_PEERNAME is redundant with BRIDGEPEER and is removed. The more useful DYNAMIC_WHO_ACTIVATED gives the channel name that activated the dynamic feature. * The channel variables DYNAMIC_FEATURENAME and DYNAMIC_WHO_ACTIVATED are set only on the channel executing the dynamic feature. Executing a dynamic feature on the bridge peer in a multi-party bridge will execute it on all peers of the activating channel. (closes issue ASTERISK-21555) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2582/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/bridging.h')
-rw-r--r--include/asterisk/bridging.h85
1 files changed, 67 insertions, 18 deletions
diff --git a/include/asterisk/bridging.h b/include/asterisk/bridging.h
index b589874b0..9d3f5b3cf 100644
--- a/include/asterisk/bridging.h
+++ b/include/asterisk/bridging.h
@@ -219,10 +219,12 @@ enum ast_bridge_action_type {
AST_BRIDGE_ACTION_TALKING_STOP,
/*! Bridge channel is to play the indicated sound file. */
AST_BRIDGE_ACTION_PLAY_FILE,
- /*! Bridge channel is to get parked. */
- AST_BRIDGE_ACTION_PARK,
/*! Bridge channel is to run the indicated application. */
AST_BRIDGE_ACTION_RUN_APP,
+ /*! Bridge channel is to run the custom callback routine. */
+ AST_BRIDGE_ACTION_CALLBACK,
+ /*! Bridge channel is to get parked. */
+ AST_BRIDGE_ACTION_PARK,
/*! Bridge channel is to execute a blind transfer. */
AST_BRIDGE_ACTION_BLIND_TRANSFER,
/*! Bridge channel is to execute an attended transfer */
@@ -1209,22 +1211,6 @@ typedef void (*ast_bridge_custom_play_fn)(struct ast_bridge_channel *bridge_chan
void ast_bridge_channel_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class);
/*!
- * \brief Have a bridge channel park a channel in the bridge
- * \since 12.0.0
- *
- * \param bridge_channel Bridge channel performing the parking
- * \param parkee_uuid Unique id of the channel we want to park
- * \param parker_uuid Unique id of the channel parking the call
- * \param app_data string indicating data used for park application (NULL allowed)
- *
- * \note This is intended to be called by bridge hooks.
- *
- * \return Nothing
- */
-void ast_bridge_channel_write_park(struct ast_bridge_channel *bridge_channel, const char *parkee_uuid,
- const char *parker_uuid, const char *app_data);
-
-/*!
* \brief Write a bridge action play file frame into the bridge.
* \since 12.0.0
*
@@ -1259,6 +1245,69 @@ void ast_bridge_channel_write_playfile(struct ast_bridge_channel *bridge_channel
void ast_bridge_channel_queue_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class);
/*!
+ * \brief Custom callback run on a bridge channel.
+ *
+ * \param bridge_channel Which channel to operate on.
+ * \param payload Data to pass to the callback. (NULL if none).
+ * \param payload_size Size of the payload if payload is non-NULL. A number otherwise.
+ *
+ * \note The payload MUST NOT have any resources that need to be freed.
+ *
+ * \return Nothing
+ */
+typedef void (*ast_bridge_custom_callback_fn)(struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size);
+
+/*!
+ * \brief Write a bridge action custom callback frame into the bridge.
+ * \since 12.0.0
+ *
+ * \param bridge_channel Which channel is putting the frame into the bridge
+ * \param callback Custom callback run on a bridge channel.
+ * \param payload Data to pass to the callback. (NULL if none).
+ * \param payload_size Size of the payload if payload is non-NULL. A number otherwise.
+ *
+ * \note The payload MUST NOT have any resources that need to be freed.
+ *
+ * \note This is intended to be called by bridge hooks.
+ *
+ * \return Nothing
+ */
+void ast_bridge_channel_write_callback(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size);
+
+/*!
+ * \brief Queue a bridge action custom callback frame onto the bridge channel.
+ * \since 12.0.0
+ *
+ * \param bridge_channel Which channel to put the frame onto.
+ * \param callback Custom callback run on a bridge channel.
+ * \param payload Data to pass to the callback. (NULL if none).
+ * \param payload_size Size of the payload if payload is non-NULL. A number otherwise.
+ *
+ * \note The payload MUST NOT have any resources that need to be freed.
+ *
+ * \note This is intended to be called by bridge hooks.
+ *
+ * \return Nothing
+ */
+void ast_bridge_channel_queue_callback(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size);
+
+/*!
+ * \brief Have a bridge channel park a channel in the bridge
+ * \since 12.0.0
+ *
+ * \param bridge_channel Bridge channel performing the parking
+ * \param parkee_uuid Unique id of the channel we want to park
+ * \param parker_uuid Unique id of the channel parking the call
+ * \param app_data string indicating data used for park application (NULL allowed)
+ *
+ * \note This is intended to be called by bridge hooks.
+ *
+ * \return Nothing
+ */
+void ast_bridge_channel_write_park(struct ast_bridge_channel *bridge_channel, const char *parkee_uuid,
+ const char *parker_uuid, const char *app_data);
+
+/*!
* \brief Restore the formats of a bridge channel's channel to how they were before bridge_channel_join
* \since 12.0.0
*