diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip.c | 8 | ||||
-rw-r--r-- | res/res_pjsip/pjsip_configuration.c | 1 | ||||
-rw-r--r-- | res/res_pjsip_sdp_rtp.c | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 6b22c66ef..5d422d8d5 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -922,6 +922,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 d8ae9e0a3..f7a4fdc30 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -1937,6 +1937,7 @@ int ast_res_pjsip_initialize_configuration(void) 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 7937972c7..ad1d72f4d 100644 --- a/res/res_pjsip_sdp_rtp.c +++ b/res/res_pjsip_sdp_rtp.c @@ -380,6 +380,11 @@ static int set_caps(struct ast_sip_session *session, session->dsp = NULL; } } + + if (ast_channel_is_bridged(session->channel)) { + ast_channel_set_unbridged_nolock(session->channel, 1); + } + ast_channel_unlock(session->channel); } |