summaryrefslogtreecommitdiff
path: root/res/res_pjsip_session.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-09-28 12:24:11 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-09-28 12:24:11 -0500
commitdd4c573e6df26fe8d77e36d1fb0bc822b5427d12 (patch)
tree699daa3ea8862aefbba6120b00bb022dbbf51e79 /res/res_pjsip_session.c
parent7c5e55f15d9280b92088df2e2e2bcc077b3a446d (diff)
parentb74cbadd05d1ba42d66ba43a690c45f5d2c5f706 (diff)
Merge "res_pjsip_session: outgoing call did not offer all configured codecs"
Diffstat (limited to 'res/res_pjsip_session.c')
-rw-r--r--res/res_pjsip_session.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 9636583d2..70c88a504 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -2486,6 +2486,16 @@ struct ast_sip_session *ast_sip_session_create_outgoing(struct ast_sip_endpoint
continue;
}
+ if (ast_stream_get_type(req_stream) == AST_MEDIA_TYPE_AUDIO) {
+ /*
+ * By appending codecs from the endpoint after compatible ones this
+ * guarantees that priority is given to those while also allowing
+ * translation to occur for non-compatible.
+ */
+ ast_format_cap_append_from_cap(joint_cap,
+ endpoint->media.codecs, AST_MEDIA_TYPE_AUDIO);
+ }
+
ast_stream_set_formats(clone_stream, joint_cap);
ao2_ref(joint_cap, -1);