aboutsummaryrefslogtreecommitdiffstats
path: root/apps
AgeCommit message (Collapse)AuthorFilesLines
2008-03-27These small documentation updates made in response to a query inmurf1-0/+2
asterisk-users, where a user was using Playback, but needed the features of Background, and had no idea that Background existed, or that it might provide the features he needed. I thought the best way to avert these kinds of queries was to provide "See Also" references in all three of "Background", "Playback", "WaitExten". Perhaps a project to do this with all related apps is in order. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@111391 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-26This code change is made just for clarification. It does exactlymmichelson1-1/+1
the same thing as before. It just doesn't look as wrong. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@111121 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-26Add a lock to the vm_state structure and use the lock around mail_open callsmmichelson1-0/+7
to prevent concurrent access of the same mailstream. This, along with trunk's ability to configure TCP timeouts for IMAP storage will help to prevent crashes and hangs when using voicemail with IMAP storage. (closes issue #10487) Reported by: ewilhelmsen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@111049 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19Fix a bug where when calls on the trunk side hang up while on hold, the staterussell1-2/+3
is not properly reflected. (closes issue #11990, reported by anakaoka, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110163 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19Add a missing unlock in the case that memory allocation fails in app_chanspy.mmichelson1-4/+3
Thanks to Russell for confirming that this was an issue. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110083 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Fix one place where the chanspy datastore isn't removed from a channel.russell1-1/+3
(issue #12243, reported by atis, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109763 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18This patch makes it so that all queue member status changes are handled ↵mmichelson1-96/+56
through device state code. This removes several problems people were seeing where their queue members would get into an "unknown" state. Huge props go to atis on this one since he was the one who found the code section that was causing the problem and proposed the solution. I just wrote what he suggested :) (closes issue #12127) Reported by: atis Patches: 12127v3.patch uploaded by putnopvut (license 60) Tested by: atis, jvandal git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109713 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-17Make sure that we release the lock on the spyee channel if the spyee or spy ↵mmichelson1-1/+3
has hung up (closes issue #12232) Reported by: atis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109012 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-13Fix another issue that was causing crashes in chanspy. This introduces a newrussell1-0/+10
datastore callback, called chan_fixup(). The concept is exactly like the fixup callback that is used in the channel technology interface. This callback gets called when the owning channel changes due to a masquerade. Before this was introduced, if a masquerade happened on a channel being spyed on, the channel pointer in the datastore became invalid. (closes issue #12187) (reported by, and lots of testing from atis) (props to file for the help with ideas) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108583 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-13Fix a couple uses of sprintf. The second one could actually cause an overflowrussell1-2/+2
of a stack buffer. It's not a security issue though, it only depends on your configuration. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108469 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12(closes issue #12187, reported by atis, fixed by me after some brainstormingrussell1-1/+3
on the issue with mmichelson) - Update copyright info on app_chanspy. - Fix a race condition that caused app_chanspy to crash. The issue was that the chanspy datastore magic that was used to ensure that spyee channels did not disappear out from under the code did not completely solve the problem. It was actually possible for chanspy to acquire a channel reference out of its datastore to a channel that was in the middle of being destroyed. That was because datastore destruction in ast_channel_free() was done near the end. So, this left the code in app_chanspy accessing a channel that was partially, or completely invalid because it was in the process of being free'd by another thread. The following sort of shows the code path where the race occurred: ============================================================================= Thread 1 (PBX thread for spyee chan) || Thread 2 (chanspy) --------------------------------------||------------------------------------- ast_channel_free() || - remove channel from channel list || - lock/unlock the channel to ensure || that no references retrieved from || the channel list exist. || --------------------------------------||------------------------------------- || channel_spy() - destroy some channel data || - Lock chanspy datastore || - Retrieve reference to channel || - lock channel || - Unlock chanspy datastore --------------------------------------||------------------------------------- - destroy channel datastores || - call chanspy datastore d'tor || which NULL's out the ds' || - Operate on the channel ... reference to the channel || || - free the channel || || || - unlock the channel --------------------------------------||------------------------------------- ============================================================================= git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108135 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Add a trigger mode that triggers on both read and write. The actual function ↵file1-1/+1
that returns the combined audio frame though will wait until both sides have fed in audio, or until one side stops (such as the case when you call Wait). (closes issue #11945) Reported by: xheliox git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108083 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Add a newline on a logqwell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107712 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Add an additional check for setting conference parameter when using the ↵file1-1/+1
marked user options. It was possible for it to return to a no listen/no talk state if a masquerade happened. (closes issue #12136) Reported by: aragon git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107637 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Fix a minor spelling error.file1-1/+1
(closes issue #12183) Reported by: darrylc git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107582 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11backport a fix from trunkkpfleming1-6/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107472 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11stop checking for mktime() in the configure script... we don't use it, and ↵kpfleming1-2/+2
the test is buggy under gcc 4.3 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107461 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-10Move where unanswered CDRs are dropped to the CDR core, not everything uses ↵file1-19/+0
app_dial. (closes issue #11516) Reported by: ys Patches: branch_1.4_cdr.diff uploaded by ys (license 281) Tested by: anest, jcapp, dartvader git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107016 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Only start the SLA thread if SLA has actually been configured.russell1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106895 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Warn the user when a temporary greeting existstilghman1-1/+5
(Closes issue #11409) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106635 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Safely use the strncat() function.tilghman4-7/+7
(closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106552 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05Add a control frame to indicate the source of media has changed. Depending ↵file2-1/+11
on the underlying technology it may need to change some things. (closes issue #12148) Reported by: jcomellas git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106235 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-29If the message file does not exist, just return harmlessly, instead of crashing.tilghman1-1/+3
(Closes issue #12108) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@105296 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-29Bump up the size of the uniqueid variable.file1-1/+1
(closes issue #12107) Reported by: asgaroth git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@105261 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-28When using autofill, members who are in use should be counted towards the mmichelson1-0/+4
number of available members to call if ringinuse is set to yes. Thanks to jmls who brought this issue up on IRC git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@105059 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Don't loop around infinitely trying to spy on our own channel, and don't ↵file1-5/+5
forget to free/detach the datastore upon hangup of the spy. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104787 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Fix a problem in ChanSpy where it could get stuck in an infinite loop withoutrussell1-1/+7
being able to detect that the calling channel hung up. (closes issue #12076, reported by junky, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104625 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Avoid some recursion in the cleanup code for the chanspy datastorerussell1-0/+2
(closes issue #12076, reported by junky, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104334 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26Merge changes from team/russell/smdi-1.4russell1-6/+3
This commit brings in a significant set of changes to the SMDI support in Asterisk. There were a number of bugs in the current implementation, most notably being that it was very likely on busy systems to pop off the wrong message from the SMDI message queue. So, this set of changes fixes the issues discovered as well as introducing some new ways to use the SMDI support which are required to avoid the bugs with grabbing the wrong message off of the queue. This code introduces a new interface to SMDI, with two dialplan functions. First, you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access details in the message using the SMDI_MSG() function. A side benefit of this is that it now supports more than just chan_zap. For example, with this implementation, you can have some FXO lines being terminated on a SIP gateway, but the SMDI link in Asterisk. Another issue with the current implementation is that it is quite common that the station ID that comes in on the SMDI link is not necessarily the same as the Asterisk voicemail box. There are now additional directives in the smdi.conf configuration file which let you map SMDI station IDs to Asterisk voicemail boxes. Yet another issue with the current SMDI support was related to MWI reporting over the SMDI link. The current code could only report a MWI change when the change was made by someone calling into voicemail. If the change was made by some other entity (such as with IMAP storage, or with a web interface of some kind), then the MWI change would never be sent. The SMDI module can now poll for MWI changes if configured to do so. This work was inspired by and primarily done for the University of Pennsylvania. (also related to issue #9260) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104119 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25This patch fixes some pretty significant problems with how app_chanspy handlesrussell1-32/+178
pointers to channels that are being spied upon. It was very likely that a crash would occur if the channel being spied upon hung up. This was because the current ast_channel handling _requires_ that the object is locked or else it could disappear at any time (except in the owning channel thread). So, this patch uses some channel datastore magic on the spied upon channel to be able to detect if and when the channel goes away. (closes issue #11877) (patch written by me, but thanks to kpfleming for the idea, and to file for review) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104106 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25If the destination folder is full, don't delete a message when exiting.tilghman1-2/+4
(closes issue #12065) Reported by: selsky Patch by: (myself) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104094 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-20Clear up confusion when viewing the QUEUE_WAITING_COUNT of a mmichelson1-0/+8
"dead" realtime queue. Since from the user's perspective, the queue does exist, we shouldn't tell them we couldn't find the queue. Instead since it is a dead queue, report a 0 waiting count This issue was brought up on IRC by jmls git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103956 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-14Change to the configure logic regarding IMAP. Prior to this commit, if you ↵mmichelson1-16/+23
wished to configure Asterisk with IMAP support, you would use the --with-imap configure switch in one of the following two ways: --with-imap=/some/directory would look in the directory specified for a UW IMAP source installation --with-imap would assume that you had imap-2004g installed in .. relative to the Asterisk source With this set of changes the two above options still work the same, but there are two new behaviors, too. --with-imap=system will assume that you have -libc-client.so where you store your shared objects and will attempt to find c-client headers in your include path either in the imap or c-client directory. If either of the two original methods of specifying the imap option should fail, then the check for --with-imap =system will be performed in addition. It is only after this "system" check that failure can happen. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103698 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-14Fix build for non-IMAP buildsmmichelson1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103690 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-14Fix the new message count if delete=yes when using IMAP storage.mmichelson1-7/+12
(closes issue #11406) Reported by: jaroth Patches: deleteflag_v2.patch uploaded by jaroth (license 50) Tested by: jaroth git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103688 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-13Refuse to load app_voicemail if res_adsi is not loaded (which is a symbol ↵tilghman1-0/+7
dependency) (closes issue #11760) Reported by: non-poster Patches: 20080114__bug11760.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, non-poster, jamesgolovich git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103556 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-11If entering a conference with the 'w' option ensure that we can't listen or ↵file1-1/+3
speak until the marked user appears. (closes issue #11835) Reported by: alanmcmillan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103324 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-09Commit fix for being unable to send voicemail from VoiceMailMaintilghman1-1/+5
Reported by: William F Acker (via the -users mailing list) Patch by: Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103197 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-08Prevent a potential three-thread deadlock. Also added a comment blockmmichelson1-7/+22
to explicitly state the locking order necessary inside app_queue. (closes issue #11862) Reported by: flujan Patches: 11862.patch uploaded by putnopvut (license 60) Tested by: flujan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103120 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-06Move around some defines to unbreak ODBC storage.tilghman1-27/+25
(closes issue #11932) Reported by: snuffy git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102576 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-01Fix the VM_DUR variable for forwarded voicemail, and fixed several other bugstilghman1-29/+61
while I'm in the area. (closes issue #11615) Reported by: jamessan Patches: 20071226__bug11615__2.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, jamessan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101942 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-01Remove a needless (and incorrect) call to feof() after fgets().qwell1-1/+1
This would have exited the loop early if you had an authentication file with no newline at the end. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101822 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-01off by one errorrussell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101820 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-01Don't overwrite the last character of a line if it's not a newline. This wouldrussell1-1/+3
happen if the last line in the file doesn't have a newline. (pointed out by Qwell) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-01From bugtracker: "fix totalAnalysisTime to handle periods of no channel ↵mmichelson1-8/+40
activity" (closes issue #9256) Reported by: cmaj Patches: amd-dont-wait-too-long-for-frames-take3.diff.txt uploaded by cmaj (license 111) Tested by: cmaj, skygreg, ZX81, rjain git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101649 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-30Fix a logic error with regards to autofill. Prior to this change, it was ↵mmichelson1-2/+3
possible for a caller to go out of turn if autofill were enabled and callers ahead in the queue were attempting to call a member. This change fixes this. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101216 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-29Remove a memory leak from updating realtime queuesmmichelson1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101035 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-29Fixing an erroneous return value returned when attempting to pause or ↵mmichelson1-2/+2
unpause a queue member fails. Fixes BE-366, thanks to John Bigelow for writing the patch. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100973 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-29Don't forget to record the channel so we know whether it is bridged or not ↵file1-0/+1
later. (closes issue #11811) Reported by: slavon git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100934 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-28When using ODBC_STORAGE, make sure we put greeting files into the database ↵qwell1-33/+40
like we do with the others. Issue #11795 Reported by: dimas Patches: vmgreet.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100672 f38db490-d61c-443f-a65b-d21fe96a405b