aboutsummaryrefslogtreecommitdiffstats
path: root/main
AgeCommit message (Collapse)AuthorFilesLines
2007-11-27Don't start/stop autoservice in pbx_extension_helper() unless a channel existsrussell1-8/+16
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89839 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27Merge changes from team/russell/autoservice_1.4russell2-7/+90
This set of changes fixes an issue that was reported to me on IRC yesterday. The user, d1mas, was using chan_zap for incoming calls and was having DTMF recognition issues in some situations. Specifically, he noticed that the problem occurred when using DISA or WaitExten. He also noticed that when using Read, the problem did not occur. His system also used DUNDi for dialplan lookups. So, he theorized that if the DUNDi lookups blocked for some period of time, that audio from the zap channel could get lost. If the audio got lost, then it wouldn't be run through the DTMF detector, and digits could get lost. He was correct, and the following set of changes fixes the problem. However, the changes go a little bit further than what was necessary to fix this exact problem. 1) I updated pbx_extension_helper() to autoservice the associated channel to handle cases where extension lookups may take a long time. This would normally be a dialplan switch that does some lookup over the network, such as the DUNDi or IAX2 switches. This ensures that even while a DUNDi lookup is blocking, the channel will be continuously serviced. 2) I made a change to the autoservice code. This is actually something that has bothered me for a long time. When a channel is in autoservice, _all_ frames get thrown away. However, some frames really shouldn't be thrown away. The most notable examples are signalling (CONTROL) frames, and DTMF. So, this patch queues up important frames while a channel is in autoservice. When autoservice is stopped on the channel, the queued up frames get stuck back on the channel so that they can get processed instead of thrown away. 3) I made another change to the autoservice code to handle the case where autoservice is started on channels recursively. Previously, you could call ast_autoservice_start() multiple times on a channel, and it would stop the first time ast_autoservice_stop() gets called. Now, it will ensure that autoservice doesn't actually stop until the final call to ast_autoservice_stop(). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89790 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27on second thought... revert all the other changes i've made in app options ↵kpfleming1-5/+1
parsing leaving only one: if an empty argument is supplied for an option, set that argument pointer to point to an empty string rather than NULL, so that the application can do normal checks on it without worrying about it being NULL git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89709 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27generate a warning when an application option that requires an argument is ↵kpfleming1-2/+5
ignored due to lack of an argument git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89701 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27If we get a codec offer using a well-known payload type, but using it for ↵oej1-3/+16
another codec that we don't know, Asterisk did not remove that codec from the list. With this patch, we remove the codec from audio and video rtp objects and deny it ever existed. Thanks to lasse for testing. (closes issue #11376) Reported by: lasse Patches: bug11376.txt uploaded by oej (license 306) Tested by: lasse git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89630 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27closes issue #11379; OK, this is an attempt to make both sides happy. To the ↵murf1-2/+11
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-26Fix issues with async dialing with an application executing. The application ↵file1-5/+24
has to be terminated and control returned to the thread before hanging things up. (issue #BE-252) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89610 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26Add channel locking to a function that needed to be doing it. This is just arussell1-0/+2
little something I noticed while working on a completely unrelated issue. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89594 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26when parsing application options that take arguments, don't indicate that ↵kpfleming1-1/+2
the option was supplied unless a non-zero-length argument was found for it git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89586 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26If channel allocation fails because the alert pipe could not be created also ↵file1-0/+1
free the scheduler context. (closes issue #11355) Reported by: eliel Patches: main.channel.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89577 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24Currently, zero-length voicemail messages cause a hangup in VoicemailMain.tilghman1-3/+11
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-23Up until this point, the XML output of the manager has been technicallytilghman1-3/+71
invalid, due to the repetition of certain parameters in a single event. This caused various issues for XML parsers, some of which refused to parse at all, given the invalidity of the rendered XML. So this commit fixes the XML output, ensuring that each entity parameter has a unique name, thus ensuring valid XML. Reported by: msetim Patch by: tilghman (Closes issue #10220) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20bring back compile-option checking when loading modules, only this time use ↵kpfleming1-0/+9
a string-based storage and comparison mechanism because it is easier to support on other platforms git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89461 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20According to comments in main/pbx.c, it is essential that if we are going to ↵mmichelson1-0/+2
lock the conlock as well as the hints lock, it must be locked in that respective order. In order to prevent a potential deadlock, we need to lock the conlock prior to locking the hints lock in ast_hint_state_changed (see the call stack example on issue #11323 for how this can happen). (closes issue #11323, reported by eelcob, suggestion for patch by eelcob, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89457 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Temporarily revert revision 89325, which added md5 magic for keeping track ofrussell1-11/+0
what build options were used. We agreed that we should remove this before making a 1.4 release, and then we can put it back in. Then, we can take a month or so to play around with it to get it how we want it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89339 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16To help combat problems where people build external modules (asterisk-addons ↵kpfleming1-0/+11
or others) and then change the build options of the Asterisk build in a way that makes the incompatible without warning, this commit introduces an MD5 signature of the important build-time options and includes that signature into modules when they are built. When the loader loads one of these modules and notices the problem, it will emit a warning to console and refuse to initialize the module, as doing so could cause the system to be unstable or even crash. If you upgrade to this version of Asterisk, you must rebuild *all* of your modules that came from other sources before trying to run this version. If you are using Digium's G.729 binary codec module, you will need v33 or newer. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89325 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15Undoing previous commit since I realize it was wrongmmichelson1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89288 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15Adding a missing mutex unlock.mmichelson1-0/+1
(closes issue 11256, reported and patched by ys) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89286 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14When a recording ends with '#', we are improperly trimming an extra 200ms ↵tilghman1-3/+10
from the recording. Reported by: sim Patch by: tilghman Closes issue #11247 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89275 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14Return the proper value when the srv_callback function executes properly.file1-1/+1
(closes issue #11240) Reported by: jtodd git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89260 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13Debugging is running into the 16-lock limit. Increase to avoid.tilghman1-1/+1
(This define is only effective when debugging is turned on, so there's no effect for most installations.) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89239 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12Fix a typo pointed out by De_Mon on #asterisk-devqwell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89194 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12If two config writes collide, file corruption could result. Use a mkstemp() ↵tilghman1-9/+22
file, instead. Reported by: paravoid Patch by: tilghman Closes issue #10781 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89191 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12Fix two cases of memory corruption caused by background threads.tilghman1-0/+2
Reported by: atis Patch by: tilghman Fixes issue #10923 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89184 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08Properly say the seconds here..qwell1-1/+1
Issue 11203, fix described by vma. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89125 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08fix a glaring bug in the new SRV record handling that would cause incorrect ↵kpfleming1-0/+1
weight sorting git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89105 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07Fixing a segfault in the manager "core show channels concise" command.mmichelson1-1/+1
(closes issue #11183, reported by arnd and patched by ys) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89085 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06Bug fixes to tdd support in zaptel. oej1-16/+24
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89042 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06closes issue #8786 - where the [catname](!) and ↵murf1-7/+66
[catname](othercat1,othercat2,...) notation gets dropped across a ConfigUpdate (or any other thing that would cause a config file to be written). While I was at it, I also cleaned up some of the destroy routines to free up comments, which was not being done. Made sure the new struct I introduced is also cleaned up properly at destruction time. My code handles multiple template inclusions. Many thanks to ssokol for his patch, which, while not literally used in the final merge, served as a foundation for the fix. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89036 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05Reworked deadlock avoidance in __ast_read. Restored audio to mmichelson1-20/+9
callback agents. (closes issue #11071, reported by callguy, patched by me, tested by callguy and Ted Brown) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88826 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05After seeing crashes related to channel variables, I went looking around at therussell1-11/+37
ways that channel variables are handled. In general, they were not handled in a thread-safe way. The channel _must_ be locked when reading or writing from/to the channel variable list. What I have done to improve this situation is to make pbx_builtin_setvar_helper() and friends lock the channel when doing their thing. Asterisk API calls almost all lock the channel for you as necessary, but this family of functions did not. (closes issue #10923, reported by atis) (closes issue #11159, reported by 850t) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88805 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05Merge changes from asterisk/team/kpfleming/SRV-priority-handlingrussell1-41/+146
Previously, the SRV record support in Asterisk was broken. There was no guarantee on what record Asterisk would choose to actually use. This set of changes improves the situation by ensuring that Asterisk will choose the highest priority record. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88719 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05Merge the last bit of changes from asterisk/team/russell/readq-1.4russell1-24/+27
The issue here is that the channel frame readq handling got broken when the code was converted to use the linked list macros. It caused corruption of the list head and tail pointers. So, I fixed up the usage of the linked list macros and in passing, simplified the code. I also documented what the code is doing, as it was a bit difficult to figure out at first. This bug showed itself with crashes showing messed up head/tail pointers for the readq. However, there are a couple of crashes that aren't quite as obvious, but I think may be related. So, if your bug gets closed by this commit, but you still have a problem, please reopen or create a new bug report. (closes issue #10936) (closes issue #10595) (closes issue #10368) (closes issue #11084) (closes issue #10040) (closes issue #10840) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88709 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05Fix up datastore handling in ast_do_masquerade(). The code is intended to moverussell1-2/+1
any channel datastores from the old channel to the new one. However, it did not use the linked list macros properly to accomplish the task. The existing code would only work if there was only a single datastore on the old channel. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88624 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
2007-11-02We need to make sure to specify a language to ast_fileexists, otherwise it ↵qwell1-3/+3
may fail for anything besides en Issue 11147, fix discovered by both citats and myself (independently), with input from Corydon76 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88283 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-30Fix build of editline on Solaris.qwell1-2/+1
Issue 11113, patch by snuffy. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87567 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29clean up (and ignore) assembler and preprocessor intermediate files if any ↵kpfleming2-1/+2
are created during the build git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87463 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29Add some more details to the output of "core show locks". When a threadrussell1-0/+15
is waiting for a lock, this will now show the details about who currently has it locked. (inspired by issue #11100) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87396 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29Remove a lock that doesn't make any sense. The regions lock needs to be heldrussell1-3/+2
when traversing the list of allocated chunks so that they can be printed out to the CLI. (Thanks to eliel on #asterisk-dev for pointing this out!) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87373 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29Fix issue with ast_unescape_semicolon going into an endless loop.file1-0/+2
(closes issue #10550) Reported by: ramonpeek Patches: unescape-85177-1.patch uploaded by IgorG (license 20) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87294 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-25appending one list to another should leave the first list empty, and not ↵kpfleming1-1/+0
require the user to do that git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87069 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-23this update to Makefile corrects how ast_expr2f.c should be generatedmurf1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86881 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-23This should get rid of a really, really irritating warning generated by some ↵murf1-153/+138
64-bit platforms from libc, where free(0) is frowned upon git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86880 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Minor FreeBSD build fixtilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86787 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Don't leak a frame in the case that an END frame is received and the time sincerussell1-0/+1
the BEGIN is less than that of the defined minimum DTMF duration. (closes issue #11051) Reported by: casper Patches: channel.c.86664.diff uploaded by casper (license 55) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86750 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Move log message to before the frame it references is freed.file1-1/+1
(closes issue #11050) Reported by: slavon Patches: channel.c.86662.diff uploaded by casper (license 55) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86663 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Fixes for building under OpenSolaris.file1-6/+6
(closes issue #11047) Reported by: snuffy Patches: 11047-fixes.diff uploaded by snuffy (license 35) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86630 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19When returning a DTMF digit from ast_control_streamfile cast it as a char so ↵file1-0/+4
that 0 does not overlap with the success return code. (closes issue #11023) Reported by: cfc git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86502 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-18The channel needs to stay locked while running timer callbacks, as they accessrussell1-6/+2
and modify channel data that may change elsewhere. I went through every timer callback in the source tree to make sure that none of them did any additional locking that could introduce deadlocks, and all is well. (closes issue #10765) Reported by: Ivan Patches: ast_1_4_11_svn_patch_channel_rc.diff uploaded by Ivan (license 229) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86330 f38db490-d61c-443f-a65b-d21fe96a405b