[asterisk-commits] mmichelson: trunk r399284 - in /trunk: ./ include/asterisk/ res/ res/res_pjsip/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 17 18:10:51 CDT 2013


Author: mmichelson
Date: Tue Sep 17 18:10:49 2013
New Revision: 399284

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399284
Log:
Change the "external_media_address" PJSIP endpoint option to "media_address".

The endpoint option does not apply to communication with external entities. Rather,
the option is applied to all communications with the endpoint. The external_media_address
transport configuration option may override the endpoint option if it turns out that
we are going to be communicating with an external entity.

Two things of note:
1) I have not updated the XML documentation. This is being taken care of by Rusty as part
of his work on issue ASTERISK-22405
2) This commit is likely to cause testsuite failures since there are tests that use the
external_media_address endpoint option, and they will need to be changed over. Well, I'm
planning to get that updated ASAP after this commit.

(closes issue ASTERISK-22528)
reported by Rusty Newton
........

Merged revisions 399283 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/include/asterisk/res_pjsip.h
    trunk/res/res_pjsip/pjsip_configuration.c
    trunk/res/res_pjsip_sdp_rtp.c
    trunk/res/res_pjsip_t38.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Tue Sep 17 18:10:49 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399100,399136,399146,399160,399197,399207,399225,399237,399247,399257,399268
+/branches/12:1-398558,398560-398577,398579-399100,399136,399146,399160,399197,399207,399225,399237,399247,399257,399268,399283

Modified: trunk/include/asterisk/res_pjsip.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/res_pjsip.h?view=diff&rev=399284&r1=399283&r2=399284
==============================================================================
--- trunk/include/asterisk/res_pjsip.h (original)
+++ trunk/include/asterisk/res_pjsip.h Tue Sep 17 18:10:49 2013
@@ -490,8 +490,8 @@
  */
 struct ast_sip_endpoint_media_configuration {
 	AST_DECLARE_STRING_FIELDS(
-		/*! Optional external media address to use in SDP */
-		AST_STRING_FIELD(external_address);
+		/*! Optional media address to use in SDP */
+		AST_STRING_FIELD(address);
 		/*! SDP origin username */
 		AST_STRING_FIELD(sdpowner);
 		/*! SDP session name */

Modified: trunk/res/res_pjsip/pjsip_configuration.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip/pjsip_configuration.c?view=diff&rev=399284&r1=399283&r2=399284
==============================================================================
--- trunk/res/res_pjsip/pjsip_configuration.c (original)
+++ trunk/res/res_pjsip/pjsip_configuration.c Tue Sep 17 18:10:49 2013
@@ -656,7 +656,7 @@
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "auth", "", inbound_auth_handler, NULL, 0, 0);
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "outbound_auth", "", outbound_auth_handler, 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", "external_media_address", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, media.external_address));
+	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_custom(sip_sorcery, "endpoint", "identify_by", "username", ident_handler, 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, NULL, 0, 0);

Modified: trunk/res/res_pjsip_sdp_rtp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_sdp_rtp.c?view=diff&rev=399284&r1=399283&r2=399284
==============================================================================
--- trunk/res/res_pjsip_sdp_rtp.c (original)
+++ trunk/res/res_pjsip_sdp_rtp.c Tue Sep 17 18:10:49 2013
@@ -889,7 +889,7 @@
 	/* Add connection level details */
 	if (direct_media_enabled) {
 		ast_copy_string(hostip, ast_sockaddr_stringify_fmt(&session_media->direct_media_addr, AST_SOCKADDR_STR_ADDR), sizeof(hostip));
-	} else if (ast_strlen_zero(session->endpoint->media.external_address)) {
+	} else if (ast_strlen_zero(session->endpoint->media.address)) {
 		pj_sockaddr localaddr;
 
 		if (pj_gethostip(session->endpoint->media.rtp.ipv6 ? pj_AF_INET6() : pj_AF_INET(), &localaddr)) {
@@ -897,7 +897,7 @@
 		}
 		pj_sockaddr_print(&localaddr, hostip, sizeof(hostip), 2);
 	} else {
-		ast_copy_string(hostip, session->endpoint->media.external_address, sizeof(hostip));
+		ast_copy_string(hostip, session->endpoint->media.address, sizeof(hostip));
 	}
 
 	media->conn->net_type = STR_IN;

Modified: trunk/res/res_pjsip_t38.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_t38.c?view=diff&rev=399284&r1=399283&r2=399284
==============================================================================
--- trunk/res/res_pjsip_t38.c (original)
+++ trunk/res/res_pjsip_t38.c Tue Sep 17 18:10:49 2013
@@ -671,7 +671,7 @@
 	media->desc.media = pj_str(session_media->stream_type);
 	media->desc.transport = STR_UDPTL;
 
-	if (ast_strlen_zero(session->endpoint->media.external_address)) {
+	if (ast_strlen_zero(session->endpoint->media.address)) {
 		pj_sockaddr localaddr;
 
 		if (pj_gethostip(session->endpoint->media.t38.ipv6 ? pj_AF_INET6() : pj_AF_INET(), &localaddr)) {
@@ -679,7 +679,7 @@
 		}
 		pj_sockaddr_print(&localaddr, hostip, sizeof(hostip), 2);
 	} else {
-		ast_copy_string(hostip, session->endpoint->media.external_address, sizeof(hostip));
+		ast_copy_string(hostip, session->endpoint->media.address, sizeof(hostip));
 	}
 
 	media->conn->net_type = STR_IN;




More information about the asterisk-commits mailing list