aboutsummaryrefslogtreecommitdiffstats
path: root/apps
AgeCommit message (Collapse)AuthorFilesLines
2009-04-07Merged revisions 186799 via svnmerge from tilghman1-13/+9
https://origsvn.digium.com/svn/asterisk/trunk ................ r186799 | tilghman | 2009-04-07 17:23:46 -0500 (Tue, 07 Apr 2009) | 10 lines Merged revisions 186775 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r186775 | tilghman | 2009-04-07 17:16:50 -0500 (Tue, 07 Apr 2009) | 3 lines Fix Macro documentation to match current (and intended) behavior. (See -dev mailing list) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@186805 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03Merged revisions 186444 via svnmerge from tilghman1-21/+98
https://origsvn.digium.com/svn/asterisk/trunk ................ r186444 | tilghman | 2009-04-03 14:30:34 -0500 (Fri, 03 Apr 2009) | 14 lines Merged revisions 186415 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r186415 | tilghman | 2009-04-03 14:06:58 -0500 (Fri, 03 Apr 2009) | 7 lines Distinguish in a sent email between simple sends and forwards. (closes issue #11678) Reported by: jamessan Patches: 20090330__bug11678.diff.txt uploaded by tilghman (license 14) Tested by: tilghman, lmadsen ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@186446 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03Merged revisions 186286 via svnmerge from mmichelson1-16/+8
https://origsvn.digium.com/svn/asterisk/trunk ........ r186286 | mmichelson | 2009-04-03 09:32:05 -0500 (Fri, 03 Apr 2009) | 20 lines Fix the ability to retrieve voicemail messages from IMAP. A recent change made interactive vm_states no longer get added to the list of vm_states and instead get stored in thread-local storage. In trunk and all the 1.6.X branches, the problem is that when we search for messages in a voicemail box, we would attempt to update the appropriate vm_state struct by directly searching in the list of vm_states instead of using the get_vm_state_by_imap_user function. This meant we could not find the interactive vm_state that we wanted. (closes issue #14685) Reported by: BlargMaN Patches: 14685.patch uploaded by mmichelson (license 60) Tested by: BlargMaN, qualleyiv, mmichelson ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@186287 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31Merged revisions 185600 via svnmerge from mmichelson1-0/+5
https://origsvn.digium.com/svn/asterisk/trunk ................ r185600 | mmichelson | 2009-03-31 17:02:48 -0500 (Tue, 31 Mar 2009) | 12 lines Merged revisions 185599 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185599 | mmichelson | 2009-03-31 17:00:01 -0500 (Tue, 31 Mar 2009) | 6 lines Fix crash that would occur if an empty member was specified in queues.conf. (closes issue #14796) Reported by: pida ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@185601 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31Merged revisions 185469 via svnmerge from mmichelson1-6/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r185469 | mmichelson | 2009-03-31 14:46:18 -0500 (Tue, 31 Mar 2009) | 14 lines Merged revisions 185468 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185468 | mmichelson | 2009-03-31 14:45:30 -0500 (Tue, 31 Mar 2009) | 8 lines Fix Russian voicemail intro to say the word "messages" properly. (closes issue #14736) Reported by: chappell Patches: voicemail_no_messages.diff uploaded by chappell (license 8) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@185470 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31Merged revisions 185261 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r185261 | russell | 2009-03-31 09:53:45 -0500 (Tue, 31 Mar 2009) | 5 lines Don't free() an astobj2 object. (closes issue #14672) Reported by: makoto ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@185262 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-30Merged revisions 185072 via svnmerge from mmichelson1-70/+81
https://origsvn.digium.com/svn/asterisk/trunk ................ r185072 | mmichelson | 2009-03-30 11:26:48 -0500 (Mon, 30 Mar 2009) | 45 lines Merged revisions 185031 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185031 | mmichelson | 2009-03-30 11:17:35 -0500 (Mon, 30 Mar 2009) | 39 lines Fix queue weight behavior so that calls in low-weight queues are not inappropriately blocked. (This is copied and pasted from the review request I made for this patch) Asterisk has some odd behavior when queue weights are used. The current logic used when potentially calling a queue member is: If the member we are going to call is part of another queue and _that other queue has any callers in it_ and has a higher weight than the queue we are calling from, then don't try to contact that member. The issue here is what I have marked with underscores. If the higher-weighted queue has any callers in it at all, then the queue member will be unreachable from the lower-weighted queue. This has the potential to be really really bad if using a queue strategy, such as leastrecent or fewestcalls, with the potential to call the same member repeatedly. The fix proposed by garychen on issue 13220 is very simple and, as far as I can see, works well for this situation. With this set of changes, the logic used becomes: If the member we are going to call is part of another queue, the other queue has a higher weight than the queue we are calling from, and the higher weight queue has at least as many callers as available members, then do not try to contact the queue member. If the higher weighted queue has fewer callers than available members, then there is no reason to deny the call to this member since the other queue can afford to spare a member. Since the fix involved writing a generic function for determining the number of available members in the queue, I also modified the is_our_turn function to make use of the new num_available_members function to determine if it is our turn to try calling a member. There is one small behavior change. Before writing this patch, if you had autofill disabled, then if you were the head caller in a queue, you would automatically be told that it was your turn to try calling a member. This did not take into account whether there were actually any queue members available to take the call. Now we actually make sure there is at least one member available to take the call if autofill is disabled. (closes issue #13220) Reported by: garychen Review: http://reviewboard.digium.com/r/202/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@185087 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-29Merged revisions 184843 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r184843 | russell | 2009-03-29 00:52:20 -0500 (Sun, 29 Mar 2009) | 13 lines Merged revisions 184842 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r184842 | russell | 2009-03-29 00:51:55 -0500 (Sun, 29 Mar 2009) | 5 lines Ensure targs variable is fully initialized. (closes issue #14758) Reported by: tim_ringenbach ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@184844 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184726 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r184726 | russell | 2009-03-27 13:04:43 -0500 (Fri, 27 Mar 2009) | 2 lines Use ast_random() instead of rand() to ensure we use the best RNG available. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@184727 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-26Merged revisions 184389 via svnmerge from dvossel1-27/+28
https://origsvn.digium.com/svn/asterisk/trunk ................ r184389 | dvossel | 2009-03-26 16:09:37 -0500 (Thu, 26 Mar 2009) | 14 lines Merged revisions 184388 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r184388 | dvossel | 2009-03-26 16:07:32 -0500 (Thu, 26 Mar 2009) | 8 lines pri loop TestClient/TestServer fails: server SEND DTMF 8 app_test was failing when sending the last DTMF digit, 8, because of the 100ms pause issued after DTMF is sent. During this pause the other side would hang up causing the test to look like it failed. Now the other side waits a second before hanging up. (closes issue #12442) Reported by: tzafrir ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@184391 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-24Merged revisions 184079 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r184079 | mmichelson | 2009-03-24 17:40:39 -0500 (Tue, 24 Mar 2009) | 15 lines Merged revisions 184078 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r184078 | mmichelson | 2009-03-24 17:34:45 -0500 (Tue, 24 Mar 2009) | 9 lines Change NULL pointer check to be ast_strlen_zero. The 'digit' variable is guaranteed to be non-NULL, so the if statement could never evaluate true. Changing to ast_strlen_zero makes the logic correct. This was found while reviewing ast_channel_ao2 code review. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@184080 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Merged revisions 183436 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r183436 | dvossel | 2009-03-19 15:30:39 -0500 (Thu, 19 Mar 2009) | 13 lines Merged revisions 183386 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183386 | dvossel | 2009-03-19 14:40:07 -0500 (Thu, 19 Mar 2009) | 6 lines Cleaning up a few things in detect disconnect patch Initialized ast_call_feature in detect_disconnect to avoid accessing uninitialized memory. Cleaned up /param tags in features.h. No longer send dynamic features in ast_feature_detect. issue #11583 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@183437 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Merged revisions 183244 via svnmerge from mmichelson1-13/+14
https://origsvn.digium.com/svn/asterisk/trunk ........ r183244 | mmichelson | 2009-03-19 13:10:34 -0500 (Thu, 19 Mar 2009) | 16 lines Fix a memory leak associated with queues. For every attempt that app_queue made to place an outbound call to a queue member, we would allocate a queue_end_bridge structure. When the bridge for the call had completed, we would free the structure. Unfortunately not all call attempts actually end up bridged to a member, so we need to be more selective of when to allocate the structure. With this change, the allocation occurs in an area where we can guarantee that the call will be bridged. (closes issue #14680) Reported by: caspy Patches: 14680.patch uploaded by mmichelson (license 60) Tested by: caspy ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@183245 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Merged revisions 183172 via svnmerge from dvossel1-4/+25
https://origsvn.digium.com/svn/asterisk/trunk ................ r183172 | dvossel | 2009-03-19 11:28:33 -0500 (Thu, 19 Mar 2009) | 20 lines Merged revisions 183126 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183126 | dvossel | 2009-03-19 11:15:16 -0500 (Thu, 19 Mar 2009) | 17 lines Allow disconnect feature before a call is bridged feature.conf has a disconnect option. By default this option is set to '*', but it could be anything. If a user wishes to disconnect a call before the other side answers, only '*' will work, regardless if the disconnect option is set to something else. This is because features are unavailable until bridging takes place. The default disconnect option, '*', was hardcoded in app_dial, which doesn't make any sense from a user perspective since they may expect it to be something different. This patch allows features to be detected from outside of the bridge, but not operated on. In this case, the disconnect feature can be detected before briding and handled outside of features.c. (closes issue #11583) Reported by: sobomax Patches: patch-apps__app_dial.c uploaded by sobomax (license 359) 11583.latest-patch uploaded by murf (license 17) detect_disconnect.diff uploaded by dvossel (license 671) Tested by: sobomax, dvossel Review: http://reviewboard.digium.com/r/195/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@183199 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18Merged revisions 182847 via svnmerge from russell2-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r182847 | russell | 2009-03-17 21:28:55 -0500 (Tue, 17 Mar 2009) | 52 lines Merged revisions 182810 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines Fix cases where the internal poll() was not being used when it needed to be. We have seen a number of problems caused by poll() not working properly on Mac OSX. If you search around, you'll find a number of references to using select() instead of poll() to work around these issues. In Asterisk, we've had poll.c which implements poll() using select() internally. However, we were still getting reports of problems. vadim investigated a bit and realized that at least on his system, even though we were compiling in poll.o, the system poll() was still being used. So, the primary purpose of this patch is to ensure that we're using the internal poll() when we want it to be used. The changes are: 1) Remove logic for when internal poll should be used from the Makefile. Instead, put it in the configure script. The logic in the configure script is the same as it was in the Makefile. Ideally, we would have a functionality test for the problem, but that's not actually possible, since we would have to be able to run an application on the _target_ system to test poll() behavior. 2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT is not defined. 3) Change uses of poll() throughout the source tree to ast_poll(). I feel that it is good practice to give the API call a new name when we are changing its behavior and not using the system version directly in all cases. So, normally, ast_poll() is just redefined to poll(). On systems where AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll(). 4) Change poll() in main/poll.c to be ast_internal_poll(). It's worth noting that any code that still uses poll() directly will work fine (if they worked fine before). So, for example, out of tree modules that are using poll() will not stop working or anything. However, for modules to work properly on Mac OSX, ast_poll() needs to be used. (closes issue #13404) Reported by: agalbraith Tested by: russell, vadim http://reviewboard.digium.com/r/198/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@182945 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-13Merged revisions 182121 via svnmerge from mmichelson1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r182121 | mmichelson | 2009-03-13 16:26:20 -0500 (Fri, 13 Mar 2009) | 6 lines Change faulty comparison used when announcing average hold minutes and seconds (closes issue #14227) Reported by: caspy ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@182122 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-12Merged revisions 181846 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r181846 | mmichelson | 2009-03-12 16:43:51 -0500 (Thu, 12 Mar 2009) | 3 lines Run the macro on the queue member's channel when he answers, not the caller's channel. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@181848 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-12Merged revisions 181612 via svnmerge from file1-2/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r181612 | file | 2009-03-12 10:24:12 -0300 (Thu, 12 Mar 2009) | 5 lines Fix crash when sleep and retries argument was not given to RetryDial application. (closes issue #14647) Reported by: sherpya ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@181613 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-06Merged revisions 180579 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r180579 | mmichelson | 2009-03-06 12:25:44 -0600 (Fri, 06 Mar 2009) | 9 lines Merged revisions 180567 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180567 | mmichelson | 2009-03-06 12:23:09 -0600 (Fri, 06 Mar 2009) | 2 lines Make compilation succeed in dev-mode when IMAP storage is enabled. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@180582 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-05Merged revisions 180465 via svnmerge from mmichelson1-0/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r180465 | mmichelson | 2009-03-05 17:26:58 -0600 (Thu, 05 Mar 2009) | 22 lines Merged revisions 180464 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180464 | mmichelson | 2009-03-05 17:26:11 -0600 (Thu, 05 Mar 2009) | 16 lines [IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts. There was a fix put in a while back so that an X-Asterisk-VM-Context message header was added to stored IMAP voicemails. This would allow for us to differentiate if the same mailbox name was used in multiple contexts. The problem still left was that not all places where messages were retrieved actually attempted to use this header for information when retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain work as expected. (closes issue #13853) Reported by: vicks1 Patches: 13853_v2.patch uploaded by mmichelson (license 60) Tested by: lmadsen ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@180466 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-05Merged revisions 180383 via svnmerge from mmichelson1-7/+14
https://origsvn.digium.com/svn/asterisk/trunk ................ r180383 | mmichelson | 2009-03-05 13:14:14 -0600 (Thu, 05 Mar 2009) | 31 lines Merged revisions 180380 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180380 | mmichelson | 2009-03-05 12:58:48 -0600 (Thu, 05 Mar 2009) | 25 lines Fix broken mailbox parsing when searchcontexts option is enabled. When using the searchcontexts option in voicemail.conf, the code made the assumption that all mailbox names defined were unique across all contexts. However, the code did nothing to actually enforce this assumption, nor did it do anything to alert a user that he may have created an ambiguity in his voicemail.conf file by defining the same mailbox name in multiple contexts. With this change, we now will issue a nice long warning if searchcontexts is on and we encounter the same mailbox name in multiple contexts and ignore any duplicates after the first box. Whether searchcontexts is enabled or not, if we come across a duplicate mailbox in the same context, then we will issue a warning and ignore the duplicated mailbox. I have also added a small note to voicemail.conf.sample in the explanation for searchcontexts explaining that you cannot define the same mailbox in multiple contexts if you have enabled the option. (closes issue #14599) Reported by: lmadsen Patches: 14599.patch uploaded by mmichelson (license 60) (with slight modification) Tested by: lmadsen ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@180404 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-04Merged revisions 180120 via svnmerge from file1-2/+0
https://origsvn.digium.com/svn/asterisk/trunk ........ r180120 | file | 2009-03-04 10:39:28 -0400 (Wed, 04 Mar 2009) | 7 lines Remove duplicate 'k' and 'K' Dial options. (closes issue #14601) Reported by: alecdavis Patches: app_dial.optionk.diff.txt uploaded by alecdavis (license 585) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@180121 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03Merged revisions 180032 via svnmerge from dvossel1-3/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r180032 | dvossel | 2009-03-03 17:21:18 -0600 (Tue, 03 Mar 2009) | 14 lines app_read does not break from prompt loop with user terminated empty string In app.c, ast_app_getdata is called to stream the prompts and receive DTMF input. If ast_app_getdata() receives an empty string caused by the user inputing the end of string character, in this case '#', it should break from the prompt loop and return to app_read, but instead it cycles through all the prompts. I've added a return value for this special case in ast_readstring() which uses an enum I've delcared in apps.h. This enum is now used as a return value for ast_app_getdata(). (closes issue #14279) Reported by: Marquis Patches: fix_app_read.patch uploaded by Marquis (license 32) read-ampersanmd.patch2 uploaded by dvossel (license 671) Tested by: Marquis, dvossel Review: http://reviewboard.digium.com/r/177/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@180078 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03Merged revisions 180007 via svnmerge from mmichelson1-0/+4
https://origsvn.digium.com/svn/asterisk/trunk ................ r180007 | mmichelson | 2009-03-03 16:49:07 -0600 (Tue, 03 Mar 2009) | 22 lines Merged revisions 180006 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180006 | mmichelson | 2009-03-03 16:48:18 -0600 (Tue, 03 Mar 2009) | 17 lines Clarify some documentation of queues.conf.sample It had always been possible to explicitly specify a "blank" value for a sound file in queues.conf and have no sound played back. The problem with this is that it would result in some ugly CLI warnings from file.c. This commit introduces a check when playing a file in app_queue to see if the name of the file is zero-length and return early if that is the case. Also, the ability to specify the blank sound files in queues.conf is now mentioned more clearly in queues.conf.sample (closes issue #14227) Reported by: caspy ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@180008 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03Fix a memory leak when updating a realtime member field.mmichelson1-4/+10
This was discovered while looking at issue #14353 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@179971 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02Merged revisions 179533 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r179533 | russell | 2009-03-02 17:36:38 -0600 (Mon, 02 Mar 2009) | 48 lines Merged revisions 179532 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r179532 | russell | 2009-03-02 17:34:13 -0600 (Mon, 02 Mar 2009) | 40 lines Move ast_waitfor() down to avoid the results of the API call becoming stale. This call to ast_waitfor() was being done way too soon in this section of code. Specifically, there was code in between the call to waitfor and the code that uses the result that puts the channel in autoservice. By putting the channel in autoservice, the previous results of ast_waitfor() become meaningless, as the autoservice thread will do it's own ast_waitfor() and ast_read() on the channel. So, when we came back out of autoservice and eventually hit the block of code that calls ast_read() on the channel, there may not actually be any input on the channel available. Even though the previous call to ast_waitfor() in app_meetme said there was input, the autoservice thread has since serviced the channel for some period of time. This bug manifested itself while dvossel was doing some testing of MeetMe in Asterisk trunk. He was using the timerfd timing module. When the code hit ast_read() erroneously, it determined that it must have been called because of input on the timer fd, as chan->fdno was set to AST_TIMING_FD, since that was the cause of the last legitimate call to ast_read() done by autoservice. In this test, an IAX2 channel was calling into the MeetMe conference. It was _much_ more likely to be seen with an IAX2 channel because of the way audio is handled. Every audio frame that comes in results in a call to ast_queue_frame(), which then uses ast_timer_enable_continuous() to notify the channel thread that a frame is waiting to be handled. So, the chances of ast_waitfor() indicating that a channel needs servicing due to a timer event on an IAX2 event is very high. Finally, it is interesting to note that if a different timing interface was being used, this bug would probably not be noticed. When ast_read() is called and erroneously thinks that there is a timer event to handle, it calls the ast_timer_ack() function. The pthread and dahdi timing modules handle the ack() function being called when there is no event by simply ignoring it. In the case of the timerfd module, it results in a read() on the timer fd that will block forever, as there is no data to read. This caused Asterisk to lock up very quickly. Thanks to dvossel and mmichelson for the fun debugging session. :-) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@179534 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02KeepAlive application no longer exists, so fix gosub implementation to not ↵tilghman1-18/+4
use it. (closes issue #14571) Reported by: zktech Patches: 20090302__bug14571.diff.txt uploaded by tilghman (license 14) Tested by: tilghman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@179363 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-01Add error checking when updating the "paused" field of a realtime queue member.mmichelson1-3/+14
This code already existed in trunk and 1.6.1, but was not in 1.6.0 prior to this commit. (closes issue #14338) Reported by: fiddur Patches: 14338.patch uploaded by mmichelson (license 60) Tested by: fiddur git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@179222 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-24Change include order to make compile on Centos 5 with DAHDItwilson1-2/+2
If BIT_TYPES_DEFINED gets defined before linux/types.h is included, the __s32 type doesn't get defined git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@178306 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-20Merged revisions 177699 via svnmerge from dhubbard1-3/+9
https://origsvn.digium.com/svn/asterisk/trunk ........ r177699 | dhubbard | 2009-02-20 14:29:00 -0600 (Fri, 20 Feb 2009) | 9 lines Make app_fax compatible with spandsp-0.0.6pre4 Prior to spandsp-0.0.6pre4 the t30_stats_t structure used a pages_transferred integer to indicate the number of pages transferred (so far) during the fax session. The spandsp-0.0.6pre4 release removed the pages_transferred integer and replaced it with two different integers - pages_tx and pages_rx. This revision uses the new integers for spandsp-0.0.6pre4 while maintaining backwards compatibility for previous spandsp releases. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@177763 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-20Merged revisions 148868 via svnmerge from dhubbard1-19/+42
https://origsvn.digium.com/svn/asterisk/trunk ........ r148868 | tilghman | 2008-10-14 10:15:45 -0500 (Tue, 14 Oct 2008) | 6 lines API differences in spandsp 0.0.6pre1 and higher (closes issue #13688) Reported by: irroot Patches: app_fax-span6.patch uploaded by irroot (license 52) with minor modifications by me ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@177762 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-20Merged revisions 177664 via svnmerge from tilghman1-1/+8
https://origsvn.digium.com/svn/asterisk/trunk ........ r177664 | tilghman | 2009-02-20 11:29:51 -0600 (Fri, 20 Feb 2009) | 8 lines Allow semicolons to be escaped, when passing arguments to the System command. (closes issue #14231) Reported by: jcovert Patches: 20090113__bug14231__2.diff.txt uploaded by Corydon76 (license 14) corrected_20090113__bug14231__2.diff.txt uploaded by jcovert (license 551) Tested by: jcovert ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@177665 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-20Merged revisions 177661 via svnmerge from tilghman1-3/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r177661 | tilghman | 2009-02-20 11:22:19 -0600 (Fri, 20 Feb 2009) | 2 lines Oops, merge broke trunk ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@177662 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-19Merged revisions 177537 via svnmerge from tilghman1-2/+37
https://origsvn.digium.com/svn/asterisk/trunk ................ r177537 | tilghman | 2009-02-19 16:33:00 -0600 (Thu, 19 Feb 2009) | 14 lines Merged revisions 177536 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r177536 | tilghman | 2009-02-19 16:26:01 -0600 (Thu, 19 Feb 2009) | 7 lines Fix up potential crashes, by reducing the sharing between interactive and non-interactive threads. (closes issue #14253) Reported by: Skavin Patches: 20090219__bug14253.diff.txt uploaded by Corydon76 (license 14) Tested by: Skavin ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@177538 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-19Merged revisions 177384 via svnmerge from file1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r177384 | file | 2009-02-19 12:38:41 -0400 (Thu, 19 Feb 2009) | 10 lines Merged revisions 177383 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r177383 | file | 2009-02-19 12:37:25 -0400 (Thu, 19 Feb 2009) | 3 lines If we are able to create a speech structure unset the ERROR variable in case it was previously set. (issue #LUMENVOX-13) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@177385 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18Merged revisions 177101 via svnmerge from russell1-6/+11
https://origsvn.digium.com/svn/asterisk/trunk ........ r177101 | russell | 2009-02-18 13:12:49 -0600 (Wed, 18 Feb 2009) | 8 lines Re-add 'o' option to MeetMe, reverting rev 62297. Enabling this option by default proved to be a bad idea, as the talker detection is not very reliable. So, make it optional again, and off by default. (issue #13801) Reported by: justdave ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@177135 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16Merged revisions 176253 via svnmerge from mmichelson1-14/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r176253 | mmichelson | 2009-02-16 15:40:40 -0600 (Mon, 16 Feb 2009) | 24 lines Merged revisions 176249,176252 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176249 | mmichelson | 2009-02-16 15:34:27 -0600 (Mon, 16 Feb 2009) | 14 lines Open the DAHDI pseudo device and set it to be nonblocking atomically Apparently on FreeBSD, attempting to set the O_NONBLOCKING flag separately from opening the file was causing an "inappropriate ioctl for device" error. While I cannot fathom why this would be happening, I certainly am not opposed to making the code a bit more compact/efficient if it also fixes a bug. (closes issue #14482) Reported by: ys Patches: meetme.patch uploaded by ys (license 281) Tested by: ys ........ r176252 | mmichelson | 2009-02-16 15:39:21 -0600 (Mon, 16 Feb 2009) | 3 lines Remove unused variable and make dev-mode compilation happy ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@176256 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-13Merged revisions 175549 via svnmerge from file1-3/+7
https://origsvn.digium.com/svn/asterisk/trunk ........ r175549 | file | 2009-02-13 12:41:15 -0400 (Fri, 13 Feb 2009) | 4 lines Add an option to keep the recorded file upon hangup. (closes issue #14341) Reported by: fnordian ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@175550 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-11Merged revisions 174948 via svnmerge from mmichelson1-2/+6
https://origsvn.digium.com/svn/asterisk/trunk ................ r174948 | mmichelson | 2009-02-11 17:03:08 -0600 (Wed, 11 Feb 2009) | 35 lines Fix odd "thank you" sound playing behavior in app_queue.c If someone has configured the queue to play an position or holdtime announcement, then it is odd and potentially unexpected to hear a "Thank you for your patience" sound when no position or holdtime was actually announced. This fixes the announcement so that the "thanks" sound is only played in the case that a position or holdtime was actually announced. There is a way that the "thank you" sound can be played without a position or holdtime, and that is to set announce-frequency to a value but keep announce-position and announce-holdtime both turned off. (closes issue #14227) Reported by: caspy Patches: 14227_v3.patch uploaded by putnopvut (license 60) Tested by: caspy ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@174949 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-11Merged revisions 174945 via svnmerge from mmichelson3-2/+10
https://origsvn.digium.com/svn/asterisk/trunk ........ r174945 | mmichelson | 2009-02-11 16:41:01 -0600 (Wed, 11 Feb 2009) | 29 lines Fix 'd' option for app_dial and add new option to Answer application The 'd' option would not work for channel types which use RTP to transport DTMF digits. The only way to allow for this to work was to answer the channel if we saw that this option was enabled. I realized that this may cause issues with CDRs, specifically with giving false dispositions and answer times. I therefore modified ast_answer to take another parameter which would tell if the CDR should be marked answered. I also extended this to the Answer application so that the channel may be answered but not CDRified if desired. I also modified app_dictate and app_waitforsilence to only answer the channel if it is not already up, to help not allow for faulty CDR answer times. All of these changes are going into Asterisk trunk. For 1.6.0 and 1.6.1, however, all the changes except for the change to the Answer application will go in since we do not introduce new features into stable branches (closes issue #14164) Reported by: DennisD Patches: 14164.patch uploaded by putnopvut (license 60) Tested by: putnopvut Review: http://reviewboard.digium.com/r/145 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@174946 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-10Merged revisions 174805 via svnmerge from mmichelson1-28/+17
https://origsvn.digium.com/svn/asterisk/trunk ........ r174805 | mmichelson | 2009-02-10 17:17:03 -0600 (Tue, 10 Feb 2009) | 11 lines Fix potential for stack overflows in app_chanspy.c When using the 'g' or 'e' options, the stack allocations that were used could cause a stack overflow if a spyer stayed on the line long enough without actually successfully spying on anyone. The problem has been corrected by using static buffers and copying the contents of the appropriate strings into them instead of using functions like alloca or ast_strdupa ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@174820 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-10For some strange reason, I didn't think 1.6.0 neededmurf1-1/+1
this fix. I was wrong. Here it is. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@174439 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-05Merged revisions 173773 via svnmerge from mmichelson1-0/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r173773 | mmichelson | 2009-02-05 17:28:19 -0600 (Thu, 05 Feb 2009) | 7 lines Properly set "seen" and "unseen" flags when moving messages from the new to the old folder when using IMAP for voicemail storage (closes issue #13905) Reported by: jaroth Patches: foldermove_v2.patch uploaded by jaroth (license 50) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@173774 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-05Merged revisions 173697 via svnmerge from jpeeler1-2/+11
https://origsvn.digium.com/svn/asterisk/trunk ................ r173697 | jpeeler | 2009-02-05 15:00:26 -0600 (Thu, 05 Feb 2009) | 18 lines Merged revisions 173696 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173696 | jpeeler | 2009-02-05 14:47:51 -0600 (Thu, 05 Feb 2009) | 12 lines Add new configuration option to make shared IMAP mailboxes function as expected. The new option is "imapvmshareid" which is an ID to tag multiple mailboxes using the same IMAP storage location to function as one mailbox. This allows all messages to be retrieved for any user in the group. The patch alters the 'X-Asterisk-VM-Extension' header that is responsible for matching voicemails for a given user. (closes issue #13673) Reported by: howardwilkinson ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@173698 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-05Merged revisions 173693 via svnmerge from mmichelson1-6/+6
https://origsvn.digium.com/svn/asterisk/trunk ................ r173693 | mmichelson | 2009-02-05 14:30:45 -0600 (Thu, 05 Feb 2009) | 20 lines Merged revisions 173692 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173692 | mmichelson | 2009-02-05 14:29:09 -0600 (Thu, 05 Feb 2009) | 12 lines Fix situations where queue members could be autopaused unexpectedly Specifically, this patch prevents us from autopausing members when we receive a busy or congestion frame from them. (closes issue #14376) Reported by: fiddur Patches: 14376.patch uploaded by putnopvut (license 60) Tested by: fiddur ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@173694 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-05Merged revisions 173593 via svnmerge from mmichelson1-0/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r173593 | mmichelson | 2009-02-05 12:48:55 -0600 (Thu, 05 Feb 2009) | 11 lines Merged revisions 173592 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173592 | mmichelson | 2009-02-05 12:47:24 -0600 (Thu, 05 Feb 2009) | 3 lines Add some missing cleanup to app_mixmonitor ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@173594 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-05Merged revisions 173589 via svnmerge from mmichelson1-5/+88
https://origsvn.digium.com/svn/asterisk/trunk ................ r173589 | mmichelson | 2009-02-05 12:34:06 -0600 (Thu, 05 Feb 2009) | 33 lines Merged revisions 173559 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173559 | mmichelson | 2009-02-05 11:34:33 -0600 (Thu, 05 Feb 2009) | 25 lines Fix a problem where a channel pointer becomes invalid due to masquerading or hanging up. app_mixmonitor runs its own thread to monitor the channel's activity and write the mixed audio to a file. Since this thread runs independently of the channel, it is possible that the mixmonitor thread's channel pointer will point to freed memory when the channel either is masqueraded or hangs up (technically, both cases are hangups, but we need to handle the cases slightly differently). The solution for this is to employ a datastore, which has the nice benefit of allowing us to hook into channel masquerades and hangups and update our pointer as necessary. If this looks familiar, this same technique is employed in app_chanspy. app_chanspy is a bit more involved since it does a lot more operations on the channel that is being spied upon. app_mixmonitor does have an extra touch that app_chanspy doesn't have, though. Since there is a thread race between the channel's thread and the mixmonitor thread on a hangup, we em- ploy a condition-and-boolean combination to ensure that the channel thread finishes with our structure before the mixmonitor thread attempts to free it. No crashes! (closes issue #14374) Reported by: aragon Patches: 14374.patch uploaded by putnopvut (license 60) Tested by: aragon, putnopvut ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@173590 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04Merged revisions 173507 via svnmerge from mmichelson1-3/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r173507 | mmichelson | 2009-02-04 16:16:19 -0600 (Wed, 04 Feb 2009) | 7 lines Fix some areas where the incorrect interface was passed to ast_device_state I swear it feels like I already did this once... (closes issue #14359) Reported by: francesco_r ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@173534 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04Merged revisions 173397 via svnmerge from mmichelson1-3/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r173397 | mmichelson | 2009-02-04 11:45:14 -0600 (Wed, 04 Feb 2009) | 11 lines Merged revisions 173396 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173396 | mmichelson | 2009-02-04 11:44:48 -0600 (Wed, 04 Feb 2009) | 3 lines Revert my previous change because it was stupid ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@173398 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04Merged revisions 173393 via svnmerge from mmichelson1-1/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r173393 | mmichelson | 2009-02-04 11:41:02 -0600 (Wed, 04 Feb 2009) | 11 lines Merged revisions 173392 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173392 | mmichelson | 2009-02-04 11:40:29 -0600 (Wed, 04 Feb 2009) | 3 lines Add a missing unlock. Extremely unlikely to ever matter, but it's needed. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@173394 f38db490-d61c-443f-a65b-d21fe96a405b