mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 14:06:27 +00:00
Made some bridging API calls void. Some bridging comments updated.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -131,7 +131,11 @@ static int feature_blind_transfer(struct ast_bridge *bridge, struct ast_bridge_c
|
|||||||
/*! \brief Attended transfer feature to turn it into a threeway call */
|
/*! \brief Attended transfer feature to turn it into a threeway call */
|
||||||
static int attended_threeway_transfer(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
|
static int attended_threeway_transfer(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
|
||||||
{
|
{
|
||||||
/* This is sort of abusing the depart state but in this instance it is only going to be handled in the below function so it is okay */
|
/*
|
||||||
|
* This is sort of abusing the depart state but in this instance
|
||||||
|
* it is only going to be handled by feature_attended_transfer()
|
||||||
|
* so it is okay.
|
||||||
|
*/
|
||||||
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_DEPART);
|
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_DEPART);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,13 +85,13 @@ enum ast_bridge_capability {
|
|||||||
|
|
||||||
/*! \brief State information about a bridged channel */
|
/*! \brief State information about a bridged channel */
|
||||||
enum ast_bridge_channel_state {
|
enum ast_bridge_channel_state {
|
||||||
/*! Waiting for a signal */
|
/*! Waiting for a signal (Channel in the bridge) */
|
||||||
AST_BRIDGE_CHANNEL_STATE_WAIT = 0,
|
AST_BRIDGE_CHANNEL_STATE_WAIT = 0,
|
||||||
/*! Bridged channel has ended itself (it has hung up) */
|
/*! Bridged channel has ended itself (it has hung up) */
|
||||||
AST_BRIDGE_CHANNEL_STATE_END,
|
AST_BRIDGE_CHANNEL_STATE_END,
|
||||||
/*! Bridged channel should be hung up */
|
/*! Bridged channel was forced out and should be hung up */
|
||||||
AST_BRIDGE_CHANNEL_STATE_HANGUP,
|
AST_BRIDGE_CHANNEL_STATE_HANGUP,
|
||||||
/*! Bridged channel should be removed from the bridge without being hung up */
|
/*! Bridged channel was ast_bridge_depart() from the bridge without being hung up */
|
||||||
AST_BRIDGE_CHANNEL_STATE_DEPART,
|
AST_BRIDGE_CHANNEL_STATE_DEPART,
|
||||||
/*! Bridged channel is executing a feature hook */
|
/*! Bridged channel is executing a feature hook */
|
||||||
AST_BRIDGE_CHANNEL_STATE_FEATURE,
|
AST_BRIDGE_CHANNEL_STATE_FEATURE,
|
||||||
|
|||||||
@@ -243,10 +243,9 @@ int ast_bridge_features_hook(struct ast_bridge_features *features,
|
|||||||
* \param pvt_data Optional unique data that will be passed with the talking events.
|
* \param pvt_data Optional unique data that will be passed with the talking events.
|
||||||
* \param talker_destructor Optional destructor callback for pvt data.
|
* \param talker_destructor Optional destructor callback for pvt data.
|
||||||
*
|
*
|
||||||
* \retval 0, success
|
* \return Nothing
|
||||||
* \retval -1, failure
|
|
||||||
*/
|
*/
|
||||||
int ast_bridge_features_set_talk_detector(struct ast_bridge_features *features,
|
void ast_bridge_features_set_talk_detector(struct ast_bridge_features *features,
|
||||||
ast_bridge_talking_indicate_callback talker_cb,
|
ast_bridge_talking_indicate_callback talker_cb,
|
||||||
ast_bridge_talking_indicate_destructor talker_destructor,
|
ast_bridge_talking_indicate_destructor talker_destructor,
|
||||||
void *pvt_data);
|
void *pvt_data);
|
||||||
@@ -282,8 +281,7 @@ int ast_bridge_features_enable(struct ast_bridge_features *features, enum ast_br
|
|||||||
* \param features Bridge features structure
|
* \param features Bridge features structure
|
||||||
* \param flag Flag to enable
|
* \param flag Flag to enable
|
||||||
*
|
*
|
||||||
* \retval 0 on success
|
* \return Nothing
|
||||||
* \retval -1 on failure
|
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
*
|
*
|
||||||
@@ -296,7 +294,7 @@ int ast_bridge_features_enable(struct ast_bridge_features *features, enum ast_br
|
|||||||
* This sets the AST_BRIDGE_FLAG_DISSOLVE feature to be enabled on the features structure
|
* This sets the AST_BRIDGE_FLAG_DISSOLVE feature to be enabled on the features structure
|
||||||
* 'features'.
|
* 'features'.
|
||||||
*/
|
*/
|
||||||
int ast_bridge_features_set_flag(struct ast_bridge_features *features, enum ast_bridge_feature_flags flag);
|
void ast_bridge_features_set_flag(struct ast_bridge_features *features, enum ast_bridge_feature_flags flag);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize bridge features structure
|
* \brief Initialize bridge features structure
|
||||||
@@ -325,8 +323,7 @@ int ast_bridge_features_init(struct ast_bridge_features *features);
|
|||||||
*
|
*
|
||||||
* \param features Bridge features structure
|
* \param features Bridge features structure
|
||||||
*
|
*
|
||||||
* \retval 0 on success
|
* \return Nothing
|
||||||
* \retval -1 on failure
|
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
*
|
*
|
||||||
@@ -341,7 +338,7 @@ int ast_bridge_features_init(struct ast_bridge_features *features);
|
|||||||
* \note This MUST be called after the features structure is done being used
|
* \note This MUST be called after the features structure is done being used
|
||||||
* or a memory leak may occur.
|
* or a memory leak may occur.
|
||||||
*/
|
*/
|
||||||
int ast_bridge_features_cleanup(struct ast_bridge_features *features);
|
void ast_bridge_features_cleanup(struct ast_bridge_features *features);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Play a DTMF stream into a bridge, optionally not to a given channel
|
* \brief Play a DTMF stream into a bridge, optionally not to a given channel
|
||||||
|
|||||||
@@ -1404,7 +1404,7 @@ int ast_bridge_features_hook(struct ast_bridge_features *features,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_bridge_features_set_talk_detector(struct ast_bridge_features *features,
|
void ast_bridge_features_set_talk_detector(struct ast_bridge_features *features,
|
||||||
ast_bridge_talking_indicate_callback talker_cb,
|
ast_bridge_talking_indicate_callback talker_cb,
|
||||||
ast_bridge_talking_indicate_destructor talker_destructor,
|
ast_bridge_talking_indicate_destructor talker_destructor,
|
||||||
void *pvt_data)
|
void *pvt_data)
|
||||||
@@ -1412,7 +1412,6 @@ int ast_bridge_features_set_talk_detector(struct ast_bridge_features *features,
|
|||||||
features->talker_cb = talker_cb;
|
features->talker_cb = talker_cb;
|
||||||
features->talker_destructor_cb = talker_destructor;
|
features->talker_destructor_cb = talker_destructor;
|
||||||
features->talker_pvt_data = pvt_data;
|
features->talker_pvt_data = pvt_data;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_bridge_features_enable(struct ast_bridge_features *features, enum ast_bridge_builtin_feature feature, const char *dtmf, void *config)
|
int ast_bridge_features_enable(struct ast_bridge_features *features, enum ast_bridge_builtin_feature feature, const char *dtmf, void *config)
|
||||||
@@ -1436,11 +1435,10 @@ int ast_bridge_features_enable(struct ast_bridge_features *features, enum ast_br
|
|||||||
return ast_bridge_features_hook(features, dtmf, builtin_features_handlers[feature], config, NULL);
|
return ast_bridge_features_hook(features, dtmf, builtin_features_handlers[feature], config, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_bridge_features_set_flag(struct ast_bridge_features *features, enum ast_bridge_feature_flags flag)
|
void ast_bridge_features_set_flag(struct ast_bridge_features *features, enum ast_bridge_feature_flags flag)
|
||||||
{
|
{
|
||||||
ast_set_flag(&features->feature_flags, flag);
|
ast_set_flag(&features->feature_flags, flag);
|
||||||
features->usable = 1;
|
features->usable = 1;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_bridge_features_init(struct ast_bridge_features *features)
|
int ast_bridge_features_init(struct ast_bridge_features *features)
|
||||||
@@ -1454,7 +1452,7 @@ int ast_bridge_features_init(struct ast_bridge_features *features)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_bridge_features_cleanup(struct ast_bridge_features *features)
|
void ast_bridge_features_cleanup(struct ast_bridge_features *features)
|
||||||
{
|
{
|
||||||
struct ast_bridge_features_hook *hook;
|
struct ast_bridge_features_hook *hook;
|
||||||
|
|
||||||
@@ -1469,8 +1467,6 @@ int ast_bridge_features_cleanup(struct ast_bridge_features *features)
|
|||||||
features->talker_destructor_cb(features->talker_pvt_data);
|
features->talker_destructor_cb(features->talker_pvt_data);
|
||||||
features->talker_pvt_data = NULL;
|
features->talker_pvt_data = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_bridge_dtmf_stream(struct ast_bridge *bridge, const char *dtmf, struct ast_channel *chan)
|
int ast_bridge_dtmf_stream(struct ast_bridge *bridge, const char *dtmf, struct ast_channel *chan)
|
||||||
|
|||||||
Reference in New Issue
Block a user