aboutsummaryrefslogtreecommitdiffstats
path: root/res
AgeCommit message (Collapse)AuthorFilesLines
2007-07-30Revert change in revision 71656, even though it fixed a bug, because many ↵tilghman1-1/+2
people were depending upon the (broken) behavior. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@77782 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-13Fix a couple potential minor memory leaks. load_moh_classes() could returnrussell1-2/+2
without destroying the loaded configuration. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@75107 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-13Ensure that adding a user to the list of users of a specific music on holdrussell1-0/+2
class is not done at the same time as any of the other operations on this list to prevent list corruption. Using the global moh_data lock for this is not ideal, but it is what is used to protect these lists everywhere else in the module, and I am only changing what is necessary to fix the bug. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@75059 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-12Only print out a warning for situations where it is actually helpful. (issue ↵file1-8/+9
#10187 reported by denke) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@74814 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-11Make sure that the ESCAPE immediately follows the condition that uses LIKE.russell1-10/+8
This fixes realtime extensions with ODBC. (closes issue #10175, reported by stuarth, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@74656 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-10Only use ESCAPE when LIKE is used. russell1-2/+4
(issue #10075, this part reported by jmls on IRC, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@74313 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09When the specified class isn't found, properly fall back to the channel's musicrussell1-9/+9
class or the default. (issue #10123, reported by blitzrage, patches from juggie, qwell, and me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@74165 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-06(closes issue #10075)russell1-0/+4
Reported by: apsaras Patches submitted by: Corydon76 Tested by: apsaras Fix a problem with MSSQL 2005 by explicitly stating that '\' is being used as an escape character. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@73684 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-25Issue 10035 - handle_exec returns a result inconsistent with all of the ↵tilghman1-1/+1
other AGI commands git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@71656 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Send an unhold indication when going off hold. (issue #10036 reported by speedy)file1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@71124 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Fix a few silly usages of ast_playstream() - it only ever returns 0...qwell1-16/+2
Issue 10035 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@71065 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-19Add parked call extension AFTER the parking slot has been announced, ↵file1-2/+2
otherwise two threads will try to handle the same channel and it will go kaboom. (issue #9191 reported by japple) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@69846 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-03doh... initializing the pointer variable will work just a bit betterkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@62841 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-02increase reliability and efficiency of static Realtime config loading via ODBC:kpfleming1-13/+13
don't request fields we aren't going to use don't request sorting on fields that are pointless to sort on explicitly request the fields we want, because we can't expect the database to always return them in the order they were created (reported by blitzrage in person (!), patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@62796 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-01Remove an unnecessary check that makes it so if you hang up after doing anrussell1-1/+1
attended transfer before the target extension answers the channel, the transfer is not successful. (issue #9338, patch by svanlund) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@62547 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-29Change ENV section to use setenv, instead of putenv (Alexandru Pirvulescu ↵tilghman1-9/+2
<sigxcpu@gmail.com>, reported via -dev list) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@59299 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-21Indicate the filename changed when it is changed. (issue #9311 reported by ↵file1-0/+1
jsmith) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@59086 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16Issue #9069 - If we open with TH we should not close with /TD. (seanbright)oej1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@54771 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-01Return previous behavior of having MOH pick up where it was left off. (issue ↵file1-12/+13
#8672 reported by sinistermidget) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@53084 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23Yield before reading from zaptel timing source under Solaris so that other ↵file1-0/+6
threads get a chance to do things. (issue #7875 reported by bob) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@51512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-16Return previous behavior. ParkedCalls will be able to do DTMF based ↵file1-0/+2
transfers again. trunk however will get an option to allow this to be set on/off. (issue #8804 reported by nortex) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@51145 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-11When doing a fork() and exec(), two problems existed (Issue 8086):tilghman2-3/+28
1) Ignored signals stayed ignored after the exec(). 2) Signals could possibly fire between the fork() and exec(), causing Asterisk signal handlers within the child to execute, which caused nasty race conditions. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@48374 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-07Ensure that the file position is not incremented beyond the total number ofrussell1-0/+1
files available for playback. (issue #8539, ulogic) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@48356 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30Do not listen for DTMF on the bridge that comes into existence when ↵file1-6/+0
ParkedCall is executed. This means native bridging can now occur for this. (issue #8406 reported by kebl0155) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@48154 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30Remember the pointer to the allocated block of memory so that we can free it ↵file1-4/+6
and not cause a memory leak. (issue #8449 reported by arkadia) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@48146 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-27Random MOH wasn't really random (bug 8381)tilghman1-17/+14
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@48045 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-13If the execute fails a second time, make sure that we don't pass back a ↵tilghman1-0/+1
stale handle git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@47525 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-07If random order is enabled for files mode music on hold, set a random initialrussell1-0/+2
position, instead of always starting at the first file, and doing the random operation only when switching to the next file. (bug reported by John Lange on the asterisk-dev mailing list) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@47238 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-02ignore files in a music on hold directory that begin with '.'russell1-0/+4
(issue #8249, cboie) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@46964 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-01a fix for bug 8251; the var_val needs to accept longer strings or mass ↵murf1-1/+1
confusion and a lot of lost time is the result git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@46803 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-01soxmix and Asterisk expect different file extensions for certain formats. Thisrussell1-1/+19
was already handled for the wav49 format. However, it was not handled for ulaw and alaw. I fixed this in such a way that using the alternate extensions for ulaw and alaw will only happen if we know we're calling soxmix, and not a custom script defined using the MONITOR_EXEC variable. The wav49 processing was left alone so that external scripts will see no behavior change. (issue #7550, reported by mnicholson, proposed patch by junky, committed fix is a bit different) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@46776 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-31fix some copy/paste bugs in the checking of arguments for the russell1-2/+2
"control stream file" AGI command (issue #8255, mnicholson) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@46557 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-27We should always be using _exit() after a fork() or vfork() instead of exit().russell2-3/+3
This is because exit() does some extra cleanup which in some implementations of vfork(), for example, can actually modify the state of the parent process, causing very weird bugs or crashes. (issue #7971, Nick Gavrikov) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@46361 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-28Put in missing \ns on the end of ast_logs (issue #7936 reported by wojtekka)file3-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@43924 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-27Fix a problem that occurred if a user entered a digit that matched a bridgerussell1-6/+7
feature that was configured using multiple digits, and the digit that was pressed timed out in the feature digit timeout period. For example, if blind transfer is configured as '##', and a user presses just '#'. In this situation, the call would lock up and no longer pass any frames. (issue #7977 reported by festr, and issue #7982 reported by michaels and valuable input provided by mneuhauser and kuj. Fixed by me, with testing help and peer review from Joshua Colp). There are a couple of issues involved in this fix: 1) When ast_generic_bridge determines that there has been a timeout, it returned AST_BRIDGE_RETRY. Then, when ast_channel_bridge gets this result, it calls ast_generic_bridge over again with the same timestamp for the next event. This results in an endless loop of nothing until the call is terminated. This is resolved by simply changing ast_generic_bridge to return AST_BRIDGE_COMPLETE when it sees a timeout. 2) I also changed ast_channel_bridge such that if in the process of calculating the time until the next event, it knows a timeout has already occured, to immediately return AST_BRIDGE_COMPLETE instead of attempting to bridge the channels anyway. 3) In the process of testing the previous two changes, I ran into a problem in res_features where ast_channel_bridge would return because it determined that there was a timeout. However, ast_bridge_call in res_features would then determine by its own calculation that there was still 1 ms before the timeout really occurs. It would then proceed, and since the bridge broke out and did *not* return a frame, it interpreted this as the call was over and hung up the channels. The reason for this was because ast_bridge_call in res_features and ast_channel_bridge in channel.c were using different times for their calculations. channel.c uses the start_time on the bridge config, which is the time that the feature digit was recieved. However, res_features had another time, 'start', which was set right before calling ast_channel_bridge. 'start' will always be slightly after start_time in the bridge config, and sometimes enough to round up to one ms. This is fixed by making ast_bridge_call use the same time as ast_channel_bridge for the timeout calculation. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@43778 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-06Don't close the second file descriptor if it's the same as the first one, as ↵file1-1/+2
it will have already been closed elsewhere and could cause massive panic. (issue #7699 reported by bn999) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@42148 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-23Revert last change - breaks retrieval of builtin variablestilghman1-4/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@40901 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-15use pbx_builtin_getvar_helper() so that GET VARIABLE can retrieve globalrussell1-5/+4
variables (issue #7609) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@39935 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-03Treat the file as invalid if we have no valid formats for it (issue #7643 ↵file1-1/+1
reported by KNK) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@38825 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-01ensure that the 'feature digit timeout' value is taken into account when ↵kpfleming1-0/+1
deciding how long the bridge should run (this fixes a problem report where a digit press that did not invoke a feature is never passed across the bridge) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@38686 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-01Close the stream when file based MOH stop. This won't get rid of their ↵file1-0/+4
position in the file but it will cause the translation path to be setup again. (issue #7634 reported by asimpson) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@38654 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-31Add missing code to bring transferee channel out of MOH/autoservice under ↵file1-0/+3
certain circumstance (issue #7611 reported by guillecabeza with minor mods by myself) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@38585 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-12remove some more bad examples of using printfkpfleming1-5/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@37419 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-12fix a place where a frame would be free'd twicerussell1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@33693 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-12Move set priority up, because at this point in the code, stdout is no longertilghman1-3/+3
the console. If we're unable to set priority, the error goes to Asterisk as if it were an AGI command (issue 7335). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@33615 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-03when using moh files mode, don't look for a file past the number of filesrussell1-0/+2
that have been loaded, or worse, past the size of the files array git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@31775 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-01remove pointless forcing of the channel into SLINEAR mode; the write format ↵kpfleming1-12/+2
will be set later based on the file that is chosen to be played to the channel git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@31555 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-31if the connection to a FastAGI server fails because of a timeout, log a morerussell1-2/+7
informative log message git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@31194 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-24support video recording via AGI 'RECORD FILE' command (issue #7068)kpfleming1-0/+6
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@29973 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-23backport some mutex initialization and linked list handling fixes from trunkkpfleming1-2/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@29732 f38db490-d61c-443f-a65b-d21fe96a405b