Asterisk - The Open Source Telephony Project
18.5.0
|
Go to the source code of this file.
Functions | |
struct ast_format_cap * | ast_sip_create_joint_call_cap (const struct ast_format_cap *remote, struct ast_format_cap *local, enum ast_media_type media_type, struct ast_flags codec_pref) |
Create joint capabilities. More... | |
struct ast_format_cap * | ast_sip_session_create_joint_call_cap (const struct ast_sip_session *session, enum ast_media_type media_type, const struct ast_format_cap *remote) |
Create joint capabilities. More... | |
struct ast_stream * | ast_sip_session_create_joint_call_stream (const struct ast_sip_session *session, struct ast_stream *remote) |
Create a new stream of joint capabilities. More... | |
struct ast_format_cap* ast_sip_create_joint_call_cap | ( | const struct ast_format_cap * | remote, |
struct ast_format_cap * | local, | ||
enum ast_media_type | media_type, | ||
struct ast_flags | codec_pref | ||
) |
Create joint capabilities.
Creates a list of joint capabilities between the given remote capabilities, and local ones. "local" and "remote" reference the values in ast_sip_call_codec_pref.
remote | The "remote" capabilities |
local | The "local" capabilities |
media_type | The media type |
codec_prefs | One or more of enum ast_sip_call_codec_pref |
A | pointer to the joint capabilities (which may be empty). NULL will be returned only if no memory was available to allocate the structure. |
Definition at line 65 of file pjsip_session_caps.c.
References ao2_cleanup, ao2_ref, ast_codec_media_type2str(), ast_format_cap_alloc, ast_format_cap_append, ast_format_cap_append_from_cap(), ast_format_cap_empty(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_compatible(), ast_format_cap_get_format(), ast_format_cap_remove_by_type(), ast_log, AST_MEDIA_TYPE_UNKNOWN, LOG_ERROR, and NULL.
Referenced by ast_sip_session_create_joint_call_cap(), ast_sip_session_create_joint_call_stream(), and test_create_joint().
struct ast_format_cap* ast_sip_session_create_joint_call_cap | ( | const struct ast_sip_session * | session, |
enum ast_media_type | media_type, | ||
const struct ast_format_cap * | remote | ||
) |
Create joint capabilities.
Creates a list of joint capabilities between the given session's local capabilities, and the remote capabilities. Codec selection is based on the session->endpoint's codecs, the session->endpoint's codec call preferences, and the "remote" capabilities passed by the core (for outgoing calls) or created by the incoming SDP (for incoming calls).
session | The session |
media_type | The media type |
remote | Capabilities received in an SDP offer or from the core |
A | pointer to the joint capabilities (which may be empty). NULL will be returned only if no memory was available to allocate the structure. |
Definition at line 151 of file pjsip_session_caps.c.
References ast_sip_create_joint_call_cap(), AST_SIP_SESSION_OUTGOING_CALL, ast_sip_session::call_direction, ast_sip_endpoint_media_configuration::codecs, ast_sip_session::endpoint, ast_sip_endpoint_media_configuration::incoming_call_offer_pref, log_caps(), LOG_DEBUG, ast_sip_endpoint::media, and ast_sip_endpoint_media_configuration::outgoing_call_offer_pref.
Referenced by set_incoming_call_offer_cap().
struct ast_stream* ast_sip_session_create_joint_call_stream | ( | const struct ast_sip_session * | session, |
struct ast_stream * | remote | ||
) |
Create a new stream of joint capabilities.
Creates a new stream with capabilities between the given session's local capabilities, and the remote stream's. Codec selection is based on the session->endpoint's codecs, the session->endpoint's codec call preferences, and the stream passed by the core (for outgoing calls) or created by the incoming SDP (for incoming calls).
session | The session |
remote | The remote stream |
A | pointer to a new stream with the joint capabilities (which may be empty), NULL will be returned only if no memory was available to allocate the structure. |
Definition at line 130 of file pjsip_session_caps.c.
References ao2_cleanup, ast_sip_create_joint_call_cap(), AST_SIP_SESSION_OUTGOING_CALL, ast_stream_clone(), ast_stream_get_formats(), ast_stream_get_type(), ast_stream_set_formats(), ast_sip_session::call_direction, ast_sip_endpoint_media_configuration::codecs, ast_sip_session::endpoint, ast_sip_endpoint_media_configuration::incoming_call_offer_pref, log_caps(), LOG_DEBUG, ast_sip_endpoint::media, NULL, and ast_sip_endpoint_media_configuration::outgoing_call_offer_pref.
Referenced by ast_sip_session_create_outgoing().