--- /dev/null
+Subject: res_pjsip_session
+
+When placing an outgoing call to a PJSIP endpoint the intent
+of any requested formats will now be respected. If only an audio
+format is requested (such as ulaw) but the underlying endpoint
+does not support the format the resulting SDP will still only
+contain an audio stream, and not any additional streams such as
+video.
}
ast_format_cap_get_compatible(req_cap, endpoint->media.codecs, joint_cap);
- if (!ast_format_cap_count(joint_cap)) {
- ao2_ref(joint_cap, -1);
- continue;
- }
-
- clone_stream = ast_stream_clone(req_stream, NULL);
- if (!clone_stream) {
- ao2_ref(joint_cap, -1);
- continue;
- }
if (ast_stream_get_type(req_stream) == AST_MEDIA_TYPE_AUDIO) {
/*
endpoint->media.codecs, AST_MEDIA_TYPE_AUDIO);
}
+ if (!ast_format_cap_count(joint_cap)) {
+ ao2_ref(joint_cap, -1);
+ continue;
+ }
+
+ clone_stream = ast_stream_clone(req_stream, NULL);
+ if (!clone_stream) {
+ ao2_ref(joint_cap, -1);
+ continue;
+ }
+
ast_stream_set_formats(clone_stream, joint_cap);
ao2_ref(joint_cap, -1);