aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2008-03-25Make file access in cdr_custom similar to cdr_csv.qwell1-9/+10
Fixes issue #12268. Patch borrowed from r82344 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110779 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-25This one line change makes an if inside a for loop (in realtime_peer) check ↵jpeeler1-1/+1
all the ast_variables the loop was intending to test rather than just the first one. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110727 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-25When reverting a commit, I accidentally left in this bit which was an experimentmmichelson1-1/+3
to see what would happen. It passed the compile test, and I didn't notice I had left this change in too. So this is a revert of a revert...sort of. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110635 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-25Add an option (transmit_silence) which transmits silence during both ↵file4-3/+13
Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases. (closes issue #10058) Reported by: tracinet git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110628 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-24This is a revert for revision 108288. The reason is that that revisionmmichelson1-6/+3
was not for an actual bug fix per se, and so it really should not have been in 1.4 in the first place. Plus, people who compile with DO_CRASH are more likely to encounter a crash due to this change. While I think the usage of DO_CRASH in ast_sched_del is a bit absurd, this sort of change is beyond the scope of 1.4 and should be done instead in a developer branch based on trunk so that all scheduler functions are fixed at once. I also am reverting the change to trunk and 1.6 since they also suffer from the DO_CRASH potential. (closes issue #12272) Reported by: qq12345 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110618 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-24Turn a NOTICE into a DEBUG message.russell1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110614 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-21Don't attempt to do optimizations of gsm on mips platforms either.qwell1-3/+3
(closes issue #12270) Reported by: zandbelt Patches: 026-gsm-mips.patch uploaded by zandbelt (license 33) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110474 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-20Shorten the ast_waitfor() timeout from 500 ms to 50 ms in the autoservice ↵russell1-1/+1
thread. This really should not make a difference except in very rare cases. That case would be that all of the channels in autoservice are not generating any frames. In that case, this change reduces the potential amount of time that a thread waits in ast_autoservice_stop() for the autoservice thread to wrap back around to the beginning of its loop. (closes issue #12266, reported by dimas) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110395 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-20Merged revisions 110335 via svnmerge from russell2-13/+9
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r110335 | russell | 2008-03-20 16:53:27 -0500 (Thu, 20 Mar 2008) | 6 lines Fix some very broken code that was introduced in 1.2.26 as a part of the security fix. The dnsmgr is not appropriate here. The dnsmgr takes a pointer to an address structure that a background thread continuously updates. However, in these cases, a stack variable was passed. That means that the dnsmgr thread would be continuously writing to bogus memory. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110336 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-19Add sanity checking for position resuming. We *have* to make sure that the ↵file1-2/+8
position does not exceed the total number of files present, and we have to make sure that the position's filename is the same as previous. These values can change if a music class is reloaded and give unpredictable behavior. (closes issue #11663) Reported by: junky git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110035 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19Make sure that the mark bit does not incorrectly cause video frame ↵file1-2/+2
timestamps to be calculated as if they are audio frames. (closes issue #11429) Reported by: sperreault Patches: 11429-frametype.diff uploaded by qwell (license 4) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110019 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19People report bugs about Asterisk crashing with DO_CRASH enabled was getting ↵qwell3-18/+23
a little silly... Now we only show certain cflags when you run configure with --enable-dev-mode (corresponding menuselect change to follow) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109973 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19(closes issue #11442)murf1-10/+21
Reported by: tzafrir Patches: 11442.patch uploaded by murf (license 17) Tested by: murf I didn't give tzafrir very much time to test this, but if he does still have remaining issues, he is welcome to re-open this bug, and we'll do what is called for. I reproduced the problem, and tested the fix, so I hope I am not jumping by just going ahead and committing the fix. The problem was with what file_save does with templates; firstly, it tended to print out multiple options: [my_category](!)(templateref) instead of [my_category](!,templateref) which is fixed by this patch. Nextly, the code to suppress output of duplicate declarations that would occur because the reader copies inherited declarations down the hierarchy, was not working. Thus: [master-template](!) mastervar = bar [template](!,master-template) tvar = value [cat](template) catvar = val would be rewritten as: ;! ;! Automatically generated configuration file ;! Filename: experiment.conf (/etc/asterisk/experiment.conf) ;! Generator: Manager ;! Creation Date: Tue Mar 18 23:17:46 2008 ;! [master-template](!) mastervar = bar [template](!,master-template) mastervar = bar tvar = value [cat](template) mastervar = bar tvar = value catvar = val This has been fixed. Since the config reader 'explodes' inherited vars into the category, users may, in certain circumstances, see output different from what they originally entered, but it should be both correct and equivalent. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109908 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19Tweak spacing in a recent change because I'm very picky.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109838 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-18Allow codecs that use log2comp (g726) to compile correctly on x86 with gcc4 ↵qwell1-1/+1
optimizations. (closes issue #12253) Reported by: fossil Patches: log2comp.patch uploaded by fossil (license 140) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109648 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Make sure an agent doesn't try to send dtmf to a NULL channelmmichelson1-2/+6
closes issue #12242 Reported by Yourname git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109575 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Fix character string being treated ad format stringtwilson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109482 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Merged revisions 109391 via svnmerge from qwell1-2/+0
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r109391 | qwell | 2008-03-18 10:08:41 -0500 (Tue, 18 Mar 2008) | 3 lines Do not return with a successful authentication if the From header ends up empty. (AST-2008-003) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109393 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Put a maximum limit on the number of payloads accepted, and also make sure a ↵file2-13/+24
given payload does not exceed our maximum value. (AST-2008-002) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109386 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18(closes issue #11903)murf15-21/+125
Reported by: atis Many thanks to atis for spotting this problem and reporting it. The fix was to straighten out how items are placed on and removed from the file stack. Regressions as well as the provided test case helped to straighten out all code paths. valgrind was used to make sure all memory allocated was freed. Sorry for not solving this earlier. I got distracted. Added the ntest23 regression test, which is mainly a copy of ntest22, but with a few juicy errors thrown in, to replicate the kind of error that atis spotted. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109309 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-17Fix a logic flaw in the code that stores lock info which is displayedmmichelson1-1/+1
via the "core show locks" command. The idea behind this section of code was to remove the previous lock from the list if it was a trylock that had failed. Unfortunately, instead of checking the status of the previous lock, we were referencing the index immediately following the previous lock in the lock_info->locks array. The result of this problem, under the right circumstances, was that the lock which we currently in the process of attempting to acquire could "overwrite" the previous lock which was acquired. While this does not in any way affect typical operation, it *could* lead to misleading "core show locks" output. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109226 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-17Update the directory of placed calls on skinny phones ↵mvanbaak1-0/+1
when dialing a channel that does not provide progress (analog ZAP lines) The phone does handle the double update on calls to channels that do provide progress and wont insert duplicate items (closes issue #12239) Reported by: DEA Patches: chan_skinny-call-log.txt uploaded by DEA (license 3) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109171 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-17200 OKs in response to a reinvite need to be sent reliably. If the remote ↵file1-1/+1
side does not receive one the dialog will be torn down. (closes issue #12208) Reported by: atrash git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109107 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-17Backport revision 106439 from trunk. I didn't realize this was broken in ↵qwell1-41/+71
1.4 as well. Closes issue #12222. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109057 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-16add missing break to case AST_CONTROL_SRCUPDATEmvanbaak1-0/+1
(closes issue #12228) Reported by: andrew Patches: SRC.patch uploaded by andrew (license 240) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108961 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-14Fix a channel name issue. chan_oss registers the "Console" channel type,russell1-1/+1
but it created channels with an "OSS" prefix. (closes issue #12194, reported by davidw, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108796 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-14Update the SuSE init script to start networking before asterisk, as well.russell1-1/+1
(closes issue #12200, reported by and change suggested by reinerotto) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108792 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-14Fix a race condition in the SIP packet scheduler which could cause a crash.mmichelson1-6/+27
chan_sip uses the scheduler API in order to schedule retransmission of reliable packets (such as INVITES). If a retransmission of a packet is occurring, then the packet is removed from the scheduler and retrans_pkt is called. Meanwhile, if a response is received from the packet as previously transmitted, then when we ACK the response, we will remove the packet from the scheduler and free the packet. The problem is that both the ACK function and retrans_pkt attempt to acquire the same lock at the beginning of the function call. This means that if the ACK function acquires the lock first, then it will free the packet which retrans_pkt is about to read from and write to. The result is a crash. The solution: 1. If the ACK function fails to remove the packet from the scheduler and the retransmit id of the packet is not -1 (meaning that we have not reached the maximum number of retransmissions) then release the lock and yield so that retrans_pkt may acquire the lock and operate. 2. Make absolutely certain that the ACK function does not recursively lock the lock in question. If it does, then releasing the lock will do no good, since retrans_pkt will still be unable to acquire the lock. (closes issue #12098) Reported by: wegbert (closes issue #12089) Reported by: PTorres Patches: 12098-putnopvutv3.patch uploaded by putnopvut (license 60) Tested by: jvandal git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108737 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-14Fix a potential segfault if chan (or chan->music_state) is NULL.qwell1-13/+16
Closes issue #12210, credit to edantie for pointing this out. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108682 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-13Fix another issue that was causing crashes in chanspy. This introduces a newrussell3-1/+32
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-13Make a tweak that gets the LEDs on polycom phones to blink when an extension ↵russell1-1/+1
that has been subscribed to goes on hold. Otherwise, they just stay on like it does when an extension is in use. (closes issue #11263) Reported by: russell Patches: notify_hold.rev1.txt uploaded by russell (license 2) Tested by: russell git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108530 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-12Change AST_SCHED_DEL use to ast_sched_del for autocongestion in chan_sip.mmichelson1-3/+3
The scheduler callback will always return 0. This means that this id is never rescheduled, so it makes no sense to loop trying to delete the id from the scheduler queue. If we fail to remove the item from the queue once, it will fail every single time. (Yes I realize that in this case, the macro would exit early because the id is set to -1 in the callback, but it still makes no sense to use that macro in favor of calling ast_sched_del once and being done with it) This is the first of potentially several such fixes. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108288 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Added a large comment before the AST_SCHED_DEL macro to explain its purpose ↵mmichelson1-2/+20
as well as when it is appropriate and when it is not appropriate to use it. I also removed the part of the debug message that mentions that this is probably a bug because there are some perfectly legitimate places where ast_sched_del may fail to delete an entry (e.g. when the scheduler callback manually reschedules with a new id instead of returning non-zero to tell the scheduler to reschedule with the same idea). I also raised the debug level of the debug message in AST_SCHED_DEL since it seems like it could come up quite frequently since the macro is probably being used in several places where it shouldn't be. Also removed the redundant line, file, and function information since that is provided by ast_log. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108227 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12(closes issue #12187, reported by atis, fixed by me after some brainstormingrussell2-9/+16
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-12if we receive an INVITE with a Content-Length that is not a valid number, or ↵kpfleming1-0/+15
is zero, then don't process the rest of the message body looking for an SDP closes issue #11475 Reported by: andrebarbosa git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108086 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Add a trigger mode that triggers on both read and write. The actual function ↵file3-15/+42
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-12Destroy the channel lock after the channel datastores.russell1-1/+2
(inspired by issue #12187) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108031 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Document all of the possible realtime fieldstilghman2-4/+83
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107877 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Update documentation for pgsql ODBC voicemail.qwell1-24/+50
(closes issue #12186) Reported by: jsmith Patches: vm_pgsql_doc_update.patch uploaded by jsmith (license 15) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107826 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Copy voicemail dependency logic for res_adsi to chan_gtalk (for jabber).qwell1-0/+7
(closes issue #12014) Reported by: junky git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107714 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11get chan_vpb to build properly in dev modekpfleming2-3/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107713 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-11Make sure the visible indication is on the right channel so when the ↵file1-0/+1
masquerade happens the proper indication is enacted. (closes issue #11707) Reported by: iam git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107646 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