mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
And some deprecated APIs and modifications to documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -613,7 +613,6 @@ struct sip_pkt;
|
||||
|
||||
/*! \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 @@ static int sip_call(struct ast_channel *ast, char *dest, int timeout)
|
||||
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 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
|
||||
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 @@ static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init)
|
||||
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 ) {
|
||||
|
@@ -873,10 +873,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
|
||||
===========================
|
||||
|
@@ -710,7 +710,6 @@ The SIP channel uses the following variables:
|
||||
---------------------------------------------------------
|
||||
${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
|
||||
|
@@ -34,10 +34,8 @@ ef (expedited forwarding),
|
||||
|
||||
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
|
||||
|
@@ -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
|
||||
|
@@ -44,7 +44,6 @@ int ast_apply_ha(struct ast_ha *ha, struct sockaddr_in *sin);
|
||||
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);
|
||||
|
62
main/acl.c
62
main/acl.c
@@ -78,9 +78,6 @@ struct ast_ha {
|
||||
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. */
|
||||
struct sockaddr_in ifru_addr;
|
||||
@@ -294,44 +291,16 @@ int ast_str2tos(const char *value, unsigned int *tos)
|
||||
}
|
||||
}
|
||||
|
||||
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";
|
||||
@@ -342,29 +311,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)
|
||||
{
|
||||
int s;
|
||||
|
Reference in New Issue
Block a user