summaryrefslogtreecommitdiff
path: root/channels/chan_pjsip.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2014-09-19 17:08:47 +0000
committerRichard Mudgett <rmudgett@digium.com>2014-09-19 17:08:47 +0000
commitfbbe455b9d661eb85ceb95eefddde47bc11f1ebe (patch)
treed3e9cb3b14383896d11865e9922b8ca396cac3f7 /channels/chan_pjsip.c
parentd1b1e911bf7d11c5f2991bf5f625d84418ccdff2 (diff)
res_pjsip_sdp_rtp.c: Fix native formats containing formats that were not negotiated.
Outgoing PJSIP calls can result in non-negotiated formats listed in the channel's native formats if video formats are listed in the endpoint's configuration. The resulting call could then use a non-negotiated format resulting in one way audio. * Simplified the update of session->req_caps in set_caps(). Why do something in five steps when only one is needed? AFS-162 #close Review: https://reviewboard.asterisk.org/r/4000/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_pjsip.c')
-rw-r--r--channels/chan_pjsip.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 342eabb21..1ca580699 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -417,6 +417,11 @@ static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int s
}
ast_channel_nativeformats_set(chan, caps);
+
+ /*
+ * XXX Probably should pick the first audio codec instead
+ * of simply the first codec. The first codec may be video.
+ */
fmt = ast_format_cap_get_format(caps, 0);
ast_channel_set_writeformat(chan, fmt);
ast_channel_set_rawwriteformat(chan, fmt);