[Home]

Summary:ASTERISK-11940: App Queue extension/context copying
Reporter:jeffery palmer (darren1713)Labels:
Date Opened:2008-04-29 10:15:11Date Closed:2008-05-01 14:30:20
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_queue.c.macroextenpatch
Description:The queue app copies the incoming context/exten from either its parent macro, or current context, but it behaves strangely.

The macro app copies the context/extension to two places, one is on the chan struct (macrocontext/macroexten) and also copies it to the channel vars (MACRO_EXTEN, MACRO_CONTEXT). Why this is, I don't know, but it should be cleaned up in the future because they behave differently. The chan struct only receives the FIRST macro to run, and no successive ones. This means daisy chained macro's don't pass valid information off to app_queue.

This patch is to read the correct, and modifiable, channel variables (MACRO_EXTEN, MACRO_CONTEXT) instead of the variables on the chan struct.
Comments:By: Mark Michelson (mmichelson) 2008-04-29 14:12:12

Good work. I'll get this merged in ASAP. Since this is a small patch and I can clearly see the modification (thanks in part to your good descriptive summary) I will go ahead and get this patch merged in, but for future patches, please upload the diff in unified format.

Thanks!

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

Repository: asterisk
Revision: 114848

U   branches/1.4/apps/app_queue.c

------------------------------------------------------------------------
r114848 | mmichelson | 2008-04-29 14:34:31 -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


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

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

By: Digium Subversion (svnbot) 2008-04-29 14:36:42

Repository: asterisk
Revision: 114849

_U  trunk/
U   trunk/apps/app_queue.c

------------------------------------------------------------------------
r114849 | mmichelson | 2008-04-29 14:36:40 -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


........

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

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

By: Digium Subversion (svnbot) 2008-04-29 14:37:24

Repository: asterisk
Revision: 114850

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_queue.c

------------------------------------------------------------------------
r114850 | mmichelson | 2008-04-29 14:37:21 -0500 (Tue, 29 Apr 2008) | 30 lines

Merged revisions 114849 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
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


........

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

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

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

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:20

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