Fix a random one way audio issue in PJSIP.

Due to the asynchronous design of the PJMEDIA SDP negotiator it was possible for
the SDP to be negotiated *after* a channel was created and after it was being wait
on by an application. It is only after negotiation occurs that the file descriptors
for RTP are placed on the channel. Since the channel was already being waited on
these file descriptors were not monitored, causing incoming media to never be read.

This change wakes up any application waiting on the channel so that added file
descriptors end up being monitored.

(closes issue AST-1227)
Reported by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/78/78/1
Joshua Colp 13 years ago
parent add6d9a012
commit 1e22b90efe

@ -472,6 +472,7 @@ static int handle_negotiated_sdp(struct ast_sip_session *session, const pjmedia_
successful = ao2_callback(session->media, OBJ_MULTIPLE, handle_negotiated_sdp_session_media, &callback_data);
if (successful && ao2_container_count(successful->c) == ao2_container_count(session->media)) {
/* Nothing experienced a catastrophic failure */
ast_queue_frame(session->channel, &ast_null_frame);
return 0;
}
return -1;

Loading…
Cancel
Save