aboutsummaryrefslogtreecommitdiffstats
path: root/main
AgeCommit message (Collapse)AuthorFilesLines
2010-08-20Merged revision 278274 fromrmudgett2-7/+21
https://origsvn.digium.com/svn/asterisk/trunk .......... r278274 | rmudgett | 2010-07-20 17:38:13 -0500 (Tue, 20 Jul 2010) | 1 line Reference correct struct member for unlikely event PRI_EVENT_CONFIG_ERR. .......... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@283123 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-29fixes issue with translator frame not getting freeddvossel1-0/+3
A translator frame even if it local storage so the translation path can be freed. This issue prevented g729 licenses from being freed up. (closes issue #17630) Reported by: manvirr Patches: encoder_fix.diff uploaded by dvossel (license 671) Tested by: manvirr, dvossel git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@280448 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-27remove empty audiohook write list on channeldvossel2-1/+21
If a channel has an audiohook write list created on it, that list stays on the channel until the channel is destroyed. There is no reason to keep that list on the channel if it becomes empty. If it is empty that just means we are doing needless translating for every ast_read and ast_write. This patch removes the audiohook list from the channel once it is detected to be empty on either a read or write. If a audiohook is added back to the channel after this list is destroyed, the list just gets recreated as if it never existed to begin with. (closes issue #17630) Reported by: manvirr Review: https://reviewboard.asterisk.org/r/799/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@279945 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-23Avoid race with consolethread on shutdown (on parallel processors).tilghman1-6/+13
(closes issue #17080) Reported by: sybasesql Patches: 20100721__issue17080.diff.txt uploaded by tilghman (license 14) Tested by: sybasesql git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@278981 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-22Allow PLC to function properly when channels use SLIN for audio.mmichelson1-1/+3
If a channel involved in a bridge was using SLIN audio, then translation paths were not guaranteed to be set up properly since in all likelihood the number of translation steps was only 1. This patch enforces the transcode_via_slin behavior if transcode_via_slin or generic_plc is enabled and one of the formats to make compatible is SLIN. AST-352 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@278618 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-20Do not queue up DTMF frames while a call is on hold.tilghman1-1/+21
(Fixes ABE-2110) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@278167 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-20Off-by-one errortilghman1-5/+3
(closes issue #16506) Reported by: nik600 Patches: 20100629__issue16506.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@278023 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16Interpret device state AST_DEVICE_UNKNOWN as extension state ↵mnicholson1-1/+2
AST_EXTENSION_NOT_INUSE. (closes issue #16035) Reported by: francesco_r Patches: pbx.c.patch uploaded by viniciusfontes (license 978) Tested by: francesco_r, agx, lawbar git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@277327 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16If variable gotten is not set, will segfault on Solaris.tilghman1-1/+1
(closes issue #17636) Reported by: bklang git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@277261 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16For pass through DTMF tones, measure the actual duration between the begin ↵mnicholson1-0/+13
and end packets on the wire. If it is detected to be less than AST_MIN_DTMF_DURATION, trigger dtmf emulation. AST-362 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@277247 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-15In a perfect world, the frame source would never be NULL. In the meantime, ↵jpeeler1-1/+1
don't crash when it is. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@276652 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-12Change ast_write to not stop generator when called from ast_prod.jpeeler1-5/+5
For SIP channels configured with the progressinband option on, the ringback was being immediately stopped. This problem was due to ast_prod being moved for a deadlock fix in 259858. Prodding the channel after setting up the generator triggered the check in ast_write to stop the generator. The fix here should write the frame the same as was done before the call to ast_prod was moved. (closes issue #17372) Reported by: tech_admin git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@275665 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09fix tab-completion for unload command.pabelanger1-1/+6
(closes issue #17536) Reported by: junky Patches: unload_vs_mod_unload.diff uploaded by junky (license 177) Tested by: pabelanger git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@275290 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09give a better error message when attempting to unload a module that is not ↵mnicholson1-1/+3
loaded git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@275182 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09don't unload modules that returned AST_MODULE_LOAD_DECLINE when they were loadedmnicholson1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@275143 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09Document that a leading and trailing slash is expected for test categories.russell1-0/+5
Also, emit a warning if a test is registered without one of these. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@275021 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-06Ensure file.o is built correctly.jpeeler1-1/+1
(related to issue #15250) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@274359 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-06Fix problem with RFC 2833 DTMF not being accepted.mmichelson1-1/+5
A recent check was added to ensure that we did not erroneously detect duplicate DTMF when we received packets out of order. The problem was that the check did not account for the fact that the seqno of an RTP stream will roll over back to 0 after hitting 65535. Now, we have a secondary check that will ensure that the seqno rolling over will not cause us to stop accepting DTMF. (closes issue #17571) Reported by: mdeneen Patches: rtp_seqno_rollover.patch uploaded by mmichelson (license 60) Tested by: richardf, maxochoa, JJCinAZ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@274157 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-05Remove extra line breaks from 'core show config mappings'pabelanger1-3/+1
(closes issue #17583) Reported by: pabelanger Patches: issue17583.patch uploaded by pabelanger (license 224) Tested by: lmadsen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273884 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-02Autoservice loop optimization causes a busy loop, when channels are serviced ↵tilghman1-0/+5
while in hangup. (closes issue #17564) Reported by: ramonpeek Patches: 20100630__issue17564.diff.txt uploaded by tilghman (license 14) Tested by: ramonpeek git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273717 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-01Don't return a partially initialized datastore.russell1-1/+4
If memory allocation fails in ast_strdup(), don't return a partially initialized datastore. Bad things may happen. (related to ABE-2415) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273565 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-29_Really_ skip the channel... don't just retry for another 200 cycles.tilghman1-1/+1
(Closes issue SWP-1652, ABE-2240) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273057 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-28Don't change ownership/group/permissions on run directory, if it already exists.tilghman1-4/+8
(closes issue #17076) Reported by: stuarth Patches: 20100324__issue17076.diff.txt uploaded by tilghman (license 14) Tested by: stuarth git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@272925 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-28Also trim trailing blanks on #includestilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@272922 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-28Change the way that we read include files, to accommodate for changes in GCC ↵tilghman1-13/+6
4.4. (closes issue #17472) Reported by: seandarcy Patches: config2.patch uploaded by nivan (license 1066) Tested by: nivan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@272921 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-28Backport unit test API to 1.4.russell3-1/+907
Review: https://reviewboard.asterisk.org/r/750/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@272878 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-17Set sin_family in ast_get_ip_or_srv() and removed the 'last' member of the ↵mnicholson2-6/+3
ast_dnsmgr_entry struct. (closes issue #15827) Reported by: DennisD Patches: (modified) dnsmgr_15827.patch uploaded by chappell (license 8) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@271123 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-15Variables have always been case-sensitive, so we should not be removing ↵tilghman1-1/+1
case-insensitive matches. Bug reported via the -dev list. See http://lists.digium.com/pipermail/asterisk-dev/2010-June/044510.html git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@270583 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-11For SpeeX, 0 bits remaining is valid and does not need an emitted warning.tilghman1-1/+3
(closes issue #15762) Reported by: nblasgen Patches: issue15672.patch uploaded by pabelanger (license 224) Tested by: nblasgen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@269960 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-10Fix potential crash when writing raw SLIN audio on a PLC-enabled channel.mmichelson1-3/+22
The issue here was that the frame created when adjusting for PLC had no offset to its audio data. If this frame were translated to another format prior to being sent out an RTP socket, all went well because the translation code would put an appropriate offset into the frame. However, if the SLIN audio were not translated before being sent out the RTP socket, bad things would happen. Specifically, the ast_rtp_raw_write makes the assumption that the frame has at least enough of an offset that it can accommodate an RTP header. This was not the case. As such, data was being written prior to the allocation, likely corrupting the data the memory allocator had written. Thus when the time came to free the data, all hell broke loose. ....Well, Asterisk crashed at least. The fix was just what one would expect. Offset the data in the frame by a reasonable amount. The method I used is a bit odd since the data in the frame is 16 bit integers and not bytes. I left a big ol' comment about it. This can be improved on if someone is interested. I was more interested in getting the crash resolved. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@269821 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-10Ensure restartable system calls can restart (BSD signal semantics)tilghman2-0/+5
This eliminates the annoying <beep> on the console. (closes issue #17477) Reported by: jvandal Patches: 20100610__issue17477.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@269635 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-09Fix Debian init script to not use -c.pabelanger1-6/+16
When using the init script as-is currently, it could cause issues on Debian such as high CPU usage. This fix has worked for several people so I'm implementing the change. We now handle color displays properly. (closes issue #16784) Reported by: pabelanger Patches: 20100530__issue16784__2.diff.txt uploaded by tilghman (license 14) Tested by: pabelanger, tilghman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@269334 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-07Fix summary for "core waitfullybooted" CLI command. Thanks, mnicholson.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@268579 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-04Get rid of a warning that gets printed out when the console is configured ↵russell1-1/+4
without any logger levels git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@268203 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-031.4 version of the dead PLC code fix.mmichelson1-40/+6
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@267539 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Add CLI command that blocks until Asterisk has fully booted.russell1-0/+19
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@267183 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Cleanup error/warning messages in AEL2 parserpabelanger1-2/+2
(closes issue #16684) Reported by: Silmaril Patches: patch_ael2_logmsg.diff uploaded by Silmaril (license 979) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@267009 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-01Prevent CLI prompt from distorting output of lines shorter than the prompt.tilghman1-1/+1
Uses the VT100 method of clearing the line from the cursor position to the end of the line: Esc-0K (closes issue #17160) Reported by: coolmig Patches: 20100531__issue17160.diff.txt uploaded by tilghman (license 14) Tested by: coolmig git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@266585 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-26Use sigaction for signals which should persist past the initial trigger, not ↵tilghman2-20/+38
signal. If you call signal() in a Solaris signal handler, instead of just resetting the signal handler, it causes the signal to refire, because the signal is not marked as handled prior to the signal handler being called. This effectively causes Solaris to immediately exceed the threadstack in recursive signal handlers and crash. (closes issue #17000) Reported by: rmcgilvr Patches: 20100526__issue17000.diff.txt uploaded by tilghman (license 14) Tested by: rmcgilvr git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@266142 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-25Merged revisions 265320,265467 via svnmerge from twilson2-0/+8
https://origsvn.digium.com/svn/asterisk/trunk ........ r265320 | twilson | 2010-05-24 14:06:40 -0500 (Mon, 24 May 2010) | 14 lines Add the FullyBooted AMI event It is possible to connect to the manager interface before all Asterisk modules are loaded. To ensure that an application does not send AMI actions that might require a module that has not yet loaded, the application can listen for the FullyBooted manager event. It will be sent upon connection if all modules have been loaded, or as soon as loading is complete. The event: Event: FullyBooted Privilege: system,all Status: Fully Booted Review: https://reviewboard.asterisk.org/r/639/ ........ r265467 | twilson | 2010-05-24 17:21:58 -0500 (Mon, 24 May 2010) | 1 line Merge the rest of the FullyBooted patch ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@265570 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-24fixes segfault when using generic plcdvossel1-0/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@265365 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-21Allow ast_safe_sleep to defer specific frames until after the sleep has ↵mmichelson2-27/+57
concluded. From reviewboard Background: A Digium customer discovered a somewhat odd bug. The setup is that parties A and B are bridged, and party A places party B on hold. While party B is listening to hold music, he mashes a bunch of DTMF. Party A takes party B off hold while this is happening, but party B continues to hear hold music. I could reproduce this about 1 in 5 times. The issue: When DTMF features are enabled and a user presses keys, the channel that the DTMF is streamed to is placed in an ast_safe_sleep for 100 ms, the duration of the emulated tone. If an AST_CONTROL_UNHOLD frame is read from the channel during the sleep, the frame is dropped. Thus the unhold indication is never made to the channel that was originally placed on hold. The fix: Originally, I discussed with Kevin possible ways of fixing the specific problem reported. However, we determined that the same type of problem could happen in other situations where ast_safe_sleep() is used. Using autoservice as a model, I modified ast_safe_sleep_conditional() to defer specific frame types so they can be re-queued once the sleep has finished. I made a common function for determining if a frame should be deferred so that there are not two identical switch blocks to maintain. Review: https://reviewboard.asterisk.org/r/674/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@264996 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-20ast_callerid_parse() had a path that left name uninitialized.rmudgett1-0/+2
Several callers of ast_callerid_parse() do not initialize the name parameter before calling thus there is the potential to use an uninitialized pointer. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@264820 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-201.4 version of PLC fix.mmichelson2-4/+108
Analogous to trunk revision 264452, but without the change to chan_sip since it is not necessary in this branch. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@264541 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-19Because progress is called multiple times, across several frames, we must ↵tilghman1-51/+62
persist states when detecting multitone sequences. (closes issue #16749) Reported by: dant Patches: dsp.c-bug16749-1.patch uploaded by dant (license 670) Tested by: dant git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@263949 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-17Fix logic error when checking for a devstate provider.mmichelson1-1/+1
When using strsep, if one of the list of specified separators is not found, it is the first parameter to strsep which is now NULL, not the pointer returned by strsep. This issue isn't especially severe in that the worst it is likely to do is waste some cycles when a device with no '/' and no ':' is passed to ast_device_state. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@263639 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-17Remove arbitrary size limitation for hints.mmichelson1-2/+2
(closes issue #17257) Reported by: tim_ringenbach Patches: hints_crash_fix.diff uploaded by tim ringenbach (license 540) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@263637 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-17Manager cookies are not compatible with RFC2109.lmadsen1-1/+1
The Version field in the cookies we're setting contain quotes around the version number which is not compatible with RFC2109 and breaks some implementations. (closes issue #17231) Reported by: ecarruda Patches: manager_rfc2109-trunk-v1.patch uploaded by ecarruda (license 559) manager_rfc2109-1.6.2-v1.patch uploaded by ecarruda (license 559) Tested by: ecarruda, russell git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@263456 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-13Fix internal timing not working with Zapteljpeeler2-1/+2
dahdi_compat.h was not being included in channel.c when used with Zaptel and wasn't in file.c at all. (closes issue #15250) Reported by: mneuhauser Patches: dahdi_compat.patch uploaded by mneuhauser (license 425) Tested by: IgorG git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@263112 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-04Add a tiny corner case to the previous committilghman1-1/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@261094 f38db490-d61c-443f-a65b-d21fe96a405b