28 #include "asterisk/res_pjsip.h"
29 #include "asterisk/res_pjsip_session.h"
30 #include "asterisk/res_pjsip_session_caps.h"
32 static void log_caps(
int level,
const char *file,
int line,
const char *
function,
46 if (level == __LOG_DEBUG && !DEBUG_ATLEAST(3)) {
54 ast_log(level, file, line,
function,
"'%s' Caps for %s %s call with pref '%s' - remote: %s local: %s joint: %s\n",
57 outgoing?
"outgoing" :
"incoming",
59 ast_sip_call_codec_pref_to_str(pref),
73 if (!joint || !local_filtered || !remote_filtered) {
74 ast_log(LOG_ERROR,
"Failed to allocate %s call offer capabilities\n",
77 ao2_cleanup(local_filtered);
78 ao2_cleanup(remote_filtered);
89 if (ast_sip_call_codec_pref_test(codec_pref, LOCAL)) {
90 if (ast_sip_call_codec_pref_test(codec_pref, INTERSECT)) {
97 if (ast_sip_call_codec_pref_test(codec_pref, INTERSECT)) {
98 joint = remote_filtered;
99 remote_filtered = NULL;
107 ao2_cleanup(remote_filtered);
113 if (ast_sip_call_codec_pref_test(codec_pref, FIRST)) {
137 struct ast_format_cap *joint = ast_sip_create_joint_call_cap(remote,
155 struct ast_format_cap *joint = ast_sip_create_joint_call_cap(remote,
struct ast_sip_endpoint * endpoint
Asterisk main include file. File version handling, generic pbx functions.
enum ast_media_type ast_stream_get_type(const struct ast_stream *stream)
Get the media type of a stream.
const char * ast_codec_media_type2str(enum ast_media_type type)
Conversion function to take a media type and turn it into a string.
void ast_stream_set_formats(struct ast_stream *stream, struct ast_format_cap *caps)
Set the current negotiated formats of a stream.
A structure describing a SIP session.
struct ast_sip_endpoint_media_configuration media
General Asterisk PBX channel definitions.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
const char * ast_sorcery_object_get_id(const void *object)
Get the unique identifier of a sorcery object.
struct ast_channel * channel
const struct ast_format_cap * ast_stream_get_formats(const struct ast_stream *stream)
Get the current negotiated formats of a stream.
Support for dynamic strings.
Support for logging to various files, console and syslog Configuration in file logger.conf.
Structure used to handle boolean flags.
struct ast_stream * ast_stream_clone(const struct ast_stream *stream, const char *name)
Create a deep clone of an existing stream.
enum ast_sip_session_call_direction call_direction
ast_media_type
Types of media.
Sorcery Data Access Layer API.