summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-10-27 16:51:33 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-10-27 16:51:33 -0500
commite8a3af2629ff8668b4ebd78a50bfebdbfaa66a6e (patch)
treeb35edf8f1301aa78dc546f12cfa0c805036a3562 /res
parent66044dd606a87f804a1261ff6b0cf7b19f40164b (diff)
parente0bc17edfff27bb9dbbe931814fb5653005f3219 (diff)
Merge "pjsip: Fix a few media bugs with reinvites and asymmetric payloads." into 13
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip.c8
-rw-r--r--res/res_pjsip/pjsip_configuration.c1
-rw-r--r--res/res_pjsip_sdp_rtp.c5
3 files changed, 14 insertions, 0 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 4927ea36a..153352f9f 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -919,6 +919,14 @@
On outbound requests, force the user portion of the Contact header to this value.
</para></description>
</configOption>
+ <configOption name="asymmetric_rtp_codec" default="no">
+ <synopsis>Allow the sending and receiving RTP codec to differ</synopsis>
+ <description><para>
+ When set to "yes" the codec in use for sending will be allowed to differ from
+ that of the received one. PJSIP will not automatically switch the sending one
+ to the receiving one.
+ </para></description>
+ </configOption>
</configObject>
<configObject name="auth">
<synopsis>Authentication type</synopsis>
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 478e5c7d7..84dfa2264 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -1939,6 +1939,7 @@ int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_mod
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "contact_acl", "", endpoint_acl_handler, contact_acl_to_str, NULL, 0, 0);
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "subscribe_context", "", OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct ast_sip_endpoint, subscription.context));
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "contact_user", "", contact_user_handler, contact_user_to_str, NULL, 0, 0);
+ ast_sorcery_object_field_register(sip_sorcery, "endpoint", "asymmetric_rtp_codec", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, asymmetric_rtp_codec));
if (ast_sip_initialize_sorcery_transport()) {
ast_log(LOG_ERROR, "Failed to register SIP transport support with sorcery\n");
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index aaedde423..9e9815591 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -370,6 +370,11 @@ static int set_caps(struct ast_sip_session *session, struct ast_sip_session_medi
session->dsp = NULL;
}
}
+
+ if (ast_channel_is_bridged(session->channel)) {
+ ast_channel_set_unbridged_nolock(session->channel, 1);
+ }
+
ast_channel_unlock(session->channel);
}