aboutsummaryrefslogtreecommitdiffstats
path: root/apps
AgeCommit message (Collapse)AuthorFilesLines
2008-01-02A change to improve the accuracy of queue logging in the case where a member ↵mmichelson1-6/+23
does not answer during the specified timeout period. Prior to this change, there was a small chance that the member name recorded in this case would be blank. Also prior to this change, if using the ringall strategy, if no one answered the call during the specified timeout, the member name listed in the queue log would randomly be one of the members that was rung. (closes issue #11498, reported and tested by hloubser, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@95890 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-28I found a bug while browsing the queue code and managed to reproduce it in a ↵mmichelson1-4/+2
small setup. If a queue uses the ringall strategy, it was possible through unfortunate coincidence for a single member at a given penalty level to make app_queue think that all members at that penalty level were unavailable and cause the members at the next penalty level to be rung. With this patch, we will only move to the next penalty level if ALL the members at a given penalty level are unreachable. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@95095 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21Bunch of coding guidelines cleanupmmichelson1-79/+77
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94543 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21Better quota support for using IMAP storage voicemailmmichelson1-1/+38
(closes issue #11415, reported by jaroth) (closes issue #11152, reported by selsky) Patch provided by jaroth git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94540 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21The mail_copy c-client function does not expect a full imap mailbox string, ↵mmichelson1-7/+3
just the name of the mailbox. (closes issue #11419, reported and patched by jaroth, with additional patchwork from me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94538 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21Removing a debug message I accidentally just committedmmichelson1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94464 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21Fixing Portuguese syntax for saying dates and times. Also some coding ↵mmichelson1-0/+1
guidelines cleanup. (closes issue #11599, reported and patched by caio1982, coding guidelines cleanup by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94420 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17We need to create the directory for a voicemail user even if they are using ↵mmichelson1-2/+0
IMAP storage since greetings are stored in the filesystem. (closes issue #11388, reported by spditner, patch by me inspired by a patch by spditner) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@93291 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17Issue 11574: Add dependencies on res_monitor and res_features. oej1-0/+4
I wonder if Asterisk can run at all without res_features. My guess is that there's propably a lot of more modules and the core that depends on it. Reported by: caio1982 (closes issue #11574) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@93182 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,kpfleming1-2/+8
rizzo brought up some issues related to the way that the metadata required for menuselect and the rest of the build system is extracted from the source files. Since I had a few hours to kill on an airplane today, I decided to improve this situation... so now the system caches the extracted metadata and uses it to build the menuselect 'tree' as much as it can. The result of this is that when a single source file is changed, only the metadata for that file needs to be extracted again, and the rest is used from the cache files. I also reduced the number of forked processes required to do the metadata extraction; it was actually possible to do most of what we needed in the Makefiles themselves without using any shell scripts at all! On my laptop, these changes resulted in an 80% decrease in the time required for the 'menuselect.makeopts' automatic check to occur after editing a single source file. While doing this work I also cleaned up a few minor things in the Makefiles, adding a check for 'awk' to the configure script and changed all remaining places we use 'grep' or 'awk' to use the ones found by the configure script, and changed the 'prep_tarball' script to build the menuselect metadata so that tarballs of Asterisk will include it and won't require the user to wait while it is extracted after unpacking. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@93180 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13Prevent another potential fd leakmmichelson1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92807 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13Prevent a possible fd leak. mmichelson1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92803 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-12Don't increment user count until after name has been recorded (if enabled).qwell1-21/+29
Issue 11048, tested by pep. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92617 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-12Removing an unused variable.mmichelson1-7/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92443 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-11Fixing autofill to be more accurate. Specifically, if calls ahead of the currentmmichelson1-1/+4
caller were ringing members (but not yet bridged) there could be available members and waiting callers who would not get matched up. The member availability checker was correctly determining the number of available members in this scenario, but the queue itself did not parallelly reflect this status on the pending calls. This commit corrects the issue. (closes issue #11459, reported by equissoftware, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92323 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10If there are no members in a queue, then the loop where the datastore for ↵mmichelson1-2/+4
detecting duplicate dialed numbers will be skipped, meaning the datastore isn't created. This means that when we try to free it, there's a crash. This stops that crash from occurring. (closes issue #11499, reported by slavon, patched by eliel) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92202 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07* Add channel locking around datastore operations that expect the channelrussell1-26/+43
to be locked. * Document why we don't record Local channels in the dialed interfaces list. * Remove the dialed variable as it isn't needed. * Restructure some code for clarity and coding guidelines stuff git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91783 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07* Add channel locking around datastore operations that expect the channelrussell1-17/+39
to be locked. * Document why we don't record Local channels in the dialed interfaces list. * Handle memory allocation failure. * Remove the dialed variable, as it wasn't actually needed. * Tweak some formatting to conform to coding guidelines. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91780 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07Don't unlock the dialed_interfaces list until we're done messing with the ↵russell1-1/+1
iterator. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91693 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07Allow dialing local channels from Queue() and Dial() again. There was a slightrussell2-4/+3
flaw in the code to prevent call forwards from looping that caused this problem. (related to issue #11486) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91677 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07Fix in an issue in the call forwarding handling code that was causing crashesrussell1-1/+2
on every call into a queue. I'm not entirely sure about the logic in this part of the code, so I want to look at it some more tomorrow. However, this makes it safe and keeps it from crashing. (closes issue #11486, reported by adamg, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91675 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06IMAP storage did not honor the maxmsg setting in voicemail.conf, and it also ↵mmichelson1-0/+14
had the possibility of crashing if a user had more than 256 messages in their voicemail. This patch kills two birds with one stone by adding maxmsg support and also setting a hard limit on the number of messages at 255 so that the crashes cannot happen. (closes issue #11101, reported by Skavin, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91541 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Reverting extra stuff I didn't mean to commitmmichelson1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91292 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05The 'G' option for Dial() did not properly handle the case where only a ↵mmichelson2-4/+4
label was provided. This was due to the fact that the answering channel did not have an extension set, so ast_parseable_goto would fail. This fix eliminates the call to ast_parseable_goto on the answering channel since it is a wasteful call. The answering channel and the calling channel are both directed to the same extension and context, just different priorities, so we can just copy the values from the calling channel to the answering channel and increment the answering channel's priority. (closes issue #11382, reported by jon, patch by me with correction by jon) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91273 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-04Fix build issue on the build cluster.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90798 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03A big one...mmichelson2-72/+128
This is the merge of the forward-loop branch. The main change here is that call-forwards can no longer loop. This is accomplished by creating a datastore on the calling channel which has a linked list of all devices dialed. If a forward happens, then the local channel which is created inherits the datastore. If, through this progression of forwards and datastore inheritance, a device is attempted to be dialed a second time, it will simply be skipped and a warning message will be printed to the CLI. After the dialing has been completed, the datastore is detached from the channel and destroyed. This change also introduces some side effects to the code which I shall enumerate here: 1. Datastore inheritance has been backported from trunk into 1.4 2. A large chunk of code has been removed from app_dial. This chunk is the section of code which handles the call forward case after the channel has been requested but before it has been called. This was removed because call-forwarding still works fine without it, it makes the code less error-prone should it need changing, and it made this set of changes much less painful to just have the forwarding handled in one place in each module. 3. Two new files, global_datastores.h and .c have been added. These are necessary since the datastore which is attached to the channel may be created and attached in either app_dial or app_queue, so they need a common place to find the datastore info. This approach was taken in case similar datastores are needed in the future, there will be a common place to add them. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90735 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03Make sure we always close the conference fd if we have an open one.qwell1-1/+1
Issue 11383, reported by markmhy, patch by eliel. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90696 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-02The other day when I went through making changes as a result of the ao2_link()russell1-2/+3
change, I added some code to set pointers to NULL after they were unreferenced. This pointed out that in this place, the object was unreferenced before the code was done using it. So, move the unref down a little bit. (crash reported by jmls on IRC) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90470 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30Change the behavior of ao2_link(). Previously, in inherited a reference.russell1-0/+6
Now, it automatically increases the reference count to reflect the reference that is now held by the container. This was done to be more consistent with ao2_unlink(), which automatically releases the reference held by the container. It also makes it so it is no longer possible for a pointer to be invalid after ao2_link() returns. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29This patch handles the case where a queue member with a negative penalty is ↵mmichelson1-1/+1
added via the manager. If a negative value is submitted for a member penalty, we set it to 0. (closes issue #11411, reported and patched by Laureano) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90163 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28Fix a few memory leaks.file1-0/+1
(closes issue #11405) Reported by: eliel Patches: load_realtime.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90101 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28Recording greetings when using IMAP storage was causing zero-length files to ↵mmichelson1-0/+4
be stored. Since greetings are not retrieved from IMAP anyway, it is pointless to attempt storing them there. (closes issue #11359, reported by spditner, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89999 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27Instead of depending on the return value of ast_true(), explicitly set therussell1-1/+1
eventwhencalled variable to 1. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89844 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27Two changes with regards to the 'eventwhencalled' option of queues.confmmichelson1-3/+3
1) Due to some signed vs. unsigned silliness, setting 'eventwhencalled' to 'vars' or 'yes' did exactly the same thing. Thus the sign change of the ast_true call. 2) The vars2manager function overwrote a \n for every channel variable it parsed, resulting in bizarre output for the channel variables. This patch remedies this. (related to issue #11385, however I'm not sure if this will actually be enough to close it) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89837 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27closes issue #11379; OK, this is an attempt to make both sides happy. To the ↵murf1-1/+21
cdr.conf file, I added the option 'unanswered', which defaults to 'no'. In this mode, you will see a cdr for a call, whether it was answered or not. The disposition will be NO ANSWER or ANSWERED, as appropriate. The src is as you'd expect, the destination channel will be one of the channels from the Dial() call, usually the last in the list if more than one chan was specified. With unanswered set to 'yes', you will still see this cdr entry in both cases. But in the case where the dial timed out, you will also see a cdr for each line attempted, marked NO ANSWER, with no destination channel name. The new option defaults to 'no', so you don't see the pesky extra cdr's by default, and you will not see the irritating 'not posted' messages. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89622 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26After issuing a "say load new", if a caller hangs up during the middle of ↵mmichelson1-1/+5
playback of a number, app_playback will continue to try to play the remaining files. With this change, no more files will be played back upon hangup. (closes issue #11345, reported and patched by IgorG) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89618 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26After issuing a "say load new" tons of warning messages are printedmmichelson1-4/+0
out to the CLI every time do_say in app_playback is called. Removing these warnings git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89616 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26Close the audio file before sending it to the post processing application.file1-3/+3
(closes issue #11357) Reported by: reformed Patches: mixmonitor.patch uploaded by reformed (license 330) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89587 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26Revert vmu->email back to an empty string if it was empty when imap_store_filemmichelson1-1/+12
was called. This prevents sending a duplicate e-mail. (closes issue #11204, reported by spditner, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89580 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26When unloading app_meetme destroy any auto created contexts created by SLA.file1-0/+3
(closes issue #11367) Reported by: eliel git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89571 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24Currently, zero-length voicemail messages cause a hangup in VoicemailMain.tilghman1-1/+4
This change fixes the problem, with a multi-faceted approach. First, we do our best to avoid these messages from being created in the first place, and second, if that fails, we detect when the voicemail message is zero-length and avoid exiting at that point. Reported by: dtyoo Patch by: gkloepfer,tilghman (Closes issue #11083) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89540 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21Fix a small error I made in my previous commitmmichelson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89495 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21Changing an inaccurate debug message to be less inaccurate. Under the ↵mmichelson1-1/+1
circumstances, this message would always report that there were 0 members available, even though that may not be true. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89493 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Make realtime queues accessible from the QUEUE_MEMBER_COUNT function.mmichelson1-10/+2
(closes issue #11271, reported and patched by atis, with small modifications from me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89323 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15Update the SLAStation application to account for the case where the SLA threadrussell1-0/+23
has a call out to the station, but the user has pressed a line button to answer the call instead of picking up the handset. If they do, the phone sends out a new INVITE. So, the SLAStation app must check to see if it is picking up a ringing trunk, and ensure that the other stations stop ringing. (reported internally, patched by me, tested by mogorman) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89296 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13Reverting commit made in revision 89205 since it is unnecessary.mmichelson1-2/+2
Thanks to Kevin for pointing this out git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89241 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13Some sanity checking for MixMonitor. If only 1 argument is given, then the ↵mmichelson1-2/+2
args.options and args.post_process strings are uninitialized and could contain garbage. This change handles this situation properly by only using arguments that we have parsed. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89205 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08I made this same adjustment in trunk to fix a bug, and it makes sense to do ↵mmichelson1-1/+1
it in 1.4 as well. If an imapfolder is specified in voicemail.conf, don't ever explicitly connect to INBOX since it may not exist. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89111 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07The member refcount must be incremented, to avoid using it after deallocation.tilghman1-0/+6
A huge thanks go to lvl- for patiently providing the necessary valgrind output that was necessary to finding this problem of memory corruption. Reported by: lvl- Patch by: tilghman Closes issue #11174 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89093 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-04Rename ast_string_field_free_pool to ast_string_field_free_memory,rizzo1-2/+2
and ast_string_field_free_all to ast_string_field_reset_all to avoid misuse (due to too similar names and an error in documentation). Fix two related memory leaks in app_meetme. No need to merge to trunk, different fix already applied there. Not applicable to 1.2 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88471 f38db490-d61c-443f-a65b-d21fe96a405b