]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a random one way audio issue in PJSIP.
authorJoshua Colp <jcolp@digium.com>
Wed, 2 Oct 2013 15:31:31 +0000 (15:31 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 2 Oct 2013 15:31:31 +0000 (15:31 +0000)
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

res/res_pjsip_session.c

index 965f66ba4d396c8a9d77007ffef20cf094c0e130..9cb85dcf0d13d4b114e57fd595f696a19c133056 100644 (file)
@@ -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;