[-]
[+]
|
Changed |
asterisk.spec
|
|
[-]
[+]
|
Deleted |
app_nv_faxdetect.c.1.4.patch
^
|
@@ -1,43 +0,0 @@
---- app_nv_faxdetect.c.old 2006-02-24 04:52:29.000000000 +0100-+
-+++ app_nv_faxdetect.c 2007-08-16 03:40:21.000000000 +0200
-@@ -77,7 +77,7 @@
- static int nv_detectfax_exec(struct ast_channel *chan, void *data)
- {
- int res = 0;
-- struct localuser *u;
-+ //struct localuser *u;
- char tmp256 = "\0";
- char *p = NULL;
- char *waitstr = NULL;
-@@ -157,7 +157,7 @@
- ast_log(LOG_DEBUG, "Preparing detect of fax (waitdur=%dms, sildur=%dms, mindur=%dms, maxdur=%dms)\n",
- waitdur, sildur, mindur, maxdur);
-
-- LOCAL_USER_ADD(u);
-+ //LOCAL_USER_ADD(u);
- if (chan->_state != AST_STATE_UP && !skipanswer) {
- /* Otherwise answer unless we're supposed to send this while on-hook */
- res = ast_answer(chan);
-@@ -307,14 +307,14 @@
- if (dsp)
- ast_dsp_free(dsp);
-
-- LOCAL_USER_REMOVE(u);
-+ //LOCAL_USER_REMOVE(u);
-
- return res;
- }
-
- int unload_module(void)
- {
-- STANDARD_HANGUP_LOCALUSERS;
-+ //STANDARD_HANGUP_LOCALUSERS;
- return ast_unregister_application(app);
- }
-
-@@ -339,3 +339,5 @@
- {
- return ASTERISK_GPL_KEY;
- }
-+
-+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Fax detection application");
|
[-]
[+]
|
Deleted |
asterisk-1.4-chan_h323-moduleinfo.patch
^
|
@@ -1,10 +0,0 @@
---- asterisk-1.4.0/channels/chan_h323.c.rpmbuild 2006-12-27 13:46:23.000000000 -0500
-+++ asterisk-1.4.0/channels/chan_h323.c 2006-12-27 13:46:31.000000000 -0500
-@@ -35,7 +35,6 @@
-
- /*** MODULEINFO
- <depend>openh323</depend>
-- <defaultenabled>no</defaultenabled>
- ***/
-
- #ifdef __cplusplus
|
[-]
[+]
|
Deleted |
app_nv_faxdetect.c
^
|
@@ -1,341 +0,0 @@
-/*
- * Asterisk -- A telephony toolkit for Linux.
- *
- * Fax detection application for all channel types.
- *
- * Copyright (C) 2004-2005, Newman Telecom, Inc. and Newman Ventures, Inc.
- *
- * Justin Newman <jnewman@newmantelecom.com>
- *
- * We would like to thank Newman Ventures, Inc. for funding this
- * Asterisk project.
- *
- * Newman Ventures <info@newmanventures.com>
- *
- * Portions Copyright:
- * Copyright (C) 2001, Linux Support Services, Inc.
- * Copyright (C) 2004, Digium, Inc.
- *
- * Matthew Fredrickson <creslin@linux-support.net>
- * Mark Spencer <markster@digium.com>
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License
- */
-
-#include <stdio.h>
-#include <asterisk/lock.h>
-#include <asterisk/file.h>
-#include <asterisk/logger.h>
-#include <asterisk/channel.h>
-#include <asterisk/pbx.h>
-#include <asterisk/module.h>
-#include <asterisk/translate.h>
-#include <asterisk/dsp.h>
-#include <asterisk/utils.h>
-#include <string.h>
-#include <stdlib.h>
-
-static char *tdesc = "Newman's fax detection application";
-
-static char *app = "NVFaxDetect";
-
-static char *synopsis = "Detects fax sounds on all channel types (IAX and SIP too)";
-
-static char *descrip =
-" NVFaxDetect([waitdur[|options[|sildur[|mindur[|maxdur]]]]]):\n"
-"This application listens for fax tones (on IAX and SIP channels too)\n"
-"for waitdur seconds of time. In addition, it can be interrupted by digits,\n"
-"or non-silence. Audio is only monitored in the receive direction. If\n"
-"digits interrupt, they must be the start of a valid extension unless the\n"
-"option is included to ignore. If fax is detected, it will jump to the\n"
-"'fax' extension. If a period of non-silence greater than 'mindur' ms,\n"
-"yet less than 'maxdur' ms is followed by silence at least 'sildur' ms\n"
-"then the app is aborted and processing jumps to the 'talk' extension.\n"
-"If all undetected, control will continue at the next priority.\n"
-" waitdur: Maximum number of seconds to wait (default=4)\n"
-" options:\n"
-" 'n': Attempt on-hook if unanswered (default=no)\n"
-" 'x': DTMF digits terminate without extension (default=no)\n"
-" 'd': Ignore DTMF digit detection (default=no)\n"
-" 'f': Ignore fax detection (default=no)\n"
-" 't': Ignore talk detection (default=no)\n"
-" sildur: Silence ms after mindur/maxdur before aborting (default=1000)\n"
-" mindur: Minimum non-silence ms needed (default=100)\n"
-" maxdur: Maximum non-silence ms allowed (default=0/forever)\n"
-"Returns -1 on hangup, and 0 on successful completion with no exit conditions.\n\n"
-"For questions or comments, please e-mail support@newmantelecom.com.\n";
-
-// Use the second one for recent Asterisk releases
-#define CALLERID_FIELD cid.cid_num
-//#define CALLERID_FIELD callerid
-
-STANDARD_LOCAL_USER;
-
-LOCAL_USER_DECL;
-
-static int nv_detectfax_exec(struct ast_channel *chan, void *data)
-{
- int res = 0;
- struct localuser *u;
- char tmp[256] = "\0";
- char *p = NULL;
- char *waitstr = NULL;
- char *options = NULL;
- char *silstr = NULL;
- char *minstr = NULL;
- char *maxstr = NULL;
- struct ast_frame *fr = NULL;
- struct ast_frame *fr2 = NULL;
- int notsilent = 0;
- struct timeval start = {0, 0}, end = {0, 0};
- int waitdur = 4;
- int sildur = 1000;
- int mindur = 100;
- int maxdur = -1;
- int skipanswer = 0;
- int noextneeded = 0;
- int ignoredtmf = 0;
- int ignorefax = 0;
- int ignoretalk = 0;
- int x = 0;
- int origrformat = 0;
- int features = 0;
- time_t timeout = 0;
- struct ast_dsp *dsp = NULL;
-
- pbx_builtin_setvar_helper(chan, "FAX_DETECTED", "");
- pbx_builtin_setvar_helper(chan, "FAXEXTEN", "");
- pbx_builtin_setvar_helper(chan, "DTMF_DETECTED", "");
- pbx_builtin_setvar_helper(chan, "TALK_DETECTED", "");
-
- if (data || !ast_strlen_zero((char *)data)) {
- strncpy(tmp, (char *)data, sizeof(tmp)-1);
- }
-
- p = tmp;
-
- waitstr = strsep(&p, "|");
- options = strsep(&p, "|");
- silstr = strsep(&p, "|");
- minstr = strsep(&p, "|");
- maxstr = strsep(&p, "|");
-
- if (waitstr) {
- if ((sscanf(waitstr, "%d", &x) == 1) && (x > 0))
- waitdur = x;
- }
-
- if (options) {
- if (strchr(options, 'n'))
- skipanswer = 1;
- if (strchr(options, 'x'))
- noextneeded = 1;
- if (strchr(options, 'd'))
- ignoredtmf = 1;
- if (strchr(options, 'f'))
- ignorefax = 1;
- if (strchr(options, 't'))
- ignoretalk = 1;
- }
-
- if (silstr) {
- if ((sscanf(silstr, "%d", &x) == 1) && (x > 0))
- sildur = x;
- }
-
- if (minstr) {
- if ((sscanf(minstr, "%d", &x) == 1) && (x > 0))
- mindur = x;
- }
-
- if (maxstr) {
- if ((sscanf(maxstr, "%d", &x) == 1) && (x > 0))
- maxdur = x;
- }
-
- ast_log(LOG_DEBUG, "Preparing detect of fax (waitdur=%dms, sildur=%dms, mindur=%dms, maxdur=%dms)\n",
- waitdur, sildur, mindur, maxdur);
-
- LOCAL_USER_ADD(u);
- if (chan->_state != AST_STATE_UP && !skipanswer) {
- /* Otherwise answer unless we're supposed to send this while on-hook */
- res = ast_answer(chan);
- }
- if (!res) {
- origrformat = chan->readformat;
- if ((res = ast_set_read_format(chan, AST_FORMAT_SLINEAR)))
- ast_log(LOG_WARNING, "Unable to set read format to linear!\n");
- }
- if (!(dsp = ast_dsp_new())) {
- ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
- res = -1;
- }
-
- if (dsp) {
- if (!ignoretalk)
- ; /* features |= DSP_FEATURE_SILENCE_SUPPRESS; */
- if (!ignorefax)
- features |= DSP_FEATURE_FAX_DETECT;
- //if (!ignoredtmf)
- features |= DSP_FEATURE_DTMF_DETECT;
-
- ast_dsp_set_threshold(dsp, 256);
- ast_dsp_set_features(dsp, features | DSP_DIGITMODE_RELAXDTMF);
- ast_dsp_digitmode(dsp, DSP_DIGITMODE_DTMF);
- }
-
- if (!res) {
- if (waitdur > 0)
- timeout = time(NULL) + (time_t)waitdur;
-
- while(ast_waitfor(chan, -1) > -1) {
- if (waitdur > 0 && time(NULL) > timeout) {
- res = 0;
- break;
- }
-
- fr = ast_read(chan);
- if (!fr) {
|
[-]
[+]
|
Deleted |
app_nv_faxdetect14.c
^
|
@@ -1,343 +0,0 @@
-/*
- * Asterisk -- A telephony toolkit for Linux.
- *
- * Fax detection application for all channel types.
- *
- * Copyright (C) 2004-2005, Newman Telecom, Inc. and Newman Ventures, Inc.
- *
- * Justin Newman <jnewman@newmantelecom.com>
- *
- * We would like to thank Newman Ventures, Inc. for funding this
- * Asterisk project.
- *
- * Newman Ventures <info@newmanventures.com>
- *
- * Portions Copyright:
- * Copyright (C) 2001, Linux Support Services, Inc.
- * Copyright (C) 2004, Digium, Inc.
- *
- * Matthew Fredrickson <creslin@linux-support.net>
- * Mark Spencer <markster@digium.com>
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License
- */
-
-#include <stdio.h>
-#include <asterisk/lock.h>
-#include <asterisk/file.h>
-#include <asterisk/logger.h>
-#include <asterisk/channel.h>
-#include <asterisk/pbx.h>
-#include <asterisk/module.h>
-#include <asterisk/translate.h>
-#include <asterisk/dsp.h>
-#include <asterisk/utils.h>
-#include <string.h>
-#include <stdlib.h>
-
-static char *tdesc = "Newman's fax detection application";
-
-static char *app = "NVFaxDetect";
-
-static char *synopsis = "Detects fax sounds on all channel types (IAX and SIP too)";
-
-static char *descrip =
-" NVFaxDetect([waitdur[|options[|sildur[|mindur[|maxdur]]]]]):\n"
-"This application listens for fax tones (on IAX and SIP channels too)\n"
-"for waitdur seconds of time. In addition, it can be interrupted by digits,\n"
-"or non-silence. Audio is only monitored in the receive direction. If\n"
-"digits interrupt, they must be the start of a valid extension unless the\n"
-"option is included to ignore. If fax is detected, it will jump to the\n"
-"'fax' extension. If a period of non-silence greater than 'mindur' ms,\n"
-"yet less than 'maxdur' ms is followed by silence at least 'sildur' ms\n"
-"then the app is aborted and processing jumps to the 'talk' extension.\n"
-"If all undetected, control will continue at the next priority.\n"
-" waitdur: Maximum number of seconds to wait (default=4)\n"
-" options:\n"
-" 'n': Attempt on-hook if unanswered (default=no)\n"
-" 'x': DTMF digits terminate without extension (default=no)\n"
-" 'd': Ignore DTMF digit detection (default=no)\n"
-" 'f': Ignore fax detection (default=no)\n"
-" 't': Ignore talk detection (default=no)\n"
-" sildur: Silence ms after mindur/maxdur before aborting (default=1000)\n"
-" mindur: Minimum non-silence ms needed (default=100)\n"
-" maxdur: Maximum non-silence ms allowed (default=0/forever)\n"
-"Returns -1 on hangup, and 0 on successful completion with no exit conditions.\n\n"
-"For questions or comments, please e-mail support@newmantelecom.com.\n";
-
-// Use the second one for recent Asterisk releases
-#define CALLERID_FIELD cid.cid_num
-//#define CALLERID_FIELD callerid
-
-STANDARD_LOCAL_USER;
-
-LOCAL_USER_DECL;
-
-static int nv_detectfax_exec(struct ast_channel *chan, void *data)
-{
- int res = 0;
- //struct localuser *u;
- char tmp[256] = "\0";
- char *p = NULL;
- char *waitstr = NULL;
- char *options = NULL;
- char *silstr = NULL;
- char *minstr = NULL;
- char *maxstr = NULL;
- struct ast_frame *fr = NULL;
- struct ast_frame *fr2 = NULL;
- int notsilent = 0;
- struct timeval start = {0, 0}, end = {0, 0};
- int waitdur = 4;
- int sildur = 1000;
- int mindur = 100;
- int maxdur = -1;
- int skipanswer = 0;
- int noextneeded = 0;
- int ignoredtmf = 0;
- int ignorefax = 0;
- int ignoretalk = 0;
- int x = 0;
- int origrformat = 0;
- int features = 0;
- time_t timeout = 0;
- struct ast_dsp *dsp = NULL;
-
- pbx_builtin_setvar_helper(chan, "FAX_DETECTED", "");
- pbx_builtin_setvar_helper(chan, "FAXEXTEN", "");
- pbx_builtin_setvar_helper(chan, "DTMF_DETECTED", "");
- pbx_builtin_setvar_helper(chan, "TALK_DETECTED", "");
-
- if (data || !ast_strlen_zero((char *)data)) {
- strncpy(tmp, (char *)data, sizeof(tmp)-1);
- }
-
- p = tmp;
-
- waitstr = strsep(&p, "|");
- options = strsep(&p, "|");
- silstr = strsep(&p, "|");
- minstr = strsep(&p, "|");
- maxstr = strsep(&p, "|");
-
- if (waitstr) {
- if ((sscanf(waitstr, "%d", &x) == 1) && (x > 0))
- waitdur = x;
- }
-
- if (options) {
- if (strchr(options, 'n'))
- skipanswer = 1;
- if (strchr(options, 'x'))
- noextneeded = 1;
- if (strchr(options, 'd'))
- ignoredtmf = 1;
- if (strchr(options, 'f'))
- ignorefax = 1;
- if (strchr(options, 't'))
- ignoretalk = 1;
- }
-
- if (silstr) {
- if ((sscanf(silstr, "%d", &x) == 1) && (x > 0))
- sildur = x;
- }
-
- if (minstr) {
- if ((sscanf(minstr, "%d", &x) == 1) && (x > 0))
- mindur = x;
- }
-
- if (maxstr) {
- if ((sscanf(maxstr, "%d", &x) == 1) && (x > 0))
- maxdur = x;
- }
-
- ast_log(LOG_DEBUG, "Preparing detect of fax (waitdur=%dms, sildur=%dms, mindur=%dms, maxdur=%dms)\n",
- waitdur, sildur, mindur, maxdur);
-
- //LOCAL_USER_ADD(u);
- if (chan->_state != AST_STATE_UP && !skipanswer) {
- /* Otherwise answer unless we're supposed to send this while on-hook */
- res = ast_answer(chan);
- }
- if (!res) {
- origrformat = chan->readformat;
- if ((res = ast_set_read_format(chan, AST_FORMAT_SLINEAR)))
- ast_log(LOG_WARNING, "Unable to set read format to linear!\n");
- }
- if (!(dsp = ast_dsp_new())) {
- ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
- res = -1;
- }
-
- if (dsp) {
- if (!ignoretalk)
- ; /* features |= DSP_FEATURE_SILENCE_SUPPRESS; */
- if (!ignorefax)
- features |= DSP_FEATURE_FAX_DETECT;
- //if (!ignoredtmf)
- features |= DSP_FEATURE_DTMF_DETECT;
-
- ast_dsp_set_threshold(dsp, 256);
- ast_dsp_set_features(dsp, features | DSP_DIGITMODE_RELAXDTMF);
- ast_dsp_digitmode(dsp, DSP_DIGITMODE_DTMF);
- }
-
- if (!res) {
- if (waitdur > 0)
- timeout = time(NULL) + (time_t)waitdur;
-
- while(ast_waitfor(chan, -1) > -1) {
- if (waitdur > 0 && time(NULL) > timeout) {
- res = 0;
- break;
- }
-
- fr = ast_read(chan);
- if (!fr) {
|
[-]
[+]
|
Deleted |
asterisk-1.4.41.tar.bz2/asterisk-1.4.41-summary.html
^
|
@@ -1,257 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-1.4.41</title></head>
-<body>
-<h1 align="center"><a name="top">Release Summary</a></h1>
-<h3 align="center">asterisk-1.4.41</h3>
-<h3 align="center">Date: 2011-04-25</h3>
-<h3 align="center"><asteriskteam@digium.com></h3>
-<hr/>
-<h2 align="center">Table of Contents</h2>
-<ol>
- <li><a href="#summary">Summary</a></li>
- <li><a href="#contributors">Contributors</a></li>
- <li><a href="#issues">Closed Issues</a></li>
- <li><a href="#commits">Other Changes</a></li>
- <li><a href="#diffstat">Diffstat</a></li>
-</ol>
-<hr/>
-<a name="summary"><h2 align="center">Summary</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
-<p>The data in this summary reflects changes that have been made since the previous release, asterisk-1.4.40.</p>
-<hr/>
-<a name="contributors"><h2 align="center">Contributors</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
-<table width="100%" border="0">
-<tr>
-<td width="33%"><h3>Coders</h3></td>
-<td width="33%"><h3>Testers</h3></td>
-<td width="33%"><h3>Reporters</h3></td>
-</tr>
-<tr valign="top">
-<td>
-12 rmudgett<br/>
-8 jpeeler<br/>
-7 qwell<br/>
-6 lmadsen<br/>
-6 twilson<br/>
-4 mnicholson<br/>
-2 russell<br/>
-2 seanbright<br/>
-2 tilghman<br/>
-1 gbour<br/>
-1 mmichelson<br/>
-</td>
-<td>
-7 rmudgett<br/>
-2 wimpy<br/>
-1 jacco<br/>
-1 lmadsen<br/>
-1 loloski<br/>
-1 oej<br/>
-1 qwell<br/>
-1 russell<br/>
-1 wedhorn<br/>
-</td>
-<td>
-1 bluefox<br/>
-1 gbour<br/>
-1 gelo<br/>
-1 gincantalupo<br/>
-1 grecco<br/>
-1 iskatel<br/>
-1 jacco<br/>
-1 JJCinAZ<br/>
-1 jvandal<br/>
-1 kerframil<br/>
-1 mcallist<br/>
-1 oej<br/>
-1 shawkris<br/>
-1 shihchuan<br/>
-1 vrban<br/>
-1 wimpy<br/>
-</td>
-</tr>
-</table>
-<hr/>
-<a name="issues"><h2 align="center">Closed Issues</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p>
-<h3>Category: Applications/app_dial</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=18264">#18264</a>: [patch] Dail L(x) shows "Setting call duration limit to x seconds" in CLI<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=302916">302916</a><br/>
-Reporter: jacco<br/>
-Testers: lmadsen, jacco<br/>
-Coders: lmadsen<br/>
-<br/>
-<a href="https://issues.asterisk.org/view.php?id=18379">#18379</a>: attended transfer weird behaviour<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=302671">302671</a><br/>
-Reporter: gincantalupo<br/>
-Testers: rmudgett<br/>
-Coders: rmudgett<br/>
-<br/>
-<h3>Category: Applications/app_queue</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=18747">#18747</a>: [regression] changeset 298596 harm the ring/moh logic in queues<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=308002">308002</a><br/>
-Reporter: vrban<br/>
-Coders: qwell<br/>
-<br/>
-<h3>Category: Applications/app_voicemail</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=18486">#18486</a>: [patch] Voicemail files out of sequence<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303676">303676</a><br/>
-Reporter: bluefox<br/>
-Coders: jpeeler<br/>
-<br/>
-<a href="https://issues.asterisk.org/view.php?id=18498">#18498</a>: [patch] [regression] Resequencing of mailbox not working as expected.<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303676">303676</a><br/>
-Reporter: JJCinAZ<br/>
-Coders: jpeeler<br/>
-<br/>
-<h3>Category: Applications/app_voicemail/IMAP</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=18718">#18718</a>: [regression] Implicit declaration of copy yields broken app_voicemail when building with IMAP support<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=306960">306960</a><br/>
-Reporter: kerframil<br/>
-Coders: jpeeler<br/>
-<br/>
-<h3>Category: Channels/General</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=18585">#18585</a>: [patch] AMI redirect from meetme - calls fail<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303546">303546</a><br/>
-Reporter: oej<br/>
-Testers: oej, wedhorn, russell<br/>
-Coders: russell<br/>
-<br/>
-<h3>Category: Channels/chan_dahdi</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=17085">#17085</a>: [patch] [regression] Overlap dialing to PSTN failing after #16789<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303765">303765</a><br/>
-Reporter: shawkris<br/>
-Testers: wimpy, rmudgett<br/>
-Coders: rmudgett<br/>
-<br/>
-<a href="https://issues.asterisk.org/view.php?id=17273">#17273</a>: atxfer *2 channel dahdi FXS no hangup<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=302172">302172</a><br/>
-Reporter: grecco<br/>
-Testers: rmudgett<br/>
-Coders: rmudgett<br/>
-<br/>
-<a href="https://issues.asterisk.org/view.php?id=18509">#18509</a>: [patch] Sending out unnecessary PROCEEDING messages breaks overlap dialing<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303765">303765</a><br/>
-Reporter: wimpy<br/>
-Testers: wimpy, rmudgett<br/>
-Coders: rmudgett<br/>
-<br/>
-<h3>Category: Channels/chan_sip/General</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=18371">#18371</a>: [patch] asterisk crash when dialing SIP/${var} where var is empty or not set<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=305252">305252</a><br/>
-Reporter: gbour<br/>
-Coders: gbour<br/>
-<br/>
-<h3>Category: Core/PBX</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=17999">#17999</a>: Issues with DTMF triggered attended transfers<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=302172">302172</a><br/>
-Reporter: iskatel<br/>
-Testers: rmudgett<br/>
-Coders: rmudgett<br/>
-<br/>
-<h3>Category: Features</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=18395">#18395</a>: C should not receive request call again after C cancel if B blind transfer using atxfer call C<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=302172">302172</a><br/>
-Reporter: shihchuan<br/>
-Testers: rmudgett<br/>
-Coders: rmudgett<br/>
-<br/>
-<h3>Category: Resources/res_features</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=17096">#17096</a>: C keeps ringing when hanging A and B after blind transfer using atxfer<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=302172">302172</a><br/>
-Reporter: gelo<br/>
-Testers: rmudgett<br/>
-Coders: rmudgett<br/>
-<br/>
-<a href="https://issues.asterisk.org/view.php?id=18637">#18637</a>: [patch] No MOH on Call Park and Exceptionally long voice queue length ...<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=306120">306120</a><br/>
-Reporter: jvandal<br/>
-Coders: jpeeler<br/>
-<br/>
-<h3>Category: Resources/res_musiconhold</h3><br/>
-<a href="https://issues.asterisk.org/view.php?id=18457">#18457</a>: [patch] moh reload leaks file descriptors to dahdi timing channel<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=305471">305471</a><br/>
-Reporter: mcallist<br/>
-Testers: qwell, loloski<br/>
-Coders: qwell<br/>
-<br/>
-<hr/>
-<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
-<table width="100%" border="1">
-<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=302087">302087</a></td><td>twilson</td><td>Only offer codecs both sides support for directmedia</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=302311">302311</a></td><td>mnicholson</td><td>URI encode the user part of the contact header.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=302663">302663</a></td><td>tilghman</td><td>Add some API documentation</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303007">303007</a></td><td>jpeeler</td><td>Add new queue strategy to preserve behavior for when queue members moved to ao2.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303284">303284</a></td><td>qwell</td><td>Reset configuration before parsing users.conf.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303552">303552</a></td><td>russell</td><td>Fix a couple of mistakes in the backport of this patch to 1.4.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303747">303747</a></td><td>rmudgett</td><td>Backport the Proceeding application.</td>
-<td><a href="https://issues.asterisk.org/view.php?id=17085">#17085</a>, <a href="https://issues.asterisk.org/view.php?id=18509">#18509</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=303906">303906</a></td><td>twilson</td><td>Guard against retransmitting BYEs indefinitely</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=304005">304005</a></td><td>rmudgett</td><td>DTMF attended transfers sometimes fail for no apparent reason.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=304159">304159</a></td><td>seanbright</td><td>Make sure the sample queues.conf is properly commented.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=304241">304241</a></td><td>mnicholson</td><td>This patch modifies chan_sip to route responses to the address the request came from. It also modifies chan_sip to respect the maddr parameter in the Via header.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=304242">304242</a></td><td>mmichelson</td><td>Get rid of unused 'verbose' field in ast_udptl</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=304247">304247</a></td><td>mnicholson</td><td>Convert from network to host byte ordering before checking if an IP is a multicast address.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=304460">304460</a></td><td>qwell</td><td>Rerun bootstrap.sh with no changes, so that it is more obvious what my next commit changes.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=304464">304464</a></td><td>qwell</td><td>Fix default prefix=/usr regression on non-Linux systems.</td>
-<td><a href="https://issues.asterisk.org/view.php?id=17013">#17013</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=304820">304820</a></td><td>seanbright</td><td>Backport MeetMe related reference leaks fixes from 1.6.2/1.8/trunk.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=304952">304952</a></td><td>tilghman</td><td>Fix compilation when ODBC_STORAGE is defined.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=305129">305129</a></td><td>qwell</td><td>Set file descriptors to -1 on creation, so that we don't see weirdness later.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=305341">305341</a></td><td>rmudgett</td><td>Obtain the pri lock for PRI queue counters.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=305888">305888</a></td><td>rmudgett</td><td>Minor AST_FRAME_TEXT related issues.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=306119">306119</a></td><td>twilson</td><td>Set hangup cause in local_hangup</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=306617">306617</a></td><td>twilson</td><td>Don't allow a REFER w/replaces to replace its own dialog</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=306672">306672</a></td><td>twilson</td><td>Don't try to pickup a call in the middle of a masquerade</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=306864">306864</a></td><td>jpeeler</td><td>make this safer and fully correct, pointed out by Steve Davis</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=306964">306964</a></td><td>jpeeler</td><td>clean this up, sorry my brain is not really working</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=306965">306965</a></td><td>jpeeler</td><td>fix this line again</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=306972">306972</a></td><td>twilson</td><td>Fix comparison for REFER Replaces tags with pedantic=yes</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=307534">307534</a></td><td>qwell</td><td>Remove color when executing commands via a remote console.</td>
-<td><a href="https://issues.asterisk.org/view.php?id=18776">#18776</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=307623">307623</a></td><td>rmudgett</td><td>Reentrancy problem if outgoing call gets different B channel than requested.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=308413">308413</a></td><td>mnicholson</td><td>Properly check the bounds of arrays when decoding UDPTL packets. Also, remove broken support for receiving UDPTL packets larger than 16k. That shouldn't ever happen anyway.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315203">315203</a></td><td>lmadsen</td><td>Create Asterisk 1.4.41 from 1.4.41-rc1</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315204">315204</a></td><td>lmadsen</td><td>Merge changes for AST-2011-005 and AST-2011-006, update .version and ChangeLog</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315205">315205</a></td><td>lmadsen</td><td>Merge changes for AST-2011-005 and AST-2011-006</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315206">315206</a></td><td>lmadsen</td><td>Importing release summary for 1.4.41 release.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315207">315207</a></td><td>lmadsen</td><td>Remove incorrect summary files in preparation for rebuilding.</td>
-<td></td></tr></table>
-<hr/>
-<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
-<pre>
-.version | 2
-ChangeLog | 14
-apps/app_dial.c | 6
-apps/app_meetme.c | 28 -
-apps/app_queue.c | 58 ++
-apps/app_sendtext.c | 2
-apps/app_voicemail.c | 64 ++
-asterisk-1.4.41-rc1-summary.html | 242 -----------
-asterisk-1.4.41-rc1-summary.txt | 356 ----------------
-channels/chan_dahdi.c | 468 ++++++++++++++++-----
-channels/chan_local.c | 1
-channels/chan_sip.c | 234 ++++++++++
-channels/chan_skinny.c | 75 +++
-configs/http.conf.sample | 7
-configs/manager.conf.sample | 11
-configs/queues.conf.sample | 2
-configs/skinny.conf.sample | 9
-configure.ac | 6
-include/asterisk/astdb.h | 21
-include/asterisk/autoconfig.h.in | 53 +-
-include/asterisk/channel.h | 23 +
-main/asterisk.c | 2
-main/channel.c | 40 +
-main/http.c | 25 +
-main/manager.c | 87 +++-
-main/pbx.c | 26 -
-main/udptl.c | 54 +-
-res/res_features.c | 844 +++++++++++++++++++++++++++------------
-res/res_musiconhold.c | 7
-29 files changed, 1677 insertions(+), 1090 deletions(-)
-</pre><br/>
-<hr/>
-</body>
-</html>
|
[-]
[+]
|
Deleted |
asterisk-1.4.41.tar.bz2/asterisk-1.4.41-summary.txt
^
|
@@ -1,384 +0,0 @@
- Release Summary
-
- asterisk-1.4.41
-
- Date: 2011-04-25
-
- <asteriskteam@digium.com>
-
- ----------------------------------------------------------------------
-
- Table of Contents
-
- 1. Summary
- 2. Contributors
- 3. Closed Issues
- 4. Other Changes
- 5. Diffstat
-
- ----------------------------------------------------------------------
-
- Summary
-
- [Back to Top]
-
- This release includes only bug fixes. The changes included were made only
- to address problems that have been identified in this release series.
- Users should be able to safely upgrade to this version if this release
- series is already in use. Users considering upgrading from a previous
- release series are strongly encouraged to review the UPGRADE.txt document
- as well as the CHANGES document for information about upgrading to this
- release series.
-
- The data in this summary reflects changes that have been made since the
- previous release, asterisk-1.4.40.
-
- ----------------------------------------------------------------------
-
- Contributors
-
- [Back to Top]
-
- This table lists the people who have submitted code, those that have
- tested patches, as well as those that reported issues on the issue tracker
- that were resolved in this release. For coders, the number is how many of
- their patches (of any size) were committed into this release. For testers,
- the number is the number of times their name was listed as assisting with
- testing a patch. Finally, for reporters, the number is the number of
- issues that they reported that were closed by commits that went into this
- release.
-
- Coders Testers Reporters
- 12 rmudgett 7 rmudgett 1 bluefox
- 8 jpeeler 2 wimpy 1 gbour
- 7 qwell 1 jacco 1 gelo
- 6 lmadsen 1 lmadsen 1 gincantalupo
- 6 twilson 1 loloski 1 grecco
- 4 mnicholson 1 oej 1 iskatel
- 2 russell 1 qwell 1 jacco
- 2 seanbright 1 russell 1 JJCinAZ
- 2 tilghman 1 wedhorn 1 jvandal
- 1 gbour 1 kerframil
- 1 mmichelson 1 mcallist
- 1 oej
- 1 shawkris
- 1 shihchuan
- 1 vrban
- 1 wimpy
-
- ----------------------------------------------------------------------
-
- Closed Issues
-
- [Back to Top]
-
- This is a list of all issues from the issue tracker that were closed by
- changes that went into this release.
-
- Category: Applications/app_dial
-
- #18264: [patch] Dail L(x) shows "Setting call duration limit to x seconds"
- in CLI
- Revision: 302916
- Reporter: jacco
- Testers: lmadsen, jacco
- Coders: lmadsen
-
- #18379: attended transfer weird behaviour
- Revision: 302671
- Reporter: gincantalupo
- Testers: rmudgett
- Coders: rmudgett
-
- Category: Applications/app_queue
-
- #18747: [regression] changeset 298596 harm the ring/moh logic in queues
- Revision: 308002
- Reporter: vrban
- Coders: qwell
-
- Category: Applications/app_voicemail
-
- #18486: [patch] Voicemail files out of sequence
- Revision: 303676
- Reporter: bluefox
- Coders: jpeeler
-
- #18498: [patch] [regression] Resequencing of mailbox not working as
- expected.
- Revision: 303676
- Reporter: JJCinAZ
- Coders: jpeeler
-
- Category: Applications/app_voicemail/IMAP
-
- #18718: [regression] Implicit declaration of copy yields broken
- app_voicemail when building with IMAP support
- Revision: 306960
- Reporter: kerframil
- Coders: jpeeler
-
- Category: Channels/General
-
- #18585: [patch] AMI redirect from meetme - calls fail
- Revision: 303546
- Reporter: oej
- Testers: oej, wedhorn, russell
- Coders: russell
-
- Category: Channels/chan_dahdi
-
- #17085: [patch] [regression] Overlap dialing to PSTN failing after #16789
- Revision: 303765
- Reporter: shawkris
- Testers: wimpy, rmudgett
- Coders: rmudgett
-
- #17273: atxfer *2 channel dahdi FXS no hangup
- Revision: 302172
- Reporter: grecco
- Testers: rmudgett
- Coders: rmudgett
-
- #18509: [patch] Sending out unnecessary PROCEEDING messages breaks overlap
- dialing
- Revision: 303765
- Reporter: wimpy
- Testers: wimpy, rmudgett
- Coders: rmudgett
-
- Category: Channels/chan_sip/General
-
- #18371: [patch] asterisk crash when dialing SIP/${var} where var is empty
- or not set
- Revision: 305252
- Reporter: gbour
- Coders: gbour
-
- Category: Core/PBX
-
- #17999: Issues with DTMF triggered attended transfers
- Revision: 302172
- Reporter: iskatel
- Testers: rmudgett
- Coders: rmudgett
-
- Category: Features
-
- #18395: C should not receive request call again after C cancel if B blind
- transfer using atxfer call C
- Revision: 302172
- Reporter: shihchuan
- Testers: rmudgett
- Coders: rmudgett
-
- Category: Resources/res_features
-
- #17096: C keeps ringing when hanging A and B after blind transfer using
- atxfer
- Revision: 302172
- Reporter: gelo
- Testers: rmudgett
- Coders: rmudgett
-
- #18637: [patch] No MOH on Call Park and Exceptionally long voice queue
- length ...
- Revision: 306120
- Reporter: jvandal
- Coders: jpeeler
-
- Category: Resources/res_musiconhold
-
- #18457: [patch] moh reload leaks file descriptors to dahdi timing channel
- Revision: 305471
- Reporter: mcallist
- Testers: qwell, loloski
- Coders: qwell
-
- ----------------------------------------------------------------------
-
- Commits Not Associated with an Issue
-
- [Back to Top]
-
- This is a list of all changes that went into this release that did not
- directly close an issue from the issue tracker. The commits may have been
- marked as being related to an issue. If that is the case, the issue
- numbers are listed here, as well.
-
- +------------------------------------------------------------------------+
- | Revision | Author | Summary | Issues |
- | | | | Referenced |
- |----------+------------+-------------------------------+----------------|
- | 302087 | twilson | Only offer codecs both sides | |
- | | | support for directmedia | |
- |----------+------------+-------------------------------+----------------|
- | 302311 | mnicholson | URI encode the user part of | |
- | | | the contact header. | |
- |----------+------------+-------------------------------+----------------|
- | 302663 | tilghman | Add some API documentation | |
- |----------+------------+-------------------------------+----------------|
- | | | Add new queue strategy to | |
- | 303007 | jpeeler | preserve behavior for when | |
- | | | queue members moved to ao2. | |
- |----------+------------+-------------------------------+----------------|
- | 303284 | qwell | Reset configuration before | |
- | | | parsing users.conf. | |
- |----------+------------+-------------------------------+----------------|
- | | | Fix a couple of mistakes in | |
- | 303552 | russell | the backport of this patch to | |
- | | | 1.4. | |
- |----------+------------+-------------------------------+----------------|
- | 303747 | rmudgett | Backport the Proceeding | #17085, #18509 |
- | | | application. | |
- |----------+------------+-------------------------------+----------------|
- | 303906 | twilson | Guard against retransmitting | |
- | | | BYEs indefinitely | |
- |----------+------------+-------------------------------+----------------|
- | | | DTMF attended transfers | |
- | 304005 | rmudgett | sometimes fail for no | |
- | | | apparent reason. | |
- |----------+------------+-------------------------------+----------------|
- | | | Make sure the sample | |
- | 304159 | seanbright | queues.conf is properly | |
- | | | commented. | |
- |----------+------------+-------------------------------+----------------|
- | | | This patch modifies chan_sip | |
- | | | to route responses to the | |
- | 304241 | mnicholson | address the request came | |
- | | | from. It also modifies | |
- | | | chan_sip to respect the maddr | |
- | | | parameter in the Via header. | |
- |----------+------------+-------------------------------+----------------|
- | 304242 | mmichelson | Get rid of unused 'verbose' | |
- | | | field in ast_udptl | |
- |----------+------------+-------------------------------+----------------|
- | | | Convert from network to host | |
- | 304247 | mnicholson | byte ordering before checking | |
- | | | if an IP is a multicast | |
- | | | address. | |
- |----------+------------+-------------------------------+----------------|
- | | | Rerun bootstrap.sh with no | |
- | 304460 | qwell | changes, so that it is more | |
- | | | obvious what my next commit | |
- | | | changes. | |
- |----------+------------+-------------------------------+----------------|
- | | | Fix default prefix=/usr | |
- | 304464 | qwell | regression on non-Linux | #17013 |
- | | | systems. | |
- |----------+------------+-------------------------------+----------------|
- | | | Backport MeetMe related | |
- | 304820 | seanbright | reference leaks fixes from | |
- | | | 1.6.2/1.8/trunk. | |
- |----------+------------+-------------------------------+----------------|
- | 304952 | tilghman | Fix compilation when | |
- | | | ODBC_STORAGE is defined. | |
- |----------+------------+-------------------------------+----------------|
- | | | Set file descriptors to -1 on | |
- | 305129 | qwell | creation, so that we don't | |
- | | | see weirdness later. | |
- |----------+------------+-------------------------------+----------------|
- | 305341 | rmudgett | Obtain the pri lock for PRI | |
- | | | queue counters. | |
- |----------+------------+-------------------------------+----------------|
- | 305888 | rmudgett | Minor AST_FRAME_TEXT related | |
- | | | issues. | |
- |----------+------------+-------------------------------+----------------|
- | 306119 | twilson | Set hangup cause in | |
- | | | local_hangup | |
- |----------+------------+-------------------------------+----------------|
- | | | Don't allow a REFER | |
- | 306617 | twilson | w/replaces to replace its own | |
- | | | dialog | |
- |----------+------------+-------------------------------+----------------|
- | 306672 | twilson | Don't try to pickup a call in | |
- | | | the middle of a masquerade | |
- |----------+------------+-------------------------------+----------------|
- | | | make this safer and fully | |
- | 306864 | jpeeler | correct, pointed out by Steve | |
- | | | Davis | |
- |----------+------------+-------------------------------+----------------|
- | 306964 | jpeeler | clean this up, sorry my brain | |
- | | | is not really working | |
- |----------+------------+-------------------------------+----------------|
- | 306965 | jpeeler | fix this line again | |
- |----------+------------+-------------------------------+----------------|
- | | | Fix comparison for REFER | |
- | 306972 | twilson | Replaces tags with | |
- | | | pedantic=yes | |
- |----------+------------+-------------------------------+----------------|
- | | | Remove color when executing | |
- | 307534 | qwell | commands via a remote | #18776 |
- | | | console. | |
- |----------+------------+-------------------------------+----------------|
- | | | Reentrancy problem if | |
- | 307623 | rmudgett | outgoing call gets different | |
- | | | B channel than requested. | |
- |----------+------------+-------------------------------+----------------|
- | | | Properly check the bounds of | |
- | | | arrays when decoding UDPTL | |
- | 308413 | mnicholson | packets. Also, remove broken | |
- | | | support for receiving UDPTL | |
- | | | packets larger than 16k. That | |
- | | | shouldn't ever happen anyway. | |
- |----------+------------+-------------------------------+----------------|
- | 315203 | lmadsen | Create Asterisk 1.4.41 from | |
- | | | 1.4.41-rc1 | |
- |----------+------------+-------------------------------+----------------|
- | | | Merge changes for | |
- | 315204 | lmadsen | AST-2011-005 and | |
- | | | AST-2011-006, update .version | |
- | | | and ChangeLog | |
- |----------+------------+-------------------------------+----------------|
- | 315205 | lmadsen | Merge changes for | |
- | | | AST-2011-005 and AST-2011-006 | |
- |----------+------------+-------------------------------+----------------|
- | 315206 | lmadsen | Importing release summary for | |
- | | | 1.4.41 release. | |
- |----------+------------+-------------------------------+----------------|
- | | | Remove incorrect summary | |
- | 315207 | lmadsen | files in preparation for | |
- | | | rebuilding. | |
- +------------------------------------------------------------------------+
-
- ----------------------------------------------------------------------
-
- Diffstat Results
-
- [Back to Top]
-
- This is a summary of the changes to the source code that went into this
- release that was generated using the diffstat utility.
-
- .version | 2
- ChangeLog | 14
- apps/app_dial.c | 6
- apps/app_meetme.c | 28 -
- apps/app_queue.c | 58 ++
- apps/app_sendtext.c | 2
- apps/app_voicemail.c | 64 ++
- asterisk-1.4.41-rc1-summary.html | 242 -----------
- asterisk-1.4.41-rc1-summary.txt | 356 ----------------
- channels/chan_dahdi.c | 468 ++++++++++++++++-----
- channels/chan_local.c | 1
- channels/chan_sip.c | 234 ++++++++++
- channels/chan_skinny.c | 75 +++
- configs/http.conf.sample | 7
- configs/manager.conf.sample | 11
- configs/queues.conf.sample | 2
- configs/skinny.conf.sample | 9
- configure.ac | 6
- include/asterisk/astdb.h | 21
- include/asterisk/autoconfig.h.in | 53 +-
- include/asterisk/channel.h | 23 +
- main/asterisk.c | 2
- main/channel.c | 40 +
- main/http.c | 25 +
- main/manager.c | 87 +++-
- main/pbx.c | 26 -
- main/udptl.c | 54 +-
- res/res_features.c | 844 +++++++++++++++++++++++++++------------
- res/res_musiconhold.c | 7
- 29 files changed, 1677 insertions(+), 1090 deletions(-)
-
- ----------------------------------------------------------------------
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/.version
^
|
@@ -1 +1 @@
-1.4.41
+1.4.42
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/ChangeLog
^
|
@@ -1,3 +1,580 @@
+2011-06-28 Leif Madsen <lmadsen@digium.com>
+
+ * Asterisk 1.4.42 Released.
+
+2011-06-28 20:03 +0000 [r325275] Terry Wilson <twilson@digium.com>
+
+ * channels/chan_sip.c: Don't leak SIP username information
+
+2011-06-23 18:16 +0000 [r324627] David Vossel <dvossel@digium.com>
+
+ * res/res_features.c, channels/chan_iax2.c: Addresses AST-2011-010,
+ remote crash in IAX2 driver Thanks to twilson for identifying the
+ issue and providing the patches. AST-2011-010
+
+2011-06-15 18:06 +0000 [r323732] Terry Wilson <twilson@digium.com>
+
+ * res/res_features.c: Fix DYNAMIC_FEATURES DYNAMIC_FEATURES were
+ broken by a recent DTMF change. This patch makes sure that
+ dynamic features are also checked when deciding whether or not to
+ pass DTMF through or store it for interpreting. (closes issue
+ ASTERISK-17914) Reported by: vrban
+
+2011-06-15 15:15 +0000 [r323559] Sean Bright <sean@malleable.com>
+
+ * main/manager.c: Resolve a segfault/bus error when we try to map
+ memory that falls on a page boundary. The fix for ASTERISK-15359
+ was incorrect in that it added 1 to the length of the mmap'd
+ region. The problem with this is that reading/writing to that
+ extra byte outside of the bounds of the underlying fd causes a
+ bus error. The real issue is that we are working with both a FILE
+ * and the raw fd underneath it and not synchronizing between
+ them. The code that was removed in ASTERISK-15359 was correct,
+ but we weren't flushing the FILE * before mapping the fd. Looking
+ at the manager code in 1.4 reveals that the FILE * in 'struct
+ mansession' is never used except to create a temporary file that
+ we immediately fdopen. This means we just need to write a 0 byte
+ to the fd and everything will just work. The other branches
+ require a call to fflush() which, while not a guaranteed fix,
+ should reduce the likelihood of a crash. This all makes sense in
+ my head. (closes issue ASTERISK-16460) Reported by:
+ Ravelomanantsoa Hoby (hoby) Patches:
+ issue17747_1.4_svn_markII.patch uploaded by Sean Bright (license
+ #5060)
+
+2011-06-09 15:36 +0000 [r322646-322698] Matthew Nicholson <mnicholson@digium.com>
+
+ * channels/chan_sip.c: unlock pvt when we drop voice frames
+ received in early media when in t.38 mode
+
+ * channels/chan_sip.c: whitespace
+
+ * channels/chan_sip.c: don't drop any voice frames when checking
+ for T.38 during early media (closes issue ASTERISK-17705) Review:
+ https://reviewboard.asterisk.org/r/1186/ patch by oej reported by
+ oej
+
+2011-05-21 05:09 +0000 [r320393] Paul Belanger <pabelanger@digium.com>
+
+ * cdr/cdr_pgsql.c: Solaris compatibility fixes
+
+2011-05-20 20:38 +0000 [r320235] Richard Mudgett <rmudgett@digium.com>
+
+ * apps/app_meetme.c: The meetme CLI command completion leaves
+ conferences mutex locked. When issuing a meetme kick CLI command
+ and an invalid (non-existent) conference number is specified,
+ pressing Tab leaves the conferences mutex locked and, therefore,
+ all conferences deadlock. Add missing unlock. (closes issue
+ #19336) Reported by: zvision Patches: app_meetme.diff uploaded by
+ zvision (license 798)
+
+2011-05-20 16:38 +0000 [r320055] David Vossel <dvossel@digium.com>
+
+ * channels/chan_sip.c: chan_sip: Destroy variables on a sip_pvt
+ before copying vars from the sip_peer. (closes issue #19202)
+ Reported by: wdoekes Patches:
+ issue19202_destroy_challenged_invite_chanvars.patch uploaded by
+ wdoekes (license 717)
+
+2011-05-18 23:04 +0000 [r319527-319652] Terry Wilson <twilson@digium.com>
+
+ * channels/chan_sip.c: Make sure everyone gets an unhold when a
+ transfer succeeds Some phones, like the Snom phones, send a hold
+ to the transfer target after before sending the REFER. We need to
+ make sure that we unhold the parties that are being connected
+ after the masquerade. If Local channels with the /nm option are
+ used when dialing the parties, hold music would still be playing
+ on the transfer target, even after being connected with the
+ transferee.
+
+ * apps/app_dial.c: Fix app_dial ring groups Revert part of r315643.
+ We need to remove the datastore here as well. The code in
+ bridging code will catch anything that app_dial might miss.
+ (closes issue #19311) Reported by: mspuhler Patches:
+ issue_19311_no_answer.diff uploaded by elguero (license 37)
+
+2011-05-13 01:09 +0000 [r318734] Richard Mudgett <rmudgett@digium.com>
+
+ * channels/chan_sip.c, res/res_features.c,
+ apps/app_directed_pickup.c: Merged revisions 318671 via svnmerge
+ from https://origsvn.digium.com/svn/asterisk/branches/1.8 * The
+ applicable fixes for v1.4 are the SIP deadlock and the in
+ progress masquerade check for multiple parties trying to pickup
+ the same call. issue18654_v1.4.patch uploaded by rmudgett
+ (license 664) * Backported to v1.6.2. issue18654_v1.6.2.patch
+ uploaded by rmudgett (license 664) ........ r318671 | alecdavis |
+ 2011-05-13 10:52:08 +1200 (Fri, 13 May 2011) | 30 lines Fix
+ directed group pickup feature code *8 with pickupsounds enabled
+ Since 1.6.2, the new pickupsound and pickupfailsound in
+ features.conf cause many issues. 1).
+ chan_sip:handle_request_invite() shouldn't be playing out the
+ fail/success audio, as it has 'netlock' locked. 2). dialplan
+ applications for directed_pickups shouldn't beep. 3). feature
+ code for directed pickup should beep on success/failure if
+ configured. Created a sip_pickup() thread to handle the pickup
+ and playout the audio, spawned from handle_request_invite. Moved
+ app_directed:pickup_do() to features:ast_do_pickup(). Functions
+ below, all now use the new ast_do_pickup() app_directed_pickup.c:
+ pickup_by_channel() pickup_by_exten() pickup_by_mark()
+ pickup_by_part() features.c: ast_pickup_call() (closes issue
+ #18654) Reported by: Docent Patches:
+ ast_do_pickup_1.8_trunk.diff.txt uploaded by alecdavis (license
+ 585) Tested by: lmadsen, francesco_r, amilcar, isis242,
+ alecdavis, irroot, rymkus, loloski, rmudgett Review:
+ https://reviewboard.asterisk.org/r/1185/ ........
+
+2011-05-06 17:59 +0000 [r317719] Richard Mudgett <rmudgett@digium.com>
+
+ * channels/chan_sip.c: Regression after r297603 (Improve handling
+ of REGISTER requests with multiple contact headers.)
+ Uninitialized variable. (issue #18640) (closes issue #18785)
+ Reported by: pnlarsson Patches: issue18785_enegaard.patch
+ uploaded by enegaard (license 1197)
+
+2011-05-06 07:55 +0000 [r317574] Terry Wilson <twilson@digium.com>
+
+ * apps/app_queue.c: Re-fix queue round-robin This part of the
+ change for r315596 was incorrect. No bridge occurs when doing a
+ roundrobin dial and no one answers, so this code shouldn't have
+ been removed.
+
+2011-05-05 18:20 +0000 [r317211] Russell Bryant <russell@digium.com>
+
+ * channels/chan_sip.c: chan_sip: fix broken realtime peer count,
+ fix memory leak This patch addresses two bugs in chan_sip: 1) The
+ count of realtime peers and users was off. The increment checked
+ the value of the caching option, while the decrement did not. 2)
+ Add a missing regfree() for a regex. (closes issue #19108)
+ Reported by: vrban Patches: missing_regfree.patch uploaded by
+ vrban (license 756) sip_object_counter.patch uploaded by vrban
+ (license 756)
+
+2011-05-05 14:54 +0000 [r317102] Leif Madsen <lmadsen@digium.com>
+
+ * contrib/scripts/safe_asterisk: Disable console colourization
+ inside safe_asterisk checks. (closes issue #19213) Reported by:
+ lefoyer Patches:
+ issue19213_strip_color_in_safe_asterisk-svn.patch uploaded by
+ wdoekes (license 717) Tested by: wdoekes, lefoyer
+
+2011-05-04 16:08 +0000 [r316707] Sean Bright <sean@malleable.com>
+
+ * apps/app_voicemail.c: If sox fails when processing a voicemail,
+ don't delete the original file. (closes issue #18111) Reported
+ by: sysreq Patches: issue18111_trunk.patch uploaded by seanbright
+ (license 71) Tested by: seanbright
+
+2011-05-03 21:27 +0000 [r316328] David Vossel <dvossel@digium.com>
+
+ * channels/chan_local.c: Fixes chan_local crashs in local_fixup()
+ Thanks OEJ for tracking down the issue and submitting the patch.
+ (closes issue #19053) Reported by: oej Tested by: oej Review:
+ https://reviewboard.asterisk.org/r/1158/
+
+2011-05-02 18:25 +0000 [r316089] Tilghman Lesher <tilghman@meg.abyt.es>
+
+ * configure, configure.ac: Breakage from slightly before the
+ outage; would have fixed sooner but for the outage.
+
+2011-04-27 21:20 +0000 [r316006] Tilghman Lesher <tilghman@meg.abyt.es>
+
+ * configure, include/asterisk/autoconfig.h.in, configure.ac:
+ Backport the use of curl from 1.6.2 to make the 1.4 target work
+ on Bamboo.
+
+2011-04-27 20:54 +0000 [r315989] Sean Bright <sean@malleable.com>
+
+ * channels/chan_sip.c: Partial revert of r315671 which removed a
+ logging statement and not a manager event. Reported by ibercom in
+ #asterisk-bugs. (issue #16033)
+
+2011-04-27 18:57 +0000 [r315891] Matthew Nicholson <mnicholson@digium.com>
+
+ * channels/chan_sip.c: Fix our compliance with RFC 3261 section
+ 18.2.2. This change optimizes the free_via() function and removes
+ some redundant null checking. It also fixes compliance with RFC
+ 3261 section 18.2.2 by always using the port specified in the Via
+ header for routing responses (even when maddr is not set). Also
+ the htons() function is now used when setting the port.
+ Additional documentation comments have been added in various
+ places to make the logic in the code clearer. (closes issue
+ #18951) Reported by: jmls Patches:
+ issue18951_set_proper_port_from_via.patch uploaded by wdoekes
+ (license 717) (modified)
+
+2011-04-26 22:47 +0000 [r315596-315671] Terry Wilson <twilson@digium.com>
+
+ * channels/chan_sip.c: Make sure unregistering a peer unlinks it
+ from the peer container Instead of mostly copying the code from
+ expire_register, just use the function that "does the right
+ thing". (closes issue #16033) Reported by: kkm Patches:
+ 016033-tilgman-fixed-refcount.diff uploaded by kkm (license 888)
+ Tested by: kkm, tilghman, twilson
+
+ * apps/app_dial.c, res/res_features.c, apps/app_queue.c: Allow
+ transfer loops without allowing forwarding loops We try to avoid
+ the situation where two phones may be forwarded to each other
+ causing an infinite loop by storing each dialed interface in a
+ channel datastore and checking the list before dialing out. This
+ works, but currently breaks situations like A calls B, A
+ transfers B to C, B transfers C to A, and A transfers C to B.
+ Since human interaction is happening here and not an automated
+ forwarding loop, it should be allowed. This patch removes the
+ dialed_interfaces datastore when a call is bridged (a suggestion
+ from the brilliant mmichelson). If a call is being bridged, it
+ should be safe to assume that we aren't stuck in a loop. Since we
+ are now handling this is the bridge code, the previous attempts
+ at handling it in app_dial and app_queue are removed. Review:
+ https://reviewboard.asterisk.org/r/1195/
+
+2011-04-26 19:18 +0000 [r315501] Tilghman Lesher <tilghman@meg.abyt.es>
+
+ * include/asterisk/select.h: Fix the bounds-checking code. The code
+ that set the bit within the select bitfield was correct, but the
+ bounds-checking code was not. The change to that line uses the
+ new _bitsize macro for clarity. Also, FD_ZERO macro did not
+ zero-out anything but the first word of the bitfield, so this
+ could have caused problems with modules using that macro with the
+ expanded bitfield. (closes issue #18773) Reported by: jamicque
+ Patches: 20110423__issue18773.diff.txt uploaded by tilghman
+ (license 14) Tested by: chris-mac
+
+2011-04-25 19:28 +0000 [r315257] Russell Bryant <russell@digium.com>
+
+ * formats/format_wav.c: Be more flexible with unknown chunks in wav
+ files. This patch makes format_wav ignore unknown chunks instead
+ of erroring out on them. (closes issue #18306) Reported by:
+ jhirsch Patches: wav_skip_unknown_blocks.diff uploaded by jhirsch
+ (license 1156)
+
+2011-04-25 16:14 +0000 [r315147] Matthew Nicholson <mnicholson@digium.com>
+
+ * main/manager.c: Reverted part of r314607, as it can introduce a
+ regression. Specifically, the security check for the "system"
+ privilege was removed. If a user had the "call" privilege but not
+ the "system" privilege, they would loose the ability to execute
+ the system app and dialplan functions that run commands in a
+ shell. This branch never used the "system" privilege for that
+ purpose and did not need to be patched. AST-2011-006 (related to
+ issue 0018787) Reported by: kobaz
+
+2011-04-25 07:06 +0000 [r315051] Alec L Davis <sivad.a@paradise.net.nz>
+
+ * channels/chan_local.c: chan_local:check_bridge() misplaced
+ misplaced ast_mutex_unlock if !p->chan->_bridge->_softhangup path
+ isn't followed, brigde remains locked. (closes issue #19176)
+ Reported by: alecdavis Patches: bug19176.diff.txt uploaded by
+ alecdavis (license 585)
+
+2011-04-22 20:01 +0000 [r314908] Matthew Nicholson <mnicholson@digium.com>
+
+ * channels/chan_agent.c: Prevent the login thread and the app
+ threads from using the asterisk channel at the same time.
+ ABE-2756
+
+2011-04-22 14:34 +0000 [r314822] Russell Bryant <russell@digium.com>
+
+ * res/res_agi.c: Initialize buffers in getvar and getvarfull.
+ Initialize the buffers used to hold the result from GET VARIABLE
+ or GET VARIABLE FULL. The bug report shows func_read returning
+ garbage in the result. It assumed that the buffer passed in was
+ initialized, like many other functions do. In the more common
+ code path (through the dialplan), it is initialized, so just
+ initialize it here too. (closes issue #19050) Reported by: johnz
+
+2011-04-21 18:19 +0000 [r314607] Matthew Nicholson <mnicholson@digium.com>
+
+ * configs/http.conf.sample, main/manager.c, channels/chan_skinny.c,
+ main/http.c, configs/skinny.conf.sample: Added limits to the
+ number of unauthenticated sessions TCP based protocols are
+ allowed to have open simultaneously. Also added timeouts for
+ unauthenticated sessions where it made sense to do so. Unrelated,
+ the manager interface now properly checks if the user has the
+ "system" privilege before executing shell commands via the
+ Originate action. AST-2011-005 AST-2011-006 (closes issue #18787)
+ Reported by: kobaz (related to issue #18996) Reported by: tzafrir
+
+2011-04-19 18:37 +0000 [r314300] Alec L Davis <sivad.a@paradise.net.nz>
+
+ * apps/app_voicemail.c: app_voicemail: Fix ODBC Storage compile
+ regression caused by me, from mantis bug #19032 / commit r312070
+ (closes issue #19142) Reported by: vrban Patches:
+ app_voicemail_fix_for_312070.patch uploaded by vrban (license
+ 756) Tested by: vrban, alecdavis
+
+2011-04-13 16:21 +0000 [r313545] Richard Mudgett <rmudgett@digium.com>
+
+ * main/channel.c, res/res_agi.c: Asterisk does not hangup a channel
+ after endpoint hangs up. If the call that the dialplan started an
+ AGI script for is hungup while the AGI script is in the middle of
+ a command then the AGI script is not notified of the hangup.
+ There are many AGI Exec commands that this can happen with. The
+ reported applications have been: Background, Wait, Read, and
+ Dial. Also the AGI Get Data command. * Don't wait on the Asterisk
+ channel after it has hung up. The channel is likely to never need
+ servicing again. * Restored the AGI script's ability to return
+ the AGI_RESULT_HANGUP value in run_agi(). It previously only
+ could return AGI_RESULT_SUCCESS or AGI_RESULT_FAILURE after the
+ DeadAGI and AGI applications were merged. (closes issue #17954)
+ Reported by: mn3250 Patches: issue17954_v1.8.patch uploaded by
+ rmudgett (license 664) issue17954_v1.6.2.patch uploaded by
+ rmudgett (license 664) issue17954_v1.4.patch uploaded by rmudgett
+ (license 664) Tested by: rmudgett JIRA SWP-2171 (closes issue
+ #18492) Reported by: devmod Tested by: rmudgett JIRA SWP-2761
+ (closes issue #18935) Reported by: nvitaly Tested by: astmiv,
+ rmudgett JIRA SWP-3216 (closes issue #17393) Reported by: siby
+ Tested by: rmudgett JIRA SWP-2727 Review:
+ https://reviewboard.asterisk.org/r/1165/
+
+2011-04-11 19:30 +0000 [r313277] Leif Madsen <lmadsen@digium.com>
+
+ * configure, include/asterisk/autoconfig.h.in, configure.ac: Fix
+ detection of OpenSSL 1.0 (closes issue #19093) Reported by:
+ tzafrir Patches: detect_openssl_10.diff uploaded by tzafrir
+ (license 46)
+
+2011-04-11 15:27 +0000 [r313188] Richard Mudgett <rmudgett@digium.com>
+
+ * channels/chan_dahdi.c: Stuck channel using FEATD_MF if caller
+ hangs up at the right time. The cause was actually a caller
+ hanging up just at the end of the Feature Group D DTMF tones that
+ setup the call. The reason for this is a "guard timer" that's
+ implemented using ast_safe_sleep(100). If the caller happens to
+ hang up AFTER the final tone of the DTMF string but BEFORE the
+ end of that ast_safe_sleep(), then ast_safe_sleep() will return
+ non-zero. This causes the code to bounce to the end of
+ ss_thread(), but it does NOT tear down the call properly. This
+ should be a rare occurrence because the caller has to hang up at
+ EXACTLY the right time. Nonetheless, it was happening quite
+ regularly on the reporter's system. It's not easily reproducible,
+ unless you purposely increase the guard-time to 2000 or more.
+ Once you do that, you can reproduce it every time by watching the
+ DTMF debug and hanging up just as it ends. Simply add an
+ ast_hangup() before goto quit. (closes issue #15671) Reported by:
+ jcromes Patches: issue15671.patch uploaded by pabelanger (license
+ 224) Tested by: jcromes
+
+2011-04-05 14:10 +0000 [r312761] Matthew Nicholson <mnicholson@digium.com>
+
+ * main/manager.c, configs/manager.conf.sample: Limit the number of
+ unauthenticated manager sessions and also limit the time they
+ have to authenticate. AST-2011-005 (closes issue #18996) Reported
+ by: tzafrir Tested by: mnicholson
+
+2011-04-04 15:49 +0000 [r312573] Richard Mudgett <rmudgett@digium.com>
+
+ * channels/chan_dahdi.c, configure,
+ include/asterisk/autoconfig.h.in, configure.ac: Issues with ISDN
+ calls changing B channels during call negotiations. The handling
+ of the PROCEEDING message was not using the correct call
+ structure if the B channel was changed. (The same for PROGRESS.)
+ The call was also not hungup if the new B channel is not
+ provisioned or is busy. * Made all call connection messages
+ (SETUP_ACKNOWLEDGE, PROCEEDING, PROGRESS, ALERTING, CONNECT,
+ CONNECT_ACKNOWLEDGE) ensure that they are using the correct
+ structure and B channel. If there is any problem with the
+ operations then the call is now hungup with an appropriate cause
+ code. * Made miscellaneous messages (INFORMATION, FACILITY,
+ NOTIFY) find the correct structure by looking for the call and
+ not using the channel ID. NOTIFY is an exception with versions of
+ libpri before v1.4.11 because a call pointer is not available for
+ Asterisk to use. * Made all hangup messages (DISCONNECT, RELEASE,
+ RELEASE_COMPLETE) find the correct structure by looking for the
+ call and not using the channel ID. (closes issue #18313) Reported
+ by: destiny6628 Tested by: rmudgett JIRA SWP-2620 (closes issue
+ #18231) Reported by: destiny6628 Tested by: rmudgett JIRA
+ SWP-2924 (closes issue #18488) Reported by: jpokorny JIRA
+ SWP-2929 JIRA AST-437 (The issues fixed here are most likely
+ causing this JIRA issue.) JIRA DAHDI-406 JIRA LIBPRI-33 (Stuck
+ resetting flag likely fixed)
+
+2011-04-01 11:02 +0000 [r312290] Alec L Davis <sivad.a@paradise.net.nz>
+
+ * apps/app_voicemail.c: app_voicemail: leave_vociemail doesn't use
+ last_message_index to store next message trivial change to bring
+ inline with 1.6.2 1.8 and trunk. The symptom was if msg0000 was
+ missing, and the last was msg0004, the next msgnum would be
+ msg0000 when it should have been msg0005 (issue #18998) Reported
+ by: tootai Patches: bug18998.diff2.txt uploaded by alecdavis
+ (license 585) Tested by: alecdavis
+
+2011-04-01 10:36 +0000 [r312285] Tilghman Lesher <tilghman@meg.abyt.es>
+
+ * main/asterisk.c, include/asterisk/select.h: Found some leaking
+ file descriptors while looking at ast_FD_SETSIZE dead code.
+ (issue #18969) Reported by: oej Patches:
+ 20110315__issue18969__14.diff.txt uploaded by tilghman (license
+ 14)
+
+2011-04-01 08:29 +0000 [r312070-312174] Alec L Davis <sivad.a@paradise.net.nz>
+
+ * apps/app_voicemail.c: voicemail: get real last_message_index and
+ count_messages, ODBC resequence change last_message_index to read
+ the max msgnum stored in the database change count_messages to
+ actually count the number of messages. last_message_index change:
+ This fixed overwriting of the last message if msgnum=0 was
+ missing. Previously every incoming message would overwrite
+ msgnum=1. count_messages change: allows us to detect when
+ requencing is required in opneA_mailbox. resequence enabled for
+ ODBC storage: Assists with fixing up corrupt databases with gaps,
+ but only when a user actively opens there mailboxes. (closes
+ issue #18692,#18582,#19032) Reported by: elguero Patches: based
+ on odbc_resequence_mailbox2.1.diff uploaded by elguero (license
+ 37) Tested by: elguero, nivek, alecdavis Review:
+ https://reviewboard.asterisk.org/r/1153/
+
+ * apps/app_voicemail.c: app_voicemail:close_mailbox imap_storage
+ doesn't use last_msg_index
+
+ * apps/app_voicemail.c: app_voicemail: close_mailbox needs to
+ respect additional messages while mailbox is open. close_mailbox
+ leave gaps in message sequence if messages are deleted and new
+ messages arrive during this time, this is because the shuffle
+ down to slot 0, only shuffles the number of pre-existing messages
+ when mailbox is opened, ignoring new arrivals. Fix: in
+ close_mailbox re-evaluate number of messages before the shuffle,
+ this then includes new arrivals. Happens on filebased or ODBC
+ storage. (issues #19032,#18582,#18692,#18998) Reported by:
+ alecdavis,tootai,afosorio Review:
+ https://reviewboard.asterisk.org/r/1153/
+
+2011-03-17 19:14 +0000 [r311199-311203] Matthew Nicholson <mnicholson@digium.com>
+
+ * channels/chan_agent.c: Don't hold the pvt lock while streaming a
+ file. ABE-2756
+
+ * main/manager.c: Don't dec the usecount of an eventqent then use
+ it. ABE-2756
+
+ * channels/chan_sip.c: Remove the provisional keepalive scheduler
+ entry's reference to the pvt when we remove the scheduler entry.
+ ABE-2756
+
+2011-03-17 10:43 +0000 [r311048] Alec L Davis <sivad.a@paradise.net.nz>
+
+ * configs/indications.conf.sample: Remove extra quote in
+ indications.conf Picking low hanging fruit. (closes issue #18971)
+ Reported by: IgorG Patches: based on indications.conf.sample.diff
+ uploaded by IgorG (license 20) Tested by: IgorG
+
+2011-03-16 16:58 +0000 [r310888] Terry Wilson <twilson@digium.com>
+
+ * res/res_features.c: Don't delay DTMF in core bridge while
+ listening for DTMF features This patch is mostly the work of Olle
+ Johansson. I did some cleanup and added the silence generating
+ code if transmit_silence is set. When a channel listens for DTMF
+ in the core bridge, the outbound DTMF is not sent until we have
+ received DTMF_END. For a long DTMF, this is a disaster. We send 4
+ seconds of DTMF to Asterisk, which sends no audio for those 4
+ seconds. Some products see this delay and the time skew on RTP
+ packets that results and start ignoring the audio that is sent
+ afterward. With this change, the DTMF_BEGIN frame is inspected
+ and checked. If it matches a feature code, we wait for DTMF_END
+ and activate the feature as before. If transmit_silence=yes in
+ asterisk.conf, silence is sent if we paritally match a
+ multi-digit feature. If it doesn't match a feature, the frame is
+ forwarded along with the DTMF_END without delay. By doing it this
+ way, DTMF is not delayed. (closes issue #15642) Reported by:
+ jasonshugart Patches: issue_15652_dtmf_ast-1.4.patch.txt uploaded
+ by twilson (license 396) Tested by: globalnetinc, jde (closes
+ issue #16625) Reported by: sharvanek Review:
+ https://reviewboard.asterisk.org/r/1092/ Review:
+ https://reviewboard.asterisk.org/r/1125/
+
+2011-03-15 00:26 +0000 [r310779] Alec L Davis <sivad.a@paradise.net.nz>
+
+ * main/utils.c: core show locks: display ThreadID in hexadecimal
+ Allow easier cross referencing of thread ID's with GDB backtraces
+ (closes issue #18968) Reported by: alecdavis Patches:
+ bug18968.diff.txt uploaded by alecdavis (license 585)
+
+2011-03-14 16:38 +0000 [r310633] Richard Mudgett <rmudgett@digium.com>
+
+ * main/callerid.c: "Caller*ID failed checksum" on Wildcard TDM2400P
+ and TDM410 The last character in the caller id message is getting
+ a framing error. The checksum is the last character in the
+ message. A framing error in the checksum could be because: 1) The
+ sender did not send a full stop bit. 2) The sender cut off the
+ FSK carrier too soon. 3) The sender opted to send zero of the
+ specified zero to 10 trailing mark bits and round-off errors in
+ the code resulted in the code not being where it thought it was
+ in the demodulated bit stream. Bit 8 of 'b' is set when parity
+ error. Bit 9 of 'b' is set when framing error. Made ignore the
+ framing and parity error bits if the errored character is the
+ checksum. We can tolerate a framing/parity error there. The
+ checksum character validates the message. (closes issue #18474)
+ Reported by: nivek Patches: callerid.c.1.patch uploaded by nivek
+ (license 636) (with modifications) Tested by: nivek
+
+2011-03-12 20:22 +0000 [r310435] Tilghman Lesher <tilghman@meg.abyt.es>
+
+ * pbx/pbx_ael.c: Add AELSub, which provides a stable entry point
+ into AEL subroutines. This commit needs some explanation, given
+ that we're adding a new application into an existing release
+ branch. This is generally a violation of our release policy,
+ except in very limited circumstances, and I believe this is one
+ of those circumstances. The problem that this solves is one of
+ the sanity of using multiple dialplan languages to define a
+ dialplan. In the case of the reporter, he or she is using AEL is
+ define subroutines, while using Realtime extensions to invoke
+ those subroutines. While you can do this, it's based upon the
+ reality of AEL using actual dialplan extensions; however, there
+ is no guarantee that the details of _how_ AEL is compiled into
+ extensions will remain stable. In fact, at the time of this
+ commit, it has already changed twice, once in a fundamental way.
+ Now normally, a new application would only be added to trunk.
+ However, this application is explicitly to create a stable
+ user-level API between versions, and adding it to trunk only will
+ not solve the user's problem of switching between 1.6.2 and 1.8,
+ nor will it help anybody switching from 1.8 to 1.10. Therefore,
+ it needs to go into existing release branches. For the sake of
+ consistency, and also because one of the changes was between 1.4
+ and 1.6.x, I am also electing to commit this to 1.4. (closes
+ issue #18910) Reported by: alexandrekeller Patches:
+ 20110304__issue18919__1.6.2.diff.txt uploaded by tilghman
+ (license 14) 20110304__issue18919__1.4.diff.txt uploaded by
+ tilghman (license 14) Tested by: alexandrekeller
+
+2011-03-10 05:38 +0000 [r310140] Tilghman Lesher <tilghman@meg.abyt.es>
+
+ * apps/app_voicemail.c, res/res_config_odbc.c: Initialize column
+ size to 0 to deal with a potential UnixODBC bug on 64-bit
+ systems. (closes issue #18295) Reported by: pruiz
+
+2011-03-08 02:42 +0000 [r309947] Terry Wilson <twilson@digium.com>
+
+ * apps/app_externalivr.c: Don't try to free statically allocated
+ memory. Note: compiling after ./configure --enable-dev-mode will
+ keep these kinds of mistakes from being committed.
+
+2011-03-07 22:02 +0000 [r309856] Jonathan Rose <jrose@digium.com>
+
+ * apps/app_mixmonitor.c: Bug fix for MixMonitor involving filenames
+ with '.' not in the extension Closes issue #18391) Reported by:
+ pabelanger Patches: bugfix.patch uploaded by jrose (license 1225)
+ Tested by: jrose
+
+2011-03-04 00:34 +0000 [r309355] David Ruggles <thedavidfactor@gmail.com>
+
+ * apps/app_externalivr.c: fix small memory leak fix small memory
+ leak caused by a string allocation that wasn't freed (closes
+ issue #18907) Reported by: andy11 Patches:
+ asterisk_trunk-app_externalivr-leak.patch uploaded by andy11
+ (license 1224)
+
+2011-02-24 17:42 +0000 [r308813] Terry Wilson <twilson@digium.com>
+
+ * main/manager.c: Don't broadcast FullyBooted to every AMI
+ connection The FullyBooted event should not be sent to every AMI
+ connection every time someone connects via AMI. It should only be
+ sent to the user who just connected. (closes issue #18168)
+ Reported by: FeyFre Patches: bug0018168.patch uploaded by FeyFre
+ (license 1142) Tested by: FeyFre, twilson
+
+2011-02-24 14:54 +0000 [r308721] Matthew Nicholson <mnicholson@digium.com>
+
+ * main/udptl.c: silence gcc 4.2 compiler warning
+
2011-04-25 Leif Madsen <lmadsen@digium.com>
* Asterisk 1.4.41 Released.
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/apps/app_dial.c
^
|
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 305252 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 319527 $")
#include <stdlib.h>
#include <errno.h>
@@ -1459,8 +1459,11 @@
* to which the datastore was moved hangs up, it will attempt to free this
* datastore again, causing a crash
*/
- if (!ast_channel_datastore_remove(chan, datastore))
+ ast_channel_lock(chan);
+ if (!ast_channel_datastore_remove(chan, datastore)) {
ast_channel_datastore_free(datastore);
+ }
+ ast_channel_unlock(chan);
if (!peer) {
if (result) {
res = result;
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/apps/app_directed_pickup.c
^
|
@@ -27,7 +27,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 218223 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 318734 $")
#include <stdlib.h>
#include <stdio.h>
@@ -54,39 +54,45 @@
"10@PICKUPMARK, this application tries to find a channel which has defined a channel variable with the same content\n"
"as \"extension\".";
-/* Perform actual pickup between two channels */
+/*!
+ * \internal
+ * \brief Perform actual pickup between two channels.
+ * \note Must remain in sync with same function in res/res_features.c.
+ */
static int pickup_do(struct ast_channel *chan, struct ast_channel *target)
{
- int res = 0;
-
if (option_debug)
ast_log(LOG_DEBUG, "Call pickup on '%s' by '%s'\n", target->name, chan->name);
- if ((res = ast_answer(chan))) {
+ if (ast_answer(chan)) {
ast_log(LOG_WARNING, "Unable to answer '%s'\n", chan->name);
return -1;
}
- if ((res = ast_queue_control(chan, AST_CONTROL_ANSWER))) {
+ if (ast_queue_control(chan, AST_CONTROL_ANSWER)) {
ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n", chan->name);
return -1;
}
- if ((res = ast_channel_masquerade(target, chan))) {
+ if (ast_channel_masquerade(target, chan)) {
ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, target->name);
return -1;
}
- return res;
+ return 0;
}
/* Helper function that determines whether a channel is capable of being picked up */
static int can_pickup(struct ast_channel *chan)
{
- if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING || chan->_state == AST_STATE_DOWN))
+ if (!chan->pbx && !chan->masq &&
+ !ast_test_flag(chan, AST_FLAG_ZOMBIE) &&
+ (chan->_state == AST_STATE_RINGING ||
+ chan->_state == AST_STATE_RING ||
+ chan->_state == AST_STATE_DOWN)) {
return 1;
- else
- return 0;
+ }
+ return 0;
}
/* Attempt to pick up specified extension with context */
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/apps/app_externalivr.c
^
|
@@ -37,7 +37,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 172438 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 309947 $")
#include <stdlib.h>
#include <stdio.h>
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/apps/app_meetme.c
^
|
@@ -35,7 +35,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 304820 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 320235 $")
#include <stdlib.h>
#include <stdio.h>
@@ -1099,6 +1099,7 @@
AST_LIST_UNLOCK(&confs);
return usr ? strdup(usrno) : NULL;
}
+ AST_LIST_UNLOCK(&confs);
} else if ( strstr(line, "list") && ( 0 == state ) )
return strdup("concise");
}
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/apps/app_mixmonitor.c
^
|
@@ -35,7 +35,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 257686 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 309856 $")
#include <stdlib.h>
#include <stdio.h>
@@ -244,6 +244,7 @@
struct ast_filestream **fs = NULL;
unsigned int oflags;
char *ext;
+ char *last_slash;
int errflag = 0;
if (option_verbose > 1)
@@ -277,7 +278,8 @@
oflags = O_CREAT | O_WRONLY;
oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
- if ((ext = strrchr(mixmonitor->filename, '.')))
+ last_slash = strrchr(mixmonitor->filename, '/');
+ if ((ext = strrchr(mixmonitor->filename, '.')) && (ext > last_slash))
*(ext++) = '\0';
else
ext = "raw";
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/apps/app_queue.c
^
|
@@ -62,7 +62,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 308002 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 317574 $")
#include <stdlib.h>
#include <errno.h>
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/apps/app_voicemail.c
^
|
@@ -52,7 +52,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 306965 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 316707 $")
#include <stdlib.h>
#include <errno.h>
@@ -2473,6 +2473,7 @@
fprintf(f, "[message]\n");
for (x=0;x<colcount;x++) {
rowdata[0] = '\0';
+ colsize = 0;
collen = sizeof(coltitle);
res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen,
&datatype, &colsize, &decimaldigits, &nullable);
@@ -2538,7 +2539,7 @@
ast_odbc_release_obj(obj);
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
-yuck:
+yuck:
if (f)
fclose(f);
if (fd > -1)
@@ -2559,7 +2560,8 @@
struct odbc_obj *obj;
obj = ast_odbc_request_obj(odbc_database, 0);
if (obj) {
- snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir=?",odbc_table);
+ snprintf(sql, sizeof(sql), "SELECT msgnum FROM %s WHERE dir=? order by msgnum desc limit 1", odbc_table);
+
stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
if (!stmt) {
ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
@@ -2568,7 +2570,12 @@
}
res = SQLFetch(stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
- ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
+ if (res == SQL_NO_DATA) {
+ ast_log(LOG_DEBUG, "Directory '%s' has no messages and therefore no index was retrieved.\n", dir);
+ } else {
+ ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
+ }
+
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
goto yuck;
@@ -2581,12 +2588,13 @@
goto yuck;
}
if (sscanf(rowdata, "%30d", &x) != 1)
- ast_log(LOG_WARNING, "Failed to read message count!\n");
+ ast_log(LOG_WARNING, "Failed to read message index!\n");
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
+ return x;
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
-yuck:
+yuck:
return x - 1;
}
@@ -2632,13 +2640,54 @@
ast_odbc_release_obj(obj);
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
-yuck:
+yuck:
return x;
}
static int count_messages(struct ast_vm_user *vmu, char *dir)
{
- return last_message_index(vmu, dir) + 1;
+ int x = 0;
+ int res;
+ SQLHSTMT stmt;
+ char sql[PATH_MAX];
+ char rowdata[20];
+ char *argv[] = { dir };
+ struct generic_prepare_struct gps = { .sql = sql, .argc = 1, .argv = argv };
+
+ struct odbc_obj *obj;
+ obj = ast_odbc_request_obj(odbc_database, 0);
+ if (obj) {
+ snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir=?", odbc_table);
+ stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
+ if (!stmt) {
+ ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+ ast_odbc_release_obj(obj);
+ goto yuck;
+ }
+ res = SQLFetch(stmt);
+ if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
+ ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
+ SQLFreeHandle (SQL_HANDLE_STMT, stmt);
+ ast_odbc_release_obj(obj);
+ goto yuck;
+ }
+ res = SQLGetData(stmt, 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
+ if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
+ ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
+ SQLFreeHandle (SQL_HANDLE_STMT, stmt);
+ ast_odbc_release_obj(obj);
+ goto yuck;
+ }
+ if (sscanf(rowdata, "%30d", &x) != 1)
+ ast_log(LOG_WARNING, "Failed to read message count!\n");
+ SQLFreeHandle (SQL_HANDLE_STMT, stmt);
+ ast_odbc_release_obj(obj);
+ return x;
+ } else
+ ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+yuck:
+ return x - 1;
+
}
static void delete_file(char *sdir, int smsg)
@@ -2833,7 +2882,7 @@
ast_odbc_release_obj(obj);
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
-yuck:
+yuck:
if (cfg)
ast_config_destroy(cfg);
if (fdm != MAP_FAILED)
@@ -3592,7 +3641,8 @@
char *ctype = (!strcasecmp(format, "ogg")) ? "application/" : "audio/x-";
char tmpdir[256], newtmp[256];
int tmpfd = -1;
-
+ int soxstatus = 0;
+
if (vmu->volgain < -.001 || vmu->volgain > .001) {
create_dirpath(tmpdir, sizeof(tmpdir), vmu->context, vmu->mailbox, "tmp");
snprintf(newtmp, sizeof(newtmp), "%s/XXXXXX", tmpdir);
@@ -3601,7 +3651,6 @@
if (option_debug > 2)
ast_log(LOG_DEBUG, "newtmp: %s\n", newtmp);
if (tmpfd > -1) {
- int soxstatus;
snprintf(tmpcmd, sizeof(tmpcmd), "sox -v %.4f %s.%s %s.%s", vmu->volgain, attach, format, newtmp, format);
if ((soxstatus = ast_safe_system(tmpcmd)) == 0) {
attach = newtmp;
@@ -3624,7 +3673,9 @@
base_encode(fname, p);
fprintf(p, ENDL "--%s--" ENDL "." ENDL, bound);
if (tmpfd > -1) {
- unlink(fname);
+ if (soxstatus == 0) {
+ unlink(fname);
+ }
close(tmpfd);
unlink(newtmp);
}
@@ -3910,7 +3961,7 @@
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
-yuck:
+yuck:
return x;
}
@@ -4485,12 +4536,10 @@
ast_unlock_path(dir);
inprocess_count(vmu->mailbox, vmu->context, -1);
} else {
- for (;;) {
- make_file(fn, sizeof(fn), dir, msgnum);
- if (!EXISTS(dir, msgnum, fn, NULL))
- break;
- msgnum++;
- }
+#ifndef IMAP_STORAGE
+ msgnum = last_message_index(vmu, dir) + 1;
+#endif
+ make_file(fn, sizeof(fn), dir, msgnum);
/* assign a variable with the name of the voicemail file */
#ifndef IMAP_STORAGE
@@ -4556,7 +4605,7 @@
return res;
}
-#if !defined(IMAP_STORAGE) && !defined(ODBC_STORAGE)
+#if !defined(IMAP_STORAGE)
static int resequence_mailbox(struct ast_vm_user *vmu, char *dir, int stopcount)
{
/* we know the actual number of messages, so stop process when number is hit */
@@ -5996,9 +6045,6 @@
#ifndef IMAP_STORAGE
static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu,int box)
{
-#ifndef ODBC_STORAGE
- int res = 0;
-#endif
int count_msg, last_msg;
ast_copy_string(vms->curbox, mbox(box), sizeof(vms->curbox));
@@ -6034,14 +6080,10 @@
if (last_msg < -1) {
return last_msg;
- }
-#ifndef ODBC_STORAGE
- else if (vms->lastmsg != last_msg)
- {
+ } else if (vms->lastmsg != last_msg) {
ast_log(LOG_NOTICE, "Resequencing Mailbox: %s, expected %d but found %d message(s) in box with max threshold of %d.\n", vms->curdir, last_msg + 1, vms->lastmsg + 1, vmu->maxmsg);
- res = resequence_mailbox(vmu, vms->curdir, count_msg);
+ resequence_mailbox(vmu, vms->curdir, count_msg);
}
-#endif
return 0;
}
@@ -6051,6 +6093,7 @@
{
int x = 0;
#ifndef IMAP_STORAGE
+ int last_msg_index;
int res = 0, nummsg;
#endif
@@ -6062,9 +6105,14 @@
/* Get the deleted messages fixed */
if (vm_lock_path(vms->curdir))
return ERROR_LOCK_PATH;
-
+
+ last_msg_index = last_message_index(vmu, vms->curdir);
+ if (last_msg_index != vms->lastmsg) {
+ ast_log(LOG_NOTICE, "%d messages arrived while mailbox was open\n", last_msg_index - vms->lastmsg);
+ }
+
/* must check up to last detected message, just in case it is erroneously greater than maxmsg */
- for (x = 0; x < vms->lastmsg + 1; x++) {
+ for (x = 0; x < last_msg_index + 1; x++) {
if (!vms->deleted[x] && (strcasecmp(vms->curbox, "INBOX") || !vms->heard[x])) {
/* Save this message. It's not in INBOX or hasn't been heard */
make_file(vms->fn, sizeof(vms->fn), vms->curdir, x);
|
[-]
[+]
|
Added |
asterisk-1.4.42.tar.bz2/asterisk-1.4.42-summary.html
^
|
@@ -0,0 +1,433 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-1.4.42</title></head>
+<body>
+<h1 align="center"><a name="top">Release Summary</a></h1>
+<h3 align="center">asterisk-1.4.42</h3>
+<h3 align="center">Date: 2011-06-28</h3>
+<h3 align="center"><asteriskteam@digium.com></h3>
+<hr/>
+<h2 align="center">Table of Contents</h2>
+<ol>
+ <li><a href="#summary">Summary</a></li>
+ <li><a href="#contributors">Contributors</a></li>
+ <li><a href="#issues">Closed Issues</a></li>
+ <li><a href="#commits">Other Changes</a></li>
+ <li><a href="#diffstat">Diffstat</a></li>
+</ol>
+<hr/>
+<a name="summary"><h2 align="center">Summary</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
+<p>The data in this summary reflects changes that have been made since the previous release, asterisk-1.4.41.</p>
+<hr/>
+<a name="contributors"><h2 align="center">Contributors</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
+<table width="100%" border="0">
+<tr>
+<td width="33%"><h3>Coders</h3></td>
+<td width="33%"><h3>Testers</h3></td>
+<td width="33%"><h3>Reporters</h3></td>
+</tr>
+<tr valign="top">
+<td>
+11 mnicholson<br/>
+8 rmudgett<br/>
+8 twilson<br/>
+6 alecdavis<br/>
+6 tilghman<br/>
+3 seanbright<br/>
+3 wdoekes<br/>
+2 dvossel<br/>
+2 elguero<br/>
+2 pabelanger<br/>
+2 vrban<br/>
+1 andy11<br/>
+1 enegaard<br/>
+1 FeyFre<br/>
+1 IgorG<br/>
+1 jhirsch<br/>
+1 jrose<br/>
+1 kkm<br/>
+1 nivek<br/>
+1 russell<br/>
+1 tzafrir<br/>
+1 zvision<br/>
+</td>
+<td>
+8 rmudgett<br/>
+4 astmiv<br/>
+3 alecdavis<br/>
+2 globalnetinc<br/>
+2 jde<br/>
+2 nivek<br/>
+2 twilson<br/>
+1 alexandrekeller<br/>
+1 amilcar<br/>
+1 chris-mac<br/>
+1 elguero<br/>
+1 FeyFre<br/>
+1 francesco_r<br/>
+1 IgorG<br/>
+1 irroot<br/>
+1 isis242<br/>
+1 jcromes<br/>
+1 jrose<br/>
+1 kkm<br/>
+1 lefoyer<br/>
+1 lmadsen<br/>
+1 loloski<br/>
+1 mnicholson<br/>
+1 oej<br/>
+1 rymkus<br/>
+1 seanbright<br/>
+1 tilghman<br/>
+1 vrban<br/>
+1 wdoekes<br/>
+</td>
+<td>
+2 alecdavis<br/>
+2 destiny6628<br/>
+2 tzafrir<br/>
+2 vrban<br/>
+1 alexandrekeller<br/>
+1 andy11<br/>
+1 devmod<br/>
+1 docent<br/>
+1 elguero<br/>
+1 feyfre<br/>
+1 igorg<br/>
+1 jamicque<br/>
+1 jasonshugart<br/>
+1 jcromes<br/>
+1 jhirsch<br/>
+1 jmls<br/>
+1 johnz<br/>
+1 jpokorny<br/>
+1 kkm<br/>
+1 kobaz<br/>
+1 lefoyer<br/>
+1 mn3250<br/>
+1 mspuhler<br/>
+1 nivek<br/>
+1 nvitaly<br/>
+1 oej<br/>
+1 pabelanger<br/>
+1 pnlarsson<br/>
+1 pruiz<br/>
+1 sharvanek<br/>
+1 siby<br/>
+1 sysreq<br/>
+1 wdoekes<br/>
+1 zvision<br/>
+</td>
+</tr>
+</table>
+<hr/>
+<a name="issues"><h2 align="center">Closed Issues</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p>
+<h3>Category: Applications/app_dial</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-16649">ASTERISK-16649</a>: [patch] Peer does not hang up when caller hangup while app_dial is executing - Deadagi<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=313545">313545</a><br/>
+Reporter: mn3250<br/>
+Testers: rmudgett, astmiv<br/>
+Coders: rmudgett<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17874">ASTERISK-17874</a>: [patch] [regression] Revision 315643 app_dial breaks ring groups<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=319527">319527</a><br/>
+Reporter: mspuhler<br/>
+Coders: elguero<br/>
+<br/>
+<h3>Category: Applications/app_externalivr</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17496">ASTERISK-17496</a>: [patch] Small leak in app_externalivr<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=309355">309355</a><br/>
+Reporter: andy11<br/>
+Coders: andy11<br/>
+<br/>
+<h3>Category: Applications/app_meetme</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17896">ASTERISK-17896</a>: [patch] meetme cli cmd completion leaves conferences mutex locked<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=320235">320235</a><br/>
+Reporter: zvision<br/>
+Coders: zvision<br/>
+<br/>
+<h3>Category: Applications/app_mixmonitor</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17038">ASTERISK-17038</a>: [patch] Mixmonitor does not parse file path proper if it contain a . (period)<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=309856">309856</a><br/>
+Reporter: pabelanger<br/>
+Testers: jrose<br/>
+Coders: jrose<br/>
+<br/>
+<h3>Category: Applications/app_voicemail</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-16784">ASTERISK-16784</a>: [patch] Message lost when sox fails to re-encode with 'volgain'<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=316707">316707</a><br/>
+Reporter: sysreq<br/>
+Testers: seanbright<br/>
+Coders: seanbright<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17299">ASTERISK-17299</a>: [patch] Compile Error - odbc_storage enabled<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=312174">312174</a><br/>
+Reporter: elguero<br/>
+Testers: elguero, nivek, alecdavis<br/>
+Coders: elguero<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17714">ASTERISK-17714</a>: [patch] app_voicemail.c does not compile in 1.4 branch<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=314300">314300</a><br/>
+Reporter: vrban<br/>
+Testers: vrban, alecdavis<br/>
+Coders: vrban<br/>
+<br/>
+<h3>Category: Channels/chan_dahdi</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-14611">ASTERISK-14611</a>: [patch] Stuck channel using FEATD_MF if caller hangs up at the right time<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=313188">313188</a><br/>
+Reporter: jcromes<br/>
+Testers: jcromes<br/>
+Coders: pabelanger<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-16892">ASTERISK-16892</a>: [patch] Asterisk gets killed during the live calling<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=312573">312573</a><br/>
+Reporter: destiny6628<br/>
+Testers: rmudgett<br/>
+Coders: rmudgett<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-16964">ASTERISK-16964</a>: Asterisk does not send release message when channel requested during SETUP gets changed during Procedding Message from TELCO<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=312573">312573</a><br/>
+Reporter: destiny6628<br/>
+Testers: rmudgett<br/>
+Coders: rmudgett<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17107">ASTERISK-17107</a>: [patch] "Caller*ID failed checksum" on Wildcard TDM2400P and TDM410<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=310633">310633</a><br/>
+Reporter: nivek<br/>
+Testers: nivek<br/>
+Coders: nivek<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17120">ASTERISK-17120</a>: Asterisk does not end call properly and stops reacting to following SETUP messages<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=312573">312573</a><br/>
+Reporter: jpokorny<br/>
+Testers: rmudgett<br/>
+Coders: rmudgett<br/>
+<br/>
+<h3>Category: Channels/chan_iax2</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-15449">ASTERISK-15449</a>: RFC2833 DTMF is not passed correctly when going SIP->IAX2->SIP<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=310888">310888</a><br/>
+Reporter: sharvanek<br/>
+Testers: globalnetinc, jde<br/>
+Coders: twilson<br/>
+<br/>
+<h3>Category: Channels/chan_local</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17633">ASTERISK-17633</a>: [patch] Chan_local crashes in fixup<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=316328">316328</a><br/>
+Reporter: oej<br/>
+Testers: oej<br/>
+Coders: dvossel<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17747">ASTERISK-17747</a>: [patch] check_bridge(): misplaced ast_mutex_unlock<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315051">315051</a><br/>
+Reporter: alecdavis<br/>
+Coders: alecdavis<br/>
+<br/>
+<h3>Category: Channels/chan_sip/General</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17124">ASTERISK-17124</a>: Asterisk does not hangup a channel after endpoint hangs up when using FastAGI<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=313545">313545</a><br/>
+Reporter: devmod<br/>
+Testers: rmudgett, astmiv<br/>
+Coders: rmudgett<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17682">ASTERISK-17682</a>: [patch] [regression] "sip prune" does not clean the relevant peer objects -> memleak<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=317211">317211</a><br/>
+Reporter: vrban<br/>
+Coders: vrban<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17771">ASTERISK-17771</a>: [patch] switching From-address mid-register breaks channel variables<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=320055">320055</a><br/>
+Reporter: wdoekes<br/>
+Coders: wdoekes<br/>
+<br/>
+<h3>Category: Channels/chan_sip/Registration</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-14953">ASTERISK-14953</a>: [patch] Autocreated peers not deleted when unregister explicitly, become zombies<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315671">315671</a><br/>
+Reporter: kkm<br/>
+Testers: kkm, tilghman, twilson<br/>
+Coders: kkm<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17382">ASTERISK-17382</a>: [patch] Regression after r297603 (Improve handling of REGISTER requests with multiple contact headers.)<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=317719">317719</a><br/>
+Reporter: pnlarsson<br/>
+Coders: enegaard<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17535">ASTERISK-17535</a>: [patch] [regression] Cisco phones do not register<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315891">315891</a><br/>
+Reporter: jmls<br/>
+Coders: wdoekes<br/>
+<br/>
+<h3>Category: Core/BuildSystem</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17668">ASTERISK-17668</a>: [patch] fix detection of openssl 1.0<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=313277">313277</a><br/>
+Reporter: tzafrir<br/>
+Coders: tzafrir<br/>
+<br/>
+<h3>Category: Core/General</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17370">ASTERISK-17370</a>: [patch] FD 32767 exceeds the maximum size of ast_fdset<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315501">315501</a><br/>
+Reporter: jamicque<br/>
+Testers: chris-mac<br/>
+Coders: tilghman<br/>
+<br/>
+<h3>Category: Core/ManagerInterface</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-16837">ASTERISK-16837</a>: [patch] Duplicated event on AMI interface<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=308813">308813</a><br/>
+Reporter: feyfre<br/>
+Testers: FeyFre, twilson<br/>
+Coders: FeyFre<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17384">ASTERISK-17384</a>: [patch] Security issue in originate, system permission bypassed if using async<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=314607">314607</a><br/>
+Reporter: kobaz<br/>
+Coders: mnicholson<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17578">ASTERISK-17578</a>: [patch] DoS through manager interface: no timeout for unauthenticated logins<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=312761">312761</a><br/>
+Reporter: tzafrir<br/>
+Testers: mnicholson<br/>
+Coders: mnicholson<br/>
+<br/>
+<h3>Category: Core/RTP</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-14589">ASTERISK-14589</a>: [patch] Fix for Sonus DTMF issues<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=310888">310888</a><br/>
+Reporter: jasonshugart<br/>
+Testers: globalnetinc, jde<br/>
+Coders: twilson<br/>
+<br/>
+<h3>Category: Features</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17264">ASTERISK-17264</a>: [patch] [regression] Call Pickup Hangs Asterisk (deadlock?)<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=318734">318734</a><br/>
+Reporter: docent<br/>
+Testers: lmadsen, francesco_r, amilcar, isis242, alecdavis, irroot, rymkus, loloski, rmudgett<br/>
+Coders: rmudgett, alecdavis<br/>
+<br/>
+<h3>Category: Formats/format_wav</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-16957">ASTERISK-16957</a>: [patch] Asterisk does not play wav files with unknown chunk types<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315257">315257</a><br/>
+Reporter: jhirsch<br/>
+Coders: jhirsch<br/>
+<br/>
+<h3>Category: Functions/func_odbc</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-16946">ASTERISK-16946</a>: [patch] Call to SQLDescribeCol returns an invalid ColumnSize paramenter on x64 (Patch included)<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=310140">310140</a><br/>
+Reporter: pruiz<br/>
+Coders: tilghman<br/>
+<br/>
+<h3>Category: Functions/func_shell</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17630">ASTERISK-17630</a>: [patch] Concatenates uninitialized buffer causes garbage data prior result also may cause crash<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=314822">314822</a><br/>
+Reporter: johnz<br/>
+Coders: russell<br/>
+<br/>
+<h3>Category: General</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17552">ASTERISK-17552</a>: [patch] 'core show locks' should show Thread ID in HEX, then would match up with GDB's backtrace<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=310779">310779</a><br/>
+Reporter: alecdavis<br/>
+Coders: alecdavis<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17555">ASTERISK-17555</a>: [patch] Remove extra quote in indications.conf<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=311048">311048</a><br/>
+Reporter: igorg<br/>
+Testers: IgorG<br/>
+Coders: IgorG<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17782">ASTERISK-17782</a>: [patch] bug in contrib/scripts/safe_asterisk<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=317102">317102</a><br/>
+Reporter: lefoyer<br/>
+Testers: wdoekes, lefoyer<br/>
+Coders: wdoekes<br/>
+<br/>
+<h3>Category: PBX/pbx_ael</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17497">ASTERISK-17497</a>: [patch] AELsub() for calling routines that will remain stable between internal changes<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=310435">310435</a><br/>
+Reporter: alexandrekeller<br/>
+Testers: alexandrekeller<br/>
+Coders: tilghman<br/>
+<br/>
+<h3>Category: Resources/res_agi</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-16144">ASTERISK-16144</a>: [patch] AGISTATUS bug in Asterisk 1.6.2.7<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=313545">313545</a><br/>
+Reporter: siby<br/>
+Testers: rmudgett, astmiv<br/>
+Coders: rmudgett<br/>
+<br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17520">ASTERISK-17520</a>: [patch] HANGUP is not sent to AGI in time<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=313545">313545</a><br/>
+Reporter: nvitaly<br/>
+Testers: rmudgett, astmiv<br/>
+Coders: rmudgett<br/>
+<br/>
+<hr/>
+<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
+<table width="100%" border="1">
+<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=308721">308721</a></td><td>mnicholson</td><td>silence gcc 4.2 compiler warning</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=309947">309947</a></td><td>twilson</td><td>Don't try to free statically allocated memory.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=311199">311199</a></td><td>mnicholson</td><td>Remove the provisional keepalive scheduler entry's reference to the pvt when we remove the scheduler entry.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=311201">311201</a></td><td>mnicholson</td><td>Don't dec the usecount of an eventqent then use it.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=311203">311203</a></td><td>mnicholson</td><td>Don't hold the pvt lock while streaming a file.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=312070">312070</a></td><td>alecdavis</td><td>app_voicemail: close_mailbox needs to respect additional messages while mailbox is open.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=312119">312119</a></td><td>alecdavis</td><td>app_voicemail:close_mailbox imap_storage doesn't use last_msg_index</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=312285">312285</a></td><td>tilghman</td><td>Found some leaking file descriptors while looking at ast_FD_SETSIZE dead code.</td>
+<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-17553">ASTERISK-17553</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=312290">312290</a></td><td>alecdavis</td><td>app_voicemail: leave_vociemail doesn't use last_message_index to store next message</td>
+<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-17580">ASTERISK-17580</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=314908">314908</a></td><td>mnicholson</td><td>Prevent the login thread and the app threads from using the asterisk channel at the same time.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315147">315147</a></td><td>mnicholson</td><td>Reverted part of r314607, as it can introduce a regression.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315596">315596</a></td><td>twilson</td><td>Allow transfer loops without allowing forwarding loops</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=315989">315989</a></td><td>seanbright</td><td>Partial revert of r315671 which removed a logging statement and not a manager event.</td>
+<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-14953">ASTERISK-14953</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=316006">316006</a></td><td>tilghman</td><td>Backport the use of curl from 1.6.2 to make the 1.4 target work on Bamboo.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=316089">316089</a></td><td>tilghman</td><td>Breakage from slightly before the outage; would have fixed sooner but for the outage.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=317574">317574</a></td><td>twilson</td><td>Re-fix queue round-robin</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=319652">319652</a></td><td>twilson</td><td>Make sure everyone gets an unhold when a transfer succeeds</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=320393">320393</a></td><td>pabelanger</td><td>Solaris compatibility fixes</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=322646">322646</a></td><td>mnicholson</td><td>don't drop any voice frames when checking for T.38 during early media</td>
+<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-17705">ASTERISK-17705</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=322657">322657</a></td><td>mnicholson</td><td>whitespace</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=322698">322698</a></td><td>mnicholson</td><td>unlock pvt when we drop voice frames received in early media when in t.38 mode</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=323559">323559</a></td><td>seanbright</td><td>Resolve a segfault/bus error when we try to map memory that falls on a page</td>
+<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-15359">ASTERISK-15359</a>, <a href="https://issues.asterisk.org/jira/browse/ASTERISK-16460">ASTERISK-16460</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=323732">323732</a></td><td>twilson</td><td>Fix DYNAMIC_FEATURES</td>
+<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-17914">ASTERISK-17914</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=324627">324627</a></td><td>dvossel</td><td>Addresses AST-2011-010, remote crash in IAX2 driver</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=325275">325275</a></td><td>twilson</td><td>Don't leak SIP username information</td>
+<td></td></tr></table>
+<hr/>
+<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
+<pre>
+apps/app_dial.c | 5
+apps/app_directed_pickup.c | 26
+apps/app_meetme.c | 1
+apps/app_mixmonitor.c | 4
+apps/app_voicemail.c | 108 +-
+cdr/cdr_pgsql.c | 8
+channels/chan_agent.c | 181 ++-
+channels/chan_dahdi.c | 2007 ++++++++++++++++++++++++---------------
+channels/chan_iax2.c | 14
+channels/chan_local.c | 4
+channels/chan_sip.c | 106 +-
+channels/chan_skinny.c | 75 +
+configs/http.conf.sample | 7
+configs/indications.conf.sample | 2
+configs/manager.conf.sample | 11
+configs/skinny.conf.sample | 9
+configure.ac | 10
+contrib/scripts/safe_asterisk | 2
+formats/format_wav.c | 84 -
+include/asterisk/autoconfig.h.in | 3
+include/asterisk/select.h | 15
+main/asterisk.c | 6
+main/callerid.c | 19
+main/channel.c | 32
+main/http.c | 25
+main/manager.c | 122 ++
+main/udptl.c | 6
+main/utils.c | 2
+pbx/pbx_ael.c | 30
+res/res_agi.c | 46
+res/res_config_odbc.c | 2
+res/res_features.c | 273 +++--
+32 files changed, 2133 insertions(+), 1112 deletions(-)
+</pre><br/>
+<hr/>
+</body>
+</html>
|
[-]
[+]
|
Added |
asterisk-1.4.42.tar.bz2/asterisk-1.4.42-summary.txt
^
|
@@ -0,0 +1,527 @@
+ Release Summary
+
+ asterisk-1.4.42
+
+ Date: 2011-06-28
+
+ <asteriskteam@digium.com>
+
+ ----------------------------------------------------------------------
+
+ Table of Contents
+
+ 1. Summary
+ 2. Contributors
+ 3. Closed Issues
+ 4. Other Changes
+ 5. Diffstat
+
+ ----------------------------------------------------------------------
+
+ Summary
+
+ [Back to Top]
+
+ This release includes only bug fixes. The changes included were made only
+ to address problems that have been identified in this release series.
+ Users should be able to safely upgrade to this version if this release
+ series is already in use. Users considering upgrading from a previous
+ release series are strongly encouraged to review the UPGRADE.txt document
+ as well as the CHANGES document for information about upgrading to this
+ release series.
+
+ The data in this summary reflects changes that have been made since the
+ previous release, asterisk-1.4.41.
+
+ ----------------------------------------------------------------------
+
+ Contributors
+
+ [Back to Top]
+
+ This table lists the people who have submitted code, those that have
+ tested patches, as well as those that reported issues on the issue tracker
+ that were resolved in this release. For coders, the number is how many of
+ their patches (of any size) were committed into this release. For testers,
+ the number is the number of times their name was listed as assisting with
+ testing a patch. Finally, for reporters, the number is the number of
+ issues that they reported that were closed by commits that went into this
+ release.
+
+ Coders Testers Reporters
+ 11 mnicholson 8 rmudgett 2 alecdavis
+ 8 rmudgett 4 astmiv 2 destiny6628
+ 8 twilson 3 alecdavis 2 tzafrir
+ 6 alecdavis 2 globalnetinc 2 vrban
+ 6 tilghman 2 jde 1 alexandrekeller
+ 3 seanbright 2 nivek 1 andy11
+ 3 wdoekes 2 twilson 1 devmod
+ 2 dvossel 1 alexandrekeller 1 docent
+ 2 elguero 1 amilcar 1 elguero
+ 2 pabelanger 1 chris-mac 1 feyfre
+ 2 vrban 1 elguero 1 igorg
+ 1 andy11 1 FeyFre 1 jamicque
+ 1 enegaard 1 francesco_r 1 jasonshugart
+ 1 FeyFre 1 IgorG 1 jcromes
+ 1 IgorG 1 irroot 1 jhirsch
+ 1 jhirsch 1 isis242 1 jmls
+ 1 jrose 1 jcromes 1 johnz
+ 1 kkm 1 jrose 1 jpokorny
+ 1 nivek 1 kkm 1 kkm
+ 1 russell 1 lefoyer 1 kobaz
+ 1 tzafrir 1 lmadsen 1 lefoyer
+ 1 zvision 1 loloski 1 mn3250
+ 1 mnicholson 1 mspuhler
+ 1 oej 1 nivek
+ 1 rymkus 1 nvitaly
+ 1 seanbright 1 oej
+ 1 tilghman 1 pabelanger
+ 1 vrban 1 pnlarsson
+ 1 wdoekes 1 pruiz
+ 1 sharvanek
+ 1 siby
+ 1 sysreq
+ 1 wdoekes
+ 1 zvision
+
+ ----------------------------------------------------------------------
+
+ Closed Issues
+
+ [Back to Top]
+
+ This is a list of all issues from the issue tracker that were closed by
+ changes that went into this release.
+
+ Category: Applications/app_dial
+
+ ASTERISK-16649: [patch] Peer does not hang up when caller hangup while
+ app_dial is executing - Deadagi
+ Revision: 313545
+ Reporter: mn3250
+ Testers: rmudgett, astmiv
+ Coders: rmudgett
+
+ ASTERISK-17874: [patch] [regression] Revision 315643 app_dial breaks ring
+ groups
+ Revision: 319527
+ Reporter: mspuhler
+ Coders: elguero
+
+ Category: Applications/app_externalivr
+
+ ASTERISK-17496: [patch] Small leak in app_externalivr
+ Revision: 309355
+ Reporter: andy11
+ Coders: andy11
+
+ Category: Applications/app_meetme
+
+ ASTERISK-17896: [patch] meetme cli cmd completion leaves conferences mutex
+ locked
+ Revision: 320235
+ Reporter: zvision
+ Coders: zvision
+
+ Category: Applications/app_mixmonitor
+
+ ASTERISK-17038: [patch] Mixmonitor does not parse file path proper if it
+ contain a . (period)
+ Revision: 309856
+ Reporter: pabelanger
+ Testers: jrose
+ Coders: jrose
+
+ Category: Applications/app_voicemail
+
+ ASTERISK-16784: [patch] Message lost when sox fails to re-encode with
+ 'volgain'
+ Revision: 316707
+ Reporter: sysreq
+ Testers: seanbright
+ Coders: seanbright
+
+ ASTERISK-17299: [patch] Compile Error - odbc_storage enabled
+ Revision: 312174
+ Reporter: elguero
+ Testers: elguero, nivek, alecdavis
+ Coders: elguero
+
+ ASTERISK-17714: [patch] app_voicemail.c does not compile in 1.4 branch
+ Revision: 314300
+ Reporter: vrban
+ Testers: vrban, alecdavis
+ Coders: vrban
+
+ Category: Channels/chan_dahdi
+
+ ASTERISK-14611: [patch] Stuck channel using FEATD_MF if caller hangs up at
+ the right time
+ Revision: 313188
+ Reporter: jcromes
+ Testers: jcromes
+ Coders: pabelanger
+
+ ASTERISK-16892: [patch] Asterisk gets killed during the live calling
+ Revision: 312573
+ Reporter: destiny6628
+ Testers: rmudgett
+ Coders: rmudgett
+
+ ASTERISK-16964: Asterisk does not send release message when channel
+ requested during SETUP gets changed during Procedding Message from TELCO
+ Revision: 312573
+ Reporter: destiny6628
+ Testers: rmudgett
+ Coders: rmudgett
+
+ ASTERISK-17107: [patch] "Caller*ID failed checksum" on Wildcard TDM2400P
+ and TDM410
+ Revision: 310633
+ Reporter: nivek
+ Testers: nivek
+ Coders: nivek
+
+ ASTERISK-17120: Asterisk does not end call properly and stops reacting to
+ following SETUP messages
+ Revision: 312573
+ Reporter: jpokorny
+ Testers: rmudgett
+ Coders: rmudgett
+
+ Category: Channels/chan_iax2
+
+ ASTERISK-15449: RFC2833 DTMF is not passed correctly when going
+ SIP->IAX2->SIP
+ Revision: 310888
+ Reporter: sharvanek
+ Testers: globalnetinc, jde
+ Coders: twilson
+
+ Category: Channels/chan_local
+
+ ASTERISK-17633: [patch] Chan_local crashes in fixup
+ Revision: 316328
+ Reporter: oej
+ Testers: oej
+ Coders: dvossel
+
+ ASTERISK-17747: [patch] check_bridge(): misplaced ast_mutex_unlock
+ Revision: 315051
+ Reporter: alecdavis
+ Coders: alecdavis
+
+ Category: Channels/chan_sip/General
+
+ ASTERISK-17124: Asterisk does not hangup a channel after endpoint hangs up
+ when using FastAGI
+ Revision: 313545
+ Reporter: devmod
+ Testers: rmudgett, astmiv
+ Coders: rmudgett
+
+ ASTERISK-17682: [patch] [regression] "sip prune" does not clean the
+ relevant peer objects -> memleak
+ Revision: 317211
+ Reporter: vrban
+ Coders: vrban
+
+ ASTERISK-17771: [patch] switching From-address mid-register breaks channel
+ variables
+ Revision: 320055
+ Reporter: wdoekes
+ Coders: wdoekes
+
+ Category: Channels/chan_sip/Registration
+
+ ASTERISK-14953: [patch] Autocreated peers not deleted when unregister
+ explicitly, become zombies
+ Revision: 315671
+ Reporter: kkm
+ Testers: kkm, tilghman, twilson
+ Coders: kkm
+
+ ASTERISK-17382: [patch] Regression after r297603 (Improve handling of
+ REGISTER requests with multiple contact headers.)
+ Revision: 317719
+ Reporter: pnlarsson
+ Coders: enegaard
+
+ ASTERISK-17535: [patch] [regression] Cisco phones do not register
+ Revision: 315891
+ Reporter: jmls
+ Coders: wdoekes
+
+ Category: Core/BuildSystem
+
+ ASTERISK-17668: [patch] fix detection of openssl 1.0
+ Revision: 313277
+ Reporter: tzafrir
+ Coders: tzafrir
+
+ Category: Core/General
+
+ ASTERISK-17370: [patch] FD 32767 exceeds the maximum size of ast_fdset
+ Revision: 315501
+ Reporter: jamicque
+ Testers: chris-mac
+ Coders: tilghman
+
+ Category: Core/ManagerInterface
+
+ ASTERISK-16837: [patch] Duplicated event on AMI interface
+ Revision: 308813
+ Reporter: feyfre
+ Testers: FeyFre, twilson
+ Coders: FeyFre
+
+ ASTERISK-17384: [patch] Security issue in originate, system permission
+ bypassed if using async
+ Revision: 314607
+ Reporter: kobaz
+ Coders: mnicholson
+
+ ASTERISK-17578: [patch] DoS through manager interface: no timeout for
+ unauthenticated logins
+ Revision: 312761
+ Reporter: tzafrir
+ Testers: mnicholson
+ Coders: mnicholson
+
+ Category: Core/RTP
+
+ ASTERISK-14589: [patch] Fix for Sonus DTMF issues
+ Revision: 310888
+ Reporter: jasonshugart
+ Testers: globalnetinc, jde
+ Coders: twilson
+
+ Category: Features
+
+ ASTERISK-17264: [patch] [regression] Call Pickup Hangs Asterisk
+ (deadlock?)
+ Revision: 318734
+ Reporter: docent
+ Testers: lmadsen, francesco_r, amilcar, isis242, alecdavis, irroot,
+ rymkus, loloski, rmudgett
+ Coders: rmudgett, alecdavis
+
+ Category: Formats/format_wav
+
+ ASTERISK-16957: [patch] Asterisk does not play wav files with unknown
+ chunk types
+ Revision: 315257
+ Reporter: jhirsch
+ Coders: jhirsch
+
+ Category: Functions/func_odbc
+
+ ASTERISK-16946: [patch] Call to SQLDescribeCol returns an invalid
+ ColumnSize paramenter on x64 (Patch included)
+ Revision: 310140
+ Reporter: pruiz
+ Coders: tilghman
+
+ Category: Functions/func_shell
+
+ ASTERISK-17630: [patch] Concatenates uninitialized buffer causes garbage
+ data prior result also may cause crash
+ Revision: 314822
+ Reporter: johnz
+ Coders: russell
+
+ Category: General
+
+ ASTERISK-17552: [patch] 'core show locks' should show Thread ID in HEX,
+ then would match up with GDB's backtrace
+ Revision: 310779
+ Reporter: alecdavis
+ Coders: alecdavis
+
+ ASTERISK-17555: [patch] Remove extra quote in indications.conf
+ Revision: 311048
+ Reporter: igorg
+ Testers: IgorG
+ Coders: IgorG
+
+ ASTERISK-17782: [patch] bug in contrib/scripts/safe_asterisk
+ Revision: 317102
+ Reporter: lefoyer
+ Testers: wdoekes, lefoyer
+ Coders: wdoekes
+
+ Category: PBX/pbx_ael
+
+ ASTERISK-17497: [patch] AELsub() for calling routines that will remain
+ stable between internal changes
+ Revision: 310435
+ Reporter: alexandrekeller
+ Testers: alexandrekeller
+ Coders: tilghman
+
+ Category: Resources/res_agi
+
+ ASTERISK-16144: [patch] AGISTATUS bug in Asterisk 1.6.2.7
+ Revision: 313545
+ Reporter: siby
+ Testers: rmudgett, astmiv
+ Coders: rmudgett
+
+ ASTERISK-17520: [patch] HANGUP is not sent to AGI in time
+ Revision: 313545
+ Reporter: nvitaly
+ Testers: rmudgett, astmiv
+ Coders: rmudgett
+
+ ----------------------------------------------------------------------
+
+ Commits Not Associated with an Issue
+
+ [Back to Top]
+
+ This is a list of all changes that went into this release that did not
+ directly close an issue from the issue tracker. The commits may have been
+ marked as being related to an issue. If that is the case, the issue
+ numbers are listed here, as well.
+
+ +------------------------------------------------------------------------+
+ | Revision | Author | Summary | Issues |
+ | | | | Referenced |
+ |----------+------------+------------------------------+-----------------|
+ | 308721 | mnicholson | silence gcc 4.2 compiler | |
+ | | | warning | |
+ |----------+------------+------------------------------+-----------------|
+ | 309947 | twilson | Don't try to free statically | |
+ | | | allocated memory. | |
+ |----------+------------+------------------------------+-----------------|
+ | | | Remove the provisional | |
+ | 311199 | mnicholson | keepalive scheduler entry's | |
+ | | | reference to the pvt when we | |
+ | | | remove the scheduler entry. | |
+ |----------+------------+------------------------------+-----------------|
+ | 311201 | mnicholson | Don't dec the usecount of an | |
+ | | | eventqent then use it. | |
+ |----------+------------+------------------------------+-----------------|
+ | 311203 | mnicholson | Don't hold the pvt lock | |
+ | | | while streaming a file. | |
+ |----------+------------+------------------------------+-----------------|
+ | | | app_voicemail: close_mailbox | |
+ | 312070 | alecdavis | needs to respect additional | |
+ | | | messages while mailbox is | |
+ | | | open. | |
+ |----------+------------+------------------------------+-----------------|
+ | | | app_voicemail:close_mailbox | |
+ | 312119 | alecdavis | imap_storage doesn't use | |
+ | | | last_msg_index | |
+ |----------+------------+------------------------------+-----------------|
+ | | | Found some leaking file | |
+ | 312285 | tilghman | descriptors while looking at | ASTERISK-17553 |
+ | | | ast_FD_SETSIZE dead code. | |
+ |----------+------------+------------------------------+-----------------|
+ | | | app_voicemail: | |
+ | 312290 | alecdavis | leave_vociemail doesn't use | ASTERISK-17580 |
+ | | | last_message_index to store | |
+ | | | next message | |
+ |----------+------------+------------------------------+-----------------|
+ | | | Prevent the login thread and | |
+ | 314908 | mnicholson | the app threads from using | |
+ | | | the asterisk channel at the | |
+ | | | same time. | |
+ |----------+------------+------------------------------+-----------------|
+ | | | Reverted part of r314607, as | |
+ | 315147 | mnicholson | it can introduce a | |
+ | | | regression. | |
+ |----------+------------+------------------------------+-----------------|
+ | 315596 | twilson | Allow transfer loops without | |
+ | | | allowing forwarding loops | |
+ |----------+------------+------------------------------+-----------------|
+ | | | Partial revert of r315671 | |
+ | 315989 | seanbright | which removed a logging | ASTERISK-14953 |
+ | | | statement and not a manager | |
+ | | | event. | |
+ |----------+------------+------------------------------+-----------------|
+ | | | Backport the use of curl | |
+ | 316006 | tilghman | from 1.6.2 to make the 1.4 | |
+ | | | target work on Bamboo. | |
+ |----------+------------+------------------------------+-----------------|
+ | | | Breakage from slightly | |
+ | 316089 | tilghman | before the outage; would | |
+ | | | have fixed sooner but for | |
+ | | | the outage. | |
+ |----------+------------+------------------------------+-----------------|
+ | 317574 | twilson | Re-fix queue round-robin | |
+ |----------+------------+------------------------------+-----------------|
+ | | | Make sure everyone gets an | |
+ | 319652 | twilson | unhold when a transfer | |
+ | | | succeeds | |
+ |----------+------------+------------------------------+-----------------|
+ | 320393 | pabelanger | Solaris compatibility fixes | |
+ |----------+------------+------------------------------+-----------------|
+ | | | don't drop any voice frames | |
+ | 322646 | mnicholson | when checking for T.38 | ASTERISK-17705 |
+ | | | during early media | |
+ |----------+------------+------------------------------+-----------------|
+ | 322657 | mnicholson | whitespace | |
+ |----------+------------+------------------------------+-----------------|
+ | | | unlock pvt when we drop | |
+ | 322698 | mnicholson | voice frames received in | |
+ | | | early media when in t.38 | |
+ | | | mode | |
+ |----------+------------+------------------------------+-----------------|
+ | | | Resolve a segfault/bus error | ASTERISK-15359, |
+ | 323559 | seanbright | when we try to map memory | ASTERISK-16460 |
+ | | | that falls on a page | |
+ |----------+------------+------------------------------+-----------------|
+ | 323732 | twilson | Fix DYNAMIC_FEATURES | ASTERISK-17914 |
+ |----------+------------+------------------------------+-----------------|
+ | 324627 | dvossel | Addresses AST-2011-010, | |
+ | | | remote crash in IAX2 driver | |
+ |----------+------------+------------------------------+-----------------|
+ | 325275 | twilson | Don't leak SIP username | |
+ | | | information | |
+ +------------------------------------------------------------------------+
+
+ ----------------------------------------------------------------------
+
+ Diffstat Results
+
+ [Back to Top]
+
+ This is a summary of the changes to the source code that went into this
+ release that was generated using the diffstat utility.
+
+ apps/app_dial.c | 5
+ apps/app_directed_pickup.c | 26
+ apps/app_meetme.c | 1
+ apps/app_mixmonitor.c | 4
+ apps/app_voicemail.c | 108 +-
+ cdr/cdr_pgsql.c | 8
+ channels/chan_agent.c | 181 ++-
+ channels/chan_dahdi.c | 2007 ++++++++++++++++++++++++---------------
+ channels/chan_iax2.c | 14
+ channels/chan_local.c | 4
+ channels/chan_sip.c | 106 +-
+ channels/chan_skinny.c | 75 +
+ configs/http.conf.sample | 7
+ configs/indications.conf.sample | 2
+ configs/manager.conf.sample | 11
+ configs/skinny.conf.sample | 9
+ configure.ac | 10
+ contrib/scripts/safe_asterisk | 2
+ formats/format_wav.c | 84 -
+ include/asterisk/autoconfig.h.in | 3
+ include/asterisk/select.h | 15
+ main/asterisk.c | 6
+ main/callerid.c | 19
+ main/channel.c | 32
+ main/http.c | 25
+ main/manager.c | 122 ++
+ main/udptl.c | 6
+ main/utils.c | 2
+ pbx/pbx_ael.c | 30
+ res/res_agi.c | 46
+ res/res_config_odbc.c | 2
+ res/res_features.c | 273 +++--
+ 32 files changed, 2133 insertions(+), 1112 deletions(-)
+
+ ----------------------------------------------------------------------
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/cdr/cdr_pgsql.c
^
|
@@ -38,7 +38,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 288265 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 320393 $")
#include <sys/types.h>
#include <stdio.h>
@@ -86,7 +86,11 @@
if (PQstatus(conn) != CONNECTION_BAD) {
connected = 1;
if (PQsetClientEncoding(conn, encoding)) {
+#ifdef HAVE_PGSQL_pg_encoding_to_char
ast_log(LOG_WARNING, "Failed to set encoding to '%s'. Encoding set to default '%s'\n", encoding, pg_encoding_to_char(PQclientEncoding(conn)));
+#else
+ ast_log(LOG_WARNING, "Failed to set encoding to '%s'. Encoding set to default.\n", encoding);
+#endif
}
} else {
pgerror = PQerrorMessage(conn);
@@ -298,7 +302,11 @@
ast_log(LOG_DEBUG, "Successfully connected to PostgreSQL database.\n");
connected = 1;
if (PQsetClientEncoding(conn, encoding)) {
+#ifdef HAVE_PGSQL_pg_encoding_to_char
ast_log(LOG_WARNING, "Failed to set encoding to '%s'. Encoding set to default '%s'\n", encoding, pg_encoding_to_char(PQclientEncoding(conn)));
+#else
+ ast_log(LOG_WARNING, "Failed to set encoding to '%s'. Encoding set to default.\n", encoding);
+#endif
}
} else {
pgerror = PQerrorMessage(conn);
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/channels/chan_agent.c
^
|
@@ -36,7 +36,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 273793 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 314908 $")
#include <stdio.h>
#include <string.h>
@@ -194,9 +194,9 @@
char password[AST_MAX_AGENT]; /*!< Password for Agent login */
char name[AST_MAX_AGENT];
int inherited_devicestate; /*!< Does the underlying channel have a devicestate to pass? */
- ast_mutex_t app_lock; /**< Synchronization between owning applications */
int app_lock_flag;
ast_cond_t app_complete_cond;
+ ast_cond_t login_wait_cond;
volatile int app_sleep_cond; /**< Sleep condition for the login app */
struct ast_channel *owner; /**< Agent */
/**! channel they logged in from. This may also be used to tell if an agent
@@ -384,8 +384,8 @@
return NULL;
ast_copy_string(p->agent, agt, sizeof(p->agent));
ast_mutex_init(&p->lock);
- ast_mutex_init(&p->app_lock);
ast_cond_init(&p->app_complete_cond, NULL);
+ ast_cond_init(&p->login_wait_cond, NULL);
p->app_lock_flag = 0;
p->app_sleep_cond = 1;
p->group = group;
@@ -429,21 +429,26 @@
*/
static int agent_cleanup(struct agent_pvt *p)
{
- struct ast_channel *chan = p->owner;
+ struct ast_channel *chan = NULL;
+ ast_mutex_lock(&p->lock);
+ chan = p->owner;
p->owner = NULL;
chan->tech_pvt = NULL;
- p->app_sleep_cond = 1;
/* Release ownership of the agent to other threads (presumably running the login app). */
+ p->app_sleep_cond = 1;
p->app_lock_flag = 0;
ast_cond_signal(&p->app_complete_cond);
if (chan)
ast_channel_free(chan);
if (p->dead) {
+ ast_mutex_unlock(&p->lock);
ast_mutex_destroy(&p->lock);
- ast_mutex_destroy(&p->app_lock);
ast_cond_destroy(&p->app_complete_cond);
+ ast_cond_destroy(&p->login_wait_cond);
free(p);
- }
+ } else {
+ ast_mutex_unlock(&p->lock);
+ }
return 0;
}
@@ -751,22 +756,25 @@
struct agent_pvt *p = ast->tech_pvt;
int res = -1;
int newstate=0;
+ struct ast_channel *chan;
+
ast_mutex_lock(&p->lock);
p->acknowledged = 0;
+
+ if (p->pending) {
+ ast_log(LOG_DEBUG, "Pretending to dial on pending agent\n");
+ ast_mutex_unlock(&p->lock);
+ ast_setstate(ast, AST_STATE_DIALING);
+ return 0;
+ }
+
if (!p->chan) {
- if (p->pending) {
- ast_log(LOG_DEBUG, "Pretending to dial on pending agent\n");
- newstate = AST_STATE_DIALING;
- res = 0;
- } else {
- ast_log(LOG_NOTICE, "Whoa, they hung up between alloc and call... what are the odds of that?\n");
- res = -1;
- }
+ ast_log(LOG_DEBUG, "Agent disconnected while we were connecting the call\n");
ast_mutex_unlock(&p->lock);
- if (newstate)
- ast_setstate(ast, newstate);
return res;
- } else if (!ast_strlen_zero(p->loginchan)) {
+ }
+
+ if (!ast_strlen_zero(p->loginchan)) {
time(&p->start);
/* Call on this agent */
if (option_verbose > 2)
@@ -783,14 +791,25 @@
ast_verbose(VERBOSE_PREFIX_3 "agent_call, call to agent '%s' call on '%s'\n", p->agent, p->chan->name);
if (option_debug > 2)
ast_log(LOG_DEBUG, "Playing beep, lang '%s'\n", p->chan->language);
- res = ast_streamfile(p->chan, beep, p->chan->language);
+
+ chan = p->chan;
+ ast_mutex_unlock(&p->lock);
+
+ res = ast_streamfile(chan, beep, chan->language);
if (option_debug > 2)
ast_log(LOG_DEBUG, "Played beep, result '%d'\n", res);
if (!res) {
- res = ast_waitstream(p->chan, "");
+ res = ast_waitstream(chan, "");
if (option_debug > 2)
ast_log(LOG_DEBUG, "Waited for stream, result '%d'\n", res);
}
+
+ ast_mutex_lock(&p->lock);
+ if (!p->chan) {
+ /* chan went away while we were streaming, this shouldn't be possible */
+ res = -1;
+ }
+
if (!res) {
res = ast_set_read_format(p->chan, ast_best_codec(p->chan->nativeformats));
if (option_debug > 2)
@@ -888,6 +907,12 @@
p->app_sleep_cond = 1;
p->acknowledged = 0;
+ /* Release ownership of the agent to other threads (presumably running the login app). */
+ if (ast_strlen_zero(p->loginchan)) {
+ p->app_lock_flag = 0;
+ ast_cond_signal(&p->app_complete_cond);
+ }
+
/* if they really are hung up then set start to 0 so the test
* later if we're called on an already downed channel
* doesn't cause an agent to be logged out like when
@@ -973,8 +998,8 @@
p->abouttograb = 0;
} else if (p->dead) {
ast_mutex_destroy(&p->lock);
- ast_mutex_destroy(&p->app_lock);
ast_cond_destroy(&p->app_complete_cond);
+ ast_cond_destroy(&p->login_wait_cond);
free(p);
} else {
if (p->chan) {
@@ -984,11 +1009,6 @@
p->lastdisc = ast_tvadd(ast_tvnow(), ast_samp2tv(p->wrapuptime, 1000));
ast_mutex_unlock(&p->lock);
}
- /* Release ownership of the agent to other threads (presumably running the login app). */
- if (ast_strlen_zero(p->loginchan)) {
- p->app_lock_flag = 0;
- ast_cond_signal(&p->app_complete_cond);
- }
}
return 0;
}
@@ -1076,7 +1096,6 @@
static struct ast_channel *agent_new(struct agent_pvt *p, int state)
{
struct ast_channel *tmp;
- int alreadylocked;
#if 0
if (!p->chan) {
ast_log(LOG_WARNING, "No channel? :(\n");
@@ -1119,50 +1138,6 @@
#endif
ast_update_use_count();
tmp->priority = 1;
- /* Wake up and wait for other applications (by definition the login app)
- * to release this channel). Takes ownership of the agent channel
- * to this thread only.
- * For signalling the other thread, ast_queue_frame is used until we
- * can safely use signals for this purpose. The pselect() needs to be
- * implemented in the kernel for this.
- */
- p->app_sleep_cond = 0;
-
- alreadylocked = p->app_lock_flag;
- p->app_lock_flag = 1;
-
- if(ast_strlen_zero(p->loginchan) && alreadylocked) {
- if (p->chan) {
- ast_queue_frame(p->chan, &ast_null_frame);
- ast_mutex_unlock(&p->lock); /* For other thread to read the condition. */
- p->app_lock_flag = 1;
- ast_mutex_lock(&p->lock);
- } else {
- ast_log(LOG_WARNING, "Agent disconnected while we were connecting the call\n");
- p->owner = NULL;
- tmp->tech_pvt = NULL;
- p->app_sleep_cond = 1;
- ast_channel_free( tmp );
- ast_mutex_unlock(&p->lock); /* For other thread to read the condition. */
- p->app_lock_flag = 0;
- ast_cond_signal(&p->app_complete_cond);
- return NULL;
- }
- } else if (!ast_strlen_zero(p->loginchan)) {
- if (p->chan)
- ast_queue_frame(p->chan, &ast_null_frame);
- if (!p->chan) {
- ast_log(LOG_WARNING, "Agent disconnected while we were connecting the call\n");
- p->owner = NULL;
- tmp->tech_pvt = NULL;
- p->app_sleep_cond = 1;
- ast_channel_free( tmp );
- ast_mutex_unlock(&p->lock); /* For other thread to read the condition. */
- return NULL;
- }
- }
- if (p->chan)
- ast_indicate(p->chan, AST_CONTROL_UNHOLD);
return tmp;
}
@@ -1306,8 +1281,8 @@
if (!p->owner) {
if (!p->chan) {
ast_mutex_destroy(&p->lock);
- ast_mutex_destroy(&p->app_lock);
ast_cond_destroy(&p->app_complete_cond);
+ ast_cond_destroy(&p->login_wait_cond);
free(p);
} else {
/* Cause them to hang up */
@@ -1550,6 +1525,47 @@
}
*cause = hasagent ? AST_CAUSE_BUSY : AST_CAUSE_UNREGISTERED;
AST_LIST_UNLOCK(&agents);
+
+ if (chan) {
+ ast_mutex_lock(&p->lock);
+ if (p->pending) {
+ ast_mutex_unlock(&p->lock);
+ return chan;
+ }
+
+ if (!p->chan) {
+ ast_log(LOG_DEBUG, "Agent disconnected while we were connecting the call\n");
+ *cause = AST_CAUSE_UNREGISTERED;
+ ast_mutex_unlock(&p->lock);
+ agent_hangup(chan);
+ return NULL;
+ }
+
+ /* when not in callback mode we need to take control of the channel
+ * from the login app thread */
+ if(ast_strlen_zero(p->loginchan)) {
+ p->app_sleep_cond = 0;
+ p->app_lock_flag = 1;
+
+ ast_queue_frame(p->chan, &ast_null_frame);
+ ast_cond_wait(&p->login_wait_cond, &p->lock);
+
+ if (!p->chan) {
+ ast_log(LOG_DEBUG, "Agent disconnected while we were connecting the call\n");
+ p->app_sleep_cond = 1;
+ p->app_lock_flag = 0;
+ ast_cond_signal(&p->app_complete_cond);
+ ast_mutex_unlock(&p->lock);
+ *cause = AST_CAUSE_UNREGISTERED;
+ agent_hangup(chan);
+ return NULL;
+ }
+
+ ast_indicate(p->chan, AST_CONTROL_UNHOLD);
+ }
+ ast_mutex_unlock(&p->lock);
+ }
+
return chan;
}
@@ -2302,14 +2318,15 @@
}
ast_mutex_unlock(&p->lock);
AST_LIST_UNLOCK(&agents);
+
/* Synchronize channel ownership between call to agent and itself. */
- ast_mutex_lock(&p->app_lock);
+ ast_mutex_lock(&p->lock);
if (p->app_lock_flag == 1) {
- ast_cond_wait(&p->app_complete_cond, &p->app_lock);
+ ast_cond_signal(&p->login_wait_cond);
+ ast_cond_wait(&p->app_complete_cond, &p->lock);
}
- ast_mutex_unlock(&p->app_lock);
- ast_mutex_lock(&p->lock);
ast_mutex_unlock(&p->lock);
+
if (p->ackcall > 1)
res = agent_ack_sleep(p);
else
@@ -2325,13 +2342,21 @@
sched_yield();
}
ast_mutex_lock(&p->lock);
- if (res && p->owner)
- ast_log(LOG_WARNING, "Huh? We broke out when there was still an owner?\n");
/* Log us off if appropriate */
if (p->chan == chan) {
p->chan = NULL;
p->inherited_devicestate = -1;
}
+
+ /* Synchronize channel ownership between call to agent and itself. */
+ if (p->app_lock_flag == 1) {
+ ast_cond_signal(&p->login_wait_cond);
+ ast_cond_wait(&p->app_complete_cond, &p->lock);
+ }
+
+ if (res && p->owner)
+ ast_log(LOG_WARNING, "Huh? We broke out when there was still an owner?\n");
+
p->acknowledged = 0;
logintime = time(NULL) - p->loginstart;
p->loginstart = 0;
@@ -2348,8 +2373,8 @@
ast_device_state_changed("Agent/%s", p->agent);
if (p->dead && !p->owner) {
ast_mutex_destroy(&p->lock);
- ast_mutex_destroy(&p->app_lock);
ast_cond_destroy(&p->app_complete_cond);
+ ast_cond_destroy(&p->login_wait_cond);
free(p);
}
}
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/channels/chan_dahdi.c
^
|
@@ -47,7 +47,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 307623 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 313188 $")
#include <stdio.h>
#include <string.h>
@@ -126,6 +126,21 @@
#undef SUPPORT_USERUSER
/*!
+ * Define to make always pick a channel if allowed. Useful for
+ * testing channel shifting.
+ */
+//#define ALWAYS_PICK_CHANNEL 1
+
+/*!
+ * Define to force a RESTART on a channel that returns a cause
+ * code of PRI_CAUSE_REQUESTED_CHAN_UNAVAIL(44). If the cause
+ * is because of a stuck channel on the peer and the channel is
+ * always the next channel we pick for an outgoing call then
+ * this can help.
+ */
+#define FORCE_RESTART_UNAVAIL_CHANS 1
+
+/*!
* \note Define ZHONE_HACK to cause us to go off hook and then back on hook when
* the user hangs up to reset the state machine so ring works properly.
* This is used to be able to support kewlstart by putting the zhone in
@@ -146,8 +161,6 @@
/*! \brief Typically, how many rings before we should send Caller*ID */
#define DEFAULT_CIDRINGS 1
-#define CHANNEL_PSEUDO -12
-
#define AST_LAW(p) (((p)->law == DAHDI_LAW_ALAW) ? AST_FORMAT_ALAW : AST_FORMAT_ULAW)
/*! \brief Signaling types that need to use MF detection should be placed in this macro */
@@ -258,6 +271,9 @@
static int dahdi_sendtext(struct ast_channel *c, const char *text);
+#define SIG_PRI_LIB_HANDLE_CASES \
+ SIG_PRI
+
/*! \brief Avoid the silly dahdi_getevent which ignores a bunch of events */
static inline int dahdi_get_event(int fd)
{
@@ -592,6 +608,19 @@
unsigned int unknown_alarm:1;
/*! \brief TRUE if TDD in MATE mode */
unsigned int mate:1;
+#if defined(HAVE_PRI)
+ /*!
+ * \brief TRUE when this channel is allocated.
+ *
+ * \details
+ * Needed to hold an outgoing channel allocation before the
+ * owner pointer is created.
+ *
+ * \note This is one of several items to check to see if a
+ * channel is available for use.
+ */
+ unsigned int allocated:1;
+#endif /* defined(HAVE_PRI) */
/*! \brief TRUE if we originated the call leg. */
unsigned int outgoing:1;
/* unsigned int overlapdial:1; unused and potentially confusing */
@@ -3060,7 +3089,6 @@
}
if (!p->subs[SUB_REAL].owner && !p->subs[SUB_CALLWAIT].owner && !p->subs[SUB_THREEWAY].owner) {
- p->owner = NULL;
p->ringt = 0;
p->distinctivering = 0;
p->confirmanswer = 0;
@@ -3101,59 +3129,58 @@
if (res < 0)
ast_log(LOG_WARNING, "Unable to set law on channel %d to default: %s\n", p->channel, strerror(errno));
/* Perform low level hangup if no owner left */
-#ifdef HAVE_PRI
+#if defined(HAVE_PRI)
if (p->pri) {
#ifdef SUPPORT_USERUSER
const char *useruser = pbx_builtin_getvar_helper(ast,"USERUSERINFO");
#endif
/* Make sure we have a call (or REALLY have a call in the case of a PRI) */
+ pri_grab(p, p->pri);
if (p->call && (!p->bearer || (p->bearer->call == p->call))) {
- if (!pri_grab(p, p->pri)) {
- if (p->alreadyhungup) {
- ast_log(LOG_DEBUG, "Already hungup... Calling hangup once, and clearing call\n");
+ if (p->alreadyhungup) {
+ ast_log(LOG_DEBUG, "Already hungup... Calling hangup once, and clearing call\n");
#ifdef SUPPORT_USERUSER
- pri_call_set_useruser(p->call, useruser);
+ pri_call_set_useruser(p->call, useruser);
#endif
- pri_hangup(p->pri->pri, p->call, -1);
- p->call = NULL;
- if (p->bearer)
- p->bearer->call = NULL;
- } else {
- const char *cause = pbx_builtin_getvar_helper(ast,"PRI_CAUSE");
- int icause = ast->hangupcause ? ast->hangupcause : -1;
- ast_log(LOG_DEBUG, "Not yet hungup... Calling hangup once with icause, and clearing call\n");
+ pri_hangup(p->pri->pri, p->call, -1);
+ p->call = NULL;
+ if (p->bearer)
+ p->bearer->call = NULL;
+ } else {
+ const char *cause = pbx_builtin_getvar_helper(ast,"PRI_CAUSE");
+ int icause = ast->hangupcause ? ast->hangupcause : -1;
+ ast_log(LOG_DEBUG, "Not yet hungup... Calling hangup once with icause, and clearing call\n");
#ifdef SUPPORT_USERUSER
- pri_call_set_useruser(p->call, useruser);
+ pri_call_set_useruser(p->call, useruser);
#endif
- p->alreadyhungup = 1;
- if (p->bearer)
- p->bearer->alreadyhungup = 1;
- if (cause) {
- if (atoi(cause))
- icause = atoi(cause);
- }
- pri_hangup(p->pri->pri, p->call, icause);
+ p->alreadyhungup = 1;
+ if (p->bearer)
+ p->bearer->alreadyhungup = 1;
+ if (cause) {
+ if (atoi(cause))
+ icause = atoi(cause);
}
- if (res < 0)
- ast_log(LOG_WARNING, "pri_disconnect failed\n");
- pri_rel(p->pri);
- } else {
- ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
- res = -1;
+ pri_hangup(p->pri->pri, p->call, icause);
}
} else {
if (p->bearer)
ast_log(LOG_DEBUG, "Bearer call is %p, while ours is still %p\n", p->bearer->call, p->call);
p->call = NULL;
- res = 0;
}
+ p->allocated = 0;
+ p->owner = NULL;
+ pri_rel(p->pri);
+ res = 0;
+ } else
+#endif /* defined(HAVE_PRI) */
+ {
+ p->owner = NULL;
}
-#endif
if (p->sig && (p->sig != SIG_PRI))
res = dahdi_set_hook(p->subs[SUB_REAL].dfd, DAHDI_ONHOOK);
if (res < 0) {
@@ -3233,12 +3260,10 @@
p->oprmode = 0;
ast->tech_pvt = NULL;
ast_mutex_unlock(&p->lock);
- ast_module_unref(ast_module_info->self);
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Hungup '%s'\n", ast->name);
ast_mutex_lock(&iflock);
-
if (p->restartpending) {
num_restart_pending--;
}
@@ -3257,6 +3282,8 @@
}
}
ast_mutex_unlock(&iflock);
+
+ ast_module_unref(ast_module_info->self);
return 0;
}
@@ -4512,27 +4539,30 @@
case DAHDI_EVENT_ALARM:
#ifdef HAVE_PRI
if (!p->pri || !p->pri->pri || (pri_get_timer(p->pri->pri, PRI_TIMER_T309) < 0)) {
- /* T309 is not enabled : hangup calls when alarm occurs */
+ /* T309 is not enabled : destroy calls when alarm occurs */
if (p->call) {
if (p->pri && p->pri->pri) {
- if (!pri_grab(p, p->pri)) {
- pri_hangup(p->pri->pri, p->call, -1);
- pri_destroycall(p->pri->pri, p->call);
- p->call = NULL;
- pri_rel(p->pri);
- } else
- ast_log(LOG_WARNING, "Failed to grab PRI!\n");
+ pri_grab(p, p->pri);
+ pri_destroycall(p->pri->pri, p->call);
+ p->call = NULL;
+ pri_rel(p->pri);
} else
ast_log(LOG_WARNING, "The PRI Call has not been destroyed\n");
}
if (p->owner)
p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
}
- if (p->bearer)
+ if (p->bearer) {
p->bearer->inalarm = 1;
- else
+ p->bearer->resetting = 0;
+ } else
#endif
- p->inalarm = 1;
+ {
+ p->inalarm = 1;
+#if defined(HAVE_PRI)
+ p->resetting = 0;
+#endif /* defined(HAVE_PRI) */
+ }
res = get_alarms(p);
handle_alarms(p, res);
#ifdef HAVE_PRI
@@ -4872,9 +4902,12 @@
case DAHDI_EVENT_NOALARM:
p->inalarm = 0;
#ifdef HAVE_PRI
+ p->resetting = 0;
/* Extremely unlikely but just in case */
- if (p->bearer)
+ if (p->bearer) {
p->bearer->inalarm = 0;
+ p->bearer->resetting = 0;
+ }
#endif
if (!p->unknown_alarm) {
ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", p->channel);
@@ -5389,14 +5422,27 @@
static struct ast_frame *dahdi_read(struct ast_channel *ast)
{
- struct dahdi_pvt *p = ast->tech_pvt;
+ struct dahdi_pvt *p;
int res;
int index;
void *readbuf;
struct ast_frame *f;
+ /*
+ * For analog channels, we must do deadlock avoidance because
+ * analog ports can have more than one Asterisk channel using
+ * the same private structure.
+ */
+ p = ast->tech_pvt;
while (ast_mutex_trylock(&p->lock)) {
DEADLOCK_AVOIDANCE(&ast->lock);
+
+ /*
+ * For PRI channels, we must refresh the private pointer because
+ * the call could move to another B channel while the Asterisk
+ * channel is unlocked.
+ */
+ p = ast->tech_pvt;
}
index = dahdi_get_index(ast, p, 0);
@@ -6622,7 +6668,10 @@
/* some switches require a minimum guard time between
the last FGD wink and something that answers
immediately. This ensures it */
- if (ast_safe_sleep(chan,100)) goto quit;
+ if (ast_safe_sleep(chan, 100)) {
+ ast_hangup(chan);
+ goto quit;
+ }
}
dahdi_enable_ec(p);
if (NEED_MFDETECT(p)) {
@@ -7614,6 +7663,9 @@
break;
case DAHDI_EVENT_NOALARM:
i->inalarm = 0;
+#if defined(HAVE_PRI)
+ i->resetting = 0;
+#endif /* defined(HAVE_PRI) */
if (!i->unknown_alarm) {
ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", i->channel);
manager_event(EVENT_FLAG_SYSTEM, "AlarmClear",
@@ -7624,6 +7676,9 @@
break;
case DAHDI_EVENT_ALARM:
i->inalarm = 1;
+#if defined(HAVE_PRI)
+ i->resetting = 0;
+#endif /* defined(HAVE_PRI) */
res = get_alarms(i);
handle_alarms(i, res);
/* fall thru intentionally */
@@ -8509,10 +8564,14 @@
/* the dchannel is down so put the channel in alarm */
if (tmp->pri && !pri_is_up(tmp->pri)) {
tmp->inalarm = 1;
+ tmp->resetting = 0;
}
#endif
if ((res = get_alarms(tmp)) != DAHDI_ALARM_NONE) {
tmp->inalarm = 1;
+#if defined(HAVE_PRI)
+ tmp->resetting = 0;
+#endif /* defined(HAVE_PRI) */
handle_alarms(tmp, res);
} else {
/* yes, this looks strange... the unknown_alarm flag is only used to
@@ -8582,6 +8641,86 @@
return tmp;
}
+#if defined(HAVE_PRI)
+/*!
+ * \internal
+ * \brief Determine if a private channel structure is in use.
+ * \since 1.8
+ *
+ * \param pvt Channel to determine if in use.
+ *
+ * \return TRUE if the channel is in use.
+ */
+static int sig_pri_is_chan_in_use(struct dahdi_pvt *pvt)
+{
+ return pvt->owner || pvt->call || pvt->allocated || pvt->resetting || pvt->inalarm;
+}
+#endif /* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
+/*!
+ * \internal
+ * \brief Determine if a private channel structure is available.
+ * \since 1.8
+ *
+ * \param pvt Channel to determine if available.
+ *
+ * \return TRUE if the channel is available.
+ */
+static int sig_pri_is_chan_available(struct dahdi_pvt *pvt)
+{
+ return !sig_pri_is_chan_in_use(pvt);
+}
+#endif /* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
+/*!
+ * \internal
+ * \brief Simple check if the channel is available to use.
+ * \since 1.8
+ *
+ * \param pvt Private channel control structure.
+ *
+ * \retval 0 Interface not available.
+ * \retval 1 Interface is available.
+ */
+static int sig_pri_available_check(struct dahdi_pvt *pvt)
+{
+ /*
+ * If interface is available for use
+ * then the channel is available.
+ */
+ if (sig_pri_is_chan_available(pvt)) {
+ return 1;
+ }
+ return 0;
+}
+#endif /* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
+static int sig_pri_available(struct dahdi_pvt *pvt)
+{
+ struct dahdi_pvt *p = pvt;
+ struct dahdi_pri *pri;
+
+ if (!p->pri) {
+ /* Something is wrong here. A PRI channel without the pri pointer? */
+ return 0;
+ }
+ pri = p->pri;
+
+ ast_mutex_lock(&pri->lock);
+ if (sig_pri_available_check(p)) {
+ p->allocated = 1;
+ ast_mutex_unlock(&pri->lock);
+ return 1;
+ }
+
+ ast_mutex_unlock(&pri->lock);
+ return 0;
+}
+#endif /* defined(HAVE_PRI) */
+
static inline int available(struct dahdi_pvt *p, int channelmatch, ast_group_t groupmatch, int *busy, int *channelmatched, int *groupmatched)
{
int res;
@@ -8599,6 +8738,16 @@
return 0;
*channelmatched = 1;
}
+
+#if defined(HAVE_PRI)
+ switch (p->sig) {
+ case SIG_PRI_LIB_HANDLE_CASES:
+ return sig_pri_available(p);
+ default:
+ break;
+ }
+#endif /* defined(HAVE_PRI) */
+
/* We're at least busy at this point */
if (busy) {
if ((p->sig == SIG_FXOKS) || (p->sig == SIG_FXOLS) || (p->sig == SIG_FXOGS))
@@ -8616,10 +8765,8 @@
#ifdef HAVE_PRI
/* Trust PRI */
if (p->pri) {
- if (p->resetting || p->call)
- return 0;
- else
- return 1;
+ /* Likely only GR-303 gets here. */
+ return sig_pri_available(p);
}
#endif
if (!(p->radio || (p->oprmode < 0)))
@@ -8726,6 +8873,18 @@
#ifdef HAVE_PRI
+/*!
+ * \internal
+ * \brief Find an empty B-channel interface to use.
+ *
+ * \param pri PRI span control structure.
+ * \param backwards TRUE if the search starts from higher channels.
+ *
+ * \note Assumes the pri->lock is already obtained.
+ *
+ * \retval array-index into private pointer array on success.
+ * \retval -1 on error.
+ */
static int pri_find_empty_chan(struct dahdi_pri *pri, int backwards)
{
int x;
@@ -8738,7 +8897,8 @@
break;
if (!backwards && (x >= pri->numchans))
break;
- if (pri->pvts[x] && !pri->pvts[x]->inalarm && !pri->pvts[x]->owner) {
+ if (pri->pvts[x]
+ && sig_pri_is_chan_available(pri->pvts[x])) {
ast_log(LOG_DEBUG, "Found empty available channel %d/%d\n",
pri->pvts[x]->logicalspan, pri->pvts[x]->prioffset);
return x;
@@ -8929,10 +9089,34 @@
break;
}
}
+#if defined(HAVE_PRI)
+ switch (p->sig) {
+ case SIG_GR303FXOKS:
+ case SIG_GR303FXSKS:
+ case SIG_PRI_LIB_HANDLE_CASES:
+ /*
+ * We already have the B channel reserved for this call. We
+ * just need to make sure that dahdi_hangup() has completed
+ * cleaning up before continuing.
+ */
+ ast_mutex_lock(&p->lock);
+ ast_mutex_unlock(&p->lock);
+ break;
+ default:
+ break;
+ }
+#endif /* defined(HAVE_PRI) */
p->outgoing = 1;
tmp = dahdi_new(p, AST_STATE_RESERVED, 0, p->owner ? SUB_CALLWAIT : SUB_REAL, 0, 0);
if (!tmp) {
p->outgoing = 0;
+#if defined(HAVE_PRI)
+ /*
+ * This should be the last thing to clear when we are done with
+ * the channel.
+ */
+ p->allocated = 0;
+#endif /* defined(HAVE_PRI) */
}
#ifdef HAVE_PRI
if (p->bearer) {
@@ -9016,7 +9200,7 @@
* \brief Obtain the DAHDI owner channel lock if the owner exists.
* \since 1.8
*
- * \param pri DAHDI PRI control structure.
+ * \param pri PRI span control structure.
* \param chanpos Channel position in the span.
*
* \note Assumes the pri->lock is already obtained.
@@ -9046,9 +9230,126 @@
#if defined(HAVE_PRI)
/*!
* \internal
+ * \brief Queue the given frame onto the owner channel.
+ * \since 1.8
+ *
+ * \param pri PRI span control structure.
+ * \param chanpos Channel position in the span.
+ * \param frame Frame to queue onto the owner channel.
+ *
+ * \note Assumes the pri->lock is already obtained.
+ * \note Assumes the sig_pri_lock_private(pri->pvts[chanpos]) is already obtained.
+ *
+ * \return Nothing
+ */
+static void pri_queue_frame(struct dahdi_pri *pri, int chanpos, struct ast_frame *frame)
+{
+ sig_pri_lock_owner(pri, chanpos);
+ if (pri->pvts[chanpos]->owner) {
+ ast_queue_frame(pri->pvts[chanpos]->owner, frame);
+ ast_channel_unlock(pri->pvts[chanpos]->owner);
+ }
+}
+#endif /* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
+/*!
+ * \internal
+ * \brief Queue a control frame of the specified subclass onto the owner channel.
+ * \since 1.8
+ *
+ * \param pri PRI span control structure.
+ * \param chanpos Channel position in the span.
+ * \param subclass Control frame subclass to queue onto the owner channel.
+ *
+ * \note Assumes the pri->lock is already obtained.
+ * \note Assumes the sig_pri_lock_private(pri->pvts[chanpos]) is already obtained.
+ *
+ * \return Nothing
+ */
+static void pri_queue_control(struct dahdi_pri *pri, int chanpos, int subclass)
+{
+ struct ast_frame f = {AST_FRAME_CONTROL, };
+
+ f.subclass = subclass;
+ pri_queue_frame(pri, chanpos, &f);
+}
+#endif /* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
+/*!
+ * \internal
+ * \brief Find the channel associated with the libpri call.
+ * \since 1.10
+ *
+ * \param pri PRI span control structure.
+ * \param call LibPRI opaque call pointer to find.
+ *
+ * \note Assumes the pri->lock is already obtained.
+ *
+ * \retval array-index into private pointer array on success.
+ * \retval -1 on error.
+ */
+static int pri_find_principle_by_call(struct dahdi_pri *pri, q931_call *call)
+{
+ int idx;
+
+ if (!call) {
+ /* Cannot find a call without a call. */
+ return -1;
+ }
+ for (idx = 0; idx < pri->numchans; ++idx) {
+ if (pri->pvts[idx] && pri->pvts[idx]->call == call) {
+ /* Found the principle */
+ return idx;
+ }
+ }
+ return -1;
+}
+#endif /* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
+/*!
+ * \internal
+ * \brief Kill the call.
+ * \since 1.10
+ *
+ * \param pri PRI span control structure.
+ * \param call LibPRI opaque call pointer to find.
+ * \param cause Reason call was killed.
+ *
+ * \note Assumes the pvt->pri->lock is already obtained.
+ *
+ * \return Nothing
+ */
+static void sig_pri_kill_call(struct dahdi_pri *pri, q931_call *call, int cause)
+{
+ int chanpos;
+
+ chanpos = pri_find_principle_by_call(pri, call);
+ if (chanpos < 0) {
+ pri_hangup(pri->pri, call, cause);
+ return;
+ }
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ if (!pri->pvts[chanpos]->owner) {
+ pri_hangup(pri->pri, call, cause);
+ pri->pvts[chanpos]->call = NULL;
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ return;
+ }
+ pri->pvts[chanpos]->owner->hangupcause = cause;
+ pri_queue_control(pri, chanpos, AST_CONTROL_HANGUP);
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+}
+#endif /* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
+/*!
+ * \internal
* \brief Find the private structure for the libpri call.
*
- * \param pri Span controller structure.
+ * \param pri PRI span control structure.
* \param channel LibPRI encoded channel ID.
*
* \note Assumes the pri->lock is already obtained.
@@ -9090,7 +9391,7 @@
* \internal
* \brief Fixup the private structure associated with the libpri call.
*
- * \param pri Span controller structure.
+ * \param pri PRI span control structure.
* \param principle Array-index into private array to move call to if not already there.
* \param c LibPRI opaque call pointer to find if need to move call.
*
@@ -9133,7 +9434,7 @@
old->owner ? old->owner->name : "",
old->channel, new->channel);
}
- if (new->owner) {
+ if (!sig_pri_is_chan_available(new)) {
ast_log(LOG_WARNING,
"Can't move call (%s) from channel %d to %d. It is already in use.\n",
old->owner ? old->owner->name : "",
@@ -9170,11 +9471,13 @@
new->alreadyhungup = old->alreadyhungup;
new->isidlecall = old->isidlecall;
new->progress = old->progress;
+ new->allocated = old->allocated;
new->outgoing = old->outgoing;
new->digital = old->digital;
old->alreadyhungup = 0;
old->isidlecall = 0;
old->progress = 0;
+ old->allocated = 0;
old->outgoing = 0;
old->digital = 0;
@@ -9221,6 +9524,54 @@
#endif /* defined(HAVE_PRI) */
#if defined(HAVE_PRI)
+/*!
+ * \internal
+ * \brief Find and fixup the private structure associated with the libpri call.
+ *
+ * \param pri PRI span control structure.
+ * \param channel LibPRI encoded channel ID.
+ * \param call LibPRI opaque call pointer.
+ *
+ * \details
+ * This is a combination of pri_find_principle() and pri_fixup_principle()
+ * to reduce code redundancy and to make handling several PRI_EVENT_xxx's
+ * consistent for the current architecture.
+ *
+ * \note Assumes the pri->lock is already obtained.
+ *
+ * \retval array-index into private pointer array on success.
+ * \retval -1 on error.
+ */
+static int pri_find_fixup_principle(struct dahdi_pri *pri, int channel, q931_call *call)
+{
+ int chanpos;
+
+ chanpos = pri_find_principle(pri, channel);
+ if (chanpos < 0) {
+ ast_log(LOG_WARNING, "Span %d: PRI requested channel %d/%d is unconfigured.\n",
+ pri->span, PRI_SPAN(channel), PRI_CHANNEL(channel));
+ sig_pri_kill_call(pri, call, PRI_CAUSE_IDENTIFIED_CHANNEL_NOTEXIST);
+ return -1;
+ }
+ chanpos = pri_fixup_principle(pri, chanpos, call);
+ if (chanpos < 0) {
+ ast_log(LOG_WARNING, "Span %d: PRI requested channel %d/%d is not available.\n",
+ pri->span, PRI_SPAN(channel), PRI_CHANNEL(channel));
+ /*
+ * Using Q.931 section 5.2.3.1 b) as the reason for picking
+ * PRI_CAUSE_CHANNEL_UNACCEPTABLE. Receiving a
+ * PRI_CAUSE_REQUESTED_CHAN_UNAVAIL would cause us to restart
+ * that channel (which is not specified by Q.931) and kill some
+ * other call which would be bad.
+ */
+ sig_pri_kill_call(pri, call, PRI_CAUSE_CHANNEL_UNACCEPTABLE);
+ return -1;
+ }
+ return chanpos;
+}
+#endif /* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
static void *do_idle_thread(void *vchan)
{
struct ast_channel *chan = vchan;
@@ -9360,14 +9711,25 @@
ast_mutex_unlock(&pridebugfdlock);
}
-static int pri_check_restart(struct dahdi_pri *pri)
+/*!
+ * \internal
+ * \brief Restart the next channel we think is idle on the span.
+ *
+ * \param pri PRI span control structure.
+ *
+ * \note Assumes the pri->lock is already obtained.
+ *
+ * \return Nothing
+ */
+static void pri_check_restart(struct dahdi_pri *pri)
{
- do {
- pri->resetpos++;
- } while ((pri->resetpos < pri->numchans) &&
- (!pri->pvts[pri->resetpos] ||
- pri->pvts[pri->resetpos]->call ||
- pri->pvts[pri->resetpos]->resetting));
+ for (++pri->resetpos; pri->resetpos < pri->numchans; ++pri->resetpos) {
+ if (!pri->pvts[pri->resetpos]
+ || sig_pri_is_chan_in_use(pri->pvts[pri->resetpos])) {
+ continue;
+ }
+ break;
+ }
if (pri->resetpos < pri->numchans) {
/* Mark the channel as resetting and restart it */
pri->pvts[pri->resetpos]->resetting = 1;
@@ -9376,7 +9738,6 @@
pri->resetting = 0;
time(&pri->lastreset);
}
- return 0;
}
static int pri_hangup_all(struct dahdi_pvt *p, struct dahdi_pri *pri)
@@ -9489,7 +9850,8 @@
char plancallingnum[256];
char plancallingani[256];
char calledtonstr[10];
-
+ unsigned int len;
+
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
gettimeofday(&lastidle, NULL);
@@ -9523,8 +9885,9 @@
ast_mutex_lock(&pri->lock);
if (pri->switchtype != PRI_SWITCH_GR303_TMC && (pri->resetinterval > 0)) {
if (pri->resetting && pri_is_up(pri)) {
- if (pri->resetpos < 0)
+ if (pri->resetpos < 0) {
pri_check_restart(pri);
+ }
} else {
if (!pri->resetting && (t - pri->lastreset) >= pri->resetinterval) {
pri->resetting = 1;
@@ -9538,30 +9901,41 @@
haveidles = 0;
activeidles = 0;
for (x = pri->numchans; x >= 0; x--) {
- if (pri->pvts[x] && !pri->pvts[x]->owner &&
- !pri->pvts[x]->call) {
- if (haveidles < pri->minunused) {
- haveidles++;
- } else if (!pri->pvts[x]->resetting) {
- nextidle = x;
- break;
+ if (pri->pvts[x]) {
+ if (sig_pri_is_chan_available(pri->pvts[x])) {
+ if (haveidles < pri->minunused) {
+ haveidles++;
+ } else {
+ nextidle = x;
+ break;
+ }
+ } else if (pri->pvts[x]->owner && pri->pvts[x]->isidlecall) {
+ activeidles++;
}
- } else if (pri->pvts[x] && pri->pvts[x]->owner && pri->pvts[x]->isidlecall)
- activeidles++;
+ }
}
if (nextidle > -1) {
if (ast_tvdiff_ms(ast_tvnow(), lastidle) > 1000) {
/* Don't create a new idle call more than once per second */
snprintf(idlen, sizeof(idlen), "%d/%s", pri->pvts[nextidle]->channel, pri->idledial);
+ /*
+ * Release the PRI lock while we create the channel so other
+ * threads can send D channel messages.
+ */
+ ast_mutex_unlock(&pri->lock);
idle = dahdi_request(dahdi_chan_name, AST_FORMAT_ULAW, idlen, &cause);
+ ast_mutex_lock(&pri->lock);
if (idle) {
pri->pvts[nextidle]->isidlecall = 1;
if (ast_pthread_create_background(&p, NULL, do_idle_thread, idle)) {
ast_log(LOG_WARNING, "Unable to start new thread for idle channel '%s'\n", idle->name);
- dahdi_hangup(idle);
+ ast_mutex_unlock(&pri->lock);
+ ast_hangup(idle);
+ ast_mutex_lock(&pri->lock);
}
- } else
+ } else {
ast_log(LOG_WARNING, "Unable to request channel 'DAHDI/%s' for idle call\n", idlen);
+ }
gettimeofday(&lastidle, NULL);
}
} else if ((haveidles < pri->minunused) &&
@@ -9699,30 +10073,31 @@
pri->lastreset -= pri->resetinterval;
pri->lastreset += 5;
}
- pri->resetting = 0;
/* Take the channels from inalarm condition */
- for (i = 0; i < pri->numchans; i++)
+ pri->resetting = 0;
+ for (i = 0; i < pri->numchans; i++) {
if (pri->pvts[i]) {
pri->pvts[i]->inalarm = 0;
+ pri->pvts[i]->resetting = 0;
}
+ }
break;
case PRI_EVENT_DCHAN_DOWN:
pri_find_dchan(pri);
if (!pri_is_up(pri)) {
- pri->resetting = 0;
/* Hangup active channels and put them in alarm mode */
+ pri->resetting = 0;
for (i = 0; i < pri->numchans; i++) {
struct dahdi_pvt *p = pri->pvts[i];
if (p) {
if (!p->pri || !p->pri->pri || pri_get_timer(p->pri->pri, PRI_TIMER_T309) < 0) {
- /* T309 is not enabled : hangup calls when alarm occurs */
+ /* T309 is not enabled : destroy calls when alarm occurs */
if (p->call) {
if (p->pri && p->pri->pri) {
- pri_hangup(p->pri->pri, p->call, -1);
pri_destroycall(p->pri->pri, p->call);
p->call = NULL;
} else
- ast_log(LOG_WARNING, "The PRI Call have not been destroyed\n");
+ ast_log(LOG_WARNING, "The PRI Call has not been destroyed\n");
}
if (p->realcall) {
pri_hangup_all(p->realcall, pri);
@@ -9730,20 +10105,24 @@
p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
}
p->inalarm = 1;
+ p->resetting = 0;
}
}
}
break;
case PRI_EVENT_RESTART:
- if (e->restart.channel > -1) {
+ if (e->restart.channel > -1 && PRI_CHANNEL(e->ring.channel) != 0xFF) {
chanpos = pri_find_principle(pri, e->restart.channel);
if (chanpos < 0)
- ast_log(LOG_WARNING, "Restart requested on odd/unavailable channel number %d/%d on span %d\n",
- PRI_SPAN(e->restart.channel), PRI_CHANNEL(e->restart.channel), pri->span);
+ ast_log(LOG_WARNING,
+ "Span %d: Restart requested on odd/unavailable channel number %d/%d\n",
+ pri->span, PRI_SPAN(e->restart.channel),
+ PRI_CHANNEL(e->restart.channel));
else {
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "B-channel %d/%d restarted on span %d\n",
- PRI_SPAN(e->restart.channel), PRI_CHANNEL(e->restart.channel), pri->span);
+ ast_verbose(VERBOSE_PREFIX_3 "Span %d: Channel %d/%d restarted\n",
+ pri->span, PRI_SPAN(e->restart.channel),
+ PRI_CHANNEL(e->restart.channel));
ast_mutex_lock(&pri->pvts[chanpos]->lock);
if (pri->pvts[chanpos]->call) {
pri_destroycall(pri->pri, pri->pvts[chanpos]->call);
@@ -9758,7 +10137,8 @@
}
} else {
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_2 "Restart on requested on entire span %d\n", pri->span);
+ ast_verbose(VERBOSE_PREFIX_2 "Restart requested on entire span %d\n",
+ pri->span);
for (x = 0; x < pri->numchans; x++)
if (pri->pvts[x]) {
ast_mutex_lock(&pri->pvts[x]->lock);
@@ -9775,748 +10155,818 @@
}
break;
case PRI_EVENT_KEYPAD_DIGIT:
- chanpos = pri_find_principle(pri, e->digit.channel);
+ chanpos = pri_find_principle_by_call(pri, e->digit.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "KEYPAD_DIGITs received on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->digit.channel), PRI_CHANNEL(e->digit.channel), pri->span);
- } else {
- chanpos = pri_fixup_principle(pri, chanpos, e->digit.call);
- if (chanpos > -1) {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- /* queue DTMF frame if the PBX for this call was already started (we're forwarding KEYPAD_DIGITs further on */
- if ((pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) && pri->pvts[chanpos]->call==e->digit.call && pri->pvts[chanpos]->owner) {
- /* how to do that */
- int digitlen = strlen(e->digit.digits);
- char digit;
- int i;
- for (i = 0; i < digitlen; i++) {
- digit = e->digit.digits[i];
- {
- struct ast_frame f = { AST_FRAME_DTMF, digit, };
- dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
- }
- }
+ ast_log(LOG_WARNING,
+ "Span %d: Received keypad digits for unknown call.\n", pri->span);
+ break;
+ }
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ /* queue DTMF frame if the PBX for this call was already started (we're forwarding KEYPAD_DIGITs further on */
+ if ((pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)
+ && pri->pvts[chanpos]->owner) {
+ /* how to do that */
+ int digitlen = strlen(e->digit.digits);
+ char digit;
+ int i;
+ for (i = 0; i < digitlen; i++) {
+ digit = e->digit.digits[i];
+ {
+ struct ast_frame f = { AST_FRAME_DTMF, digit, };
+ dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
}
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
}
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
case PRI_EVENT_INFO_RECEIVED:
- chanpos = pri_find_principle(pri, e->ring.channel);
+ chanpos = pri_find_principle_by_call(pri, e->ring.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "INFO received on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
- } else {
- chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
- if (chanpos > -1) {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- /* queue DTMF frame if the PBX for this call was already started (we're forwarding INFORMATION further on */
- if ((pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) && pri->pvts[chanpos]->call==e->ring.call && pri->pvts[chanpos]->owner) {
- /* how to do that */
- int digitlen = strlen(e->ring.callednum);
- char digit;
- int i;
- for (i = 0; i < digitlen; i++) {
- digit = e->ring.callednum[i];
- {
- struct ast_frame f = { AST_FRAME_DTMF, digit, };
- dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
- }
- }
+ ast_log(LOG_WARNING,
+ "Span %d: Received INFORMATION for unknown call.\n", pri->span);
+ break;
+ }
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ /* queue DTMF frame if the PBX for this call was already started (we're forwarding INFORMATION further on */
+ if ((pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)
+ && pri->pvts[chanpos]->owner) {
+ /* how to do that */
+ int digitlen = strlen(e->ring.callednum);
+ char digit;
+ int i;
+ for (i = 0; i < digitlen; i++) {
+ digit = e->ring.callednum[i];
+ {
+ struct ast_frame f = { AST_FRAME_DTMF, digit, };
+ dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
}
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
}
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
case PRI_EVENT_RING:
crv = NULL;
- if (e->ring.channel == -1)
+ chanpos = pri_find_principle_by_call(pri, e->ring.call);
+ if (-1 < chanpos) {
+ /* Libpri has already filtered out duplicate SETUPs. */
+ ast_log(LOG_WARNING,
+ "Span %d: Got SETUP with duplicate call ptr. Dropping call.\n",
+ pri->span);
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_NORMAL_TEMPORARY_FAILURE);
+ break;
+ }
+ if (e->ring.channel == -1 || PRI_CHANNEL(e->ring.channel) == 0xFF) {
+ /* Any channel requested. */
chanpos = pri_find_empty_chan(pri, 1);
- else
+ } else if (PRI_CHANNEL(e->ring.channel) == 0x00) {
+ /* No channel specified. */
+ {
+ /* We will not accept incoming call waiting calls. */
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_INCOMPATIBLE_DESTINATION);
+ break;
+ }
+ } else {
+ /* A channel is specified. */
chanpos = pri_find_principle(pri, e->ring.channel);
- /* if no channel specified find one empty */
+ if (chanpos < 0) {
+ ast_log(LOG_WARNING,
+ "Span %d: SETUP on unconfigured channel %d/%d\n",
+ pri->span, PRI_SPAN(e->ring.channel),
+ PRI_CHANNEL(e->ring.channel));
+ } else if (!sig_pri_is_chan_available(pri->pvts[chanpos])) {
+ /* This is where we handle initial glare */
+ ast_log(LOG_DEBUG,
+ "Span %d: SETUP requested unavailable channel %d/%d. Attempting to renegotiate.\n",
+ pri->span, PRI_SPAN(e->ring.channel),
+ PRI_CHANNEL(e->ring.channel));
+ chanpos = -1;
+ }
+#if defined(ALWAYS_PICK_CHANNEL)
+ if (e->ring.flexible) {
+ chanpos = -1;
+ }
+#endif /* defined(ALWAYS_PICK_CHANNEL) */
+ if (chanpos < 0 && e->ring.flexible) {
+ /* We can try to pick another channel. */
+ chanpos = pri_find_empty_chan(pri, 1);
+ }
+ }
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Ring requested on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
- } else {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- if (pri->pvts[chanpos]->owner) {
- if (pri->pvts[chanpos]->call == e->ring.call) {
- ast_log(LOG_WARNING, "Duplicate setup requested on channel %d/%d already in use on span %d\n",
- PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- break;
- } else {
- /* This is where we handle initial glare */
- ast_log(LOG_DEBUG, "Ring requested on channel %d/%d already in use or previously requested on span %d. Attempting to renegotiating channel.\n",
- PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- chanpos = -1;
- }
+ if (e->ring.flexible) {
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION);
+ } else {
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_REQUESTED_CHAN_UNAVAIL);
}
- if (chanpos > -1)
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ break;
}
- if ((chanpos < 0) && (e->ring.flexible))
- chanpos = pri_find_empty_chan(pri, 1);
- if (chanpos > -1) {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- if (pri->switchtype == PRI_SWITCH_GR303_TMC) {
- /* Should be safe to lock CRV AFAIK while bearer is still locked */
- crv = pri_find_crv(pri, pri_get_crv(pri->pri, e->ring.call, NULL));
+
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ if (pri->switchtype == PRI_SWITCH_GR303_TMC) {
+ /* Should be safe to lock CRV AFAIK while bearer is still locked */
+ crv = pri_find_crv(pri, pri_get_crv(pri->pri, e->ring.call, NULL));
+ if (crv)
+ ast_mutex_lock(&crv->lock);
+ if (!crv || crv->owner) {
+ pri->pvts[chanpos]->call = NULL;
+ if (crv) {
+ if (crv->owner)
+ crv->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+ ast_log(LOG_WARNING, "Call received for busy CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
+ } else
+ ast_log(LOG_NOTICE, "Call received for unconfigured CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_INVALID_CALL_REFERENCE);
if (crv)
- ast_mutex_lock(&crv->lock);
- if (!crv || crv->owner) {
- pri->pvts[chanpos]->call = NULL;
- if (crv) {
- if (crv->owner)
- crv->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- ast_log(LOG_WARNING, "Call received for busy CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
- } else
- ast_log(LOG_NOTICE, "Call received for unconfigured CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_INVALID_CALL_REFERENCE);
- if (crv)
- ast_mutex_unlock(&crv->lock);
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- break;
- }
+ ast_mutex_unlock(&crv->lock);
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ break;
}
- pri->pvts[chanpos]->call = e->ring.call;
- apply_plan_to_number(plancallingnum, sizeof(plancallingnum), pri, e->ring.callingnum, e->ring.callingplan);
- if (pri->pvts[chanpos]->use_callerid) {
- ast_shrink_phone_number(plancallingnum);
- ast_copy_string(pri->pvts[chanpos]->cid_num, plancallingnum, sizeof(pri->pvts[chanpos]->cid_num));
+ }
+
+ /* Mark channel as in use so noone else will steal it. */
+ pri->pvts[chanpos]->call = e->ring.call;
+
+ apply_plan_to_number(plancallingnum, sizeof(plancallingnum), pri, e->ring.callingnum, e->ring.callingplan);
+ if (pri->pvts[chanpos]->use_callerid) {
+ ast_shrink_phone_number(plancallingnum);
+ ast_copy_string(pri->pvts[chanpos]->cid_num, plancallingnum, sizeof(pri->pvts[chanpos]->cid_num));
#ifdef PRI_ANI
- if (!ast_strlen_zero(e->ring.callingani)) {
- apply_plan_to_number(plancallingani, sizeof(plancallingani), pri, e->ring.callingani, e->ring.callingplanani);
- ast_shrink_phone_number(plancallingani);
- ast_copy_string(pri->pvts[chanpos]->cid_ani, plancallingani, sizeof(pri->pvts[chanpos]->cid_ani));
- } else {
- pri->pvts[chanpos]->cid_ani[0] = '\0';
- }
-#endif
- ast_copy_string(pri->pvts[chanpos]->cid_name, e->ring.callingname, sizeof(pri->pvts[chanpos]->cid_name));
- pri->pvts[chanpos]->cid_ton = e->ring.callingplan; /* this is the callingplan (TON/NPI), e->ring.callingplan>>4 would be the TON */
+ if (!ast_strlen_zero(e->ring.callingani)) {
+ apply_plan_to_number(plancallingani, sizeof(plancallingani), pri, e->ring.callingani, e->ring.callingplanani);
+ ast_shrink_phone_number(plancallingani);
+ ast_copy_string(pri->pvts[chanpos]->cid_ani, plancallingani, sizeof(pri->pvts[chanpos]->cid_ani));
} else {
- pri->pvts[chanpos]->cid_num[0] = '\0';
pri->pvts[chanpos]->cid_ani[0] = '\0';
- pri->pvts[chanpos]->cid_name[0] = '\0';
- pri->pvts[chanpos]->cid_ton = 0;
}
- apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
- e->ring.redirectingnum, e->ring.callingplanrdnis);
+#endif
+ ast_copy_string(pri->pvts[chanpos]->cid_name, e->ring.callingname, sizeof(pri->pvts[chanpos]->cid_name));
+ pri->pvts[chanpos]->cid_ton = e->ring.callingplan; /* this is the callingplan (TON/NPI), e->ring.callingplan>>4 would be the TON */
+ } else {
+ pri->pvts[chanpos]->cid_num[0] = '\0';
+ pri->pvts[chanpos]->cid_ani[0] = '\0';
+ pri->pvts[chanpos]->cid_name[0] = '\0';
+ pri->pvts[chanpos]->cid_ton = 0;
+ }
+ apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
+ e->ring.redirectingnum, e->ring.callingplanrdnis);
- /* Set DNID on all incoming calls -- even immediate */
- ast_copy_string(pri->pvts[chanpos]->dnid, e->ring.callednum, sizeof(pri->pvts[chanpos]->dnid));
+ /* Set DNID on all incoming calls -- even immediate */
+ ast_copy_string(pri->pvts[chanpos]->dnid, e->ring.callednum, sizeof(pri->pvts[chanpos]->dnid));
- /* If immediate=yes go to s|1 */
- if (pri->pvts[chanpos]->immediate) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of immediate=yes\n");
- pri->pvts[chanpos]->exten[0] = 's';
- pri->pvts[chanpos]->exten[1] = '\0';
- }
- /* Get called number */
- else if (!ast_strlen_zero(e->ring.callednum)) {
- ast_copy_string(pri->pvts[chanpos]->exten, e->ring.callednum, sizeof(pri->pvts[chanpos]->exten));
- } else if (pri->overlapdial)
- pri->pvts[chanpos]->exten[0] = '\0';
- else {
- /* Some PRI circuits are set up to send _no_ digits. Handle them as 's'. */
- pri->pvts[chanpos]->exten[0] = 's';
- pri->pvts[chanpos]->exten[1] = '\0';
+ /* If immediate=yes go to s|1 */
+ if (pri->pvts[chanpos]->immediate) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of immediate=yes\n");
+ pri->pvts[chanpos]->exten[0] = 's';
+ pri->pvts[chanpos]->exten[1] = '\0';
+ }
+ /* Get called number */
+ else if (!ast_strlen_zero(e->ring.callednum)) {
+ ast_copy_string(pri->pvts[chanpos]->exten, e->ring.callednum, sizeof(pri->pvts[chanpos]->exten));
+ } else if (pri->overlapdial)
+ pri->pvts[chanpos]->exten[0] = '\0';
+ else {
+ /* Some PRI circuits are set up to send _no_ digits. Handle them as 's'. */
+ pri->pvts[chanpos]->exten[0] = 's';
+ pri->pvts[chanpos]->exten[1] = '\0';
+ }
+ /* No number yet, but received "sending complete"? */
+ if (e->ring.complete && (ast_strlen_zero(e->ring.callednum))) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of Complete received\n");
+ pri->pvts[chanpos]->exten[0] = 's';
+ pri->pvts[chanpos]->exten[1] = '\0';
+ }
+
+ /* Make sure extension exists (or in overlap dial mode, can exist) */
+ if (((pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) && ast_canmatch_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) ||
+ ast_exists_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) {
+ /* Setup law */
+ int law;
+ if (pri->switchtype != PRI_SWITCH_GR303_TMC) {
+ /* Set to audio mode at this point */
+ law = 1;
+ if (ioctl(pri->pvts[chanpos]->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &law) == -1)
+ ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d: %s\n", pri->pvts[chanpos]->channel, law, strerror(errno));
}
- /* No number yet, but received "sending complete"? */
- if (e->ring.complete && (ast_strlen_zero(e->ring.callednum))) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of Complete received\n");
- pri->pvts[chanpos]->exten[0] = 's';
- pri->pvts[chanpos]->exten[1] = '\0';
- }
-
- /* Make sure extension exists (or in overlap dial mode, can exist) */
- if (((pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) && ast_canmatch_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) ||
- ast_exists_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) {
- /* Setup law */
- int law;
- if (pri->switchtype != PRI_SWITCH_GR303_TMC) {
- /* Set to audio mode at this point */
- law = 1;
- if (ioctl(pri->pvts[chanpos]->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &law) == -1)
- ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d: %s\n", pri->pvts[chanpos]->channel, law, strerror(errno));
- }
- if (e->ring.layer1 == PRI_LAYER_1_ALAW)
- law = DAHDI_LAW_ALAW;
- else
- law = DAHDI_LAW_MULAW;
- res = dahdi_setlaw(pri->pvts[chanpos]->subs[SUB_REAL].dfd, law);
- if (res < 0)
- ast_log(LOG_WARNING, "Unable to set law on channel %d\n", pri->pvts[chanpos]->channel);
- res = set_actual_gain(pri->pvts[chanpos]->subs[SUB_REAL].dfd, 0, pri->pvts[chanpos]->rxgain, pri->pvts[chanpos]->txgain, law);
- if (res < 0)
- ast_log(LOG_WARNING, "Unable to set gains on channel %d\n", pri->pvts[chanpos]->channel);
- if (e->ring.complete || !(pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)) {
- /* Just announce proceeding */
- pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_PROCEEDING;
- pri_proceeding(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 0);
- } else if (pri->switchtype == PRI_SWITCH_GR303_TMC) {
- pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_CONNECT;
- pri_answer(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
+ if (e->ring.layer1 == PRI_LAYER_1_ALAW)
+ law = DAHDI_LAW_ALAW;
+ else
+ law = DAHDI_LAW_MULAW;
+ res = dahdi_setlaw(pri->pvts[chanpos]->subs[SUB_REAL].dfd, law);
+ if (res < 0)
+ ast_log(LOG_WARNING, "Unable to set law on channel %d\n", pri->pvts[chanpos]->channel);
+ res = set_actual_gain(pri->pvts[chanpos]->subs[SUB_REAL].dfd, 0, pri->pvts[chanpos]->rxgain, pri->pvts[chanpos]->txgain, law);
+ if (res < 0)
+ ast_log(LOG_WARNING, "Unable to set gains on channel %d\n", pri->pvts[chanpos]->channel);
+ if (e->ring.complete || !(pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)) {
+ /* Just announce proceeding */
+ pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_PROCEEDING;
+ pri_proceeding(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 0);
+ } else if (pri->switchtype == PRI_SWITCH_GR303_TMC) {
+ pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_CONNECT;
+ pri_answer(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
+ } else {
+ pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_OVERLAP;
+ pri_need_more_info(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
+ }
+ /* Get the use_callingpres state */
+ pri->pvts[chanpos]->callingpres = e->ring.callingpres;
+
+ /* Start PBX */
+ if (!e->ring.complete
+ && (pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)
+ && ast_matchmore_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) {
+ /*
+ * Release the PRI lock while we create the channel so other
+ * threads can send D channel messages. We must also release
+ * the private lock to prevent deadlock while creating the
+ * channel.
+ */
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ ast_mutex_unlock(&pri->lock);
+ if (crv) {
+ /* Set bearer and such */
+ pri_assign_bearer(crv, pri, pri->pvts[chanpos]);
+ c = dahdi_new(crv, AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
+ pri->pvts[chanpos]->owner = &inuse;
+ ast_log(LOG_DEBUG, "Started up crv %d:%d on bearer channel %d\n", pri->trunkgroup, crv->channel, crv->bearer->channel);
} else {
- pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_OVERLAP;
- pri_need_more_info(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
+ c = dahdi_new(pri->pvts[chanpos], AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
}
- /* Get the use_callingpres state */
- pri->pvts[chanpos]->callingpres = e->ring.callingpres;
-
- /* Start PBX */
- if (!e->ring.complete
- && (pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)
- && ast_matchmore_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) {
- /*
- * Release the PRI lock while we create the channel
- * so other threads can send D channel messages.
- */
- ast_mutex_unlock(&pri->lock);
- if (crv) {
- /* Set bearer and such */
- pri_assign_bearer(crv, pri, pri->pvts[chanpos]);
- c = dahdi_new(crv, AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
- pri->pvts[chanpos]->owner = &inuse;
- ast_log(LOG_DEBUG, "Started up crv %d:%d on bearer channel %d\n", pri->trunkgroup, crv->channel, crv->bearer->channel);
- } else {
- c = dahdi_new(pri->pvts[chanpos], AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
+ ast_mutex_lock(&pri->lock);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ if (c) {
+ if (!ast_strlen_zero(e->ring.callingsubaddr)) {
+ pbx_builtin_setvar_helper(c, "CALLINGSUBADDR", e->ring.callingsubaddr);
+ }
+ if (e->ring.ani2 >= 0) {
+ snprintf(ani2str, sizeof(ani2str), "%d", e->ring.ani2);
+ pbx_builtin_setvar_helper(c, "ANI2", ani2str);
}
- ast_mutex_lock(&pri->lock);
- if (c) {
- if (!ast_strlen_zero(e->ring.callingsubaddr)) {
- pbx_builtin_setvar_helper(c, "CALLINGSUBADDR", e->ring.callingsubaddr);
- }
- if (e->ring.ani2 >= 0) {
- snprintf(ani2str, sizeof(ani2str), "%d", e->ring.ani2);
- pbx_builtin_setvar_helper(c, "ANI2", ani2str);
- }
#ifdef SUPPORT_USERUSER
- if (!ast_strlen_zero(e->ring.useruserinfo)) {
- pbx_builtin_setvar_helper(c, "USERUSERINFO", e->ring.useruserinfo);
- }
+ if (!ast_strlen_zero(e->ring.useruserinfo)) {
+ pbx_builtin_setvar_helper(c, "USERUSERINFO", e->ring.useruserinfo);
+ }
#endif
- snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan);
- pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
- if (e->ring.redirectingreason >= 0)
- pbx_builtin_setvar_helper(c, "PRIREDIRECTREASON", redirectingreason2str(e->ring.redirectingreason));
-
- if (!pri->pvts[chanpos]->digital) {
- /*
- * Call has a channel.
- * Indicate that we are providing dialtone.
- */
- pri->pvts[chanpos]->progress = 1;/* No need to send plain PROGRESS again. */
- pri_progress(pri->pri, e->ring.call,
- PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
- }
+ snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan);
+ pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
+ if (e->ring.redirectingreason >= 0)
+ pbx_builtin_setvar_helper(c, "PRIREDIRECTREASON", redirectingreason2str(e->ring.redirectingreason));
+
+ if (!pri->pvts[chanpos]->digital) {
+ /*
+ * Call has a channel.
+ * Indicate that we are providing dialtone.
+ */
+ pri->pvts[chanpos]->progress = 1;/* No need to send plain PROGRESS again. */
+ pri_progress(pri->pri, e->ring.call,
+ PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
}
+ }
- pthread_attr_init(&attr);
- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- if (c && !ast_pthread_create(&threadid, &attr, ss_thread, c)) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Accepting overlap call from '%s' to '%s' on channel %d/%d, span %d\n",
- plancallingnum, S_OR(pri->pvts[chanpos]->exten, "<unspecified>"),
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
- } else {
- ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ if (c && !ast_pthread_create(&threadid, &attr, ss_thread, c)) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Accepting overlap call from '%s' to '%s' on channel %d/%d, span %d\n",
+ plancallingnum, S_OR(pri->pvts[chanpos]->exten, "<unspecified>"),
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
- if (c)
- ast_hangup(c);
- else {
- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
- pri->pvts[chanpos]->call = NULL;
- }
- }
- pthread_attr_destroy(&attr);
} else {
+ ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
+ if (c) {
+ /* Avoid deadlock while destroying channel */
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ ast_mutex_unlock(&pri->lock);
+ ast_hangup(c);
+ ast_mutex_lock(&pri->lock);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ } else {
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
+ pri->pvts[chanpos]->call = NULL;
+ }
+ }
+ pthread_attr_destroy(&attr);
+ } else {
+ /*
+ * Release the PRI lock while we create the channel so other
+ * threads can send D channel messages. We must also release
+ * the private lock to prevent deadlock while creating the
+ * channel.
+ */
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ ast_mutex_unlock(&pri->lock);
+ c = dahdi_new(pri->pvts[chanpos], AST_STATE_RING, 0, SUB_REAL, law, e->ring.ctype);
+ ast_mutex_lock(&pri->lock);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ if (c) {
/*
- * Release the PRI lock while we create the channel
- * so other threads can send D channel messages.
+ * It is reasonably safe to set the following
+ * channel variables while the PRI and DAHDI private
+ * structures are locked. The PBX has not been
+ * started yet and it is unlikely that any other task
+ * will do anything with the channel we have just
+ * created.
*/
- ast_mutex_unlock(&pri->lock);
- c = dahdi_new(pri->pvts[chanpos], AST_STATE_RING, 0, SUB_REAL, law, e->ring.ctype);
- ast_mutex_lock(&pri->lock);
- if (c) {
- /*
- * It is reasonably safe to set the following
- * channel variables while the PRI and DAHDI private
- * structures are locked. The PBX has not been
- * started yet and it is unlikely that any other task
- * will do anything with the channel we have just
- * created.
- */
- if (!ast_strlen_zero(e->ring.callingsubaddr)) {
- pbx_builtin_setvar_helper(c, "CALLINGSUBADDR", e->ring.callingsubaddr);
- }
- if (e->ring.ani2 >= 0) {
- snprintf(ani2str, sizeof(ani2str), "%d", e->ring.ani2);
- pbx_builtin_setvar_helper(c, "ANI2", ani2str);
- }
+ if (!ast_strlen_zero(e->ring.callingsubaddr)) {
+ pbx_builtin_setvar_helper(c, "CALLINGSUBADDR", e->ring.callingsubaddr);
+ }
+ if (e->ring.ani2 >= 0) {
+ snprintf(ani2str, sizeof(ani2str), "%d", e->ring.ani2);
+ pbx_builtin_setvar_helper(c, "ANI2", ani2str);
+ }
#ifdef SUPPORT_USERUSER
- if (!ast_strlen_zero(e->ring.useruserinfo)) {
- pbx_builtin_setvar_helper(c, "USERUSERINFO", e->ring.useruserinfo);
- }
+ if (!ast_strlen_zero(e->ring.useruserinfo)) {
+ pbx_builtin_setvar_helper(c, "USERUSERINFO", e->ring.useruserinfo);
+ }
#endif
- if (e->ring.redirectingreason >= 0)
- pbx_builtin_setvar_helper(c, "PRIREDIRECTREASON", redirectingreason2str(e->ring.redirectingreason));
+ if (e->ring.redirectingreason >= 0)
+ pbx_builtin_setvar_helper(c, "PRIREDIRECTREASON", redirectingreason2str(e->ring.redirectingreason));
- snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan);
- pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
- }
- if (c && !ast_pbx_start(c)) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Accepting call from '%s' to '%s' on channel %d/%d, span %d\n",
- plancallingnum, pri->pvts[chanpos]->exten,
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
+ snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan);
+ pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
+ }
+ if (c && !ast_pbx_start(c)) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Accepting call from '%s' to '%s' on channel %d/%d, span %d\n",
+ plancallingnum, pri->pvts[chanpos]->exten,
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
- dahdi_enable_ec(pri->pvts[chanpos]);
+ dahdi_enable_ec(pri->pvts[chanpos]);
+ } else {
+ ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
+ if (c) {
+ /* Avoid deadlock while destroying channel */
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ ast_mutex_unlock(&pri->lock);
+ ast_hangup(c);
+ ast_mutex_lock(&pri->lock);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
} else {
- ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
- if (c) {
- ast_hangup(c);
- } else {
- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
- pri->pvts[chanpos]->call = NULL;
- }
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
+ pri->pvts[chanpos]->call = NULL;
}
}
- } else {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Extension '%s' in context '%s' from '%s' does not exist. Rejecting call on channel %d/%d, span %d\n",
- pri->pvts[chanpos]->exten, pri->pvts[chanpos]->context, pri->pvts[chanpos]->cid_num, pri->pvts[chanpos]->logicalspan,
- pri->pvts[chanpos]->prioffset, pri->span);
- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_UNALLOCATED);
- pri->pvts[chanpos]->call = NULL;
- pri->pvts[chanpos]->exten[0] = '\0';
}
- if (crv)
- ast_mutex_unlock(&crv->lock);
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else {
- if (e->ring.flexible)
- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION);
- else
- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_REQUESTED_CHAN_UNAVAIL);
- }
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Span %d: Extension %s@%s does not exist. Rejecting call from '%s'.\n",
+ pri->span, pri->pvts[chanpos]->exten, pri->pvts[chanpos]->context,
+ pri->pvts[chanpos]->cid_num);
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_UNALLOCATED);
+ pri->pvts[chanpos]->call = NULL;
+ pri->pvts[chanpos]->exten[0] = '\0';
+ }
+ if (crv)
+ ast_mutex_unlock(&crv->lock);
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
case PRI_EVENT_RINGING:
- chanpos = pri_find_principle(pri, e->ringing.channel);
+ chanpos = pri_find_fixup_principle(pri, e->ringing.channel,
+ e->ringing.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Ringing requested on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->ringing.channel), PRI_CHANNEL(e->ringing.channel), pri->span);
- } else {
- chanpos = pri_fixup_principle(pri, chanpos, e->ringing.call);
- if (chanpos < 0) {
- ast_log(LOG_WARNING, "Ringing requested on channel %d/%d not in use on span %d\n",
- PRI_SPAN(e->ringing.channel), PRI_CHANNEL(e->ringing.channel), pri->span);
- } else {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- if (ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
- dahdi_enable_ec(pri->pvts[chanpos]);
- pri->pvts[chanpos]->subs[SUB_REAL].needringing = 1;
- if (pri->pvts[chanpos]->call_level < DAHDI_CALL_LEVEL_ALERTING) {
- pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_ALERTING;
- }
- } else
- ast_log(LOG_DEBUG, "Deferring ringing notification because of extra digits to dial...\n");
+ break;
+ }
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ if (ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
+ dahdi_enable_ec(pri->pvts[chanpos]);
+ pri->pvts[chanpos]->subs[SUB_REAL].needringing = 1;
+ if (pri->pvts[chanpos]->call_level < DAHDI_CALL_LEVEL_ALERTING) {
+ pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_ALERTING;
+ }
+ } else
+ ast_log(LOG_DEBUG, "Deferring ringing notification because of extra digits to dial...\n");
+ if (
#ifdef PRI_PROGRESS_MASK
- if (e->ringing.progressmask & PRI_PROG_INBAND_AVAILABLE) {
+ e->ringing.progressmask & PRI_PROG_INBAND_AVAILABLE
#else
- if (e->ringing.progress == 8) {
+ e->ringing.progress == 8
#endif
- /* Now we can do call progress detection */
- if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
- /* RINGING detection isn't required because we got ALERTING signal */
- ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features & ~DSP_PROGRESS_RINGING);
- pri->pvts[chanpos]->dsp_features = 0;
- }
- }
+ ) {
+ /* Now we can do call progress detection */
+ if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
+ /* RINGING detection isn't required because we got ALERTING signal */
+ ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features & ~DSP_PROGRESS_RINGING);
+ pri->pvts[chanpos]->dsp_features = 0;
+ }
+ }
#ifdef SUPPORT_USERUSER
- if (!ast_strlen_zero(e->ringing.useruserinfo)) {
- struct ast_channel *owner = pri->pvts[chanpos]->owner;
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->ringing.useruserinfo);
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- }
+ if (!ast_strlen_zero(e->ringing.useruserinfo)) {
+ struct ast_channel *owner = pri->pvts[chanpos]->owner;
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->ringing.useruserinfo);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ }
#endif
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- }
- }
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
case PRI_EVENT_PROGRESS:
- /* Get chan value if e->e is not PRI_EVNT_RINGING */
- chanpos = pri_find_principle(pri, e->proceeding.channel);
- if (chanpos > -1) {
+ chanpos = pri_find_fixup_principle(pri, e->proceeding.channel,
+ e->proceeding.call);
+ if (chanpos < 0) {
+ break;
+ }
+ if ((!pri->pvts[chanpos]->progress)
#ifdef PRI_PROGRESS_MASK
- if ((!pri->pvts[chanpos]->progress) || (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)) {
+ || (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)
#else
- if ((!pri->pvts[chanpos]->progress) || (e->proceeding.progress == 8)) {
+ || (e->proceeding.progress == 8)
#endif
- struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROGRESS, };
+ ) {
+ struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROGRESS, };
- if (e->proceeding.cause > -1) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "PROGRESS with cause code %d received\n", e->proceeding.cause);
+ if (e->proceeding.cause > -1) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "PROGRESS with cause code %d received\n", e->proceeding.cause);
- /* Work around broken, out of spec USER_BUSY cause in a progress message */
- if (e->proceeding.cause == AST_CAUSE_USER_BUSY) {
- if (pri->pvts[chanpos]->owner) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "PROGRESS with 'user busy' received, signaling AST_CONTROL_BUSY instead of AST_CONTROL_PROGRESS\n");
+ /* Work around broken, out of spec USER_BUSY cause in a progress message */
+ if (e->proceeding.cause == AST_CAUSE_USER_BUSY) {
+ if (pri->pvts[chanpos]->owner) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "PROGRESS with 'user busy' received, signaling AST_CONTROL_BUSY instead of AST_CONTROL_PROGRESS\n");
- pri->pvts[chanpos]->owner->hangupcause = e->proceeding.cause;
- f.subclass = AST_CONTROL_BUSY;
- }
+ pri->pvts[chanpos]->owner->hangupcause = e->proceeding.cause;
+ f.subclass = AST_CONTROL_BUSY;
}
}
-
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- ast_log(LOG_DEBUG, "Queuing frame from PRI_EVENT_PROGRESS on channel %d/%d span %d\n",
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset,pri->span);
- dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
+ }
+
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ ast_log(LOG_DEBUG, "Queuing frame from PRI_EVENT_PROGRESS on channel %d/%d span %d\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset,pri->span);
+ dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
+ if (
#ifdef PRI_PROGRESS_MASK
- if (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE) {
+ e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE
#else
- if (e->proceeding.progress == 8) {
+ e->proceeding.progress == 8
#endif
- /* Now we can do call progress detection */
- if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
- ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features);
- pri->pvts[chanpos]->dsp_features = 0;
- }
- /* Bring voice path up */
- f.subclass = AST_CONTROL_PROGRESS;
- dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
+ ) {
+ /* Now we can do call progress detection */
+ if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
+ ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features);
+ pri->pvts[chanpos]->dsp_features = 0;
}
- pri->pvts[chanpos]->progress = 1;
- pri->pvts[chanpos]->dialing = 0;
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ /* Bring voice path up */
+ f.subclass = AST_CONTROL_PROGRESS;
+ dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
}
+ pri->pvts[chanpos]->progress = 1;
+ pri->pvts[chanpos]->dialing = 0;
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
break;
case PRI_EVENT_PROCEEDING:
- chanpos = pri_find_principle(pri, e->proceeding.channel);
- if (chanpos > -1) {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- if (pri->pvts[chanpos]->call_level < DAHDI_CALL_LEVEL_PROCEEDING) {
- struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
-
- pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_PROCEEDING;
- ast_log(LOG_DEBUG, "Queuing frame from PRI_EVENT_PROCEEDING on channel %d/%d span %d\n",
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset,pri->span);
- dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
+ chanpos = pri_find_fixup_principle(pri, e->proceeding.channel,
+ e->proceeding.call);
+ if (chanpos < 0) {
+ break;
+ }
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ if (pri->pvts[chanpos]->call_level < DAHDI_CALL_LEVEL_PROCEEDING) {
+ struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
+
+ pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_PROCEEDING;
+ ast_log(LOG_DEBUG, "Queuing frame from PRI_EVENT_PROCEEDING on channel %d/%d span %d\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset,pri->span);
+ dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
+ if (
#ifdef PRI_PROGRESS_MASK
- if (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE) {
+ e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE
#else
- if (e->proceeding.progress == 8) {
+ e->proceeding.progress == 8
#endif
- /* Now we can do call progress detection */
- if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
- ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features);
- pri->pvts[chanpos]->dsp_features = 0;
- }
- /* Bring voice path up */
- f.subclass = AST_CONTROL_PROGRESS;
- dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
+ ) {
+ /* Now we can do call progress detection */
+ if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
+ ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features);
+ pri->pvts[chanpos]->dsp_features = 0;
}
- pri->pvts[chanpos]->dialing = 0;
+ /* Bring voice path up */
+ f.subclass = AST_CONTROL_PROGRESS;
+ dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
}
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ pri->pvts[chanpos]->dialing = 0;
}
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
case PRI_EVENT_FACNAME:
- chanpos = pri_find_principle(pri, e->facname.channel);
+ chanpos = pri_find_principle_by_call(pri, e->facname.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Facility Name requested on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->facname.channel), PRI_CHANNEL(e->facname.channel), pri->span);
- } else {
- chanpos = pri_fixup_principle(pri, chanpos, e->facname.call);
- if (chanpos < 0) {
- ast_log(LOG_WARNING, "Facility Name requested on channel %d/%d not in use on span %d\n",
- PRI_SPAN(e->facname.channel), PRI_CHANNEL(e->facname.channel), pri->span);
- } else if (pri->pvts[chanpos]->use_callerid) {
- /* Re-use *69 field for PRI */
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- ast_copy_string(pri->pvts[chanpos]->lastcid_num, e->facname.callingnum, sizeof(pri->pvts[chanpos]->lastcid_num));
- ast_copy_string(pri->pvts[chanpos]->lastcid_name, e->facname.callingname, sizeof(pri->pvts[chanpos]->lastcid_name));
- pri->pvts[chanpos]->subs[SUB_REAL].needcallerid = 1;
- dahdi_enable_ec(pri->pvts[chanpos]);
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- }
+ ast_log(LOG_WARNING, "Span %d: Received facility for unknown call.\n",
+ pri->span);
+ break;
+ }
+ if (pri->pvts[chanpos]->use_callerid) {
+ /* Re-use *69 field for PRI */
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ ast_copy_string(pri->pvts[chanpos]->lastcid_num, e->facname.callingnum, sizeof(pri->pvts[chanpos]->lastcid_num));
+ ast_copy_string(pri->pvts[chanpos]->lastcid_name, e->facname.callingname, sizeof(pri->pvts[chanpos]->lastcid_name));
+ pri->pvts[chanpos]->subs[SUB_REAL].needcallerid = 1;
+ dahdi_enable_ec(pri->pvts[chanpos]);
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
break;
case PRI_EVENT_ANSWER:
- chanpos = pri_find_principle(pri, e->answer.channel);
+ chanpos = pri_find_fixup_principle(pri, e->answer.channel, e->answer.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Answer on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->answer.channel), PRI_CHANNEL(e->answer.channel), pri->span);
- } else {
- chanpos = pri_fixup_principle(pri, chanpos, e->answer.call);
- if (chanpos < 0) {
- ast_log(LOG_WARNING, "Answer requested on channel %d/%d not in use on span %d\n",
- PRI_SPAN(e->answer.channel), PRI_CHANNEL(e->answer.channel), pri->span);
- } else {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- /* Now we can do call progress detection */
+ break;
+ }
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ /* Now we can do call progress detection */
- /* We changed this so it turns on the DSP no matter what... progress or no progress.
- * By this time, we need DTMF detection and other features that were previously disabled
- * -- Matt F */
- if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
- ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features);
- pri->pvts[chanpos]->dsp_features = 0;
- }
- if (pri->pvts[chanpos]->realcall && (pri->pvts[chanpos]->realcall->sig == SIG_FXSKS)) {
- ast_log(LOG_DEBUG, "Starting up GR-303 trunk now that we got CONNECT...\n");
- x = DAHDI_START;
- res = ioctl(pri->pvts[chanpos]->subs[SUB_REAL].dfd, DAHDI_HOOK, &x);
- if (res < 0) {
- if (errno != EINPROGRESS) {
- ast_log(LOG_WARNING, "Unable to start channel: %s\n", strerror(errno));
- }
- }
- } else if (!ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
- pri->pvts[chanpos]->dialing = 1;
- /* Send any "w" waited stuff */
- res = ioctl(pri->pvts[chanpos]->subs[SUB_REAL].dfd, DAHDI_DIAL, &pri->pvts[chanpos]->dop);
- if (res < 0) {
- ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d: %s\n", pri->pvts[chanpos]->channel, strerror(errno));
- pri->pvts[chanpos]->dop.dialstr[0] = '\0';
- } else
- ast_log(LOG_DEBUG, "Sent deferred digit string: %s\n", pri->pvts[chanpos]->dop.dialstr);
- pri->pvts[chanpos]->dop.dialstr[0] = '\0';
- } else if (pri->pvts[chanpos]->confirmanswer) {
- ast_log(LOG_DEBUG, "Waiting on answer confirmation on channel %d!\n", pri->pvts[chanpos]->channel);
- } else {
- pri->pvts[chanpos]->dialing = 0;
- if (pri->pvts[chanpos]->call_level < DAHDI_CALL_LEVEL_CONNECT) {
- pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_CONNECT;
- }
- pri->pvts[chanpos]->subs[SUB_REAL].needanswer =1;
- /* Enable echo cancellation if it's not on already */
- dahdi_enable_ec(pri->pvts[chanpos]);
+ /* We changed this so it turns on the DSP no matter what... progress or no progress.
+ * By this time, we need DTMF detection and other features that were previously disabled
+ * -- Matt F */
+ if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
+ ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features);
+ pri->pvts[chanpos]->dsp_features = 0;
+ }
+ if (pri->pvts[chanpos]->realcall && (pri->pvts[chanpos]->realcall->sig == SIG_FXSKS)) {
+ ast_log(LOG_DEBUG, "Starting up GR-303 trunk now that we got CONNECT...\n");
+ x = DAHDI_START;
+ res = ioctl(pri->pvts[chanpos]->subs[SUB_REAL].dfd, DAHDI_HOOK, &x);
+ if (res < 0) {
+ if (errno != EINPROGRESS) {
+ ast_log(LOG_WARNING, "Unable to start channel: %s\n", strerror(errno));
}
+ }
+ } else if (!ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
+ pri->pvts[chanpos]->dialing = 1;
+ /* Send any "w" waited stuff */
+ res = ioctl(pri->pvts[chanpos]->subs[SUB_REAL].dfd, DAHDI_DIAL, &pri->pvts[chanpos]->dop);
+ if (res < 0) {
+ ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d: %s\n", pri->pvts[chanpos]->channel, strerror(errno));
+ pri->pvts[chanpos]->dop.dialstr[0] = '\0';
+ } else
+ ast_log(LOG_DEBUG, "Sent deferred digit string: %s\n", pri->pvts[chanpos]->dop.dialstr);
+ pri->pvts[chanpos]->dop.dialstr[0] = '\0';
+ } else if (pri->pvts[chanpos]->confirmanswer) {
+ ast_log(LOG_DEBUG, "Waiting on answer confirmation on channel %d!\n", pri->pvts[chanpos]->channel);
+ } else {
+ pri->pvts[chanpos]->dialing = 0;
+ if (pri->pvts[chanpos]->call_level < DAHDI_CALL_LEVEL_CONNECT) {
+ pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_CONNECT;
+ }
+ pri->pvts[chanpos]->subs[SUB_REAL].needanswer =1;
+ /* Enable echo cancellation if it's not on already */
+ dahdi_enable_ec(pri->pvts[chanpos]);
+ }
#ifdef SUPPORT_USERUSER
- if (!ast_strlen_zero(e->answer.useruserinfo)) {
- struct ast_channel *owner = pri->pvts[chanpos]->owner;
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->answer.useruserinfo);
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- }
+ if (!ast_strlen_zero(e->answer.useruserinfo)) {
+ struct ast_channel *owner = pri->pvts[chanpos]->owner;
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->answer.useruserinfo);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ }
#endif
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- }
- }
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
case PRI_EVENT_HANGUP:
- chanpos = pri_find_principle(pri, e->hangup.channel);
+ chanpos = pri_find_principle_by_call(pri, e->hangup.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Hangup requested on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
- } else {
- chanpos = pri_fixup_principle(pri, chanpos, e->hangup.call);
- if (chanpos > -1) {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- if (!pri->pvts[chanpos]->alreadyhungup) {
- /* we're calling here dahdi_hangup so once we get there we need to clear p->call after calling pri_hangup */
- pri->pvts[chanpos]->alreadyhungup = 1;
- if (pri->pvts[chanpos]->realcall)
- pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
- else if (pri->pvts[chanpos]->owner) {
- /* Queue a BUSY instead of a hangup if our cause is appropriate */
- pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
- switch (pri->pvts[chanpos]->owner->_state) {
- case AST_STATE_BUSY:
- case AST_STATE_UP:
- pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- break;
- default:
- if (!pri->pvts[chanpos]->outgoing) {
- /*
- * The incoming call leg hung up before getting
- * connected so just hangup the call.
- */
- pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- break;
- }
- switch (e->hangup.cause) {
- case PRI_CAUSE_USER_BUSY:
- pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;
- break;
- case PRI_CAUSE_CALL_REJECTED:
- case PRI_CAUSE_NETWORK_OUT_OF_ORDER:
- case PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION:
- case PRI_CAUSE_SWITCH_CONGESTION:
- case PRI_CAUSE_DESTINATION_OUT_OF_ORDER:
- case PRI_CAUSE_NORMAL_TEMPORARY_FAILURE:
- pri->pvts[chanpos]->subs[SUB_REAL].needcongestion =1;
- break;
- default:
- pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- }
- break;
- }
+ /*
+ * Continue hanging up the call even though
+ * we do not remember it (if we ever did).
+ */
+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
+ break;
+ }
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ switch (e->hangup.cause) {
+ case PRI_CAUSE_INVALID_CALL_REFERENCE:
+ /*
+ * The peer denies the existence of this call so we must
+ * continue hanging it up and forget about it.
+ */
+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
+ pri->pvts[chanpos]->call = NULL;
+ break;
+ default:
+ break;
+ }
+ if (!pri->pvts[chanpos]->alreadyhungup) {
+ /* we're calling here dahdi_hangup so once we get there we need to clear p->call after calling pri_hangup */
+ pri->pvts[chanpos]->alreadyhungup = 1;
+ if (pri->pvts[chanpos]->realcall)
+ pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
+ else if (pri->pvts[chanpos]->owner) {
+ /* Queue a BUSY instead of a hangup if our cause is appropriate */
+ pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
+ switch (pri->pvts[chanpos]->owner->_state) {
+ case AST_STATE_BUSY:
+ case AST_STATE_UP:
+ pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+ break;
+ default:
+ if (!pri->pvts[chanpos]->outgoing) {
+ /*
+ * The incoming call leg hung up before getting
+ * connected so just hangup the call.
+ */
+ pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+ break;
}
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup, cause %d\n",
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, e->hangup.cause);
- } else {
- pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
- pri->pvts[chanpos]->call = NULL;
- }
- if (e->hangup.cause == PRI_CAUSE_REQUESTED_CHAN_UNAVAIL) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Forcing restart of channel %d/%d on span %d since channel reported in use\n",
- PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
- pri_reset(pri->pri, PVT_TO_CHANNEL(pri->pvts[chanpos]));
- pri->pvts[chanpos]->resetting = 1;
+ switch (e->hangup.cause) {
+ case PRI_CAUSE_USER_BUSY:
+ pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;
+ break;
+ case PRI_CAUSE_CALL_REJECTED:
+ case PRI_CAUSE_NETWORK_OUT_OF_ORDER:
+ case PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION:
+ case PRI_CAUSE_SWITCH_CONGESTION:
+ case PRI_CAUSE_DESTINATION_OUT_OF_ORDER:
+ case PRI_CAUSE_NORMAL_TEMPORARY_FAILURE:
+ pri->pvts[chanpos]->subs[SUB_REAL].needcongestion =1;
+ break;
+ default:
+ pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+ break;
+ }
+ break;
}
- if (e->hangup.aoc_units > -1)
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
+ } else {
+ /*
+ * Continue hanging up the call even though
+ * we do not have an owner.
+ */
+ pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
+ pri->pvts[chanpos]->call = NULL;
+ }
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Span %d: Channel %d/%d got hangup, cause %d\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset, e->hangup.cause);
+ } else {
+ /* Continue hanging up the call. */
+ pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
+ pri->pvts[chanpos]->call = NULL;
+ }
+#if defined(FORCE_RESTART_UNAVAIL_CHANS)
+ if (e->hangup.cause == PRI_CAUSE_REQUESTED_CHAN_UNAVAIL
+ && !pri->resetting && !pri->pvts[chanpos]->resetting) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3
+ "Span %d: Forcing restart of channel %d/%d since channel reported in use\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset);
+ pri->pvts[chanpos]->resetting = 1;
+ pri_reset(pri->pri, PVT_TO_CHANNEL(pri->pvts[chanpos]));
+ }
+#endif /* defined(FORCE_RESTART_UNAVAIL_CHANS) */
+ if (e->hangup.aoc_units > -1)
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
#ifdef SUPPORT_USERUSER
- if (pri->pvts[chanpos]->owner && !ast_strlen_zero(e->hangup.useruserinfo)) {
- struct ast_channel *owner = pri->pvts[chanpos]->owner;
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->hangup.useruserinfo);
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- }
+ if (pri->pvts[chanpos]->owner && !ast_strlen_zero(e->hangup.useruserinfo)) {
+ struct ast_channel *owner = pri->pvts[chanpos]->owner;
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->hangup.useruserinfo);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ }
#endif
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- } else {
- ast_log(LOG_WARNING, "Hangup on bad channel %d/%d on span %d\n",
- PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
- }
- }
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
#ifndef PRI_EVENT_HANGUP_REQ
#error please update libpri
#endif
case PRI_EVENT_HANGUP_REQ:
- chanpos = pri_find_principle(pri, e->hangup.channel);
+ chanpos = pri_find_principle_by_call(pri, e->hangup.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Hangup REQ requested on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
- } else {
- chanpos = pri_fixup_principle(pri, chanpos, e->hangup.call);
- if (chanpos > -1) {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- if (pri->pvts[chanpos]->realcall)
- pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
- else if (pri->pvts[chanpos]->owner) {
- pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
- switch (pri->pvts[chanpos]->owner->_state) {
- case AST_STATE_BUSY:
- case AST_STATE_UP:
- pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- break;
- default:
- if (!pri->pvts[chanpos]->outgoing) {
- /*
- * The incoming call leg hung up before getting
- * connected so just hangup the call.
- */
- pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- break;
- }
- switch (e->hangup.cause) {
- case PRI_CAUSE_USER_BUSY:
- pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;
- break;
- case PRI_CAUSE_CALL_REJECTED:
- case PRI_CAUSE_NETWORK_OUT_OF_ORDER:
- case PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION:
- case PRI_CAUSE_SWITCH_CONGESTION:
- case PRI_CAUSE_DESTINATION_OUT_OF_ORDER:
- case PRI_CAUSE_NORMAL_TEMPORARY_FAILURE:
- pri->pvts[chanpos]->subs[SUB_REAL].needcongestion =1;
- break;
- default:
- pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- }
- break;
- }
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup request, cause %d\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span, e->hangup.cause);
- if (e->hangup.aoc_units > -1)
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
- } else {
- pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
- pri->pvts[chanpos]->call = NULL;
+ /*
+ * Continue hanging up the call even though
+ * we do not remember it (if we ever did).
+ */
+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
+ break;
+ }
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ switch (e->hangup.cause) {
+ case PRI_CAUSE_INVALID_CALL_REFERENCE:
+ /*
+ * The peer denies the existence of this call so we must
+ * continue hanging it up and forget about it. We should not
+ * get this cause here, but for completeness we will handle it
+ * anyway.
+ */
+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
+ pri->pvts[chanpos]->call = NULL;
+ break;
+ default:
+ break;
+ }
+ if (pri->pvts[chanpos]->realcall)
+ pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
+ else if (pri->pvts[chanpos]->owner) {
+ pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
+ switch (pri->pvts[chanpos]->owner->_state) {
+ case AST_STATE_BUSY:
+ case AST_STATE_UP:
+ pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+ break;
+ default:
+ if (!pri->pvts[chanpos]->outgoing) {
+ /*
+ * The incoming call leg hung up before getting
+ * connected so just hangup the call.
+ */
+ pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+ break;
}
- if (e->hangup.cause == PRI_CAUSE_REQUESTED_CHAN_UNAVAIL) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Forcing restart of channel %d/%d span %d since channel reported in use\n",
- PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
- pri_reset(pri->pri, PVT_TO_CHANNEL(pri->pvts[chanpos]));
- pri->pvts[chanpos]->resetting = 1;
+ switch (e->hangup.cause) {
+ case PRI_CAUSE_USER_BUSY:
+ pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;
+ break;
+ case PRI_CAUSE_CALL_REJECTED:
+ case PRI_CAUSE_NETWORK_OUT_OF_ORDER:
+ case PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION:
+ case PRI_CAUSE_SWITCH_CONGESTION:
+ case PRI_CAUSE_DESTINATION_OUT_OF_ORDER:
+ case PRI_CAUSE_NORMAL_TEMPORARY_FAILURE:
+ pri->pvts[chanpos]->subs[SUB_REAL].needcongestion =1;
+ break;
+ default:
+ pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+ break;
}
+ break;
+ }
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Span %d: Channel %d/%d got hangup request, cause %d\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset, e->hangup.cause);
+ if (e->hangup.aoc_units > -1)
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
+ } else {
+ /*
+ * Continue hanging up the call even though
+ * we do not have an owner.
+ */
+ pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
+ pri->pvts[chanpos]->call = NULL;
+ }
+#if defined(FORCE_RESTART_UNAVAIL_CHANS)
+ if (e->hangup.cause == PRI_CAUSE_REQUESTED_CHAN_UNAVAIL
+ && !pri->resetting && !pri->pvts[chanpos]->resetting) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3
+ "Span %d: Forcing restart of channel %d/%d since channel reported in use\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset);
+ pri->pvts[chanpos]->resetting = 1;
+ pri_reset(pri->pri, PVT_TO_CHANNEL(pri->pvts[chanpos]));
+ }
+#endif /* defined(FORCE_RESTART_UNAVAIL_CHANS) */
#ifdef SUPPORT_USERUSER
- if (!ast_strlen_zero(e->hangup.useruserinfo)) {
- struct ast_channel *owner = pri->pvts[chanpos]->owner;
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->hangup.useruserinfo);
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- }
+ if (!ast_strlen_zero(e->hangup.useruserinfo)) {
+ struct ast_channel *owner = pri->pvts[chanpos]->owner;
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->hangup.useruserinfo);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ }
#endif
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- } else {
- ast_log(LOG_WARNING, "Hangup REQ on bad channel %d/%d on span %d\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
- }
- }
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
case PRI_EVENT_HANGUP_ACK:
- chanpos = pri_find_principle(pri, e->hangup.channel);
+ chanpos = pri_find_principle_by_call(pri, e->hangup.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Hangup ACK requested on unconfigured channel number %d/%d span %d\n",
- PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
- } else {
- chanpos = pri_fixup_principle(pri, chanpos, e->hangup.call);
- if (chanpos > -1) {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- pri->pvts[chanpos]->call = NULL;
- pri->pvts[chanpos]->resetting = 0;
- if (pri->pvts[chanpos]->owner) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup ACK\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
- }
-
+ break;
+ }
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ pri->pvts[chanpos]->call = NULL;
+ if (pri->pvts[chanpos]->owner) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Span %d: Channel %d/%d got hangup ACK\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset);
+ }
#ifdef SUPPORT_USERUSER
- if (!ast_strlen_zero(e->hangup.useruserinfo)) {
- struct ast_channel *owner = pri->pvts[chanpos]->owner;
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->hangup.useruserinfo);
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- }
+ if (!ast_strlen_zero(e->hangup.useruserinfo)) {
+ struct ast_channel *owner = pri->pvts[chanpos]->owner;
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->hangup.useruserinfo);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ }
#endif
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- }
- }
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
case PRI_EVENT_CONFIG_ERR:
ast_log(LOG_WARNING, "PRI Error on span %d: %s\n", pri->span, e->err.err);
@@ -10531,19 +10981,25 @@
if (pri->pvts[x] && pri->pvts[x]->resetting) {
chanpos = x;
ast_mutex_lock(&pri->pvts[chanpos]->lock);
- ast_log(LOG_DEBUG, "Assuming restart ack is really for channel %d/%d span %d\n", pri->pvts[chanpos]->logicalspan,
- pri->pvts[chanpos]->prioffset, pri->span);
- if (pri->pvts[chanpos]->realcall)
+ ast_log(LOG_DEBUG,
+ "Span %d: Assuming restart ack is for channel %d/%d\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset);
+ if (pri->pvts[chanpos]->realcall)
pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
else if (pri->pvts[chanpos]->owner) {
- ast_log(LOG_WARNING, "Got restart ack on channel %d/%d with owner on span %d\n", pri->pvts[chanpos]->logicalspan,
- pri->pvts[chanpos]->prioffset, pri->span);
+ ast_log(LOG_WARNING,
+ "Span %d: Got restart ack on channel %d/%d with owner\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset);
pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
}
pri->pvts[chanpos]->resetting = 0;
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "B-channel %d/%d successfully restarted on span %d\n", pri->pvts[chanpos]->logicalspan,
- pri->pvts[chanpos]->prioffset, pri->span);
+ ast_verbose(VERBOSE_PREFIX_3
+ "Span %d: Channel %d/%d successfully restarted\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset);
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
if (pri->resetting)
pri_check_restart(pri);
@@ -10551,79 +11007,92 @@
}
}
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Restart ACK requested on strange channel %d/%d span %d\n",
- PRI_SPAN(e->restartack.channel), PRI_CHANNEL(e->restartack.channel), pri->span);
+ ast_log(LOG_WARNING,
+ "Span %d: Restart ACK on strange channel %d/%d\n",
+ pri->span, PRI_SPAN(e->restartack.channel),
+ PRI_CHANNEL(e->restartack.channel));
}
} else {
- if (pri->pvts[chanpos]) {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- if (pri->pvts[chanpos]->realcall)
- pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
- else if (pri->pvts[chanpos]->owner) {
- ast_log(LOG_WARNING, "Got restart ack on channel %d/%d span %d with owner\n",
- PRI_SPAN(e->restartack.channel), PRI_CHANNEL(e->restartack.channel), pri->span);
- pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- }
- pri->pvts[chanpos]->resetting = 0;
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "B-channel %d/%d successfully restarted on span %d\n", pri->pvts[chanpos]->logicalspan,
- pri->pvts[chanpos]->prioffset, pri->span);
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- if (pri->resetting)
- pri_check_restart(pri);
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ if (pri->pvts[chanpos]->realcall)
+ pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
+ else if (pri->pvts[chanpos]->owner) {
+ ast_log(LOG_WARNING,
+ "Span %d: Got restart ack on channel %d/%d with owner\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset);
+ pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
}
+ pri->pvts[chanpos]->resetting = 0;
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3
+ "Span %d: Channel %d/%d successfully restarted\n",
+ pri->span, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->prioffset);
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ if (pri->resetting)
+ pri_check_restart(pri);
}
break;
case PRI_EVENT_SETUP_ACK:
- chanpos = pri_find_principle(pri, e->setup_ack.channel);
+ chanpos = pri_find_fixup_principle(pri, e->setup_ack.channel,
+ e->setup_ack.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Received SETUP_ACKNOWLEDGE on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->setup_ack.channel), PRI_CHANNEL(e->setup_ack.channel), pri->span);
- } else {
- chanpos = pri_fixup_principle(pri, chanpos, e->setup_ack.call);
- if (chanpos > -1) {
- unsigned int len;
-
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- if (pri->pvts[chanpos]->call_level < DAHDI_CALL_LEVEL_OVERLAP) {
- pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_OVERLAP;
- }
-
- /* Send any queued digits */
- len = strlen(pri->pvts[chanpos]->dialdest);
- for (x = 0; x < len; ++x) {
- ast_log(LOG_DEBUG, "Sending pending digit '%c'\n", pri->pvts[chanpos]->dialdest[x]);
- pri_information(pri->pri, pri->pvts[chanpos]->call,
- pri->pvts[chanpos]->dialdest[x]);
- }
-
- if (!pri->pvts[chanpos]->progress
- && (pri->overlapdial & DAHDI_OVERLAPDIAL_OUTGOING)
- && !pri->pvts[chanpos]->digital) {
- /*
- * Call has a channel.
- * Indicate for overlap dialing that dialtone may be present.
- */
- struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROGRESS, };
- dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
- pri->pvts[chanpos]->progress = 1;/* Claim to have seen inband-information */
- pri->pvts[chanpos]->dialing = 0;
- if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
- ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features);
- pri->pvts[chanpos]->dsp_features = 0;
- }
- }
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
- } else
- ast_log(LOG_WARNING, "Unable to move channel %d!\n", e->setup_ack.channel);
+ break;
}
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ if (pri->pvts[chanpos]->call_level < DAHDI_CALL_LEVEL_OVERLAP) {
+ pri->pvts[chanpos]->call_level = DAHDI_CALL_LEVEL_OVERLAP;
+ }
+
+ /* Send any queued digits */
+ len = strlen(pri->pvts[chanpos]->dialdest);
+ for (x = 0; x < len; ++x) {
+ ast_log(LOG_DEBUG, "Sending pending digit '%c'\n", pri->pvts[chanpos]->dialdest[x]);
+ pri_information(pri->pri, pri->pvts[chanpos]->call,
+ pri->pvts[chanpos]->dialdest[x]);
+ }
+
+ if (!pri->pvts[chanpos]->progress
+ && (pri->overlapdial & DAHDI_OVERLAPDIAL_OUTGOING)
+ && !pri->pvts[chanpos]->digital) {
+ /*
+ * Call has a channel.
+ * Indicate for overlap dialing that dialtone may be present.
+ */
+ struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROGRESS, };
+ dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
+ pri->pvts[chanpos]->progress = 1;/* Claim to have seen inband-information */
+ pri->pvts[chanpos]->dialing = 0;
+ if (pri->pvts[chanpos]->dsp && pri->pvts[chanpos]->dsp_features) {
+ ast_dsp_set_features(pri->pvts[chanpos]->dsp, pri->pvts[chanpos]->dsp_features);
+ pri->pvts[chanpos]->dsp_features = 0;
+ }
+ }
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
case PRI_EVENT_NOTIFY:
+#if defined(HAVE_PRI_CALL_HOLD)
+ chanpos = pri_find_principle_by_call(pri, e->notify.call);
+ if (chanpos < 0) {
+ ast_log(LOG_WARNING, "Span %d: Received NOTIFY for unknown call.\n",
+ pri->span);
+ break;
+ }
+#else
+ /*
+ * This version of libpri does not supply a call pointer for
+ * this message. We are just going to have to trust that the
+ * correct principle is found.
+ */
chanpos = pri_find_principle(pri, e->notify.channel);
if (chanpos < 0) {
ast_log(LOG_WARNING, "Received NOTIFY on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->notify.channel), PRI_CHANNEL(e->notify.channel), pri->span);
- } else {
+ break;
+ }
+#endif /* !defined(HAVE_PRI_CALL_HOLD) */
+ {
struct ast_frame f = { AST_FRAME_CONTROL, };
ast_mutex_lock(&pri->pvts[chanpos]->lock);
switch (e->notify.info) {
@@ -11361,13 +11830,15 @@
ast_cli(fd, "Call ");
if (tmp->bearer)
ast_cli(fd, "Bearer ");
+ if (tmp->allocated) {
+ ast_cli(fd, "Allocated ");
+ }
ast_cli(fd, "\n");
if (tmp->logicalspan)
ast_cli(fd, "PRI Logical Span: %d\n", tmp->logicalspan);
else
ast_cli(fd, "PRI Logical Span: Implicit\n");
}
-
#endif
memset(&ci, 0, sizeof(ci));
ps.channo = tmp->channel;
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/channels/chan_iax2.c
^
|
@@ -36,7 +36,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 296867 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 324627 $")
#include <stdlib.h>
#include <stdio.h>
@@ -4652,7 +4652,14 @@
/* these two cannot be sent, because they require a result */
errno = ENOSYS;
return -1;
- default:
+ /* These options are sent to the other side across the network where
+ * they will be passed to whatever channel is bridged there. Don't
+ * do anything silly like pass an option that transmits pointers to
+ * memory on this machine to a remote machine to use */
+ case AST_OPTION_TONE_VERIFY:
+ case AST_OPTION_TDD:
+ case AST_OPTION_RELAXDTMF:
+ case AST_OPTION_AUDIO_MODE:
{
unsigned short callno = PTR_TO_CALLNO(c->tech_pvt);
struct chan_iax2_pvt *pvt;
@@ -4680,7 +4687,12 @@
free(h);
return res;
}
+ default:
+ return -1;
}
+
+ /* Just in case someone does a break instead of a return */
+ return -1;
}
static struct ast_frame *iax2_read(struct ast_channel *c)
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/channels/chan_local.c
^
|
@@ -27,7 +27,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 306119 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 316328 $")
#include <stdio.h>
#include <string.h>
@@ -371,8 +371,8 @@
}
ast_mutex_unlock(&p->owner->lock);
}
- ast_mutex_unlock(&(p->chan->_bridge)->lock);
}
+ ast_mutex_unlock(&(p->chan->_bridge)->lock);
}
}
}
@@ -430,7 +430,7 @@
p->chan = newchan;
/* Do not let a masquerade cause a Local channel to be bridged to itself! */
- if (!ast_check_hangup(newchan) && (p->owner->_bridge == p->chan || p->chan->_bridge == p->owner)) {
+ if (!ast_check_hangup(newchan) && ((p->owner && p->owner->_bridge == p->chan) || (p->chan && p->chan->_bridge == p->owner))) {
ast_log(LOG_WARNING, "You can not bridge a Local channel to itself!\n");
ao2_unlock(p);
ast_queue_hangup(newchan);
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/channels/chan_sip.c
^
|
@@ -94,7 +94,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 306972 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 325275 $")
#include <stdio.h>
#include <ctype.h>
@@ -2487,11 +2487,17 @@
return;
}
res = AST_SCHED_DEL(sched, pvt->provisional_keepalive_data->sched_id);
- /* If we could not remove this item. remove pvt's reference this data and mark it for removal
- * for the next time the scheduler uses it. The scheduler has it's own ref to this data
- * and will detect it should not reschedule the event since the sched_id is -1 and pvt == NULL */
if (res == -1) {
+ /* If we could not remove this item. remove pvt's reference
+ * this data and mark it for removal for the next time the
+ * scheduler uses it. The scheduler has it's own ref to this
+ * data and will detect it should not reschedule the event
+ * since the sched_id is -1 and pvt == NULL */
pvt->provisional_keepalive_data = unref_provisional_keepalive(pvt->provisional_keepalive_data);
+ } else {
+ /* If we successfully canceled the scheduler entry, we need to
+ * remove its reference to the data. */
+ ao2_ref(pvt->provisional_keepalive_data, -1);
}
}
@@ -2764,7 +2770,7 @@
ast_free_ha(peer->ha);
if (ast_test_flag(&peer->flags[1], SIP_PAGE2_SELFDESTRUCT))
apeerobjs--;
- else if (ast_test_flag(&peer->flags[0], SIP_REALTIME))
+ else if (!ast_test_flag(&global_flags[1], SIP_PAGE2_RTCACHEFRIENDS) && ast_test_flag(&peer->flags[0], SIP_REALTIME))
rpeerobjs--;
else
speerobjs--;
@@ -2972,7 +2978,7 @@
ast_variables_destroy(user->chanvars);
user->chanvars = NULL;
}
- if (ast_test_flag(&user->flags[0], SIP_REALTIME))
+ if (!ast_test_flag(&global_flags[1], SIP_PAGE2_RTCACHEFRIENDS) && ast_test_flag(&user->flags[0], SIP_REALTIME))
ruserobjs--;
else
suserobjs--;
@@ -4056,7 +4062,11 @@
}
if (p) {
ast_mutex_lock(&p->lock);
- if (p->rtp) {
+ if (p->t38.state == T38_ENABLED && !p->t38.direct) {
+ /* drop frame, can't sent VOICE frames while in T.38 mode */
+ ast_mutex_unlock(&p->lock);
+ break;
+ } else if (p->rtp) {
/* If channel is not up, activate early media session */
if ((ast->_state != AST_STATE_UP) &&
!ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) &&
@@ -4067,12 +4077,9 @@
transmit_provisional_response(p, "183 Session Progress", &p->initreq, 1);
ast_set_flag(&p->flags[0], SIP_PROGRESS_SENT);
}
- } else if (p->t38.state == T38_ENABLED && !p->t38.direct) {
- /* drop frame, can't sent VOICE frames while in T.38 mode */
- } else {
- p->lastrtptx = time(NULL);
- res = ast_rtp_write(p->rtp, frame);
}
+ p->lastrtptx = time(NULL);
+ res = ast_rtp_write(p->rtp, frame);
}
ast_mutex_unlock(&p->lock);
}
@@ -4967,10 +4974,7 @@
return;
}
- if (v->via) {
- ast_free(v->via);
- }
-
+ ast_free(v->via);
ast_free(v);
}
@@ -5093,6 +5097,21 @@
return ((ntohl(addr->s_addr) & 0xf0000000) == 0xe0000000);
}
+/*!
+ * \brief Process the Via header according to RFC 3261 section 18.2.2.
+ * \param p a sip_pvt structure that will be modified according to the received
+ * header
+ * \param req a sip request with a Via header to process
+ *
+ * This function will update the destination of the response according to the
+ * Via header in the request and RFC 3261 section 18.2.2. We do not have a
+ * transport layer so we ignore certain values like the 'received' param (we
+ * set the destination address to the addres the request came from in the
+ * respprep() function).
+ *
+ * \retval -1 error
+ * \retval 0 success
+ */
static int process_via(struct sip_pvt *p, const struct sip_request *req)
{
struct sip_via *via = parse_via(get_header(req, "Via"));
@@ -5117,17 +5136,13 @@
p->sa.sin_family = AF_INET;
memcpy(&p->sa.sin_addr, hp->h_addr, sizeof(p->sa.sin_addr));
- if (via->port) {
- p->sa.sin_port = via->port;
- } else {
- p->sa.sin_port = STANDARD_SIP_PORT;
- }
-
if (addr_is_multicast(&p->sa.sin_addr)) {
setsockopt(sipsock, IPPROTO_IP, IP_MULTICAST_TTL, &via->ttl, sizeof(via->ttl));
}
}
+ p->sa.sin_port = htons(via->port ? via->port : STANDARD_SIP_PORT);
+
free_via(via);
return 0;
}
@@ -6779,6 +6794,9 @@
/* default to routing the response to the address where the request
* came from. Since we don't have a transport layer, we do this here.
+ * The process_via() function will update the port to either the port
+ * specified in the via header or the default port later on (per RFC
+ * 3261 section 18.2.2).
*/
p->sa = p->recv;
@@ -9023,7 +9041,7 @@
char *firstcuri = NULL;
int start = 0;
int wildcard_found = 0;
- int single_binding_found;
+ int single_binding_found = 0;
ast_copy_string(contact, __get_header(req, "Contact", &start), sizeof(contact));
@@ -9077,26 +9095,16 @@
return PARSE_REGISTER_QUERY;
} else if (!strcasecmp(curi, "*") || !expiry) { /* Unregister this peer */
/* This means remove all registrations and return OK */
- memset(&peer->addr, 0, sizeof(peer->addr));
if (!AST_SCHED_DEL(sched, peer->expire)) {
struct sip_peer *peer_ptr = peer;
ASTOBJ_UNREF(peer_ptr, sip_destroy_peer);
}
- destroy_association(peer);
-
- register_peer_exten(peer, 0); /* Add extension from regexten= setting in sip.conf */
- peer->fullcontact[0] = '\0';
- peer->useragent[0] = '\0';
- peer->sipoptions = 0;
- peer->lastms = 0;
- peer->portinuri = 0;
- pvt->expiry = 0;
+ expire_register(ASTOBJ_REF(peer));
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Unregistered SIP '%s'\n", peer->name);
- manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: SIP/%s\r\nPeerStatus: Unregistered\r\n", peer->name);
return PARSE_REGISTER_UPDATE;
}
@@ -9785,14 +9793,14 @@
if (ast_test_flag(req, SIP_PKT_IGNORE) && !ast_strlen_zero(p->randdata) && ast_strlen_zero(authtoken)) {
/* This is a retransmitted invite/register/etc, don't reconstruct authentication
* information */
- transmit_response_with_auth(p, response, req, p->randdata, 0, respheader, 0);
+ transmit_response_with_auth(p, response, req, p->randdata, reliable, respheader, 0);
/* Schedule auto destroy in 32 seconds (according to RFC 3261) */
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
return;
} else if (ast_strlen_zero(p->randdata) || ast_strlen_zero(authtoken)) {
/* We have no auth, so issue challenge and request authentication */
set_nonce_randdata(p, 1);
- transmit_response_with_auth(p, response, req, p->randdata, 0, respheader, 0);
+ transmit_response_with_auth(p, response, req, p->randdata, reliable, respheader, 0);
/* Schedule auto destroy in 32 seconds */
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
return;
@@ -10742,7 +10750,9 @@
ast_copy_flags(&p->flags[0], &user->flags[0], SIP_FLAGS_TO_COPY);
ast_copy_flags(&p->flags[1], &user->flags[1], SIP_PAGE2_FLAGS_TO_COPY);
if (sipmethod == SIP_INVITE) {
- /* copy channel vars */
+ /* destroy old channel vars and copy new channel vars */
+ ast_variables_destroy(p->chanvars);
+ p->chanvars = NULL;
for (v = user->chanvars ; v ; v = v->next) {
if ((tmpvar = ast_variable_new(v->name, v->value))) {
tmpvar->next = p->chanvars;
@@ -10902,7 +10912,9 @@
ast_string_field_set(p, authname, peer->name);
if (sipmethod == SIP_INVITE) {
- /* copy channel vars */
+ /* destroy old channel vars and copy new channel vars */
+ ast_variables_destroy(p->chanvars);
+ p->chanvars = NULL;
for (v = peer->chanvars ; v ; v = v->next) {
if ((tmpvar = ast_variable_new(v->name, v->value))) {
tmpvar->next = p->chanvars;
@@ -11470,6 +11482,7 @@
int multi = FALSE;
char *name = NULL;
regex_t regexbuf;
+ int havepattern = 0;
switch (argc) {
case 4:
@@ -11528,8 +11541,10 @@
}
if (multi && name) {
- if (regcomp(®exbuf, name, REG_EXTENDED | REG_NOSUB))
+ if (regcomp(®exbuf, name, REG_EXTENDED | REG_NOSUB)) {
return RESULT_SHOWUSAGE;
+ }
+ havepattern = 1;
}
if (multi) {
@@ -11604,6 +11619,10 @@
}
}
+ if (havepattern) {
+ regfree(®exbuf);
+ }
+
return RESULT_SUCCESS;
}
@@ -15853,6 +15872,7 @@
/* Unlock locks so ast_hangup can do its magic */
ast_mutex_unlock(&c->lock);
+ *nounlock = 1;
ast_mutex_unlock(&p->lock);
ast_hangup(c);
ast_mutex_lock(&p->lock);
@@ -15861,7 +15881,9 @@
} else { /* Pickup call in call group */
ast_channel_unlock(c);
*nounlock = 1;
+ ast_mutex_unlock(&p->lock);
if (ast_pickup_call(c)) {
+ ast_mutex_lock(&p->lock);
ast_log(LOG_NOTICE, "Nothing to pick up for %s\n", p->callid);
if (ast_test_flag(req, SIP_PKT_IGNORE))
transmit_response(p, "503 Unavailable", req); /* OEJ - Right answer? */
@@ -15872,13 +15894,11 @@
ast_mutex_unlock(&p->lock);
c->hangupcause = AST_CAUSE_CALL_REJECTED;
} else {
- ast_mutex_unlock(&p->lock);
- ast_setstate(c, AST_STATE_DOWN);
c->hangupcause = AST_CAUSE_NORMAL_CLEARING;
}
- p->invitestate = INV_COMPLETED;
ast_hangup(c);
ast_mutex_lock(&p->lock);
+ p->invitestate = INV_COMPLETED;
c = NULL;
}
break;
@@ -16090,6 +16110,10 @@
ast_log(LOG_DEBUG, "SIP attended transfer: Unlocking channel %s\n", targetcall_pvt->owner->name);
ast_channel_unlock(targetcall_pvt->owner);
}
+ ast_indicate(target.chan1, AST_CONTROL_UNHOLD);
+ if (target.chan2) {
+ ast_indicate(target.chan2, AST_CONTROL_UNHOLD);
+ }
}
return 1;
}
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/channels/chan_skinny.c
^
|
@@ -28,7 +28,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 315205 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 314607 $")
#include <stdio.h>
#include <stdlib.h>
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/configs/indications.conf.sample
^
|
@@ -155,7 +155,7 @@
congestion = 425/167,0/167
callwaiting = 1400/175,0/175,1400/175,0/3500
; DIALRECALL - not specified
-dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440"
+dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
; RECORDTONE - not specified
record = 1400/500,0/15000
info = 900/330,1400/330,1800/330,0/1000
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/configure
^
|
@@ -1,14 +1,14 @@
#! /bin/sh
-# From configure.ac Revision: 301869 .
+# From configure.ac Revision: 316006 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for asterisk 1.4.
+# Generated by GNU Autoconf 2.65 for asterisk 1.4.
#
# Report bugs to <https://issues.asterisk.org>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -322,7 +322,7 @@
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -362,19 +362,19 @@
fi # as_fn_arith
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
+# script with status $?, using 1 if that was 0.
as_fn_error ()
{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
fi
- $as_echo "$as_me: error: $2" >&2
+ $as_echo "$as_me: error: $1" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -536,7 +536,7 @@
exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -713,6 +713,10 @@
PRI_VERSION_DIR
PRI_VERSION_INCLUDE
PRI_VERSION_LIB
+PBX_PRI_CALL_HOLD
+PRI_CALL_HOLD_DIR
+PRI_CALL_HOLD_INCLUDE
+PRI_CALL_HOLD_LIB
PBX_PRI
PRI_DIR
PRI_INCLUDE
@@ -835,6 +839,7 @@
PBX_BISON
DOWNLOAD
FETCH
+CURL
WGET
DOT
LN
@@ -1056,9 +1061,8 @@
fi
case $ac_option in
- *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *=) ac_optarg= ;;
- *) ac_optarg=yes ;;
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1103,7 +1107,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1129,7 +1133,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1333,7 +1337,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1349,7 +1353,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1379,8 +1383,8 @@
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+ -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
;;
*=*)
@@ -1388,7 +1392,7 @@
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1406,13 +1410,13 @@
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error $? "missing argument to $ac_option"
+ as_fn_error "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1435,7 +1439,7 @@
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1449,8 +1453,8 @@
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1465,9 +1469,9 @@
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error $? "working directory cannot be determined"
+ as_fn_error "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error $? "pwd does not report name of working directory"
+ as_fn_error "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1506,11 +1510,11 @@
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1550,7 +1554,7 @@
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
+ -q, --quiet, --silent do not print \`checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1742,9 +1746,9 @@
if $ac_init_version; then
cat <<\_ACEOF
asterisk configure 1.4
-generated by GNU Autoconf 2.67
+generated by GNU Autoconf 2.65
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
@@ -1816,7 +1820,7 @@
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
+ test $ac_status = 0; } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -1840,10 +1844,10 @@
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -1879,7 +1883,7 @@
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -1902,15 +1906,17 @@
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ------------------------------------------ ##
+( cat <<\_ASBOX
+## ------------------------------------------ ##
## Report this to https://issues.asterisk.org ##
-## ------------------------------------------ ##"
+## ------------------------------------------ ##
+_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -1974,7 +1980,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2055,7 +2061,7 @@
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
+ test $ac_status = 0; } >/dev/null && {
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -2125,7 +2131,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2193,7 +2199,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -2247,7 +2253,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
$as_echo_n "checking for $2.$3... " >&6; }
-if eval "test \"\${$4+set}\"" = set; then :
+if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2527,10 +2533,10 @@
ac_fn_cxx_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -2566,7 +2572,7 @@
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -2589,15 +2595,17 @@
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ------------------------------------------ ##
+( cat <<\_ASBOX
+## ------------------------------------------ ##
## Report this to https://issues.asterisk.org ##
-## ------------------------------------------ ##"
+## ------------------------------------------ ##
+_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -2619,7 +2627,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2645,7 +2653,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by asterisk $as_me 1.4, which was
-generated by GNU Autoconf 2.67. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2755,9 +2763,11 @@
{
echo
- $as_echo "## ---------------- ##
+ cat <<\_ASBOX
+## ---------------- ##
## Cache variables. ##
-## ---------------- ##"
+## ---------------- ##
+_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -2791,9 +2801,11 @@
)
echo
- $as_echo "## ----------------- ##
+ cat <<\_ASBOX
+## ----------------- ##
## Output variables. ##
-## ----------------- ##"
+## ----------------- ##
+_ASBOX
echo
for ac_var in $ac_subst_vars
do
@@ -2806,9 +2818,11 @@
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ cat <<\_ASBOX
+## ------------------- ##
## File substitutions. ##
-## ------------------- ##"
+## ------------------- ##
+_ASBOX
echo
for ac_var in $ac_subst_files
do
@@ -2822,9 +2836,11 @@
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ cat <<\_ASBOX
+## ----------- ##
## confdefs.h. ##
-## ----------- ##"
+## ----------- ##
+_ASBOX
echo
cat confdefs.h
echo
@@ -2879,12 +2895,7 @@
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_file1=$CONFIG_SITE
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -2899,11 +2910,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+ . "$ac_site_file"
fi
done
@@ -2983,7 +2990,7 @@
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -3000,22 +3007,16 @@
# cross-compile macros
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
+ for ac_t in install-sh install.sh shtool; do
+ if test -f "$ac_dir/$ac_t"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/$ac_t -c"
+ break 2
+ fi
+ done
done
if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -3029,7 +3030,7 @@
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
@@ -3040,16 +3041,16 @@
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -3074,7 +3075,7 @@
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
@@ -3082,7 +3083,7 @@
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -3104,22 +3105,16 @@
ac_aux_dir=
for ac_dir in `pwd` "$srcdir"/`pwd`; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
+ for ac_t in install-sh install.sh shtool; do
+ if test -f "$ac_dir/$ac_t"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/$ac_t -c"
+ break 2
+ fi
+ done
done
if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \`pwd\` \"$srcdir\"/\`pwd\`" "$LINENO" 5
+ as_fn_error "cannot find install-sh, install.sh, or shtool in \`pwd\` \"$srcdir\"/\`pwd\`" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -3439,8 +3434,8 @@
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3554,8 +3549,9 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+{ as_fn_set_status 77
+as_fn_error "C compiler cannot create executables
+See \`config.log' for more details." "$LINENO" 5; }; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -3597,8 +3593,8 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3655,9 +3651,9 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+as_fn_error "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details." "$LINENO" 5; }
fi
fi
fi
@@ -3708,8 +3704,8 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -3972,7 +3968,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -3988,11 +3984,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -4031,7 +4027,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4047,18 +4043,18 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
fi
ac_ext=c
@@ -4119,7 +4115,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -4185,7 +4181,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -4317,7 +4313,8 @@
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -5248,8 +5245,8 @@
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -5787,7 +5784,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5803,11 +5800,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -5846,7 +5843,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5862,18 +5859,18 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
fi
ac_ext=c
@@ -5920,7 +5917,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5936,11 +5933,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -5979,7 +5976,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5995,18 +5992,18 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
fi
ac_ext=c
@@ -6074,7 +6071,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_SED"; then
- as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
fi
else
ac_cv_path_SED=$SED
@@ -6185,7 +6182,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${lt_cv_prog_gnu_ld+set}" = set; then :
@@ -6466,7 +6463,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_GNU_MAKE" >&5
$as_echo "$ac_cv_GNU_MAKE" >&6; } ;
if test "x$ac_cv_GNU_MAKE" = "xNot Found" ; then
- as_fn_error $? "*** Please install GNU make. It is required to build Asterisk!" "$LINENO" 5
+ as_fn_error "*** Please install GNU make. It is required to build Asterisk!" "$LINENO" 5
exit 1
fi
GNU_MAKE=$ac_cv_GNU_MAKE
@@ -6526,7 +6523,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -7280,8 +7277,51 @@
fi
+# Extract the first word of "curl", so it can be a program name with args.
+set dummy curl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CURL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CURL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CURL="$CURL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_CURL" && ac_cv_path_CURL=":"
+ ;;
+esac
+fi
+CURL=$ac_cv_path_CURL
+if test -n "$CURL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5
+$as_echo "$CURL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
if test "${WGET}" != ":" ; then
DOWNLOAD=${WGET}
+else if test "${CURL}" != ":" ; then
+ DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\""
else
# Extract the first word of "fetch", so it can be a program name with args.
set dummy fetch; ac_word=$2
@@ -7326,6 +7366,7 @@
DOWNLOAD=${FETCH}
fi
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison that supports parse-param" >&5
@@ -7836,7 +7877,7 @@
enableval=$enable_dev_mode; case "${enableval}" in
y|ye|yes) AST_DEVMODE=yes ;;
n|no) AST_DEVMODE=no ;;
- *) as_fn_error $? "bad value ${enableval} for --enable-dev-mode" "$LINENO" 5 ;;
+ *) as_fn_error "bad value ${enableval} for --enable-dev-mode" "$LINENO" 5 ;;
esac
fi
@@ -9006,6 +9047,22 @@
+PRI_CALL_HOLD_DESCRIP="NOTIFY with call ptr"
+PRI_CALL_HOLD_OPTION=pri
+
+if test "x${PRI_MANDATORY}" = "xyes" ; then
+ PRI_CALL_HOLD_MANDATORY="yes"
+fi
+PRI_CALL_HOLD_DIR=${PRI_DIR}
+
+PBX_PRI_CALL_HOLD=0
+
+
+
+
+
+
+
PRI_VERSION_DESCRIP="ISDN PRI get_version"
PRI_VERSION_OPTION=pri
@@ -9643,7 +9700,8 @@
for ac_func in _getb67 GETB67 getb67; do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
@@ -9710,7 +9768,7 @@
as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval "test \"\${$as_ac_Header+set}\"" = set; then :
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9737,7 +9795,8 @@
eval ac_res=\$$as_ac_Header
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF
@@ -10020,7 +10079,8 @@
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -10831,7 +10891,8 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -11214,7 +11275,8 @@
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -11411,7 +11473,8 @@
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -11965,7 +12028,8 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -12368,8 +12432,8 @@
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "cannot run test program while cross compiling
+See \`config.log' for more details." "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13009,8 +13073,9 @@
if test "$ac_cv_type_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5 ; }
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (int)
+See \`config.log' for more details." "$LINENO" 5; }; }
else
ac_cv_sizeof_int=0
fi
@@ -13042,8 +13107,9 @@
if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5 ; }
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (long)
+See \`config.log' for more details." "$LINENO" 5; }; }
else
ac_cv_sizeof_long=0
fi
@@ -13075,8 +13141,9 @@
if test "$ac_cv_type_long_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long long)
-See \`config.log' for more details" "$LINENO" 5 ; }
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (long long)
+See \`config.log' for more details." "$LINENO" 5; }; }
else
ac_cv_sizeof_long_long=0
fi
@@ -13115,8 +13182,9 @@
if test "$ac_cv_type_fd_set_fds_bits" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (fd_set.fds_bits)
-See \`config.log' for more details" "$LINENO" 5 ; }
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (fd_set.fds_bits)
+See \`config.log' for more details." "$LINENO" 5; }; }
else
ac_cv_sizeof_fd_set_fds_bits=0
fi
@@ -13941,7 +14009,8 @@
if test "x${GSM_DIR}" != "x" ; then
as_ac_Header=`$as_echo "ac_cv_header_${GSM_DIR}/include/gsm.h" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "${GSM_DIR}/include/gsm.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
GSM_HEADER_FOUND=1
else
GSM_HEADER_FOUND=0
@@ -13950,7 +14019,8 @@
as_ac_Header=`$as_echo "ac_cv_header_${GSM_DIR}/include/gsm/gsm.h" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "${GSM_DIR}/include/gsm/gsm.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
GSM_GSM_HEADER_FOUND=1
else
GSM_GSM_HEADER_FOUND=0
@@ -17194,6 +17264,125 @@
fi
+if test "${USE_PRI_CALL_HOLD}" != "no"; then
+ pbxlibdir=""
+ if test "x${PRI_CALL_HOLD_DIR}" != "x"; then
+ if test -d ${PRI_CALL_HOLD_DIR}/lib; then
+ pbxlibdir="-L${PRI_CALL_HOLD_DIR}/lib"
+ else
+ pbxlibdir="-L${PRI_CALL_HOLD_DIR}"
+ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_hold_enable in -lpri" >&5
+$as_echo_n "checking for pri_hold_enable in -lpri... " >&6; }
+if test "${ac_cv_lib_pri_pri_hold_enable+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpri ${pbxlibdir} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pri_hold_enable ();
+int
+main ()
+{
+return pri_hold_enable ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pri_pri_hold_enable=yes
+else
+ ac_cv_lib_pri_pri_hold_enable=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_hold_enable" >&5
+$as_echo "$ac_cv_lib_pri_pri_hold_enable" >&6; }
+if test "x$ac_cv_lib_pri_pri_hold_enable" = x""yes; then :
+ AST_PRI_CALL_HOLD_FOUND=yes
+else
+ AST_PRI_CALL_HOLD_FOUND=no
+fi
+
+
+ if test "${AST_PRI_CALL_HOLD_FOUND}" = "yes"; then
+ PRI_CALL_HOLD_LIB="-lpri "
+ PRI_CALL_HOLD_HEADER_FOUND="1"
+ if test "x${PRI_CALL_HOLD_DIR}" != "x"; then
+ PRI_CALL_HOLD_LIB="${pbxlibdir} ${PRI_CALL_HOLD_LIB}"
+ PRI_CALL_HOLD_INCLUDE="-I${PRI_CALL_HOLD_DIR}/include"
+ fi
+ PRI_CALL_HOLD_INCLUDE="${PRI_CALL_HOLD_INCLUDE} "
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${PRI_CALL_HOLD_INCLUDE}"
+ if test "xlibpri.h" != "x" ; then
+ ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
+if test "x$ac_cv_header_libpri_h" = x""yes; then :
+ PRI_CALL_HOLD_HEADER_FOUND=1
+else
+ PRI_CALL_HOLD_HEADER_FOUND=0
+fi
+
+
+ fi
+ CPPFLAGS="${saved_cppflags}"
+ if test "x${PRI_CALL_HOLD_HEADER_FOUND}" = "x0" ; then
+ if test -n "${PRI_CALL_HOLD_MANDATORY}" ;
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
+$as_echo "$as_me: ***" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** It appears that you do not have the pri development package installed." >&5
+$as_echo "$as_me: *** It appears that you do not have the pri development package installed." >&6;}
+ if test "x${PRI_CALL_HOLD_OPTION}" = "x" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install it to include ${PRI_CALL_HOLD_DESCRIP} support" >&5
+$as_echo "$as_me: *** Please install it to include ${PRI_CALL_HOLD_DESCRIP} support" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install it to include ${PRI_CALL_HOLD_DESCRIP} support, or re-run configure" >&5
+$as_echo "$as_me: *** Please install it to include ${PRI_CALL_HOLD_DESCRIP} support, or re-run configure" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** without explicitly specifying --with-${PRI_CALL_HOLD_OPTION}" >&5
+$as_echo "$as_me: *** without explicitly specifying --with-${PRI_CALL_HOLD_OPTION}" >&6;}
+ fi
+ exit 1
+ fi
+ PRI_CALL_HOLD_LIB=""
+ PRI_CALL_HOLD_INCLUDE=""
+ PBX_PRI_CALL_HOLD=0
+ else
+ PBX_PRI_CALL_HOLD=1
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PRI_CALL_HOLD 1
+_ACEOF
+ fi
+ elif test -n "${PRI_CALL_HOLD_MANDATORY}";
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
+$as_echo "$as_me: ***" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** The ${PRI_CALL_HOLD_DESCRIP} installation on this system appears to be broken." >&5
+$as_echo "$as_me: *** The ${PRI_CALL_HOLD_DESCRIP} installation on this system appears to be broken." >&6;}
+ if test "x${PRI_CALL_HOLD_OPTION}" = "x" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please correct the installation" >&5
+$as_echo "$as_me: *** Please correct the installation" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Either correct the installation, or run configure" >&5
+$as_echo "$as_me: *** Either correct the installation, or run configure" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** without explicitly specifying --with-${PRI_CALL_HOLD_OPTION}" >&5
+$as_echo "$as_me: *** without explicitly specifying --with-${PRI_CALL_HOLD_OPTION}" >&6;}
+ fi
+ exit 1
+ fi
+fi
+
if test "${USE_PRI_VERSION}" != "no"; then
pbxlibdir=""
@@ -17315,7 +17504,6 @@
fi
-
if test "${USE_PRI_INBANDDISCONNECT}" != "no"; then
pbxlibdir=""
if test "x${PRI_INBANDDISCONNECT_DIR}" != "x"; then
@@ -17453,7 +17641,8 @@
if test "${PWLIBDIR:-unset}" != "unset" ; then
as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/version.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/version.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
HAS_PWLIB=1
fi
@@ -17463,7 +17652,8 @@
if test "${OPENH323DIR:-unset}" != "unset"; then
as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/../pwlib/version.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
HAS_PWLIB=1
fi
@@ -17474,7 +17664,8 @@
else
as_ac_Header=`$as_echo "ac_cv_header_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${HOME}/pwlib/include/ptlib.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
HAS_PWLIB=1
fi
@@ -17898,7 +18089,8 @@
if test "${OPENH323DIR:-unset}" != "unset" ; then
as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/version.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/version.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
HAS_OPENH323=1
fi
@@ -17907,7 +18099,8 @@
if test "${HAS_OPENH323:-unset}" = "unset" ; then
as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/../openh323/version.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/../openh323/version.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1
fi
@@ -17919,7 +18112,8 @@
as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/include/h323.h" | $as_tr_sh`
ac_fn_cxx_check_header_compile "$LINENO" "${OPENH323DIR}/include/h323.h" "$as_ac_Header" "#include <ptlib.h>
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
else
OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}"
@@ -17933,7 +18127,8 @@
as_ac_Header=`$as_echo "ac_cv_header_${HOME}/openh323/include/h323.h" | $as_tr_sh`
ac_fn_cxx_check_header_compile "$LINENO" "${HOME}/openh323/include/h323.h" "$as_ac_Header" "#include <ptlib.h>
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
HAS_OPENH323=1
fi
@@ -18821,9 +19016,9 @@
pbxlibdir="-L${OPENSSL_DIR}"
fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl2_connect in -lssl" >&5
-$as_echo_n "checking for ssl2_connect in -lssl... " >&6; }
-if test "${ac_cv_lib_ssl_ssl2_connect+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
+$as_echo_n "checking for SSL_connect in -lssl... " >&6; }
+if test "${ac_cv_lib_ssl_SSL_connect+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -18837,27 +19032,27 @@
#ifdef __cplusplus
extern "C"
#endif
-char ssl2_connect ();
+char SSL_connect ();
int
main ()
{
-return ssl2_connect ();
+return SSL_connect ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ssl_ssl2_connect=yes
+ ac_cv_lib_ssl_SSL_connect=yes
else
- ac_cv_lib_ssl_ssl2_connect=no
+ ac_cv_lib_ssl_SSL_connect=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl2_connect" >&5
-$as_echo "$ac_cv_lib_ssl_ssl2_connect" >&6; }
-if test "x$ac_cv_lib_ssl_ssl2_connect" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
+$as_echo "$ac_cv_lib_ssl_SSL_connect" >&6; }
+if test "x$ac_cv_lib_ssl_SSL_connect" = x""yes; then :
AST_OPENSSL_FOUND=yes
else
AST_OPENSSL_FOUND=no
@@ -19527,7 +19722,8 @@
if test "x${tonezone_dir}/tonezone.h" != "x" ; then
as_ac_Header=`$as_echo "ac_cv_header_${tonezone_dir}/tonezone.h" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "${tonezone_dir}/tonezone.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
TONEZONE_HEADER_FOUND=1
else
TONEZONE_HEADER_FOUND=0
@@ -20193,7 +20389,7 @@
elif test "x$NCURSES_LIB" != "x" ; then
EDITLINE_LIB="$NCURSES_LIB"
else
- as_fn_error $? "*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)" "$LINENO" 5
+ as_fn_error "*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)" "$LINENO" 5
fi
@@ -20242,7 +20438,7 @@
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+ as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "/sbin/launchd"; then
ac_cv_file__sbin_launchd=yes
else
@@ -20560,7 +20756,6 @@
ac_libobjs=
ac_ltlibobjs=
-U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -20722,19 +20917,19 @@
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
+# script with status $?, using 1 if that was 0.
as_fn_error ()
{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
fi
- $as_echo "$as_me: error: $2" >&2
+ $as_echo "$as_me: error: $1" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -20930,7 +21125,7 @@
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -20984,7 +21179,7 @@
# values after options handling.
ac_log="
This file was extended by asterisk $as_me 1.4, which was
-generated by GNU Autoconf 2.67. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -21046,10 +21241,10 @@
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
asterisk config.status 1.4
-configured by $0, generated by GNU Autoconf 2.67,
+configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -21066,16 +21261,11 @@
while test $# != 0
do
case $1 in
- --*=?*)
+ --*=*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
*)
ac_option=$1
ac_optarg=$2
@@ -21097,7 +21287,6 @@
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -21110,7 +21299,7 @@
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
+ as_fn_error "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -21119,7 +21308,7 @@
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
+ -*) as_fn_error "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -21173,7 +21362,7 @@
"makeopts") CONFIG_FILES="$CONFIG_FILES makeopts" ;;
"channels/h323/Makefile") CONFIG_FILES="$CONFIG_FILES channels/h323/Makefile" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -21210,7 +21399,7 @@
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -21227,7 +21416,7 @@
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
+ ac_cs_awk_cr='\r'
else
ac_cs_awk_cr=$ac_cr
fi
@@ -21241,18 +21430,18 @@
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -21341,28 +21530,20 @@
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+ || as_fn_error "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -21390,7 +21571,7 @@
if test -z "$ac_t"; then
break
elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -21475,7 +21656,7 @@
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -21488,7 +21669,7 @@
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -21516,7 +21697,7 @@
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -21543,7 +21724,7 @@
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -21674,22 +21855,22 @@
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
+which seems to be undefined. Please make sure it is defined." >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
+which seems to be undefined. Please make sure it is defined." >&2;}
rm -f "$tmp/stdin"
case $ac_file in
-) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -21700,19 +21881,19 @@
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error $? "could not create -" "$LINENO" 5
+ || as_fn_error "could not create -" "$LINENO" 5
fi
;;
@@ -21727,7 +21908,7 @@
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -21748,7 +21929,7 @@
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
+ $ac_cs_success || as_fn_exit $?
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/configure.ac
^
|
@@ -17,7 +17,7 @@
AC_CONFIG_HEADER(include/asterisk/autoconfig.h)
AC_COPYRIGHT("Asterisk")
-AC_REVISION($Revision: 304464 $)
+AC_REVISION($Revision: 316089 $)
AC_USE_SYSTEM_EXTENSIONS # note- does not work on FreeBSD
@@ -159,12 +159,16 @@
AC_PATH_PROG([LN], [ln], :)
AC_PATH_PROG([DOT], [dot], :)
AC_PATH_PROG([WGET], [wget], :)
+AC_PATH_PROG([CURL], [curl], :)
if test "${WGET}" != ":" ; then
DOWNLOAD=${WGET}
+else if test "${CURL}" != ":" ; then
+ DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\""
else
AC_PATH_PROG([FETCH], [fetch], [:])
DOWNLOAD=${FETCH}
fi
+fi
AC_SUBST(DOWNLOAD)
AC_CACHE_CHECK([for bison that supports parse-param], [ac_cv_path_BISON2], [
@@ -259,6 +263,7 @@
AST_EXT_LIB_SETUP([POPT], [popt], [popt])
AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
+AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_HOLD], [NOTIFY with call ptr], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_VERSION], [ISDN PRI get_version], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_INBANDDISCONNECT], [ISDN PRI set_inbanddisconnect], [PRI], [pri])
AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
@@ -1479,9 +1484,8 @@
AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
AST_EXT_LIB_CHECK([PRI], [pri], [pri_keypad_facility], [libpri.h])
-
+AST_EXT_LIB_CHECK([PRI_CALL_HOLD], [pri], [pri_hold_enable], [libpri.h])
AST_EXT_LIB_CHECK([PRI_VERSION], [pri], [pri_get_version], [libpri.h])
-
AST_EXT_LIB_CHECK([PRI_INBANDDISCONNECT], [pri], [pri_set_inbanddisconnect], [libpri.h])
if test "${USE_PWLIB}" != "no"; then
@@ -1554,7 +1558,7 @@
AST_EXT_LIB_CHECK([SQLITE], [sqlite], [sqlite_exec], [sqlite.h])
-AST_EXT_LIB_CHECK([OPENSSL], [ssl], [ssl2_connect], [openssl/ssl.h], [-lcrypto])
+AST_EXT_LIB_CHECK([OPENSSL], [ssl], [SSL_connect], [openssl/ssl.h], [-lcrypto])
if test "$PBX_OPENSSL" = "1";
then
AST_EXT_LIB_CHECK([OSPTK], [osptk], [OSPPCryptoDecrypt], [osp/osp.h], [-lcrypto -lssl])
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/contrib/scripts/safe_asterisk
^
|
@@ -28,7 +28,7 @@
# Check if Asterisk is already running. If it is, then bug out, because
# starting safe_asterisk when Asterisk is running is very bad.
-VERSION=`${ASTSBINDIR}/asterisk -rx 'core show version'`
+VERSION=`${ASTSBINDIR}/asterisk -nrx 'core show version'`
if test "`echo $VERSION | cut -c 1-8`" = "Asterisk" ; then
echo "Asterisk is already running. $0 will exit now."
exit 1
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/formats/format_wav.c
^
|
@@ -26,7 +26,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 233782 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 315257 $")
#include <unistd.h>
#include <netinet/in.h>
@@ -87,48 +87,12 @@
#endif
-static int check_header(FILE *f)
+static int check_header_fmt(FILE *f, int hsize)
{
- int type, size, formtype;
- int fmt, hsize;
short format, chans, bysam, bisam;
int bysec;
int freq;
- int data;
- if (fread(&type, 1, 4, f) != 4) {
- ast_log(LOG_WARNING, "Read failed (type)\n");
- return -1;
- }
- if (fread(&size, 1, 4, f) != 4) {
- ast_log(LOG_WARNING, "Read failed (size)\n");
- return -1;
- }
- size = ltohl(size);
- if (fread(&formtype, 1, 4, f) != 4) {
- ast_log(LOG_WARNING, "Read failed (formtype)\n");
- return -1;
- }
- if (memcmp(&type, "RIFF", 4)) {
- ast_log(LOG_WARNING, "Does not begin with RIFF\n");
- return -1;
- }
- if (memcmp(&formtype, "WAVE", 4)) {
- ast_log(LOG_WARNING, "Does not contain WAVE\n");
- return -1;
- }
- if (fread(&fmt, 1, 4, f) != 4) {
- ast_log(LOG_WARNING, "Read failed (fmt)\n");
- return -1;
- }
- if (memcmp(&fmt, "fmt ", 4)) {
- ast_log(LOG_WARNING, "Does not say fmt\n");
- return -1;
- }
- if (fread(&hsize, 1, 4, f) != 4) {
- ast_log(LOG_WARNING, "Read failed (formtype)\n");
- return -1;
- }
- if (ltohl(hsize) < 16) {
+ if (hsize < 16) {
ast_log(LOG_WARNING, "Unexpected header size %d\n", ltohl(hsize));
return -1;
}
@@ -179,6 +143,34 @@
ast_log(LOG_WARNING, "Failed to skip remaining header bytes: %d\n", ltohl(hsize)-16 );
return -1;
}
+ return 0;
+}
+
+static int check_header(FILE *f)
+{
+ int type, size, formtype;
+ int data;
+ if (fread(&type, 1, 4, f) != 4) {
+ ast_log(LOG_WARNING, "Read failed (type)\n");
+ return -1;
+ }
+ if (fread(&size, 1, 4, f) != 4) {
+ ast_log(LOG_WARNING, "Read failed (size)\n");
+ return -1;
+ }
+ size = ltohl(size);
+ if (fread(&formtype, 1, 4, f) != 4) {
+ ast_log(LOG_WARNING, "Read failed (formtype)\n");
+ return -1;
+ }
+ if (memcmp(&type, "RIFF", 4)) {
+ ast_log(LOG_WARNING, "Does not begin with RIFF\n");
+ return -1;
+ }
+ if (memcmp(&formtype, "WAVE", 4)) {
+ ast_log(LOG_WARNING, "Does not contain WAVE\n");
+ return -1;
+ }
/* Skip any facts and get the first data block */
for(;;)
{
@@ -186,23 +178,25 @@
/* Begin data chunk */
if (fread(&buf, 1, 4, f) != 4) {
- ast_log(LOG_WARNING, "Read failed (data)\n");
+ ast_log(LOG_WARNING, "Read failed (block header format)\n");
return -1;
}
/* Data has the actual length of data in it */
if (fread(&data, 1, 4, f) != 4) {
- ast_log(LOG_WARNING, "Read failed (data)\n");
+ ast_log(LOG_WARNING, "Read failed (block '%.4s' header length)\n", buf);
return -1;
}
data = ltohl(data);
+ if (memcmp(&buf, "fmt ", 4) == 0) {
+ if (check_header_fmt(f, data))
+ return -1;
+ continue;
+ }
if(memcmp(buf, "data", 4) == 0 )
break;
- if(memcmp(buf, "fact", 4) != 0 ) {
- ast_log(LOG_WARNING, "Unknown block - not fact or data\n");
- return -1;
- }
+ ast_log(LOG_DEBUG, "Skipping unknown block '%.4s'\n", buf);
if (fseek(f,data,SEEK_CUR) == -1 ) {
- ast_log(LOG_WARNING, "Failed to skip fact block: %d\n", data );
+ ast_log(LOG_WARNING, "Failed to skip '%.4s' block: %d\n", buf, data);
return -1;
}
}
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/include/asterisk/autoconfig.h.in
^
|
@@ -329,6 +329,9 @@
/* Define to 1 if you have the ISDN PRI library. */
#undef HAVE_PRI
+/* Define to 1 if you have the NOTIFY with call ptr library. */
+#undef HAVE_PRI_CALL_HOLD
+
/* Define to 1 if you have the ISDN PRI set_inbanddisconnect library. */
#undef HAVE_PRI_INBANDDISCONNECT
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/include/asterisk/select.h
^
|
@@ -37,16 +37,19 @@
#if !defined(HAVE_VARIABLE_FDSET) && defined(CONFIGURE_RAN_AS_ROOT)
#define ast_fdset fd_set
#else
+#define ast_FDMAX 32768
typedef struct {
- TYPEOF_FD_SET_FDS_BITS fds_bits[4096 / SIZEOF_FD_SET_FDS_BITS]; /* 32768 bits */
+ TYPEOF_FD_SET_FDS_BITS fds_bits[ast_FDMAX / 8 / SIZEOF_FD_SET_FDS_BITS]; /* 32768 bits */
} ast_fdset;
+#define _bitsize(a) (sizeof(a) * 8)
+
#undef FD_ZERO
#define FD_ZERO(a) \
do { \
TYPEOF_FD_SET_FDS_BITS *bytes = (TYPEOF_FD_SET_FDS_BITS *) a; \
int i; \
- for (i = 0; i < sizeof(*(a)) / SIZEOF_FD_SET_FDS_BITS; i++) { \
+ for (i = 0; i < ast_FDMAX / _bitsize(TYPEOF_FD_SET_FDS_BITS); i++) { \
bytes[i] = 0; \
} \
} while (0)
@@ -54,10 +57,12 @@
#define FD_SET(fd, fds) \
do { \
TYPEOF_FD_SET_FDS_BITS *bytes = (TYPEOF_FD_SET_FDS_BITS *) fds; \
- if (fd / sizeof(*bytes) + ((fd + 1) % sizeof(*bytes) ? 1 : 0) < sizeof(*(fds))) { \
- bytes[fd / (sizeof(*bytes) * 8)] |= ((TYPEOF_FD_SET_FDS_BITS) 1) << (fd % (sizeof(*bytes) * 8)); \
+ /* 32bit: FD / 32 + ((FD + 1) % 32 ? 1 : 0) < 1024 */ \
+ /* 64bit: FD / 64 + ((FD + 1) % 64 ? 1 : 0) < 512 */ \
+ if (fd / _bitsize(*bytes) + ((fd + 1) % _bitsize(*bytes) ? 1 : 0) < sizeof(*(fds)) / SIZEOF_FD_SET_FDS_BITS) { \
+ bytes[fd / _bitsize(*bytes)] |= ((TYPEOF_FD_SET_FDS_BITS) 1) << (fd % _bitsize(*bytes)); \
} else { \
- ast_log(LOG_ERROR, "FD %d exceeds the maximum size of ast_fdset!\n", fd); \
+ fprintf(stderr, "FD %d exceeds the maximum size of ast_fdset!\n", fd); \
} \
} while (0)
#endif /* HAVE_VARIABLE_FDSET */
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/main/asterisk.c
^
|
@@ -52,7 +52,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 307534 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 312285 $")
#undef sched_setscheduler
#undef setpriority
@@ -2932,6 +2932,7 @@
fd2 = (l.rlim_cur > sizeof(readers) * 8 ? sizeof(readers) * 8 : l.rlim_cur) - 1;
if (dup2(fd, fd2) < 0) {
ast_log(LOG_WARNING, "Cannot open maximum file descriptor %d at boot? %s\n", fd2, strerror(errno));
+ close(fd);
break;
}
@@ -2940,9 +2941,12 @@
if (ast_select(fd2 + 1, &readers, NULL, NULL, &tv) < 0) {
ast_log(LOG_WARNING, "Maximum select()able file descriptor is %d\n", FD_SETSIZE);
}
+ ast_FD_SETSIZE = l.rlim_cur > ast_FDMAX ? ast_FDMAX : l.rlim_cur;
+ close(fd);
+ close(fd2);
} while (0);
#elif defined(HAVE_VARIABLE_FDSET)
- ast_FD_SETSIZE = l.rlim_cur;
+ ast_FD_SETSIZE = l.rlim_cur > ast_FDMAX ? ast_FDMAX : l.rlim_cur;
#endif /* !defined(CONFIGURE_RAN_AS_ROOT) */
if ((!rungroup) && !ast_strlen_zero(ast_config_AST_RUN_GROUP))
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/main/callerid.c
^
|
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 264820 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 310633 $")
#include <time.h>
#include <string.h>
@@ -572,9 +572,22 @@
return -1;
}
if (res == 1) {
- /* Ignore invalid bytes */
- if (b > 0xff)
- continue;
+ if (b > 0xff) {
+ if (cid->sawflag != 5) {
+ /* Ignore invalid bytes */
+ continue;
+ }
+ /*
+ * We can tollerate an error on the checksum character since the
+ * checksum character is the last character in the message and
+ * it validates the message.
+ *
+ * Remove character error flags.
+ * Bit 8 : Parity error
+ * Bit 9 : Framing error
+ */
+ b &= 0xff;
+ }
switch(cid->sawflag) {
case 0: /* Look for flag */
if (b == 'U')
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/main/channel.c
^
|
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 305888 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 313545 $")
#include <stdio.h>
#include <stdlib.h>
@@ -2253,21 +2253,27 @@
} else {
goto done;
}
- }
-
+ } else {
#ifdef AST_DEVMODE
- /*
- * The ast_waitfor() code records which of the channel's file descriptors reported that
- * data is available. In theory, ast_read() should only be called after ast_waitfor()
- * reports that a channel has data available for reading. However, there still may be
- * some edge cases throughout the code where ast_read() is called improperly. This can
- * potentially cause problems, so if this is a developer build, make a lot of noise if
- * this happens so that it can be addressed.
- */
- if (chan->fdno == -1) {
- ast_log(LOG_ERROR, "ast_read() called with no recorded file descriptor.\n");
- }
+ /*
+ * The ast_waitfor() code records which of the channel's file
+ * descriptors reported that data is available. In theory,
+ * ast_read() should only be called after ast_waitfor() reports
+ * that a channel has data available for reading. However,
+ * there still may be some edge cases throughout the code where
+ * ast_read() is called improperly. This can potentially cause
+ * problems, so if this is a developer build, make a lot of
+ * noise if this happens so that it can be addressed.
+ *
+ * One of the potential problems is blocking on a dead channel.
+ */
+ if (chan->fdno == -1) {
+ ast_log(LOG_ERROR,
+ "ast_read() on chan '%s' called with no recorded file descriptor.\n",
+ chan->name);
+ }
#endif
+ }
prestate = chan->_state;
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/main/http.c
^
|
@@ -30,7 +30,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 315205 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 314607 $")
#include <sys/types.h>
#include <stdio.h>
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/main/manager.c
^
|
@@ -34,7 +34,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 315205 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 323559 $")
#include <stdio.h>
#include <stdlib.h>
@@ -790,7 +790,8 @@
static void unuse_eventqent(struct eventqent *e)
{
- if (ast_atomic_dec_and_test(&e->usecount) && e->next)
+ struct eventqent *next = e->next;
+ if (ast_atomic_dec_and_test(&e->usecount) && next)
pthread_kill(t, SIGURG);
}
@@ -2322,7 +2323,12 @@
(s->session->sessiontimeout ? "HTTP " : ""), s->session->username, ast_inet_ntoa(s->session->sin.sin_addr));
astman_send_ack(s, m, "Authentication accepted");
if (ast_opt_send_fullybooted && ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) {
- manager_event(EVENT_FLAG_SYSTEM, "FullyBooted", "Status: Fully Booted\r\n");
+ char auth[80];
+ authority_to_str(EVENT_FLAG_SYSTEM, auth, sizeof(auth));
+ astman_append(s, "Event: FullyBooted\r\n"
+ "Privilege: %s\r\n"
+ "Status: Fully Booted\r\n\r\n",
+ auth);
}
}
} else if (!strcasecmp(action, "Logoff")) {
@@ -2889,6 +2895,7 @@
char *c = workspace;
char *retval = NULL;
struct ast_variable *v;
+ char template[] = "/tmp/ast-http-XXXXXX";
for (v = params; v; v = v->next) {
if (!strcasecmp(v->name, "mansession_id")) {
@@ -2936,8 +2943,9 @@
ss.session = s;
ast_mutex_unlock(&s->__lock);
- ss.f = tmpfile();
- ss.fd = fileno(ss.f);
+ if ((ss.fd = mkstemp(template)) > -1) {
+ unlink(template);
+ }
if (s) {
struct message m = { 0 };
@@ -2983,13 +2991,21 @@
if (ss.fd > -1) {
char *buf;
size_t l;
+ ssize_t res;
+
+ /* Make sure that our buffer is NULL terminated */
+ while ((res = write(ss.fd, "", 1)) < 1) {
+ if (res == -1) {
+ ast_log(LOG_ERROR, "Failed to terminate manager response output: %s\n", strerror(errno));
+ break;
+ }
+ }
- if ((l = lseek(ss.fd, 0, SEEK_END)) > 0) {
- if (MAP_FAILED == (buf = mmap(NULL, l + 1, PROT_READ | PROT_WRITE, MAP_SHARED, ss.fd, 0))) {
+ if (res == 1 && (l = lseek(ss.fd, 0, SEEK_END)) > 0) {
+ if (MAP_FAILED == (buf = mmap(NULL, l, PROT_READ | PROT_WRITE, MAP_SHARED, ss.fd, 0))) {
ast_log(LOG_WARNING, "mmap failed. Manager request output was not processed\n");
} else {
char *tmpbuf;
- buf[l] = '\0';
if (format == FORMAT_XML)
tmpbuf = xml_translate(buf, params);
else if (format == FORMAT_HTML)
@@ -3010,11 +3026,10 @@
free(tmpbuf);
free(s->outputstr);
s->outputstr = NULL;
- munmap(buf, l + 1);
+ munmap(buf, l);
}
}
- fclose(ss.f);
- ss.f = NULL;
+ close(ss.fd);
ss.fd = -1;
} else if (s->outputstr) {
char *tmp;
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/main/udptl.c
^
|
@@ -17,7 +17,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 308413 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 308721 $")
#include <stdio.h>
#include <stdlib.h>
@@ -278,9 +278,9 @@
int count;
int total_count;
int seq_no;
- const uint8_t *ifp;
- const uint8_t *data;
- int ifp_len;
+ const uint8_t *ifp = NULL;
+ const uint8_t *data = NULL;
+ int ifp_len = 0;
int repaired[16];
const uint8_t *bufs[ARRAY_LEN(s->f) - 1];
int lengths[ARRAY_LEN(s->f) - 1];
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/main/utils.c
^
|
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 301305 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 310779 $")
#include <ctype.h>
#include <string.h>
@@ -726,7 +726,7 @@
AST_LIST_TRAVERSE(&lock_infos, lock_info, entry) {
int i;
if (lock_info->num_locks) {
- ast_dynamic_str_append(&str, 0, "=== Thread ID: %ld (%s)\n", (long) lock_info->thread_id,
+ ast_dynamic_str_append(&str, 0, "=== Thread ID: 0x%lx (%s)\n", (long) lock_info->thread_id,
lock_info->thread_name);
pthread_mutex_lock(&lock_info->lock);
for (i = 0; str && i < lock_info->num_locks; i++) {
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/pbx/pbx_ael.c
^
|
@@ -25,7 +25,7 @@
#include "asterisk.h"
#if !defined(STANDALONE_AEL)
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 271552 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 310435 $")
#endif
#include <sys/types.h>
@@ -4502,6 +4502,30 @@
static int aeldebug = 0;
+#ifndef STANDALONE_AEL
+static char *aelsub = "AELSub";
+static char *aelsub_synopsis = "Launch subroutine built with AEL";
+static char *aelsub_descrip =
+"AELSub(<macroname>[|<args>])\n"
+"Execute the named subroutine, defined in AEL, from another dialplan language,\n"
+"such as extensions.conf or Realtime extensions.\n\n"
+"The purpose of this application is to provide a sane entry point into AEL\n"
+"subroutines, the implementation of which may change from time to time.\n";
+
+static int aelsub_exec(struct ast_channel *chan, void *vdata)
+{
+ char *data = ast_strdupa(vdata);
+ struct ast_app *macro = pbx_findapp("Macro");
+ if (macro) {
+ if (strncmp(data, "macro-", 6) == 0) {
+ data += 6;
+ }
+ return pbx_exec(chan, macro, data);
+ }
+ return -1;
+}
+#endif
+
/* interface stuff */
/* if all the below are static, who cares if they are present? */
@@ -4620,12 +4644,18 @@
{
ast_context_destroy(NULL, registrar);
ast_cli_unregister_multiple(cli_ael, sizeof(cli_ael) / sizeof(struct ast_cli_entry));
+#ifndef STANDALONE_AEL
+ ast_unregister_application(aelsub);
+#endif
return 0;
}
static int load_module(void)
{
ast_cli_register_multiple(cli_ael, sizeof(cli_ael) / sizeof(struct ast_cli_entry));
+#ifndef STANDALONE_AEL
+ ast_register_application(aelsub, aelsub_exec, aelsub_synopsis, aelsub_descrip);
+#endif
return (pbx_load_module());
}
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/res/res_agi.c
^
|
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 295553 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 314822 $")
#include <sys/types.h>
#include <netdb.h>
@@ -952,12 +952,14 @@
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
- return -1;
+ fdprintf(agi->fd, "200 result=%d\n", res);
+ return RESULT_FAILURE;
}
sildet = ast_dsp_new();
if (!sildet) {
ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
- return -1;
+ fdprintf(agi->fd, "200 result=-1\n");
+ return RESULT_FAILURE;
}
ast_dsp_set_threshold(sildet, 256);
}
@@ -1213,7 +1215,7 @@
static int handle_getvariable(struct ast_channel *chan, AGI *agi, int argc, char **argv)
{
char *ret;
- char tempstr[1024];
+ char tempstr[1024] = "";
if (argc != 3)
return RESULT_SHOWUSAGE;
@@ -1855,7 +1857,7 @@
return 0;
}
-static int agi_handle_command(struct ast_channel *chan, AGI *agi, char *buf)
+static enum agi_result agi_handle_command(struct ast_channel *chan, AGI *agi, char *buf)
{
char *argv[MAX_ARGS];
int argc = MAX_ARGS;
@@ -1882,14 +1884,15 @@
return AST_PBX_KEEPALIVE;
break;
case RESULT_FAILURE:
- /* They've already given the failure. We've been hung up on so handle this
- appropriately */
- return -1;
+ /* The RESULT_FAILURE code is usually because the channel hungup. */
+ return AGI_RESULT_FAILURE;
+ default:
+ break;
}
} else {
fdprintf(agi->fd, "510 Invalid or unknown command\n");
}
- return 0;
+ return AGI_RESULT_SUCCESS;
}
static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi, int pid, int *status, int dead)
{
@@ -1916,7 +1919,17 @@
setup_env(chan, request, agi->fd, (agi->audio > -1));
for (;;) {
ms = -1;
- c = ast_waitfor_nandfds(&chan, dead ? 0 : 1, &agi->ctrl, 1, NULL, &outfd, &ms);
+ if (dead) {
+ c = ast_waitfor_nandfds(&chan, 0, &agi->ctrl, 1, NULL, &outfd, &ms);
+ } else if (!ast_check_hangup(chan)) {
+ c = ast_waitfor_nandfds(&chan, 1, &agi->ctrl, 1, NULL, &outfd, &ms);
+ } else {
+ /*
+ * Read the channel control queue until it is dry so we can
+ * quit.
+ */
+ c = chan;
+ }
if (c) {
retry = AGI_NANDFS_RETRY;
/* Idle the channel until we get a command */
@@ -1937,6 +1950,7 @@
} else if (outfd > -1) {
size_t len = sizeof(buf);
size_t buflen = 0;
+ enum agi_result cmd_status;
retry = AGI_NANDFS_RETRY;
buf[0] = '\0';
@@ -1959,8 +1973,6 @@
if (!buf[0]) {
/* Program terminated */
- if (returnstatus)
- returnstatus = -1;
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AGI Script %s completed, returning %d\n", request, returnstatus);
if (pid > 0)
@@ -1981,9 +1993,15 @@
buf[strlen(buf) - 1] = 0;
if (agidebug)
ast_verbose("AGI Rx << %s\n", buf);
- returnstatus |= agi_handle_command(chan, agi, buf);
- /* If the handle_command returns -1, we need to stop */
- if ((returnstatus < 0) || (returnstatus == AST_PBX_KEEPALIVE)) {
+ cmd_status = agi_handle_command(chan, agi, buf);
+ if (cmd_status == AGI_RESULT_FAILURE) {
+ if (dead || !ast_check_hangup(chan)) {
+ /* The failure was not because of a hangup. */
+ returnstatus = AGI_RESULT_FAILURE;
+ break;
+ }
+ } else if (cmd_status == AST_PBX_KEEPALIVE) {
+ returnstatus = AST_PBX_KEEPALIVE;
break;
}
} else {
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/res/res_config_odbc.c
^
|
@@ -36,7 +36,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 298480 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 310140 $")
#include <stdio.h>
#include <stdlib.h>
@@ -223,6 +223,7 @@
}
for (x = 0; x < colcount; x++) {
rowdata[0] = '\0';
+ colsize = 0;
collen = sizeof(coltitle);
res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen,
&datatype, &colsize, &decimaldigits, &nullable);
@@ -377,6 +378,7 @@
}
for (x=0;x<colcount;x++) {
rowdata[0] = '\0';
+ colsize = 0;
collen = sizeof(coltitle);
res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen,
&datatype, &colsize, &decimaldigits, &nullable);
|
[-]
[+]
|
Changed |
asterisk-1.4.42.tar.bz2/res/res_features.c
^
|
@@ -30,7 +30,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 306672 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 324627 $")
#include <pthread.h>
#include <signal.h>
@@ -139,6 +139,12 @@
AST_FEATURE_FLAG_BYBOTH = (3 << 3),
};
+typedef enum {
+ FEATURE_INTERPRET_DETECT, /* Used by ast_feature_detect */
+ FEATURE_INTERPRET_DO, /* Used by feature_interpret */
+ FEATURE_INTERPRET_CHECK, /* Used by feature_check */
+} feature_interpret_op;
+
static char *parkedcall = "ParkedCall";
static int parkaddhints = 0; /*!< Add parking hints automatically */
@@ -1520,7 +1526,7 @@
*/
static int feature_interpret_helper(struct ast_channel *chan, struct ast_channel *peer,
struct ast_bridge_config *config, char *code, int sense, char *dynamic_features_buf,
- struct ast_flags *features, int operation, struct ast_call_feature *feature)
+ struct ast_flags *features, feature_interpret_op operation, struct ast_call_feature *feature)
{
int x;
struct ast_call_feature *tmpfeature;
@@ -1528,7 +1534,7 @@
int res = FEATURE_RETURN_PASSDIGITS;
int feature_detected = 0;
- if (!(peer && chan && config) && operation) {
+ if (!(peer && chan && config) && operation == FEATURE_INTERPRET_DO) {
return -1; /* can not run feature operation */
}
@@ -1541,15 +1547,21 @@
if (option_debug > 2) {
ast_log(LOG_DEBUG, "Feature detected: fname=%s sname=%s exten=%s\n", builtin_features[x].fname, builtin_features[x].sname, builtin_features[x].exten);
}
- if (operation) {
+ if (operation == FEATURE_INTERPRET_CHECK) {
+ res = FEATURE_RETURN_SUCCESS; /* We found something */
+ } else if (operation == FEATURE_INTERPRET_DO) {
res = builtin_features[x].operation(chan, peer, config, code, sense, NULL);
}
- memcpy(feature, &builtin_features[x], sizeof(feature));
+ if (feature) {
+ memcpy(feature, &builtin_features[x], sizeof(feature));
+ }
+
feature_detected = 1;
break;
} else if (!strncmp(builtin_features[x].exten, code, strlen(code))) {
- if (res == FEATURE_RETURN_PASSDIGITS)
+ if (res == FEATURE_RETURN_PASSDIGITS) {
res = FEATURE_RETURN_STOREDIGITS;
+ }
}
}
}
@@ -1573,10 +1585,14 @@
if (option_debug > 2) {
ast_log(LOG_NOTICE, " Feature Found: %s exten: %s\n",tmpfeature->sname, tok);
}
- if (operation) {
+ if (operation == FEATURE_INTERPRET_CHECK) {
+ res = FEATURE_RETURN_SUCCESS; /* We found something */
+ } else if (operation == FEATURE_INTERPRET_DO) {
res = tmpfeature->operation(chan, peer, config, code, sense, tmpfeature);
}
- memcpy(feature, tmpfeature, sizeof(feature));
+ if (feature) {
+ memcpy(feature, tmpfeature, sizeof(feature));
+ }
if (res != FEATURE_RETURN_KEEPTRYING) {
AST_RWLIST_UNLOCK(&feature_list);
break;
@@ -1626,13 +1642,23 @@
ast_log(LOG_DEBUG, "Feature interpret: chan=%s, peer=%s, code=%s, sense=%d, features=%d, dynamic=%s\n", chan->name, peer->name, code, sense, features.flags, dynamic_features_buf);
}
- return feature_interpret_helper(chan, peer, config, code, sense, dynamic_features_buf, &features, 1, &feature);
+ return feature_interpret_helper(chan, peer, config, code, sense, dynamic_features_buf, &features, FEATURE_INTERPRET_DO, &feature);
}
int ast_feature_detect(struct ast_channel *chan, struct ast_flags *features, char *code, struct ast_call_feature *feature) {
- return feature_interpret_helper(chan, NULL, NULL, code, 0, NULL, features, 0, feature);
+ return feature_interpret_helper(chan, NULL, NULL, code, 0, NULL, features, FEATURE_INTERPRET_DETECT, feature);
+}
+
+/*! \brief Check if a feature exists */
+static int feature_check(struct ast_channel *chan, struct ast_flags *features, char *code) {
+ char *chan_dynamic_features;
+ ast_channel_lock(chan);
+ chan_dynamic_features = ast_strdupa(S_OR(pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"),""));
+ ast_channel_unlock(chan);
+
+ return feature_interpret_helper(chan, NULL, NULL, code, 0, chan_dynamic_features, features, FEATURE_INTERPRET_CHECK, NULL);
}
static void set_config_flags(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config)
@@ -2070,6 +2096,22 @@
return;
}
+static void clear_dialed_interfaces(struct ast_channel *chan)
+{
+ struct ast_datastore *di_datastore;
+
+ ast_channel_lock(chan);
+ if ((di_datastore = ast_channel_datastore_find(chan, &dialed_interface_info, NULL))) {
+ if (option_debug) {
+ ast_log(LOG_DEBUG, "Removing dialed interfaces datastore on %s since we're bridging\n", chan->name);
+ }
+ if (!ast_channel_datastore_remove(chan, di_datastore)) {
+ ast_channel_datastore_free(di_datastore);
+ }
+ }
+ ast_channel_unlock(chan);
+}
+
int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast_bridge_config *config)
{
/* Copy voice back and forth between the two channels. Give the peer
@@ -2086,6 +2128,7 @@
int hasfeatures=0;
int hadfeatures=0;
int autoloopflag;
+ int sendingdtmfdigit = 0;
struct ast_option_header *aoh;
struct ast_bridge_config backup_config;
struct ast_cdr *bridge_cdr = NULL;
@@ -2094,6 +2137,7 @@
struct ast_cdr *peer_cdr = peer->cdr; /* the proper chan cdr, if there are forked cdrs */
struct ast_cdr *new_chan_cdr = NULL; /* the proper chan cdr, if there are forked cdrs */
struct ast_cdr *new_peer_cdr = NULL; /* the proper chan cdr, if there are forked cdrs */
+ struct ast_silence_generator *silgen = NULL;
memset(&backup_config, 0, sizeof(backup_config));
@@ -2225,6 +2269,12 @@
ast_clear_flag(bridge_cdr, AST_CDR_FLAG_DIALED);
}
+ /* If we are bridging a call, stop worrying about forwarding loops. We presume that if
+ * a call is being bridged, that the humans in charge know what they're doing. If they
+ * don't, well, what can we do about that? */
+ clear_dialed_interfaces(chan);
+ clear_dialed_interfaces(peer);
+
for (;;) {
struct ast_channel *other; /* used later */
@@ -2331,15 +2381,55 @@
break;
case AST_CONTROL_OPTION:
aoh = f->data;
- /* Forward option Requests */
+ /* Forward option Requests, but only ones we know are safe
+ * These are ONLY sent by chan_iax2 and I'm not convinced that
+ * they are useful. I haven't deleted them entirely because I
+ * just am not sure of the ramifications of removing them. */
if (aoh && aoh->flag == AST_OPTION_FLAG_REQUEST) {
- ast_channel_setoption(other, ntohs(aoh->option), aoh->data,
- f->datalen - sizeof(struct ast_option_header), 0);
+ switch (ntohs(aoh->option)) {
+ case AST_OPTION_TONE_VERIFY:
+ case AST_OPTION_TDD:
+ case AST_OPTION_RELAXDTMF:
+ case AST_OPTION_AUDIO_MODE:
+ ast_channel_setoption(other, ntohs(aoh->option), aoh->data,
+ f->datalen - sizeof(struct ast_option_header), 0);
+ }
}
break;
}
} else if (f->frametype == AST_FRAME_DTMF_BEGIN) {
- /* eat it */
+ struct ast_flags *cfg;
+ char dtmfcode[2] = { f->subclass, };
+ size_t featurelen;
+
+ if (who == chan) {
+ featurelen = strlen(chan_featurecode);
+ cfg = &(config->features_caller);
+ } else {
+ featurelen = strlen(peer_featurecode);
+ cfg = &(config->features_callee);
+ }
+ /* Take a peek if this (possibly) matches a feature. If not, just pass this
+ * DTMF along untouched. If this is not the first digit of a multi-digit code
+ * then we need to fall through and stream the characters if it matches */
+ if (featurelen == 0
+ && feature_check(chan, cfg, &dtmfcode[0]) == FEATURE_RETURN_PASSDIGITS) {
+ if (option_debug > 3) {
+ ast_log(LOG_DEBUG, "Passing DTMF through, since it is not a feature code\n");
+ }
+ ast_write(other, f);
+ sendingdtmfdigit = 1;
+ } else {
+ /* If ast_opt_transmit_silence is set, then we need to make sure we are
+ * transmitting something while we hold on to the DTMF waiting for a
+ * feature. */
+ if (!silgen && ast_opt_transmit_silence) {
+ silgen = ast_channel_start_silence_generator(other);
+ }
+ if (option_debug > 3) {
+ ast_log(LOG_DEBUG, "Not passing DTMF through, since it may be a feature code\n");
+ }
+ }
} else if (f->frametype == AST_FRAME_DTMF) {
char *featurecode;
int sense;
@@ -2353,59 +2443,78 @@
sense = FEATURE_SENSE_PEER;
featurecode = peer_featurecode;
}
- /*! append the event to featurecode. we rely on the string being zero-filled, and
- * not overflowing it.
- * \todo XXX how do we guarantee the latter ?
- */
- featurecode[strlen(featurecode)] = f->subclass;
- /* Get rid of the frame before we start doing "stuff" with the channels */
- ast_frfree(f);
- f = NULL;
- config->feature_timer = backup_config.feature_timer;
- res = feature_interpret(chan, peer, config, featurecode, sense);
- switch(res) {
- case FEATURE_RETURN_PASSDIGITS:
- ast_dtmf_stream(other, who, featurecode, 0);
- /* Fall through */
- case FEATURE_RETURN_SUCCESS:
- memset(featurecode, 0, sizeof(chan_featurecode));
- break;
- }
- if (res >= FEATURE_RETURN_PASSDIGITS) {
- res = 0;
- } else
- break;
- hasfeatures = !ast_strlen_zero(chan_featurecode) || !ast_strlen_zero(peer_featurecode);
- if (hadfeatures && !hasfeatures) {
- /* Restore backup */
- memcpy(config, &backup_config, sizeof(struct ast_bridge_config));
- memset(&backup_config, 0, sizeof(struct ast_bridge_config));
- } else if (hasfeatures) {
- if (!hadfeatures) {
- /* Backup configuration */
- memcpy(&backup_config, config, sizeof(struct ast_bridge_config));
- /* Setup temporary config options */
- config->play_warning = 0;
- ast_clear_flag(&(config->features_caller), AST_FEATURE_PLAY_WARNING);
- ast_clear_flag(&(config->features_callee), AST_FEATURE_PLAY_WARNING);
- config->warning_freq = 0;
- config->warning_sound = NULL;
- config->end_sound = NULL;
- config->start_sound = NULL;
- config->firstpass = 0;
+
+ if (sendingdtmfdigit == 1) {
+ /* We let the BEGIN go through happily, so let's not bother with the END,
+ * since we already know it's not something we bother with */
+ ast_write(other, f);
+ sendingdtmfdigit = 0;
+ } else {
+ /*! append the event to featurecode. we rely on the string being zero-filled, and
+ * not overflowing it.
+ * \todo XXX how do we guarantee the latter ?
+ */
+ featurecode[strlen(featurecode)] = f->subclass;
+ /* Get rid of the frame before we start doing "stuff" with the channels */
+ ast_frfree(f);
+ f = NULL;
+ if (silgen) {
+ ast_channel_stop_silence_generator(other, silgen);
+ silgen = NULL;
+ }
+ config->feature_timer = backup_config.feature_timer;
+ res = feature_interpret(chan, peer, config, featurecode, sense);
+ switch(res) {
+ case FEATURE_RETURN_PASSDIGITS:
+ ast_dtmf_stream(other, who, featurecode, 0);
+ /* Fall through */
+ case FEATURE_RETURN_SUCCESS:
+ memset(featurecode, 0, sizeof(chan_featurecode));
+ break;
+ }
+ if (res >= FEATURE_RETURN_PASSDIGITS) {
+ res = 0;
+ } else {
+ break;
+ }
+ hasfeatures = !ast_strlen_zero(chan_featurecode) || !ast_strlen_zero(peer_featurecode);
+ if (hadfeatures && !hasfeatures) {
+ /* Restore backup */
+ memcpy(config, &backup_config, sizeof(struct ast_bridge_config));
+ memset(&backup_config, 0, sizeof(struct ast_bridge_config));
+ } else if (hasfeatures) {
+ if (!hadfeatures) {
+ /* Backup configuration */
+ memcpy(&backup_config, config, sizeof(struct ast_bridge_config));
+ /* Setup temporary config options */
+ config->play_warning = 0;
+ ast_clear_flag(&(config->features_caller), AST_FEATURE_PLAY_WARNING);
+ ast_clear_flag(&(config->features_callee), AST_FEATURE_PLAY_WARNING);
+ config->warning_freq = 0;
+ config->warning_sound = NULL;
+ config->end_sound = NULL;
+ config->start_sound = NULL;
+ config->firstpass = 0;
+ }
+ config->start_time = ast_tvnow();
+ config->feature_timer = featuredigittimeout;
+ if (option_debug) {
+ ast_log(LOG_DEBUG, "Set time limit to %ld\n", config->feature_timer);
+ }
}
- config->start_time = ast_tvnow();
- config->feature_timer = featuredigittimeout;
- if (option_debug)
- ast_log(LOG_DEBUG, "Set time limit to %ld\n", config->feature_timer);
}
}
if (f)
ast_frfree(f);
}
- before_you_go:
+before_you_go:
+ /* Just in case something weird happened and we didn't clean up the silence generator... */
+ if (silgen) {
+ ast_channel_stop_silence_generator(who == chan ? peer : chan, silgen);
+ silgen = NULL;
+ }
if (ast_test_flag(chan,AST_FLAG_BRIDGE_HANGUP_DONT)) {
ast_clear_flag(chan,AST_FLAG_BRIDGE_HANGUP_DONT); /* its job is done */
if (bridge_cdr) {
@@ -3278,6 +3387,34 @@
}
+/*!
+ * \internal
+ * \brief Perform actual pickup between two channels.
+ * \note Must remain in sync with same function in apps/app_directed_pickup.c.
+ */
+static int pickup_do(struct ast_channel *chan, struct ast_channel *target)
+{
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Call pickup on '%s' by '%s'\n", target->name, chan->name);
+
+ if (ast_answer(chan)) {
+ ast_log(LOG_WARNING, "Unable to answer '%s'\n", chan->name);
+ return -1;
+ }
+
+ if (ast_queue_control(chan, AST_CONTROL_ANSWER)) {
+ ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n", chan->name);
+ return -1;
+ }
+
+ if (ast_channel_masquerade(target, chan)) {
+ ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, target->name);
+ return -1;
+ }
+
+ return 0;
+}
+
int ast_pickup_call(struct ast_channel *chan)
{
struct ast_channel *cur = NULL;
@@ -3289,27 +3426,21 @@
(chan->pickupgroup & cur->callgroup) &&
((cur->_state == AST_STATE_RINGING) ||
(cur->_state == AST_STATE_RING)) &&
- !cur->masq) {
+ !cur->masq &&
+ !ast_test_flag(cur, AST_FLAG_ZOMBIE)) {
break;
}
ast_channel_unlock(cur);
}
if (cur) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Call pickup on chan '%s' by '%s'\n",cur->name, chan->name);
- res = ast_answer(chan);
- if (res)
- ast_log(LOG_WARNING, "Unable to answer '%s'\n", chan->name);
- res = ast_queue_control(chan, AST_CONTROL_ANSWER);
- if (res)
- ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n", chan->name);
- res = ast_channel_masquerade(cur, chan);
- if (res)
- ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, cur->name); /* Done */
+ res = pickup_do(chan, cur);
+ if (res) {
+ ast_log(LOG_WARNING, "pickup %s failed by %s\n", cur->name, chan->name);
+ }
ast_channel_unlock(cur);
} else {
if (option_debug)
- ast_log(LOG_DEBUG, "No call pickup possible...\n");
+ ast_log(LOG_DEBUG, "No call pickup possible... for %s\n", chan->name);
}
return res;
}
|
[-]
[+]
|
Deleted |
backup
^
|
@@ -1 +0,0 @@
-# usedforbuild aaa_base acl alsa alsa-devel attr audit-libs autoconf automake bash bind-libs bind-utils binutils bison blocxx bzip2 coreutils cpio cpp cpp41 cracklib curl curl-devel cvs cyrus-sasl db diffutils e2fsprogs expat file filesystem fillup findutils flex gawk gcc gcc-c++ gcc41 gcc41-c++ gdbm gdbm-devel gettext gettext-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv irqbalance kernel-default klogd krb5 less libacl libattr libcom_err libgcc41 libgsm1 libgsm-devel libidn libidn-devel libjpeg libjpeg-devel libltdl libmudflap41 libnscd libogg libpri libstdc++-devel libstdc++41 libstdc++41-devel libtiff libtiff-devel libtool libvolume_id libxcrypt libzio limal limal-bootloader limal-perl linux-kernel-headers m4 make man mdadm mkinitrd mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2 openldap2-client openldap2-devel openssl openssl-devel pam pam-modules patch pcre perl perl-Bootloader perl-gettext permissions popt postgresql-devel postgresql-libs procinfo procps psmisc pwdutils rcs readline reiserfs rpm sed spandsp speex speex-devel strace sysvinit tar tcpd texinfo timezone udev unixODBC unixODBC-devel unzip util-linux vim zaptel zaptel-kmp-default zlib zlib-devel cyrus-sasl-devel openh323-devel SDL-devel
|