mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-23 14:44:28 +00:00
codec_negotiation: Implement outgoing_call_offer_pref
Based on this new endpoint setting, a joint list of preferred codecs between those received from the Asterisk core (remote), and those specified in the endpoint's "allow" parameter (local) is created and is used to create the outgoing SDP offer. * Add outgoing_call_offer_pref to pjsip_configuration (endpoint) * Add "call_direction" to res_pjsip_session. * Update pjsip_session_caps.c to make the functions more generic so they could be used for both incoming and outgoing. * Update ast_sip_session_create_outgoing to create the pending_media_state->topology with the results of ast_sip_session_create_joint_call_stream(). * The endpoint "preferred_codec_only" option now automatically sets AST_SIP_CALL_CODEC_PREF_FIRST in incoming_call_offer_pref. * A helper function ast_stream_get_format_count() was added to streams to return the current count of formats. ASTERISK-28777 Change-Id: Id4ec0b4a906c2ae5885bf947f101c59059935437
This commit is contained in:
committed by
Friendly Automation
parent
57a457c26c
commit
2ee455958e
@@ -186,6 +186,13 @@ struct ast_format_cap *ast_stream_get_formats(const struct ast_stream *stream)
|
||||
return stream->formats;
|
||||
}
|
||||
|
||||
int ast_stream_get_format_count(const struct ast_stream *stream)
|
||||
{
|
||||
ast_assert(stream != NULL);
|
||||
|
||||
return stream->formats ? ast_format_cap_count(stream->formats) : 0;
|
||||
}
|
||||
|
||||
void ast_stream_set_formats(struct ast_stream *stream, struct ast_format_cap *caps)
|
||||
{
|
||||
ast_assert(stream != NULL);
|
||||
|
Reference in New Issue
Block a user