[asterisk-users] rtpip patch

Stefano Sasso stesasso at gmail.com
Tue Oct 12 06:53:39 CDT 2010


Hello *,
  is the rtpip patch still valid for asterisk 1.6 (with some code
changes, obviously)?
https://issues.asterisk.org/view.php?id=8161
Or, in asterisk 1.6 there is an alternative to using it?


This is the difffile I produced for chan_sip.c in asterisk 1.6.2.11

--- chan_sip.c	2010-10-12 13:47:49.000000000 +0200
+++ chan_sip.c.orig	2010-10-12 13:47:27.000000000 +0200
@@ -987,9 +987,6 @@
 #define DEFAULT_CALLCOUNTER	FALSE
 #define DEFAULT_SRVLOOKUP	TRUE		/*!< Recommended setting is ON */
 #define DEFAULT_COMPACTHEADERS	FALSE		/*!< Send compact
(one-character) SIP headers. Default off */
-
-#define DEFAULT_RTPIP		"auto"
-
 #define DEFAULT_TOS_SIP         0               /*!< Call signalling
packets should be marked as DSCP CS3, but the default is 0 to be
compatible with previous versions. */
 #define DEFAULT_TOS_AUDIO       0               /*!< Audio packets
should be marked as DSCP EF (Expedited Forwarding), but the default is
0 to be compatible with previous versions. */
 #define DEFAULT_TOS_VIDEO       0               /*!< Video packets
should be marked as DSCP AF41, but the default is 0 to be compatible
with previous versions. */
@@ -1106,10 +1103,6 @@
 static int dumphistory;			/*!< Dump history to verbose before
destroying SIP dialog */
 static char global_regcontext[AST_MAX_CONTEXT];		/*!< Context for
auto-extensions */
 static char global_useragent[AST_MAX_EXTENSION];	/*!< Useragent for
the SIP channel */
-
-static char global_rtpip[AST_MAX_EXTENSION];
-
-
 static char global_sdpsession[AST_MAX_EXTENSION];	/*!< SDP session
name for the SIP channel */
 static char global_sdpowner[AST_MAX_EXTENSION];	/*!< SDP owner name
for the SIP channel */
 static int global_authfailureevents;		/*!< Whether we send
authentication failure manager events or not. Default no. */
@@ -10196,21 +10189,8 @@

 	get_our_media_address(p, needvideo, &sin, &vsin, &tsin, &dest, &vdest);

-
-	/*
-	snprintf(owner, sizeof(owner), "o=%s %d %d IN IP4 %s\r\n",
ast_strlen_zero(global_sdpowner) ? "-" : global_sdpowner,
p->sessionid, p->sessionversion, ast_inet_ntoa(dest.sin_addr));
-	snprintf(connection, sizeof(connection), "c=IN IP4 %s\r\n",
ast_inet_ntoa(dest.sin_addr));
-
-	*/
-	/* replace RTP IP address, if rtpip!=auto */
-	if (!strcasestr(global_rtpip, "auto")) {
-		snprintf(owner, sizeof(owner), "o=%s %d %d IN IP4 %s\r\n",
ast_strlen_zero(global_sdpowner) ? "-" : global_sdpowner,
p->sessionid, p->sessionversion, global_rtpip);
-	        snprintf(connection, sizeof(connection), "c=IN IP4 %s\r\n",
global_rtpip);
-	} else {
 		snprintf(owner, sizeof(owner), "o=%s %d %d IN IP4 %s\r\n",
ast_strlen_zero(global_sdpowner) ? "-" : global_sdpowner,
p->sessionid, p->sessionversion, ast_inet_ntoa(dest.sin_addr));
 	        snprintf(connection, sizeof(connection), "c=IN IP4 %s\r\n",
ast_inet_ntoa(dest.sin_addr));
-	}
-

 	if (add_audio) {
 		capability = p->jointcapability;
@@ -24594,9 +24574,6 @@
 	snprintf(global_sdpowner, sizeof(global_sdpowner), "%s", DEFAULT_SDPOWNER);
 	global_prematuremediafilter = TRUE;
 	ast_copy_string(default_notifymime, DEFAULT_NOTIFYMIME,
sizeof(default_notifymime));
-
-	ast_copy_string(global_rtpip, DEFAULT_RTPIP, sizeof(global_rtpip));
-
 	ast_copy_string(sip_cfg.realm, S_OR(ast_config_AST_SYSTEM_NAME,
DEFAULT_REALM), sizeof(sip_cfg.realm));
 	ast_copy_string(default_callerid, DEFAULT_CALLERID, sizeof(default_callerid));
 	sip_cfg.compactheaders = DEFAULT_COMPACTHEADERS;
@@ -24809,8 +24786,6 @@
 				ast_log(LOG_WARNING, "'%s' is not a valid RTP keepalive time at
line %d.  Using default.\n", v->value, v->lineno);
 				global_rtpkeepalive = DEFAULT_RTPKEEPALIVE;
 			}
-		} else if (!strcasecmp(v->name, "rtpip")) {
-			ast_copy_string(global_rtpip, v->value, sizeof(global_rtpip));
 		} else if (!strcasecmp(v->name, "compactheaders")) {
 			sip_cfg.compactheaders = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "notifymimetype")) {



-- 
Stefano Sasso
http://stefano.dscnet.org/



More information about the asterisk-users mailing list