summaryrefslogtreecommitdiff
path: root/res/res_pjsip/pjsip_configuration.c
diff options
context:
space:
mode:
authorGeorge Joseph <george.joseph@fairview5.com>2016-01-07 10:57:01 -0700
committerGeorge Joseph <george.joseph@fairview5.com>2016-01-11 18:39:55 -0600
commit219c204a418cbc82ca529837de53cb332ada6b37 (patch)
tree8502f1d5aa2509f9cf4e051132588c2dbbaedfdc /res/res_pjsip/pjsip_configuration.c
parentf9a275fef477246b36b0b2d102587c812a786518 (diff)
pjsip_sdp_rtp: Add option endpoint/bind_rtp_to_media_address
On a system with multiple ip addresses in the same subnet, if a transport is bound to a specific ip address and endpoint/media_address is set, the SIP/SDP will have the correct address in all fields but the rtp stream MAY still originate from one of the other ip addresses, most probably the "primary" ip address. This happens because res_pjsip_sdp_rtp/create_rtp always calls ast_instance_new with the "all" ip address (0.0.0.0 or ::). The new option causes res_pjsip_sdp_rtp/create_rtp to call ast_rtp_instance_new with the endpoint's media_address (if specified) instead of the "all" address. This causes the packets to originate from the specified address. ASTERISK-25632 ASTERISK-25637 Reported-by: Olivier Krief Reported-by: Dan Journo Change-Id: I3dfaa079e54ba7fb7c4fd1f5f7bd9509bbf8bd88
Diffstat (limited to 'res/res_pjsip/pjsip_configuration.c')
-rw-r--r--res/res_pjsip/pjsip_configuration.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 746a45742..c7fc195d3 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -1850,6 +1850,7 @@ int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_mod
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "outbound_auth", "", outbound_auth_handler, outbound_auths_to_str, NULL, 0, 0);
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "aors", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, aors));
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "media_address", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, media.address));
+ ast_sorcery_object_field_register(sip_sorcery, "endpoint", "bind_rtp_to_media_address", "no", OPT_BOOL_T, 1, STRFLDSET(struct ast_sip_endpoint, media.bind_rtp_to_media_address));
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "identify_by", "username", ident_handler, ident_to_str, NULL, 0, 0);
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "direct_media", "yes", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.direct_media.enabled));
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "direct_media_method", "invite", direct_media_method_handler, direct_media_method_to_str, NULL, 0, 0);