[Home]

Summary:ASTERISK-11894: [patch] ChanSpy and ExtenSpy applications don't accept a colon-delimited list of groups
Reporter:Jared Smith (jsmith)Labels:
Date Opened:2008-04-22 15:56:56Date Closed:2009-12-09 12:21:42.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_chanspy
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_chanspy_multiple_groups_v2.patch
( 1) chanspy_documentation.patch
Description:The documentation on the ChanSpy and ExtenSpy applications seems to suggest that they accept colon-delimited list of groups as part of the 'g' option.

Either this is a documentation bug, or this functionality needs to be added.  

To address this, I'll post a documentation patch, and Juggie will post a functionality patch.  Pick one ;-)
Comments:By: Jared Smith (jsmith) 2008-04-22 16:57:48

I haven't been able to test Juggie's patch (due to issue 12498), so I haven't had him attach it yet.

Feel free to put this bug in the FEEDBACK state until such time as we can test Juggie's patch.

By: Jared Smith (jsmith) 2008-04-23 15:27:05

OK, here's the other patch (the one that actually adds the functionality).  I obviously prefer it to the other patch.

By: Donny Kavanagh (donnyk) 2008-04-27 14:25:34

Any one going to test this?

By: Atis Lezdins (atis) 2008-04-28 07:03:49

Going to test this, as it's could fix ASTERISK-1246538
While on this, maybe it's good idea to increase amount of allowed groups in SPYGROUP variable and g() argument? I feel like 25 can be too few for having different combinations.

By: Joel Vandal (jvandal) 2008-04-28 09:45:18

v2 patch (manually applied) work great on 1.4.19, this fix my problem where colon-delimited list not worked.

By: Digium Subversion (svnbot) 2008-04-29 16:02:04

Repository: asterisk
Revision: 114857

U   trunk/apps/app_chanspy.c

------------------------------------------------------------------------
r114857 | mmichelson | 2008-04-29 16:02:00 -0500 (Tue, 29 Apr 2008) | 15 lines

Patching app_chanspy to jibe better with what is documented. This allows for
a colon-delimited list of spygroups to be specified when calling the ChanSpy application
with the 'g' option. Prior to this, you could only specify a single group when using the
'g' option.

I also have upped the maximum number of spygroups to 128 and added a #define so that this
can be easily increased or decreased later.

(closes issue ASTERISK-11894)
Reported by: jsmith
Patches:
     app_chanspy_multiple_groups_v2.patch uploaded by jsmith (license 15)
Tested by: atis, jvandal


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114857

By: Digium Subversion (svnbot) 2008-04-29 16:03:34

Repository: asterisk
Revision: 114858

_U  branches/1.6.0/

------------------------------------------------------------------------
r114858 | mmichelson | 2008-04-29 16:03:33 -0500 (Tue, 29 Apr 2008) | 22 lines

Blocked revisions 114857 via svnmerge

........
r114857 | mmichelson | 2008-04-29 16:07:36 -0500 (Tue, 29 Apr 2008) | 15 lines

Patching app_chanspy to jibe better with what is documented. This allows for
a colon-delimited list of spygroups to be specified when calling the ChanSpy application
with the 'g' option. Prior to this, you could only specify a single group when using the
'g' option.

I also have upped the maximum number of spygroups to 128 and added a #define so that this
can be easily increased or decreased later.

(closes issue ASTERISK-11894)
Reported by: jsmith
Patches:
     app_chanspy_multiple_groups_v2.patch uploaded by jsmith (license 15)
Tested by: atis, jvandal


........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114858

By: Digium Subversion (svnbot) 2008-04-30 07:19:26

Repository: asterisk
Revision: 114878

_U  team/mvanbaak/skinny-realtime/
U   team/mvanbaak/skinny-realtime/CHANGES
U   team/mvanbaak/skinny-realtime/Makefile.rules
U   team/mvanbaak/skinny-realtime/UPGRADE.txt
U   team/mvanbaak/skinny-realtime/apps/app_chanspy.c
U   team/mvanbaak/skinny-realtime/apps/app_directory.c
U   team/mvanbaak/skinny-realtime/apps/app_queue.c
U   team/mvanbaak/skinny-realtime/apps/app_voicemail.c
U   team/mvanbaak/skinny-realtime/channels/iax2-provision.c
U   team/mvanbaak/skinny-realtime/contrib/scripts/get_ilbc_source.sh
U   team/mvanbaak/skinny-realtime/include/asterisk/app.h
U   team/mvanbaak/skinny-realtime/main/app.c
U   team/mvanbaak/skinny-realtime/main/features.c
U   team/mvanbaak/skinny-realtime/phoneprov/polycom.xml
U   team/mvanbaak/skinny-realtime/res/res_config_pgsql.c

------------------------------------------------------------------------
r114878 | mvanbaak | 2008-04-30 07:19:24 -0500 (Wed, 30 Apr 2008) | 151 lines

Merged revisions 114813,114824,114830,114832,114834,114841,114845,114849,114852,114857,114866,114874,114876 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r114813 | mmichelson | 2008-04-29 00:38:07 +0200 (Tue, 29 Apr 2008) | 10 lines

Adding a new option 'n' to app_chanspy. This option allows for the name of the spied-on
party to be spoken instead of the channel name or number.

This was accomplished by adding a new function pointer to point to a function in app_voicemail
which retrieves the name file and plays it. This makes for an easy way that applications may play
a user's name should it be necessary. app_directory, in particular, can be simplified greatly by
this change.

This change comes as a suggestion from Switchvox, which already has this feature. AST-23

................
r114824 | kpfleming | 2008-04-29 14:54:31 +0200 (Tue, 29 Apr 2008) | 18 lines

Merged revisions 114823 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r114823 | kpfleming | 2008-04-29 07:53:12 -0500 (Tue, 29 Apr 2008) | 10 lines

Merged revisions 114822 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r114822 | kpfleming | 2008-04-29 07:52:32 -0500 (Tue, 29 Apr 2008) | 2 lines

stop script from appending source code if run multiple times

........

................

................
r114830 | qwell | 2008-04-29 19:10:55 +0200 (Tue, 29 Apr 2008) | 9 lines

Merged revisions 114829 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114829 | qwell | 2008-04-29 12:08:55 -0500 (Tue, 29 Apr 2008) | 1 line

Change warning message to debug, since there are cases where 0 results is perfectly fine.
........

................
r114832 | mmichelson | 2008-04-29 19:31:26 +0200 (Tue, 29 Apr 2008) | 3 lines

Fix a crash happening in app_directory. This crash would occur if a users.conf existed.


................
r114834 | mmichelson | 2008-04-29 19:56:13 +0200 (Tue, 29 Apr 2008) | 8 lines

Since there is now a globally available function for saying someone's name, a LOT of
functions in app_directory can be removed since the ODBC-specific lookups are accomplished
within app_voicemail. This change greatly reduces the amount of lines in app_directory that
were solely for the purpose of looking up a name when ODBC_STORAGE is specified for voicemail.

This commit also makes the name-saying interruptable via DTMF.


................
r114841 | mmichelson | 2008-04-29 20:48:26 +0200 (Tue, 29 Apr 2008) | 4 lines

Make app_directory dependent on app_voicemail. This is because the function
which says the person's name is handled inside app_voicemail now.


................
r114845 | kpfleming | 2008-04-29 20:58:48 +0200 (Tue, 29 Apr 2008) | 3 lines

fix this logic to actually be correct... the fd can't be *both* -1 and an array index to be checked in rfds/efds (bug found by gcc-4.3)


................
r114849 | mmichelson | 2008-04-29 21:42:04 +0200 (Tue, 29 Apr 2008) | 22 lines

Merged revisions 114848 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114848 | mmichelson | 2008-04-29 14:40:06 -0500 (Tue, 29 Apr 2008) | 14 lines

Use the MACRO_CONTEXT and MACRO_EXTEN channel variables instead of the channel's macrocontext
and macroexten fields. This is needed because if macros are daisy-chained, the incorrect
context and extension are placed on the new channel. I also added locking to the channel prior
to accessing these variables as noted in trunk's janitor project file.


(closes issue ASTERISK-11940)
Reported by: darren1713
Patches:
     app_queue.c.macroextenpatch uploaded by darren1713 (license 116)
      (with modifications from me)
Tested by: putnopvut


........

................
r114852 | qwell | 2008-04-29 22:05:48 +0200 (Tue, 29 Apr 2008) | 1 line

Fix formatting
................
r114857 | mmichelson | 2008-04-29 23:07:36 +0200 (Tue, 29 Apr 2008) | 15 lines

Patching app_chanspy to jibe better with what is documented. This allows for
a colon-delimited list of spygroups to be specified when calling the ChanSpy application
with the 'g' option. Prior to this, you could only specify a single group when using the
'g' option.

I also have upped the maximum number of spygroups to 128 and added a #define so that this
can be easily increased or decreased later.

(closes issue ASTERISK-11894)
Reported by: jsmith
Patches:
     app_chanspy_multiple_groups_v2.patch uploaded by jsmith (license 15)
Tested by: atis, jvandal


................
r114866 | jpeeler | 2008-04-30 00:54:14 +0200 (Wed, 30 Apr 2008) | 2 lines

Fixes a problem where all the templates were marked as dead no matter what. The templates should only be marked as dead if a configuration file has been successfully loaded and has changes. Bug found while making API documentation for 1.6.0.

................
r114874 | tilghman | 2008-04-30 07:05:25 +0200 (Wed, 30 Apr 2008) | 2 lines

Document the Incomplete application addition.

................
r114876 | kpfleming | 2008-04-30 14:15:43 +0200 (Wed, 30 Apr 2008) | 10 lines

Merged revisions 114875 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114875 | kpfleming | 2008-04-30 07:14:07 -0500 (Wed, 30 Apr 2008) | 2 lines

pay attention to *all* header files for dependency tracking, not just the local ones (inspired by r578 of asterisk-addons by tilghman)

........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114878

By: Digium Subversion (svnbot) 2008-05-01 12:06:48

Repository: asterisk
Revision: 114930

_U  team/group/taskprocessors/
U   team/group/taskprocessors/CHANGES
U   team/group/taskprocessors/Makefile.rules
U   team/group/taskprocessors/UPGRADE.txt
U   team/group/taskprocessors/apps/app_chanspy.c
U   team/group/taskprocessors/apps/app_directory.c
U   team/group/taskprocessors/apps/app_externalivr.c
U   team/group/taskprocessors/apps/app_macro.c
U   team/group/taskprocessors/apps/app_meetme.c
U   team/group/taskprocessors/apps/app_minivm.c
U   team/group/taskprocessors/apps/app_morsecode.c
U   team/group/taskprocessors/apps/app_queue.c
U   team/group/taskprocessors/apps/app_speech_utils.c
U   team/group/taskprocessors/apps/app_stack.c
U   team/group/taskprocessors/apps/app_voicemail.c
U   team/group/taskprocessors/apps/app_while.c
U   team/group/taskprocessors/channels/chan_iax2.c
U   team/group/taskprocessors/channels/chan_sip.c
U   team/group/taskprocessors/channels/chan_zap.c
U   team/group/taskprocessors/channels/iax2-provision.c
U   team/group/taskprocessors/channels/iax2.h
U   team/group/taskprocessors/configs/queues.conf.sample
U   team/group/taskprocessors/configs/sip.conf.sample
U   team/group/taskprocessors/contrib/scripts/get_ilbc_source.sh
A   team/group/taskprocessors/funcs/func_speex.c
U   team/group/taskprocessors/include/asterisk/audiohook.h
U   team/group/taskprocessors/main/audiohook.c
U   team/group/taskprocessors/main/features.c
U   team/group/taskprocessors/phoneprov/polycom.xml
U   team/group/taskprocessors/res/res_config_pgsql.c

------------------------------------------------------------------------
r114930 | dhubbard | 2008-05-01 12:06:46 -0500 (Thu, 01 May 2008) | 266 lines

Merged revisions 114824,114830,114832,114834,114841,114845,114849,114852,114857,114866,114874,114876,114884,114888,114892,114899,114904,114906,114912,114922,114926 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r114824 | kpfleming | 2008-04-29 07:54:31 -0500 (Tue, 29 Apr 2008) | 18 lines

Merged revisions 114823 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r114823 | kpfleming | 2008-04-29 07:53:12 -0500 (Tue, 29 Apr 2008) | 10 lines

Merged revisions 114822 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r114822 | kpfleming | 2008-04-29 07:52:32 -0500 (Tue, 29 Apr 2008) | 2 lines

stop script from appending source code if run multiple times

........

................

................
r114830 | qwell | 2008-04-29 12:10:55 -0500 (Tue, 29 Apr 2008) | 9 lines

Merged revisions 114829 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114829 | qwell | 2008-04-29 12:08:55 -0500 (Tue, 29 Apr 2008) | 1 line

Change warning message to debug, since there are cases where 0 results is perfectly fine.
........

................
r114832 | mmichelson | 2008-04-29 12:31:26 -0500 (Tue, 29 Apr 2008) | 3 lines

Fix a crash happening in app_directory. This crash would occur if a users.conf existed.


................
r114834 | mmichelson | 2008-04-29 12:56:13 -0500 (Tue, 29 Apr 2008) | 8 lines

Since there is now a globally available function for saying someone's name, a LOT of
functions in app_directory can be removed since the ODBC-specific lookups are accomplished
within app_voicemail. This change greatly reduces the amount of lines in app_directory that
were solely for the purpose of looking up a name when ODBC_STORAGE is specified for voicemail.

This commit also makes the name-saying interruptable via DTMF.


................
r114841 | mmichelson | 2008-04-29 13:48:26 -0500 (Tue, 29 Apr 2008) | 4 lines

Make app_directory dependent on app_voicemail. This is because the function
which says the person's name is handled inside app_voicemail now.


................
r114845 | kpfleming | 2008-04-29 13:58:48 -0500 (Tue, 29 Apr 2008) | 3 lines

fix this logic to actually be correct... the fd can't be *both* -1 and an array index to be checked in rfds/efds (bug found by gcc-4.3)


................
r114849 | mmichelson | 2008-04-29 14:42:04 -0500 (Tue, 29 Apr 2008) | 22 lines

Merged revisions 114848 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114848 | mmichelson | 2008-04-29 14:40:06 -0500 (Tue, 29 Apr 2008) | 14 lines

Use the MACRO_CONTEXT and MACRO_EXTEN channel variables instead of the channel's macrocontext
and macroexten fields. This is needed because if macros are daisy-chained, the incorrect
context and extension are placed on the new channel. I also added locking to the channel prior
to accessing these variables as noted in trunk's janitor project file.


(closes issue ASTERISK-11940)
Reported by: darren1713
Patches:
     app_queue.c.macroextenpatch uploaded by darren1713 (license 116)
      (with modifications from me)
Tested by: putnopvut


........

................
r114852 | qwell | 2008-04-29 15:05:48 -0500 (Tue, 29 Apr 2008) | 1 line

Fix formatting
................
r114857 | mmichelson | 2008-04-29 16:07:36 -0500 (Tue, 29 Apr 2008) | 15 lines

Patching app_chanspy to jibe better with what is documented. This allows for
a colon-delimited list of spygroups to be specified when calling the ChanSpy application
with the 'g' option. Prior to this, you could only specify a single group when using the
'g' option.

I also have upped the maximum number of spygroups to 128 and added a #define so that this
can be easily increased or decreased later.

(closes issue ASTERISK-11894)
Reported by: jsmith
Patches:
     app_chanspy_multiple_groups_v2.patch uploaded by jsmith (license 15)
Tested by: atis, jvandal


................
r114866 | jpeeler | 2008-04-29 17:54:14 -0500 (Tue, 29 Apr 2008) | 2 lines

Fixes a problem where all the templates were marked as dead no matter what. The templates should only be marked as dead if a configuration file has been successfully loaded and has changes. Bug found while making API documentation for 1.6.0.

................
r114874 | tilghman | 2008-04-30 00:05:25 -0500 (Wed, 30 Apr 2008) | 2 lines

Document the Incomplete application addition.

................
r114876 | kpfleming | 2008-04-30 07:15:43 -0500 (Wed, 30 Apr 2008) | 10 lines

Merged revisions 114875 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114875 | kpfleming | 2008-04-30 07:14:07 -0500 (Wed, 30 Apr 2008) | 2 lines

pay attention to *all* header files for dependency tracking, not just the local ones (inspired by r578 of asterisk-addons by tilghman)

........

................
r114884 | kpfleming | 2008-04-30 09:49:51 -0500 (Wed, 30 Apr 2008) | 10 lines

Merged revisions 114880 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114880 | kpfleming | 2008-04-30 09:46:57 -0500 (Wed, 30 Apr 2008) | 2 lines

use the ARRAY_LEN macro for indexing through the iaxs/iaxsl arrays so that the size of the arrays can be adjusted in one place, and change the size of the arrays from 32768 calls to 2048 calls when LOW_MEMORY is defined

........

................
r114888 | jpeeler | 2008-04-30 11:14:43 -0500 (Wed, 30 Apr 2008) | 3 lines

Fixes a bug where if a stream monitor thread was not created (caused from failure of opening or starting the stream) pthread_cancel was called with an invalid thread ID.


................
r114892 | russell | 2008-04-30 11:34:24 -0500 (Wed, 30 Apr 2008) | 36 lines

Merged revisions 114891 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114891 | russell | 2008-04-30 11:30:01 -0500 (Wed, 30 Apr 2008) | 28 lines

Merge changes from team/russell/iax2_find_callno and iax2_find_callno_1.4

These changes address a critical performance issue introduced in the latest
release.  The fix for the latest security issue included a change that made
Asterisk randomly choose call numbers to make them more difficult to guess by
attackers.  However, due to some inefficient (this is by far, an understatement)
code, when Asterisk chose high call numbers, chan_iax2 became unusable after
just a small number of calls.  On a small embedded platform, it would not be
able to handle a single call.  On my Intel Core 2 Duo @ 2.33 GHz, I couldn't
run more than about 16 IAX2 channels.  Ouch.

These changes address some performance issues of the find_callno() function
that have bothered me for a very long time.  On every incoming media frame,
it iterated through every possible call number trying to find a matching
active call.  This involved a mutex lock and unlock for each call number
checked.  So, if the random call number chosen was 20000, then every media
frame would cause 20000 locks and unlocks.  Previously, this problem was
not as obvious since Asterisk always chose the lowest call number it could.

A second container for IAX2 pvt structs has been added.  It is an astobj2
hash table.  When we know the remote side's call number, the pvt goes into
the hash table with a hash value of the remote side's call number.  Then,
lookups for incoming media frames are a very fast hash lookup instead of an
absolutely insane array traversal.

In a quick test, I was able to get more than 3600

By: Digium Subversion (svnbot) 2008-05-01 14:30:21

Repository: asterisk
Revision: 115069

_U  team/seanbright/resolve-shadow-warnings/
U   team/seanbright/resolve-shadow-warnings/CHANGES
U   team/seanbright/resolve-shadow-warnings/Makefile.rules
U   team/seanbright/resolve-shadow-warnings/UPGRADE.txt
U   team/seanbright/resolve-shadow-warnings/apps/app_chanspy.c
U   team/seanbright/resolve-shadow-warnings/apps/app_directory.c
U   team/seanbright/resolve-shadow-warnings/apps/app_externalivr.c
U   team/seanbright/resolve-shadow-warnings/apps/app_macro.c
U   team/seanbright/resolve-shadow-warnings/apps/app_meetme.c
U   team/seanbright/resolve-shadow-warnings/apps/app_minivm.c
U   team/seanbright/resolve-shadow-warnings/apps/app_morsecode.c
U   team/seanbright/resolve-shadow-warnings/apps/app_queue.c
U   team/seanbright/resolve-shadow-warnings/apps/app_speech_utils.c
U   team/seanbright/resolve-shadow-warnings/apps/app_stack.c
U   team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
U   team/seanbright/resolve-shadow-warnings/apps/app_while.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_sip.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_skinny.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_zap.c
U   team/seanbright/resolve-shadow-warnings/channels/iax2-provision.c
U   team/seanbright/resolve-shadow-warnings/channels/iax2.h
U   team/seanbright/resolve-shadow-warnings/configs/queues.conf.sample
U   team/seanbright/resolve-shadow-warnings/configs/sip.conf.sample
A   team/seanbright/resolve-shadow-warnings/funcs/func_speex.c
U   team/seanbright/resolve-shadow-warnings/include/asterisk/audiohook.h
U   team/seanbright/resolve-shadow-warnings/main/audiohook.c
U   team/seanbright/resolve-shadow-warnings/main/features.c
U   team/seanbright/resolve-shadow-warnings/main/utils.c
U   team/seanbright/resolve-shadow-warnings/phoneprov/polycom.xml
U   team/seanbright/resolve-shadow-warnings/res/res_config_pgsql.c

------------------------------------------------------------------------
r115069 | seanbright | 2008-05-01 14:30:19 -0500 (Thu, 01 May 2008) | 278 lines

Merged revisions 114830,114832,114834,114841,114845,114849,114852,114857,114866,114874,114876,114884,114888,114892,114899,114904,114906,114912,114922,114926,114931,114977,115018 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r114830 | qwell | 2008-04-29 13:10:55 -0400 (Tue, 29 Apr 2008) | 9 lines

Merged revisions 114829 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114829 | qwell | 2008-04-29 12:08:55 -0500 (Tue, 29 Apr 2008) | 1 line

Change warning message to debug, since there are cases where 0 results is perfectly fine.
........

................
r114832 | mmichelson | 2008-04-29 13:31:26 -0400 (Tue, 29 Apr 2008) | 3 lines

Fix a crash happening in app_directory. This crash would occur if a users.conf existed.


................
r114834 | mmichelson | 2008-04-29 13:56:13 -0400 (Tue, 29 Apr 2008) | 8 lines

Since there is now a globally available function for saying someone's name, a LOT of
functions in app_directory can be removed since the ODBC-specific lookups are accomplished
within app_voicemail. This change greatly reduces the amount of lines in app_directory that
were solely for the purpose of looking up a name when ODBC_STORAGE is specified for voicemail.

This commit also makes the name-saying interruptable via DTMF.


................
r114841 | mmichelson | 2008-04-29 14:48:26 -0400 (Tue, 29 Apr 2008) | 4 lines

Make app_directory dependent on app_voicemail. This is because the function
which says the person's name is handled inside app_voicemail now.


................
r114845 | kpfleming | 2008-04-29 14:58:48 -0400 (Tue, 29 Apr 2008) | 3 lines

fix this logic to actually be correct... the fd can't be *both* -1 and an array index to be checked in rfds/efds (bug found by gcc-4.3)


................
r114849 | mmichelson | 2008-04-29 15:42:04 -0400 (Tue, 29 Apr 2008) | 22 lines

Merged revisions 114848 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114848 | mmichelson | 2008-04-29 14:40:06 -0500 (Tue, 29 Apr 2008) | 14 lines

Use the MACRO_CONTEXT and MACRO_EXTEN channel variables instead of the channel's macrocontext
and macroexten fields. This is needed because if macros are daisy-chained, the incorrect
context and extension are placed on the new channel. I also added locking to the channel prior
to accessing these variables as noted in trunk's janitor project file.


(closes issue ASTERISK-11940)
Reported by: darren1713
Patches:
     app_queue.c.macroextenpatch uploaded by darren1713 (license 116)
      (with modifications from me)
Tested by: putnopvut


........

................
r114852 | qwell | 2008-04-29 16:05:48 -0400 (Tue, 29 Apr 2008) | 1 line

Fix formatting
................
r114857 | mmichelson | 2008-04-29 17:07:36 -0400 (Tue, 29 Apr 2008) | 15 lines

Patching app_chanspy to jibe better with what is documented. This allows for
a colon-delimited list of spygroups to be specified when calling the ChanSpy application
with the 'g' option. Prior to this, you could only specify a single group when using the
'g' option.

I also have upped the maximum number of spygroups to 128 and added a #define so that this
can be easily increased or decreased later.

(closes issue ASTERISK-11894)
Reported by: jsmith
Patches:
     app_chanspy_multiple_groups_v2.patch uploaded by jsmith (license 15)
Tested by: atis, jvandal


................
r114866 | jpeeler | 2008-04-29 18:54:14 -0400 (Tue, 29 Apr 2008) | 2 lines

Fixes a problem where all the templates were marked as dead no matter what. The templates should only be marked as dead if a configuration file has been successfully loaded and has changes. Bug found while making API documentation for 1.6.0.

................
r114874 | tilghman | 2008-04-30 01:05:25 -0400 (Wed, 30 Apr 2008) | 2 lines

Document the Incomplete application addition.

................
r114876 | kpfleming | 2008-04-30 08:15:43 -0400 (Wed, 30 Apr 2008) | 10 lines

Merged revisions 114875 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114875 | kpfleming | 2008-04-30 07:14:07 -0500 (Wed, 30 Apr 2008) | 2 lines

pay attention to *all* header files for dependency tracking, not just the local ones (inspired by r578 of asterisk-addons by tilghman)

........

................
r114884 | kpfleming | 2008-04-30 10:49:51 -0400 (Wed, 30 Apr 2008) | 10 lines

Merged revisions 114880 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114880 | kpfleming | 2008-04-30 09:46:57 -0500 (Wed, 30 Apr 2008) | 2 lines

use the ARRAY_LEN macro for indexing through the iaxs/iaxsl arrays so that the size of the arrays can be adjusted in one place, and change the size of the arrays from 32768 calls to 2048 calls when LOW_MEMORY is defined

........

................
r114888 | jpeeler | 2008-04-30 12:14:43 -0400 (Wed, 30 Apr 2008) | 3 lines

Fixes a bug where if a stream monitor thread was not created (caused from failure of opening or starting the stream) pthread_cancel was called with an invalid thread ID.


................
r114892 | russell | 2008-04-30 12:34:24 -0400 (Wed, 30 Apr 2008) | 36 lines

Merged revisions 114891 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114891 | russell | 2008-04-30 11:30:01 -0500 (Wed, 30 Apr 2008) | 28 lines

Merge changes from team/russell/iax2_find_callno and iax2_find_callno_1.4

These changes address a critical performance issue introduced in the latest
release.  The fix for the latest security issue included a change that made
Asterisk randomly choose call numbers to make them more difficult to guess by
attackers.  However, due to some inefficient (this is by far, an understatement)
code, when Asterisk chose high call numbers, chan_iax2 became unusable after
just a small number of calls.  On a small embedded platform, it would not be
able to handle a single call.  On my Intel Core 2 Duo @ 2.33 GHz, I couldn't
run more than about 16 IAX2 channels.  Ouch.

These changes address some performance issues of the find_callno() function
that have bothered me for a very long time.  On every incoming media frame,
it iterated through every possible call number trying to find a matching
active call.  This involved a mutex lock and unlock for each call number
checked.  So, if the random call number chosen was 20000, then every media
frame would cause 20000 locks and unlocks.  Previously, this problem was
not as obvious since Asterisk always chose the lowest call number it could.

A second container for IAX2 pvt structs has been added.  It is an astobj2
hash table.  When we know the remote side's call number, the pvt goes into
the hash table with a hash value of the remote side's call number.  Then,
lookups for incoming media frames are a very fast hash lookup instead of an
absolutely insane array traversal.

In a quick test, I was able to get more than 3600