[asterisk-commits] tilghman: trunk r43458 - in /trunk: channels/ doc/ include/asterisk/ main/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Sep 21 15:23:49 MST 2006


Author: tilghman
Date: Thu Sep 21 17:23:49 2006
New Revision: 43458

URL: http://svn.digium.com/view/asterisk?rev=43458&view=rev
Log:
And some deprecated APIs and modifications to documentation

Modified:
    trunk/channels/chan_sip.c
    trunk/doc/ael.txt
    trunk/doc/channelvariables.txt
    trunk/doc/ip-tos.txt
    trunk/doc/mp3.txt
    trunk/include/asterisk/acl.h
    trunk/main/acl.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=43458&r1=43457&r2=43458&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Sep 21 17:23:49 2006
@@ -613,7 +613,6 @@
 
 /*! \brief Parameters to the transmit_invite function */
 struct sip_invite_param {
-	const char *distinctive_ring;	/*!< Distinctive ring header */
 	int addsipheaders;		/*!< Add extra SIP headers */
 	const char *uri_options;	/*!< URI options to add to the URI */
 	const char *vxml_url;		/*!< VXML url for Cisco phones */
@@ -2691,9 +2690,6 @@
 			p->options->vxml_url = ast_var_value(current);
 		} else if (!p->options->uri_options && !strcasecmp(ast_var_name(current), "SIP_URI_OPTIONS")) {
 			p->options->uri_options = ast_var_value(current);
-		} else if (!p->options->distinctive_ring && !strcasecmp(ast_var_name(current), "ALERT_INFO")) {
-			/* Check whether there is a ALERT_INFO variable */
-			p->options->distinctive_ring = ast_var_value(current);
 		} else if (!p->options->addsipheaders && !strncasecmp(ast_var_name(current), "SIPADDHEADER", strlen("SIPADDHEADER"))) {
 			/* Check whether there is a variable with a name starting with SIPADDHEADER */
 			p->options->addsipheaders = 1;
@@ -3749,8 +3745,6 @@
 		pbx_builtin_setvar_helper(tmp, "SIPURI", i->uri);
 	if (!ast_strlen_zero(i->domain))
 		pbx_builtin_setvar_helper(tmp, "SIPDOMAIN", i->domain);
-	if (!ast_strlen_zero(i->useragent))
-		pbx_builtin_setvar_helper(tmp, "SIPUSERAGENT", i->useragent);
 	if (!ast_strlen_zero(i->callid))
 		pbx_builtin_setvar_helper(tmp, "SIPCALLID", i->callid);
 	ast_setstate(tmp, state);
@@ -6513,8 +6507,6 @@
 		add_header(&req, "Require", "replaces");
 	}
 
-	if (p->options && !ast_strlen_zero(p->options->distinctive_ring))
-		add_header(&req, "Alert-Info", p->options->distinctive_ring);
 	add_header(&req, "Allow", ALLOWED_METHODS);
 	add_header(&req, "Supported", SUPPORTED_EXTENSIONS);
 	if (p->options && p->options->addsipheaders ) {

Modified: trunk/doc/ael.txt
URL: http://svn.digium.com/view/asterisk/trunk/doc/ael.txt?rev=43458&r1=43457&r2=43458&view=diff
==============================================================================
--- trunk/doc/ael.txt (original)
+++ trunk/doc/ael.txt Thu Sep 21 17:23:49 2006
@@ -872,10 +872,6 @@
 NOTE: Every character enclosed by the switch expression's parenthesis
       are included verbatim in the labels generated. So watch out for
       spaces!
-
-NOTE: NEW: Previous to version 0.13, the random statement used the
-      "Random()" application, which has been deprecated. It now uses
-      the RAND() function instead, in the GotoIf application.
 
 
 Break, Continue, and Return

Modified: trunk/doc/channelvariables.txt
URL: http://svn.digium.com/view/asterisk/trunk/doc/channelvariables.txt?rev=43458&r1=43457&r2=43458&view=diff
==============================================================================
--- trunk/doc/channelvariables.txt (original)
+++ trunk/doc/channelvariables.txt Thu Sep 21 17:23:49 2006
@@ -710,7 +710,6 @@
 ---------------------------------------------------------
 ${SIPCALLID} 		* SIP Call-ID: header verbatim (for logging or CDR matching)
 ${SIPDOMAIN}    	* SIP destination domain of an inbound call (if appropriate)
-${SIPUSERAGENT} 	* SIP user agent (deprecated)
 ${SIPURI}		* SIP uri
 ${SIP_CODEC} 		Set the SIP codec for a call	
 ${SIP_URI_OPTIONS}	* additional options to add to the URI for an outgoing call

Modified: trunk/doc/ip-tos.txt
URL: http://svn.digium.com/view/asterisk/trunk/doc/ip-tos.txt?rev=43458&r1=43457&r2=43458&view=diff
==============================================================================
--- trunk/doc/ip-tos.txt (original)
+++ trunk/doc/ip-tos.txt Thu Sep 21 17:23:49 2006
@@ -34,10 +34,8 @@
 
 The tos* parameters also take numeric values.
 
-The lowdelay, throughput, reliability, mincost, and none values are
-deprecated because they set the IP TOS using the outdated "IP
-precedence" model as defined in RFC 791 and RFC 1349. They still
-work in this version of Asterisk, but will be removed in future releases.
+The lowdelay, throughput, reliability, mincost, and none values are no
+longer supported in this version of Asterisk.
 
 ===========================================
 Configuration	Parameter	Recommended

Modified: trunk/doc/mp3.txt
URL: http://svn.digium.com/view/asterisk/trunk/doc/mp3.txt?rev=43458&r1=43457&r2=43458&view=diff
==============================================================================
--- trunk/doc/mp3.txt (original)
+++ trunk/doc/mp3.txt Thu Sep 21 17:23:49 2006
@@ -2,9 +2,8 @@
 ======================
 
 * MP3 Music On Hold
-Use of the mpg123 for your music on hold is no longer recommended and is now
-officially deprecated.  You should now use one of the native formats for your
-music on hold selections.
+Use of the mpg123 for your music on hold is no longer supported.  You should
+now use one of the native formats for your music on hold selections.
 
 However, if you still need to use mp3 as your music on hold format, a format
 driver for reading MP3 audio files is available in the asterisk-addons SVN

Modified: trunk/include/asterisk/acl.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/acl.h?rev=43458&r1=43457&r2=43458&view=diff
==============================================================================
--- trunk/include/asterisk/acl.h (original)
+++ trunk/include/asterisk/acl.h Thu Sep 21 17:23:49 2006
@@ -44,7 +44,6 @@
 int ast_get_ip(struct sockaddr_in *sin, const char *value);
 int ast_get_ip_or_srv(struct sockaddr_in *sin, const char *value, const char *service);
 int ast_ouraddrfor(struct in_addr *them, struct in_addr *us);
-int ast_lookup_iface(char *iface, struct in_addr *address);
 struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original);
 int ast_find_ourip(struct in_addr *ourip, struct sockaddr_in bindaddr);
 int ast_str2tos(const char *value, unsigned int *tos);

Modified: trunk/main/acl.c
URL: http://svn.digium.com/view/asterisk/trunk/main/acl.c?rev=43458&r1=43457&r2=43458&view=diff
==============================================================================
--- trunk/main/acl.c (original)
+++ trunk/main/acl.c Thu Sep 21 17:23:49 2006
@@ -77,9 +77,6 @@
 	int sense;
 	struct ast_ha *next;
 };
-
-/* Default IP - if not otherwise set, don't breathe garbage */
-static struct in_addr __ourip = { 0x00000000 };
 
 struct my_ifreq {
 	char ifrn_name[IFNAMSIZ];	/* Interface name, e.g. "eth0", "ppp0", etc.  */
@@ -294,44 +291,16 @@
 		}
 	}
 
-	if (!strcasecmp(value, "lowdelay"))
-		*tos = IPTOS_LOWDELAY;
-	else if (!strcasecmp(value, "throughput"))
-		*tos = IPTOS_THROUGHPUT;
-	else if (!strcasecmp(value, "reliability"))
-		*tos = IPTOS_RELIABILITY;
-	else if (!strcasecmp(value, "mincost"))
-		*tos = IPTOS_MINCOST;
-	else if (!strcasecmp(value, "none"))
-		*tos = 0;
-	else
-		return -1;
-
-	ast_log(LOG_WARNING, "TOS value %s is deprecated. Please see doc/ip-tos.txt for more information.\n", value);
-
-	return 0;
+	return -1;
 }
 
 const char *ast_tos2str(unsigned int tos)
 {
 	unsigned int x;
 
-	switch (tos) {
-	case 0:
-		return "none";
-	case IPTOS_LOWDELAY:
-		return "lowdelay";
-	case IPTOS_THROUGHPUT:
-		return "throughput";
-	case IPTOS_RELIABILITY:
-		return "reliability";
-	case IPTOS_MINCOST:
-		return "mincost";
-	default:
-		for (x = 0; x < sizeof(dscp_pool1) / sizeof(dscp_pool1[0]); x++) {
-			if (dscp_pool1[x].space == (tos >> 2))
-				return dscp_pool1[x].name;
-		}
+	for (x = 0; x < sizeof(dscp_pool1) / sizeof(dscp_pool1[0]); x++) {
+		if (dscp_pool1[x].space == (tos >> 2))
+			return dscp_pool1[x].name;
 	}
 
 	return "unknown";
@@ -340,29 +309,6 @@
 int ast_get_ip(struct sockaddr_in *sin, const char *value)
 {
 	return ast_get_ip_or_srv(sin, value, NULL);
-}
-
-/* iface is the interface (e.g. eth0); address is the return value */
-int ast_lookup_iface(char *iface, struct in_addr *address)
-{
-	int mysock, res = 0;
-	struct my_ifreq ifreq;
-
-	memset(&ifreq, 0, sizeof(ifreq));
-	ast_copy_string(ifreq.ifrn_name, iface, sizeof(ifreq.ifrn_name));
-
-	mysock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
-	res = ioctl(mysock, SIOCGIFADDR, &ifreq);
-
-	close(mysock);
-	if (res < 0) {
-		ast_log(LOG_WARNING, "Unable to get IP of %s: %s\n", iface, strerror(errno));
-		memcpy((char *)address, (char *)&__ourip, sizeof(__ourip));
-		return -1;
-	} else {
-		memcpy((char *)address, (char *)&ifreq.ifru_addr.sin_addr, sizeof(ifreq.ifru_addr.sin_addr));
-		return 0;
-	}
 }
 
 int ast_ouraddrfor(struct in_addr *them, struct in_addr *us)



More information about the asterisk-commits mailing list