mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-04 20:25:29 +00:00
Undo r414122
The Test Suite caught a few problems, undoing until those are resolved git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -230,10 +230,8 @@ static void native_rtp_bridge_stop(struct ast_bridge *bridge, struct ast_channel
|
|||||||
break;
|
break;
|
||||||
case AST_RTP_GLUE_RESULT_REMOTE:
|
case AST_RTP_GLUE_RESULT_REMOTE:
|
||||||
if (!target) {
|
if (!target) {
|
||||||
if (ast_channel_is_leaving_bridge(c0->chan)) {
|
glue0->update_peer(c0->chan, NULL, NULL, NULL, NULL, 0);
|
||||||
glue0->update_peer(c0->chan, NULL, NULL, NULL, NULL, 0);
|
if (glue1) {
|
||||||
}
|
|
||||||
if (glue1 && ast_channel_is_leaving_bridge(c1->chan)) {
|
|
||||||
glue1->update_peer(c1->chan, NULL, NULL, NULL, NULL, 0);
|
glue1->update_peer(c1->chan, NULL, NULL, NULL, NULL, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -487,9 +485,8 @@ static void native_rtp_bridge_leave(struct ast_bridge *bridge, struct ast_bridge
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Direct RTP may have occurred, tear it down */
|
/* Direct RTP may have occurred, tear it down */
|
||||||
if (ast_channel_is_leaving_bridge(bridge_channel->chan)) {
|
glue->update_peer(bridge_channel->chan, NULL, NULL, NULL, NULL, 0);
|
||||||
glue->update_peer(bridge_channel->chan, NULL, NULL, NULL, NULL, 0);
|
|
||||||
}
|
|
||||||
native_rtp_bridge_stop(bridge, NULL);
|
native_rtp_bridge_stop(bridge, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4283,22 +4283,6 @@ struct ast_bridge *ast_channel_get_bridge(const struct ast_channel *chan);
|
|||||||
*/
|
*/
|
||||||
int ast_channel_is_bridged(const struct ast_channel *chan);
|
int ast_channel_is_bridged(const struct ast_channel *chan);
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Determine if a channel is leaving a bridge, but \em not hung up
|
|
||||||
* \since 12.3.0
|
|
||||||
*
|
|
||||||
* \param chan The channel to test
|
|
||||||
*
|
|
||||||
* \note If a channel is hung up, it is implicitly leaving any bridge it
|
|
||||||
* may be in. This function is used to test if a channel is leaving a bridge
|
|
||||||
* but may survive the experience, if it has a place to go to (dialplan or
|
|
||||||
* otherwise)
|
|
||||||
*
|
|
||||||
* \retval 0 The channel is not leaving the bridge or is hung up
|
|
||||||
* \retval non-zero The channel is leaving the bridge
|
|
||||||
*/
|
|
||||||
int ast_channel_is_leaving_bridge(struct ast_channel *chan);
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Get the channel's bridge peer only if the bridge is two-party.
|
* \brief Get the channel's bridge peer only if the bridge is two-party.
|
||||||
* \since 12.0.0
|
* \since 12.0.0
|
||||||
|
@@ -1756,9 +1756,9 @@ void bridge_channel_internal_pull(struct ast_bridge_channel *bridge_channel)
|
|||||||
/* If we are not going to be hung up after leaving a bridge, and we were an
|
/* If we are not going to be hung up after leaving a bridge, and we were an
|
||||||
* outgoing channel, clear the outgoing flag.
|
* outgoing channel, clear the outgoing flag.
|
||||||
*/
|
*/
|
||||||
if (ast_test_flag(ast_channel_flags(bridge_channel->chan), AST_FLAG_OUTGOING) &&
|
if (ast_test_flag(ast_channel_flags(bridge_channel->chan), AST_FLAG_OUTGOING)
|
||||||
(ast_channel_is_leaving_bridge(bridge_channel->chan) ||
|
&& (ast_channel_softhangup_internal_flag(bridge_channel->chan) & (AST_SOFTHANGUP_ASYNCGOTO | AST_SOFTHANGUP_UNBRIDGE)
|
||||||
bridge_channel->state == BRIDGE_CHANNEL_STATE_WAIT)) {
|
|| bridge_channel->state == BRIDGE_CHANNEL_STATE_WAIT)) {
|
||||||
ast_debug(2, "Channel %s will survive this bridge; clearing outgoing (dialed) flag\n", ast_channel_name(bridge_channel->chan));
|
ast_debug(2, "Channel %s will survive this bridge; clearing outgoing (dialed) flag\n", ast_channel_name(bridge_channel->chan));
|
||||||
ast_clear_flag(ast_channel_flags(bridge_channel->chan), AST_FLAG_OUTGOING);
|
ast_clear_flag(ast_channel_flags(bridge_channel->chan), AST_FLAG_OUTGOING);
|
||||||
}
|
}
|
||||||
|
@@ -10151,18 +10151,6 @@ int ast_channel_is_bridged(const struct ast_channel *chan)
|
|||||||
return ast_channel_internal_bridge(chan) != NULL;
|
return ast_channel_internal_bridge(chan) != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_channel_is_leaving_bridge(struct ast_channel *chan)
|
|
||||||
{
|
|
||||||
int flags = ast_channel_softhangup_internal_flag(chan);
|
|
||||||
|
|
||||||
/* We test the flags independently here in case they are masked with
|
|
||||||
* actual "hangup" soft-hangup flags
|
|
||||||
*/
|
|
||||||
return (flags == AST_SOFTHANGUP_ASYNCGOTO ||
|
|
||||||
flags == AST_SOFTHANGUP_UNBRIDGE ||
|
|
||||||
flags == (AST_SOFTHANGUP_ASYNCGOTO | AST_SOFTHANGUP_UNBRIDGE));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct ast_channel *ast_channel_bridge_peer(struct ast_channel *chan)
|
struct ast_channel *ast_channel_bridge_peer(struct ast_channel *chan)
|
||||||
{
|
{
|
||||||
struct ast_channel *peer;
|
struct ast_channel *peer;
|
||||||
|
@@ -189,10 +189,6 @@ int ast_framehook_detach(struct ast_channel *chan, int id)
|
|||||||
}
|
}
|
||||||
AST_LIST_TRAVERSE_SAFE_END;
|
AST_LIST_TRAVERSE_SAFE_END;
|
||||||
|
|
||||||
if (ast_channel_is_bridged(chan)) {
|
|
||||||
ast_softhangup_nolock(chan, AST_SOFTHANGUP_UNBRIDGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -191,7 +191,7 @@ static struct ast_frame *refer_progress_framehook(struct ast_channel *chan, stru
|
|||||||
/* Media is passing without progress, this means the call has been answered */
|
/* Media is passing without progress, this means the call has been answered */
|
||||||
notification = refer_progress_notification_alloc(progress, 200, PJSIP_EVSUB_STATE_TERMINATED);
|
notification = refer_progress_notification_alloc(progress, 200, PJSIP_EVSUB_STATE_TERMINATED);
|
||||||
} else if (f->frametype == AST_FRAME_CONTROL) {
|
} else if (f->frametype == AST_FRAME_CONTROL) {
|
||||||
|
ast_debug(5, "@@@@ GOT FRAME TYPE: %d\n", f->subclass.integer);
|
||||||
/* Based on the control frame being written we can send a NOTIFY advising of the progress */
|
/* Based on the control frame being written we can send a NOTIFY advising of the progress */
|
||||||
if ((f->subclass.integer == AST_CONTROL_RING) || (f->subclass.integer == AST_CONTROL_RINGING)) {
|
if ((f->subclass.integer == AST_CONTROL_RING) || (f->subclass.integer == AST_CONTROL_RINGING)) {
|
||||||
progress->subclass = f->subclass.integer;
|
progress->subclass = f->subclass.integer;
|
||||||
|
@@ -780,9 +780,6 @@ int ast_sip_session_refresh(struct ast_sip_session *session,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ast_debug(3, "Sending session refresh SDP via %s to %s\n",
|
|
||||||
method == AST_SIP_SESSION_REFRESH_METHOD_INVITE ? "re-INVITE" : "UPDATE",
|
|
||||||
ast_sorcery_object_get_id(session->endpoint));
|
|
||||||
ast_sip_session_send_request_with_cb(session, tdata, on_response);
|
ast_sip_session_send_request_with_cb(session, tdata, on_response);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user