[svn-commits] branch oej/test-this-branch r34066 - in
/team/oej/test-this-branch: ./ apps/ ...
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Wed Jun 14 04:58:43 MST 2006
Author: oej
Date: Wed Jun 14 06:58:42 2006
New Revision: 34066
URL: http://svn.digium.com/view/asterisk?rev=34066&view=rev
Log:
resolve conflicts caused by MOG ;-)
Modified:
team/oej/test-this-branch/ (props changed)
team/oej/test-this-branch/CREDITS
team/oej/test-this-branch/README.test-this-branch
team/oej/test-this-branch/apps/app_alarmreceiver.c
team/oej/test-this-branch/apps/app_festival.c
team/oej/test-this-branch/apps/app_ices.c
team/oej/test-this-branch/apps/app_meetme.c
team/oej/test-this-branch/apps/app_mixmonitor.c
team/oej/test-this-branch/apps/app_playback.c
team/oej/test-this-branch/apps/app_rpt.c
team/oej/test-this-branch/apps/app_voicemail.c
team/oej/test-this-branch/asterisk.c
team/oej/test-this-branch/build_tools/menuselect.h
team/oej/test-this-branch/build_tools/menuselect_curses.c
team/oej/test-this-branch/channel.c
team/oej/test-this-branch/channels/chan_agent.c
team/oej/test-this-branch/channels/chan_iax2.c
team/oej/test-this-branch/channels/chan_local.c
team/oej/test-this-branch/channels/chan_sip.c
team/oej/test-this-branch/configs/sip.conf.sample
team/oej/test-this-branch/configure
team/oej/test-this-branch/configure.ac
team/oej/test-this-branch/file.c
team/oej/test-this-branch/include/asterisk/autoconfig.h.in
team/oej/test-this-branch/include/asterisk/chanspy.h
team/oej/test-this-branch/include/asterisk/lock.h
team/oej/test-this-branch/pbx.c
team/oej/test-this-branch/res/res_agi.c
team/oej/test-this-branch/translate.c
team/oej/test-this-branch/utils/Makefile
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jun 14 06:58:42 2006
@@ -1,1 +1,1 @@
-/trunk:1-33504
+/trunk:1-34061
Modified: team/oej/test-this-branch/CREDITS
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/CREDITS?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/CREDITS (original)
+++ team/oej/test-this-branch/CREDITS Wed Jun 14 06:58:42 2006
@@ -26,6 +26,12 @@
=== HARDWARE DONORS ===
* Thanks to QuickNet Technologies for their donation of an Internet
PhoneJack and Linejack card to the project. (http://www.quicknet.net)
+
+* Thanks to VoipSupply for their donation of Sipura ATAs to the project for
+T.38 testing. (http://www.voipsupply.com)
+
+* Thanks to Grandstream for their donation of ATAs to the project for
+T.38 testing. (http://www.grandstream.com)
=== MISCELLANEOUS PATCHES ===
Jim Dixon - Zapata Telephony and app_rpt
@@ -124,6 +130,8 @@
John Martin, Aupix - Improved video support in the SIP channel
+Steve Underwood - Provided T.38 pass through support.
+
=== OTHER CONTRIBUTIONS ===
John Todd - Monkey sounds and associated teletorture prompt
Michael Jerris - bug marshaling
Modified: team/oej/test-this-branch/README.test-this-branch
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/README.test-this-branch?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/README.test-this-branch (original)
+++ team/oej/test-this-branch/README.test-this-branch Wed Jun 14 06:58:42 2006
@@ -29,7 +29,6 @@
- amieventhook-561 rev 11712: Support for manager event hooks (#5161, anthm)
- metermaids: Subscription support for parking lots (#5779)
- filenamelen: Some code changes for file name lengths (oej)
-- t38passthrough: Support for Fax passthrough in SIP (#5090, Steve Underwood)
- SSL for AMI: Secured manager connections (#6812, jtodd)
See README file in doc/ and manager.conf.sample
@@ -44,7 +43,6 @@
- Mute logging in remote console (mavetju, #6524)
- TOUPPER and TOLOWER ASCII functions (powerkill, #6668)
(With some changes)
-- SQLite 3 CDR driver (#6754, moy)
Things that has been commited to svn trunk:
- Abandon Queue manager event (tim_ringenbach, #6459)
@@ -71,10 +69,13 @@
- findme_followme: Followme application (#5574, bweschke)
- cdr_radius: CDR support for Radius (#6639, phsultan). See doc/cdrdriver.txt
- siptransfer: Improved SIP transfer support (branch)
+- t38passthrough: Support for Fax passthrough in SIP (#5090, Steve Underwood)
Temporarily disabled:
- G.722 support in Asterisk (passthrough, formats) (andrew, #5084)
(Does not compile with the latest changes in format driver handling)
+
+- SQLite 3 CDR driver (#6754, moy) - Waiting for update for new modulues
All of these exist in the bug tracker. Please report your findings
in each open issue report, so that we get the feedback for each
@@ -88,6 +89,8 @@
----------------------------
- With register=yes in a peer, the auth= header is not used for
registration (jcollie)
+- AMI_SSL does not compile in this branch for some reason. Disable
+ in Makefile.
* Metermaids
------------
Modified: team/oej/test-this-branch/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_alarmreceiver.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_alarmreceiver.c (original)
+++ team/oej/test-this-branch/apps/app_alarmreceiver.c Wed Jun 14 06:58:42 2006
@@ -206,6 +206,7 @@
i += wf.datalen / 8;
if (i > duration) {
+ ast_frfree(f);
break;
}
if (ast_write(chan, &wf)){
@@ -213,6 +214,7 @@
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Failed to write frame on %s\n", chan->name);
ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",chan->name);
res = -1;
+ ast_frfree(f);
break;
}
}
Modified: team/oej/test-this-branch/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_festival.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_festival.c (original)
+++ team/oej/test-this-branch/apps/app_festival.c Wed Jun 14 06:58:42 2006
@@ -238,11 +238,13 @@
myf.f.data = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
+ ast_frfree(f);
break;
}
if (res < needed) { /* last frame */
ast_log(LOG_DEBUG, "Last frame\n");
res=0;
+ ast_frfree(f);
break;
}
} else {
@@ -485,6 +487,9 @@
if ( read_data == -1 )
{
ast_log(LOG_WARNING,"Unable to read from cache/festival fd");
+ close(fd);
+ ast_config_destroy(cfg);
+ LOCAL_USER_REMOVE(u);
return -1;
}
n += read_data;
Modified: team/oej/test-this-branch/apps/app_ices.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_ices.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_ices.c (original)
+++ team/oej/test-this-branch/apps/app_ices.c Wed Jun 14 06:58:42 2006
@@ -173,6 +173,7 @@
if (errno != EAGAIN) {
ast_log(LOG_WARNING, "Write failed to pipe: %s\n", strerror(errno));
res = -1;
+ ast_frfree(f);
break;
}
}
Modified: team/oej/test-this-branch/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_meetme.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_meetme.c (original)
+++ team/oej/test-this-branch/apps/app_meetme.c Wed Jun 14 06:58:42 2006
@@ -1440,16 +1440,19 @@
if (!ast_goto_if_exists(chan, exitcontext, tmp, 1)) {
ast_log(LOG_DEBUG, "Got DTMF %c, goto context %s\n", tmp[0], exitcontext);
ret = 0;
+ ast_frfree(f);
break;
} else if (option_debug > 1)
ast_log(LOG_DEBUG, "Exit by single digit did not work in meetme. Extension %s does not exist in context %s\n", tmp, exitcontext);
} else if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#') && (confflags & CONFFLAG_POUNDEXIT)) {
ret = 0;
+ ast_frfree(f);
break;
} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
if (ioctl(fd, ZT_SETCONF, &ztc_empty)) {
ast_log(LOG_WARNING, "Error setting conference\n");
close(fd);
+ ast_frfree(f);
goto outrun;
}
@@ -1595,7 +1598,7 @@
if (ioctl(fd, ZT_SETCONF, &ztc)) {
ast_log(LOG_WARNING, "Error setting conference\n");
close(fd);
- AST_LIST_UNLOCK(&confs);
+ ast_frfree(f);
goto outrun;
}
Modified: team/oej/test-this-branch/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_mixmonitor.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_mixmonitor.c (original)
+++ team/oej/test-this-branch/apps/app_mixmonitor.c Wed Jun 14 06:58:42 2006
@@ -92,12 +92,11 @@
static const char *mixmonitor_spy_type = "MixMonitor";
struct mixmonitor {
- struct ast_channel *chan;
- char *filename;
+ struct ast_channel_spy spy;
+ struct ast_filestream *fs;
char *post_process;
+ char *name;
unsigned int flags;
- int readvol;
- int writevol;
};
enum {
@@ -123,13 +122,15 @@
AST_APP_OPTION_ARG('W', MUXFLAG_VOLUME, OPT_ARG_VOLUME),
});
-static void stopmon(struct ast_channel *chan, struct ast_channel_spy *spy)
-{
+static void stopmon(struct ast_channel_spy *spy)
+{
+ struct ast_channel *chan = spy->chan;
+
/* If our status has changed to DONE, then the channel we're spying on is gone....
DON'T TOUCH IT!!! RUN AWAY!!! */
if (spy->status == CHANSPY_DONE)
return;
-
+
if (!chan)
return;
@@ -149,7 +150,7 @@
ast_channel_lock(chan);
res = ast_channel_spy_add(chan, spy);
ast_channel_unlock(chan);
-
+
if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
@@ -161,91 +162,31 @@
static void *mixmonitor_thread(void *obj)
{
struct mixmonitor *mixmonitor = obj;
- struct ast_channel_spy spy;
- struct ast_filestream *fs = NULL;
- char *ext, *name;
- unsigned int oflags;
- struct ast_frame *f;
- char post_process[1024] = "";
+ struct ast_frame *f = NULL;
ast_atomic_fetchadd_int(&__mod_desc->usecnt, +1);
-
- name = ast_strdupa(mixmonitor->chan->name);
-
- oflags = O_CREAT|O_WRONLY;
- oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
-
- if ((ext = strrchr(mixmonitor->filename, '.'))) {
- *(ext++) = '\0';
- } else {
- ext = "raw";
- }
-
- fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0644);
- if (!fs) {
- ast_log(LOG_ERROR, "Cannot open %s.%s\n", mixmonitor->filename, ext);
- goto out;
- }
-
- if (ast_test_flag(mixmonitor, MUXFLAG_APPEND))
- ast_seekstream(fs, 0, SEEK_END);
-
- memset(&spy, 0, sizeof(spy));
- ast_set_flag(&spy, CHANSPY_FORMAT_AUDIO);
- ast_set_flag(&spy, CHANSPY_MIXAUDIO);
- spy.type = mixmonitor_spy_type;
- spy.status = CHANSPY_RUNNING;
- spy.read_queue.format = AST_FORMAT_SLINEAR;
- spy.write_queue.format = AST_FORMAT_SLINEAR;
- if (mixmonitor->readvol) {
- ast_set_flag(&spy, CHANSPY_READ_VOLADJUST);
- spy.read_vol_adjustment = mixmonitor->readvol;
- }
- if (mixmonitor->writevol) {
- ast_set_flag(&spy, CHANSPY_WRITE_VOLADJUST);
- spy.write_vol_adjustment = mixmonitor->writevol;
- }
- ast_mutex_init(&spy.lock);
-
- if (startmon(mixmonitor->chan, &spy)) {
- ast_log(LOG_WARNING, "Unable to add '%s' spy to channel '%s'\n",
- spy.type, mixmonitor->chan->name);
- goto out2;
- }
-
+
if (option_verbose > 1)
- ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", name);
-
- if (mixmonitor->post_process) {
- char *p;
-
- for (p = mixmonitor->post_process; *p ; p++) {
- if (*p == '^' && *(p+1) == '{') {
- *p = '$';
- }
- }
- pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
- }
-
- while (1) {
+ ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", mixmonitor->name);
+
+ ast_mutex_lock(&mixmonitor->spy.lock);
+
+ while (mixmonitor->spy.chan) {
struct ast_frame *next;
int write;
- ast_mutex_lock(&spy.lock);
-
- ast_channel_spy_trigger_wait(&spy);
+ ast_channel_spy_trigger_wait(&mixmonitor->spy);
- if (ast_check_hangup(mixmonitor->chan) || spy.status != CHANSPY_RUNNING) {
- ast_mutex_unlock(&spy.lock);
+ if (!mixmonitor->spy.chan || mixmonitor->spy.status != CHANSPY_RUNNING) {
break;
}
while (1) {
- if (!(f = ast_channel_spy_read_frame(&spy, SAMPLES_PER_FRAME)))
+ if (!(f = ast_channel_spy_read_frame(&mixmonitor->spy, SAMPLES_PER_FRAME)))
break;
write = (!ast_test_flag(mixmonitor, MUXFLAG_BRIDGED) ||
- ast_bridged_channel(mixmonitor->chan));
+ ast_bridged_channel(mixmonitor->spy.chan));
/* it is possible for ast_channel_spy_read_frame() to return a chain
of frames if a queue flush was necessary, so process them
@@ -253,32 +194,29 @@
for (; f; f = next) {
next = f->next;
if (write)
- ast_writestream(fs, f);
+ ast_writestream(mixmonitor->fs, f);
ast_frfree(f);
}
}
-
- ast_mutex_unlock(&spy.lock);
- }
-
- stopmon(mixmonitor->chan, &spy);
+ }
+
+ ast_mutex_unlock(&mixmonitor->spy.lock);
+
+ stopmon(&mixmonitor->spy);
if (option_verbose > 1)
- ast_verbose(VERBOSE_PREFIX_2 "End MixMonitor Recording %s\n", name);
-
- if (!ast_strlen_zero(post_process)) {
+ ast_verbose(VERBOSE_PREFIX_2 "End MixMonitor Recording %s\n", mixmonitor->name);
+
+ if (mixmonitor->post_process) {
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_2 "Executing [%s]\n", post_process);
- ast_safe_system(post_process);
- }
-
-out2:
- ast_mutex_destroy(&spy.lock);
-
- if (fs)
- ast_closestream(fs);
-
-out:
+ ast_verbose(VERBOSE_PREFIX_2 "Executing [%s]\n", mixmonitor->post_process);
+ ast_safe_system(mixmonitor->post_process);
+ }
+
+ ast_mutex_destroy(&mixmonitor->spy.lock);
+
+ ast_closestream(mixmonitor->fs);
+
free(mixmonitor);
ast_atomic_fetchadd_int(&__mod_desc->usecnt, -1);
@@ -292,31 +230,93 @@
pthread_attr_t attr;
pthread_t thread;
struct mixmonitor *mixmonitor;
- int len;
-
- len = sizeof(*mixmonitor) + strlen(filename) + 1;
- if (!ast_strlen_zero(post_process))
- len += strlen(post_process) + 1;
-
- if (!(mixmonitor = ast_calloc(1, len))) {
+ char *file_name, *ext;
+ char postprocess2[1024] = "";
+ unsigned int oflags;
+ size_t len;
+
+ len = sizeof(*mixmonitor) + strlen(chan->name) + 1;
+
+ /* If a post process system command is given attach it to the structure */
+ if (!ast_strlen_zero(post_process)) {
+ char *p1, *p2;
+
+ p1 = ast_strdupa(post_process);
+ for (p2 = p1; *p2 ; p2++) {
+ if (*p2 == '^' && *(p2+1) == '{') {
+ *p2 = '$';
+ }
+ }
+
+ pbx_substitute_variables_helper(chan, p1, postprocess2, sizeof(postprocess2) - 1);
+ if (!ast_strlen_zero(postprocess2))
+ len += strlen(postprocess2) + 1;
+ }
+
+ /* Pre-allocate mixmonitor structure and spy */
+ if (!(mixmonitor = calloc(1, len))) {
return;
}
- mixmonitor->chan = chan;
- mixmonitor->filename = (char *) mixmonitor + sizeof(*mixmonitor);
- strcpy(mixmonitor->filename, filename);
- if (!ast_strlen_zero(post_process)) {
- mixmonitor->post_process = mixmonitor->filename + strlen(filename) + 1;
- strcpy(mixmonitor->post_process, post_process);
- }
- mixmonitor->readvol = readvol;
- mixmonitor->writevol = writevol;
+ /* Copy over flags and channel name */
mixmonitor->flags = flags;
+ mixmonitor->name = (char *) mixmonitor + sizeof(*mixmonitor);
+ strcpy(mixmonitor->name, chan->name);
+ if (!ast_strlen_zero(postprocess2)) {
+ mixmonitor->post_process = mixmonitor->name + strlen(mixmonitor->name) + 1;
+ strcpy(mixmonitor->post_process, postprocess2);
+ }
+
+ /* Determine creation flags and filename plus extension for filestream */
+ oflags = O_CREAT | O_WRONLY;
+ oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
+ file_name = ast_strdupa(filename);
+ if ((ext = strrchr(file_name, '.'))) {
+ *(ext++) = '\0';
+ } else {
+ ext = "raw";
+ }
+
+ /* Move onto actually creating the filestream */
+ mixmonitor->fs = ast_writefile(file_name, ext, NULL, oflags, 0, 0644);
+ if (!mixmonitor->fs) {
+ ast_log(LOG_ERROR, "Cannot open %s.%s\n", file_name, ext);
+ free(mixmonitor);
+ return;
+ }
+
+ /* Setup the actual spy before creating our thread */
+ ast_set_flag(&mixmonitor->spy, CHANSPY_FORMAT_AUDIO);
+ ast_set_flag(&mixmonitor->spy, CHANSPY_MIXAUDIO);
+ mixmonitor->spy.type = mixmonitor_spy_type;
+ mixmonitor->spy.status = CHANSPY_RUNNING;
+ mixmonitor->spy.read_queue.format = AST_FORMAT_SLINEAR;
+ mixmonitor->spy.write_queue.format = AST_FORMAT_SLINEAR;
+ if (readvol) {
+ ast_set_flag(&mixmonitor->spy, CHANSPY_READ_VOLADJUST);
+ mixmonitor->spy.read_vol_adjustment = readvol;
+ }
+ if (writevol) {
+ ast_set_flag(&mixmonitor->spy, CHANSPY_WRITE_VOLADJUST);
+ mixmonitor->spy.write_vol_adjustment = writevol;
+ }
+ ast_mutex_init(&mixmonitor->spy.lock);
+
+ if (startmon(chan, &mixmonitor->spy)) {
+ ast_log(LOG_WARNING, "Unable to add '%s' spy to channel '%s'\n",
+ mixmonitor->spy.type, chan->name);
+ /* Since we couldn't add ourselves - bail out! */
+ ast_mutex_destroy(&mixmonitor->spy.lock);
+ ast_closestream(mixmonitor->fs);
+ free(mixmonitor);
+ return;
+ }
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
ast_pthread_create(&thread, &attr, mixmonitor_thread, mixmonitor);
pthread_attr_destroy(&attr);
+
}
static int mixmonitor_exec(struct ast_channel *chan, void *data)
Modified: team/oej/test-this-branch/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_playback.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_playback.c (original)
+++ team/oej/test-this-branch/apps/app_playback.c Wed Jun 14 06:58:42 2006
@@ -472,6 +472,9 @@
STANDARD_HANGUP_LOCALUSERS;
+ if (say_cfg)
+ ast_config_destroy(say_cfg);
+
return res;
}
Modified: team/oej/test-this-branch/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_rpt.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_rpt.c (original)
+++ team/oej/test-this-branch/apps/app_rpt.c Wed Jun 14 06:58:42 2006
@@ -21,7 +21,7 @@
/*! \file
*
* \brief Radio Repeater / Remote Base program
- * version 0.47 05/23/06
+ * version 0.48 06/13/06
*
* \author Jim Dixon, WB6NIL <jim at lambdatel.com>
*
@@ -123,12 +123,10 @@
/* Un-comment the following to include support for MDC-1200 digital tone
signalling protocol (using KA6SQG's GPL'ed implementation) */
-/* file must be downloaded separately, not part of Asterisk distribution */
/* #include "mdc_decode.c" */
/* Un-comment the following to include support for notch filters in the
rx audio stream (using Tony Fisher's mknotch (mkfilter) implementation) */
-/* file must be downloaded separately, not part of Asterisk distribution */
/* #include "rpt_notch.c" */
/* maximum digits in DTMF buffer, and seconds after * for DTMF command timeout */
@@ -244,7 +242,7 @@
#include "asterisk/say.h"
#include "asterisk/localtime.h"
-static char *tdesc = "Radio Repeater / Remote Base version 0.47 05/23/2006";
+static char *tdesc = "Radio Repeater / Remote Base version 0.48 06/13/2006";
static char *app = "Rpt";
@@ -6831,17 +6829,23 @@
/* if RX key */
if (f->subclass == AST_CONTROL_RADIO_KEY)
{
- if (debug == 7) printf("@@@@ rx key\n");
- myrpt->keyed = 1;
+ if ((!lasttx) || (myrpt->p.duplex > 1))
+ {
+ if (debug == 7) printf("@@@@ rx key\n");
+ myrpt->keyed = 1;
+ }
}
/* if RX un-key */
if (f->subclass == AST_CONTROL_RADIO_UNKEY)
{
- if (debug == 7) printf("@@@@ rx un-key\n");
- if(myrpt->keyed) {
- rpt_telemetry(myrpt,UNKEY,NULL);
+ if ((!lasttx) || (myrpt->p.duplex > 1))
+ {
+ if (debug == 7) printf("@@@@ rx un-key\n");
+ if(myrpt->keyed) {
+ rpt_telemetry(myrpt,UNKEY,NULL);
+ }
+ myrpt->keyed = 0;
}
- myrpt->keyed = 0;
}
}
ast_frfree(f);
Modified: team/oej/test-this-branch/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_voicemail.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_voicemail.c (original)
+++ team/oej/test-this-branch/apps/app_voicemail.c Wed Jun 14 06:58:42 2006
@@ -6496,6 +6496,8 @@
}
} else {
free(z);
+ AST_LIST_UNLOCK(&users);
+ ast_config_destroy(cfg);
return -1;
}
var = var->next;
@@ -6750,14 +6752,18 @@
return 0;
}
- if (!(origtime = ast_variable_retrieve(msg_cfg, "message", "origtime")))
+ if (!(origtime = ast_variable_retrieve(msg_cfg, "message", "origtime"))) {
+ ast_config_destroy(msg_cfg);
return 0;
+ }
cid = ast_variable_retrieve(msg_cfg, "message", "callerid");
context = ast_variable_retrieve(msg_cfg, "message", "context");
if (!strncasecmp("macro",context,5)) /* Macro names in contexts are useless for our needs */
context = ast_variable_retrieve(msg_cfg, "message","macrocontext");
+
+ ast_config_destroy(msg_cfg);
switch (option) {
case 3:
@@ -6895,8 +6901,6 @@
break;
}
-
- ast_config_destroy(msg_cfg);
if (!res) {
make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);
Modified: team/oej/test-this-branch/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/asterisk.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/asterisk.c (original)
+++ team/oej/test-this-branch/asterisk.c Wed Jun 14 06:58:42 2006
@@ -2091,17 +2091,12 @@
if (ast_opt_exec && data) { /* hack to print output then exit if asterisk -rx is used */
char tempchar;
-#ifdef __Darwin__
- struct pollfd fds[0];
- fds[0].fd = ast_consock;
- fds[0].events = POLLIN;
- fds[0].revents = 0;
- while (poll(fds, 1, 100) > 0) {
+ struct pollfd fds;
+ fds.fd = ast_consock;
+ fds.events = POLLIN;
+ fds.revents = 0;
+ while (poll(&fds, 1, 100) > 0)
ast_el_read_char(el, &tempchar);
- }
-#else
- while (!ast_el_read_char(el, &tempchar));
-#endif
return;
}
for (;;) {
Modified: team/oej/test-this-branch/build_tools/menuselect.h
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/build_tools/menuselect.h?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/build_tools/menuselect.h (original)
+++ team/oej/test-this-branch/build_tools/menuselect.h Wed Jun 14 06:58:42 2006
@@ -53,11 +53,11 @@
/*! Default setting */
const char *defaultenabled;
/*! This module is currently selected */
- int enabled;
+ unsigned int enabled:1;
/*! This module has failed dependencies */
- int depsfailed;
+ unsigned int depsfailed:1;
/*! This module has failed conflicts */
- int conflictsfailed;
+ unsigned int conflictsfailed:1;
/*! dependencies of this module */
AST_LIST_HEAD_NOLOCK(, depend) deps;
/*! conflicts of this module */
@@ -72,9 +72,9 @@
/*! the name displayed in the menu */
const char *displayname;
/*! Display what is selected, as opposed to not selected */
- int positive_output;
+ unsigned int positive_output:1;
/*! Force a clean of the source tree if anything in this category changes */
- int force_clean_on_change;
+ unsigned int force_clean_on_change:1;
/*! the list of possible values to be set in this variable */
AST_LIST_HEAD_NOLOCK(, member) members;
/*! for linking */
Modified: team/oej/test-this-branch/build_tools/menuselect_curses.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/build_tools/menuselect_curses.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/build_tools/menuselect_curses.c (original)
+++ team/oej/test-this-branch/build_tools/menuselect_curses.c Wed Jun 14 06:58:42 2006
@@ -67,7 +67,7 @@
void winch_handler(int sig);
void show_help(WINDOW *win);
void draw_main_menu(WINDOW *menu, int curopt);
-void draw_category_menu(WINDOW *menu, struct category *cat, int start, int end, int curopt);
+void draw_category_menu(WINDOW *menu, struct category *cat, int start, int end, int curopt, int changed);
int run_category_menu(WINDOW *menu, int cat_num);
int run_category_menu(WINDOW *menu, int cat_num);
void draw_title_window(WINDOW *title);
@@ -122,18 +122,72 @@
wrefresh(menu);
}
-void draw_category_menu(WINDOW *menu, struct category *cat, int start, int end, int curopt)
+void display_mem_info(WINDOW *menu, struct member *mem, int start, int end)
+{
+ char buf[64];
+ struct depend *dep;
+ struct conflict *con;
+
+ wmove(menu, end - start + 2, max_x / 2 - 16);
+ wclrtoeol(menu);
+ wmove(menu, end - start + 3, max_x / 2 - 16);
+ wclrtoeol(menu);
+ wmove(menu, end - start + 4, max_x / 2 - 16);
+ wclrtoeol(menu);
+
+ if (mem->displayname) {
+ wmove(menu, end - start + 2, max_x / 2 - 16);
+ waddstr(menu, mem->displayname);
+ }
+ if (!AST_LIST_EMPTY(&mem->deps)) {
+ wmove(menu, end - start + 3, max_x / 2 - 16);
+ strcpy(buf, "Depends on: ");
+ AST_LIST_TRAVERSE(&mem->deps, dep, list) {
+ strncat(buf, dep->name, sizeof(buf) - strlen(buf) - 1);
+ if (AST_LIST_NEXT(dep, list))
+ strncat(buf, ", ", sizeof(buf) - strlen(buf) - 1);
+ }
+ waddstr(menu, buf);
+ }
+ if (!AST_LIST_EMPTY(&mem->conflicts)) {
+ wmove(menu, end - start + 4, max_x / 2 - 16);
+ strcpy(buf, "Conflicts with: ");
+ AST_LIST_TRAVERSE(&mem->conflicts, con, list) {
+ strncat(buf, con->name, sizeof(buf) - strlen(buf) - 1);
+ if (AST_LIST_NEXT(con, list))
+ strncat(buf, ", ", sizeof(buf) - strlen(buf) - 1);
+ }
+ waddstr(menu, buf);
+ }
+
+}
+
+void draw_category_menu(WINDOW *menu, struct category *cat, int start, int end, int curopt, int changed)
{
int i = 0;
int j = 0;
- struct member *mem, *curmem = NULL;
- struct depend *dep;
- struct conflict *con;
+ struct member *mem;
char buf[64];
const char *desc = NULL;
+ if (!changed) {
+ /* If all we have to do is move the cursor,
+ * then don't clear the screen and start over */
+ AST_LIST_TRAVERSE(&cat->members, mem, list) {
+ i++;
+ if (curopt + 1 == i) {
+ display_mem_info(menu, mem, start, end);
+ break;
+ }
+ }
+ wmove(menu, curopt - start, max_x / 2 - 9);
+ wrefresh(menu);
+ return;
+ }
+
wclear(menu);
+ i = 0;
AST_LIST_TRAVERSE(&cat->members, mem, list) {
if (i < start) {
i++;
@@ -148,38 +202,13 @@
waddstr(menu, buf);
if (curopt + 1 == i)
- curmem = mem;
+ display_mem_info(menu, mem, start, end);
if (i == end)
break;
}
- if (curmem->displayname) {
- wmove(menu, end - start + 2, max_x / 2 - 16);
- waddstr(menu, curmem->displayname);
- }
- if (!AST_LIST_EMPTY(&curmem->deps)) {
- wmove(menu, end - start + 3, max_x / 2 - 16);
- strcpy(buf, "Depends on: ");
- AST_LIST_TRAVERSE(&curmem->deps, dep, list) {
- strncat(buf, dep->name, sizeof(buf) - strlen(buf) - 1);
- if (AST_LIST_NEXT(dep, list))
- strncat(buf, ", ", sizeof(buf) - strlen(buf) - 1);
- }
- waddstr(menu, buf);
- }
- if (!AST_LIST_EMPTY(&curmem->conflicts)) {
- wmove(menu, end - start + 4, max_x / 2 - 16);
- strcpy(buf, "Conflicts with: ");
- AST_LIST_TRAVERSE(&curmem->conflicts, con, list) {
- strncat(buf, con->name, sizeof(buf) - strlen(buf) - 1);
- if (AST_LIST_NEXT(con, list))
- strncat(buf, ", ", sizeof(buf) - strlen(buf) - 1);
- }
- waddstr(menu, buf);
- }
wmove(menu, curopt - start, max_x / 2 - 9);
-
wrefresh(menu);
}
@@ -192,6 +221,7 @@
int c;
int curopt = 0;
int maxopt;
+ int changed = 1;
AST_LIST_TRAVERSE(&categories, cat, list) {
if (i++ == cat_num)
@@ -202,9 +232,10 @@
maxopt = count_members(cat) - 1;
- draw_category_menu(menu, cat, start, end, curopt);
+ draw_category_menu(menu, cat, start, end, curopt, changed);
while ((c = getch())) {
+ changed = 0;
switch (c) {
case KEY_UP:
if (curopt > 0) {
@@ -212,6 +243,7 @@
if (curopt < start) {
start--;
end--;
+ changed = 1;
}
}
break;
@@ -221,6 +253,7 @@
if (curopt > end - 1) {
start++;
end++;
+ changed = 1;
}
}
break;
@@ -238,22 +271,26 @@
case '\n':
case ' ':
toggle_enabled(cat, curopt);
+ changed = 1;
break;
case 'h':
case 'H':
show_help(menu);
+ changed = 1;
break;
case KEY_F(7):
set_all(cat, 0);
+ changed = 1;
break;
case KEY_F(8):
set_all(cat, 1);
+ changed = 1;
default:
break;
}
if (c == 'x' || c == 'X' || c == 'Q' || c == 'q')
break;
- draw_category_menu(menu, cat, start, end, curopt);
+ draw_category_menu(menu, cat, start, end, curopt, changed);
}
wrefresh(menu);
Modified: team/oej/test-this-branch/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channel.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/channel.c (original)
+++ team/oej/test-this-branch/channel.c Wed Jun 14 06:58:42 2006
@@ -1124,6 +1124,9 @@
int ast_channel_spy_add(struct ast_channel *chan, struct ast_channel_spy *spy)
{
+ /* Link the owner channel to the spy */
+ spy->chan = chan;
+
if (!ast_test_flag(spy, CHANSPY_FORMAT_AUDIO)) {
ast_log(LOG_WARNING, "Could not add channel spy '%s' to channel '%s', only audio format spies are supported.\n",
spy->type, chan->name);
@@ -1193,7 +1196,14 @@
void ast_channel_spy_trigger_wait(struct ast_channel_spy *spy)
{
- ast_cond_wait(&spy->trigger, &spy->lock);
+ struct timeval tv;
+ struct timespec ts;
+
+ tv = ast_tvadd(ast_tvnow(), ast_samp2tv(50000, 1000));
+ ts.tv_sec = tv.tv_sec;
+ ts.tv_nsec = tv.tv_usec * 1000;
+
+ ast_cond_timedwait(&spy->trigger, &spy->lock, &ts);
}
void ast_channel_spy_remove(struct ast_channel *chan, struct ast_channel_spy *spy)
@@ -1206,6 +1216,8 @@
AST_LIST_REMOVE(&chan->spies->list, spy, list);
ast_mutex_lock(&spy->lock);
+
+ spy->chan = NULL;
for (f = spy->read_queue.head; f; f = spy->read_queue.head) {
spy->read_queue.head = f->next;
@@ -1244,6 +1256,7 @@
/* Marking the spies as done is sufficient. Chanspy or spy users will get the picture. */
AST_LIST_TRAVERSE(&chan->spies->list, spy, list) {
ast_mutex_lock(&spy->lock);
+ spy->chan = NULL;
if (spy->status == CHANSPY_RUNNING)
spy->status = CHANSPY_DONE;
if (ast_test_flag(spy, CHANSPY_TRIGGER_MODE) != CHANSPY_TRIGGER_NONE)
@@ -2373,10 +2386,8 @@
chan->tech->write_video(chan, fr);
break;
case AST_FRAME_MODEM:
- if (chan->tech->write)
- res = chan->tech->write(chan, fr);
- else
- res = 0;
+ res = (chan->tech->write == NULL) ? 0 :
+ chan->tech->write(chan, fr);
break;
case AST_FRAME_VOICE:
if (chan->tech->write == NULL)
Modified: team/oej/test-this-branch/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_agent.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_agent.c (original)
+++ team/oej/test-this-branch/channels/chan_agent.c Wed Jun 14 06:58:42 2006
@@ -1334,12 +1334,13 @@
return chan;
}
-static int powerof(unsigned int v)
-{
- int x;
- for (x=0;x<32;x++) {
- if (v & (1 << x)) return x;
- }
+static force_inline int powerof(unsigned int d)
+{
+ int x = ffs(d);
+
+ if (x)
+ return x - 1;
+
return 0;
}
Modified: team/oej/test-this-branch/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_iax2.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_iax2.c (original)
+++ team/oej/test-this-branch/channels/chan_iax2.c Wed Jun 14 06:58:42 2006
@@ -5531,9 +5531,6 @@
AST_LIST_LOCK(&peers);
AST_LIST_TRAVERSE_SAFE_BEGIN(&peers, p, entry) {
if (!strcasecmp(p->name, name)) {
- /* If we are set to auto clear then remove ourselves */
- if (ast_test_flag(p, IAX_RTAUTOCLEAR))
- AST_LIST_REMOVE_CURRENT(&peers, entry);
p->expire = -1;
break;
}
@@ -5559,8 +5556,8 @@
iax2_regfunk(p->name, 0);
if (ast_test_flag(p, IAX_RTAUTOCLEAR)) {
- /* We are already gone from the list, so we can just destroy ourselves */
- destroy_peer(p);
+ ast_set_flag(p, IAX_DELME);
+ prune_peers();
}
}
Modified: team/oej/test-this-branch/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_local.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_local.c (original)
+++ team/oej/test-this-branch/channels/chan_local.c Wed Jun 14 06:58:42 2006
@@ -225,7 +225,13 @@
return;
if (!p->chan || !p->owner)
return;
- if (isoutbound&& p->chan->_bridge /* Not ast_bridged_channel! Only go one step! */ && !p->owner->readq) {
+
+ /* only do the masquerade if we are being called on the outbound channel,
+ if it has been bridged to another channel and if there are no pending
+ frames on the owner channel (because they would be transferred to the
+ outbound channel during the masquerade)
+ */
+ if (isoutbound && p->chan->_bridge /* Not ast_bridged_channel! Only go one step! */ && !p->owner->readq) {
/* Masquerade bridged channel into owner */
/* Lock everything we need, one by one, and give up if
we can't get everything. Remember, we'll get another
@@ -242,6 +248,11 @@
ast_mutex_unlock(&(p->chan->_bridge)->lock);
}
}
+ /* We only allow masquerading in one 'direction'... it's important to preserve the state
+ (group variables, etc.) that live on p->chan->_bridge (and were put there by the dialplan)
+ when the local channels go away.
+ */
+#if 0
} else if (!isoutbound && p->owner && p->owner->_bridge && p->chan && !p->chan->readq) {
/* Masquerade bridged channel into chan */
if (!ast_mutex_trylock(&(p->owner->_bridge)->lock)) {
@@ -256,6 +267,7 @@
}
ast_mutex_unlock(&(p->owner->_bridge)->lock);
}
+#endif
}
}
Modified: team/oej/test-this-branch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_sip.c?rev=34066&r1=34065&r2=34066&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_sip.c (original)
+++ team/oej/test-this-branch/channels/chan_sip.c Wed Jun 14 06:58:42 2006
@@ -274,6 +274,13 @@
MWI_NOTIFICATION
};
+enum parse_register_result {
+ PARSE_REGISTER_FAILED,
+ PARSE_REGISTER_UPDATE,
+ PARSE_REGISTER_QUERY,
+};
+
+
static const struct cfsubscription_types {
enum subscriptiontype type;
const char * const event;
@@ -289,28 +296,45 @@
{ MWI_NOTIFICATION, "message-summary", "application/simple-message-summary", "mwi" } /* RFC 3842: Mailbox notification */
};
+/*! \brief SIP Request methods known by Asterisk */
enum sipmethod {
- SIP_UNKNOWN,
- SIP_RESPONSE,
+ SIP_UNKNOWN, /* Unknown response */
+ SIP_RESPONSE, /* Not request, response to outbound request */
SIP_REGISTER,
SIP_OPTIONS,
SIP_NOTIFY,
SIP_INVITE,
SIP_ACK,
- SIP_PRACK,
+ SIP_PRACK, /* Not supported at all */
SIP_BYE,
SIP_REFER,
SIP_SUBSCRIBE,
SIP_MESSAGE,
- SIP_UPDATE,
+ SIP_UPDATE, /* We can send UPDATE; but not accept it */
SIP_INFO,
SIP_CANCEL,
- SIP_PUBLISH,
+ SIP_PUBLISH, /* Not supported at all */
};
+/*! \brief Authentication types - proxy or www authentication
+ \note Endpoints, like Asterisk, should always use WWW authentication to
+ allow multiple authentications in the same call - to the proxy and
+ to the end point.
+*/
enum sip_auth_type {
PROXY_AUTH,
WWW_AUTH,
+};
+
+/*! \brief Authentication result from check_auth* functions */
+enum check_auth_result {
+ AUTH_SUCCESSFUL = 0,
+ AUTH_CHALLENGE_SENT = 1,
+ AUTH_SECRET_FAILED = -1,
+ AUTH_USERNAME_MISMATCH = -2,
+ AUTH_NOT_FOUND = -3,
+ AUTH_FAKE_AUTH = -4,
+ AUTH_UNKNOWN_DOMAIN = -5,
};
/* States for outbound registrations (with register= lines in sip.conf */
@@ -753,6 +777,10 @@
#define SIP_PAGE2_ALLOWOVERLAP (1 << 11) /*!< Allow overlap dialing ? */
#define SIP_PAGE2_SUBSCRIBEMWIONLY (1 << 12) /*!< Only issue MWI notification if subscribed to */
#define SIP_PAGE2_INC_RINGING (1 << 13) /*!< Did this connection increment the counter of in-use calls? */
+#define SIP_PAGE2_T38SUPPORT (7 << 14) /*!< T38 Fax Passthrough Support */
+#define SIP_PAGE2_T38SUPPORT_UDPTL (1 << 14) /*!< 14: T38 Fax Passthrough Support */
+#define SIP_PAGE2_T38SUPPORT_RTP (2 << 14) /*!< 15: T38 Fax Passthrough Support */
+#define SIP_PAGE2_T38SUPPORT_TCP (4 << 14) /*!< 16: T38 Fax Passthrough Support */
#define SIP_PAGE2_T38SUPPORT (7 << 14) /*!< T38 Fax Passthrough Support, need three bits */
#define SIP_PAGE2_T38SUPPORT_UDPTL (1 << 14) /*!< 15: T38 Fax Passthrough Support */
@@ -772,9 +800,54 @@
#define SIP_PKT_IGNORE_RESP (1 << 3) /*!< Resp ignore - ??? */
#define SIP_PKT_IGNORE_REQ (1 << 4) /*!< Req ignore - ??? */
+/* T.38 set of flags */
+#define T38FAX_FILL_BIT_REMOVAL (1 << 0) /*!< Default: 0 (unset)*/
+#define T38FAX_TRANSCODING_MMR (1 << 1) /*!< Default: 0 (unset)*/
+#define T38FAX_TRANSCODING_JBIG (1 << 2) /*!< Default: 0 (unset)*/
+/* Rate management */
+#define T38FAX_RATE_MANAGEMENT_TRANSFERED_TCF (0 << 3)
+#define T38FAX_RATE_MANAGEMENT_LOCAL_TCF (1 << 3) /*!< Unset for transferredTCF (UDPTL), set for localTCF (TPKT) */
+/* UDP Error correction */
+#define T38FAX_UDP_EC_NONE (0 << 4) /*!< two bits, if unset NO t38UDPEC field in T38 SDP*/
+#define T38FAX_UDP_EC_FEC (1 << 4) /*!< Set for t38UDPFEC */
+#define T38FAX_UDP_EC_REDUNDANCY (2 << 4) /*!< Set for t38UDPRedundancy */
+/* T38 Spec version */
+#define T38FAX_VERSION (3 << 6) /*!< two bits, 2 values so far, up to 4 values max */
+#define T38FAX_VERSION_0 (0 << 6) /*!< Version 0 */
+#define T38FAX_VERSION_1 (1 << 6) /*!< Version 1 */
+/* Maximum Fax Rate */
+#define T38FAX_RATE_2400 (1 << 8) /*!< 2400 bps t38FaxRate */
+#define T38FAX_RATE_4800 (1 << 9) /*!< 4800 bps t38FaxRate */
+#define T38FAX_RATE_7200 (1 << 10) /*!< 7200 bps t38FaxRate */
+#define T38FAX_RATE_9600 (1 << 11) /*!< 9600 bps t38FaxRate */
[... 2621 lines stripped ...]
More information about the svn-commits
mailing list