aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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-07* Add a bit more of a verbose comment as to why a hangup frame needs to berussell1-16/+30
queued up if autoservice gets a NULL return from ast_read(). * Make the process of queueing the hangup frame more efficient by putting the frame where it is going to end up and avoiding some locking and extra memory allocations and freeing. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91777 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07Hangups that happen during autoservice were not processed appropriately. This ismmichelson1-1/+4
because a hangup actually causes a NULL frame to be received, not a hangup frame. Queueing a hangup if we receive a NULL frame during autoservice corrects this problem (closes issue #11467, reported by jmls, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91737 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-07At the end of a call, when we're reporting, RTCP may already be partially ↵tilghman1-8/+22
torn down, so check for NULL dereference Reported by: blitzrage Patch by: tilghman (Closes issue #11450) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91637 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-06Add a new module flag to indicate that a build sum is present. Modules builtrussell2-4/+7
against older Asterisk 1.4 headers will now load properly with just a warning indicating that they are old and may cause problems. (patch by paravoid) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91501 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Fix various in the udptl implementation. It could return empty modem frames, ↵file1-26/+19
have an incorrect sequence number on packets, and display the wrong sequence number in the debug messages. (closes issue #11228) Reported by: Cache Patches: udptl-4.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91450 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Add support for accepting and sending T.38 in the initial INVITE.file1-0/+18
(closes issue #9402) Reported by: thdei git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91439 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Make sure logger is reloaded at general reload in the cli.oej3-6/+18
(Discovered during Asterisk training in Portugal) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91366 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-05Upgrade to the latest version of extra soundstilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91237 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Make the lock in the threadstorage debugging code untracked to avoid a deadlockrussell1-11/+13
on thread destruction. (closes issue #11207) Reported by: ys Patches: threadstorage.c.diff uploaded by ys (license 281) Also fixes an open bug report: (closes issue #11446) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91192 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05When DEBUG_THREADS is enabled, we only have the details about who is holdingrussell1-0/+4
a lock that we are waiting on for a mutex, not rwlocks. This should fix the problem where people have reported "core show locks" crashing sometimes. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91074 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Fix some crashes in chan_iax2 that were reported as happening on Mac systems.russell1-2/+2
It turns out that the problem was the Mac version of the ast_atomic_fetchadd_int() function. The Mac atomic add function returns the _new_ value, while this function is supposed to return the old value. So, the crashes happened on unreferencing objects. If the reference count was decreased to 1, ao2_ref() thought that it had been decreased to zero, and called the destructor. However, there was still an outstanding reference around. (closes issue #11176) (closes issue #11289) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91070 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-04Modify file.h to maintain API compatibility with earlier versions. If a recentrussell5-2/+70
compiler is being used, then a warning will show up for any modules still using the old name "private" instead of "_private". (patch suggested by paravoid) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91032 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-04Make some changes to some additions I made recently for doing channel ↵russell1-19/+9
autoservice when looking up extensions. This code was added to handle the case where a dialplan switch was in use that could block for a long time. However, the way that I added it, it did this for all extension lookups. However, lookups in the in-memory tree of extensions should _not_ take long enough to matter. So, move the autoservice stuff to be only around executing a switch. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90967 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-04If we fail to create a channel after allocating a timing fd, we need to make ↵qwell1-0/+4
sure to close it. Issue 11454, patch by eliel. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90876 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-03Solaris requires the inclusion of sys/loadavg.h for getloadavg().tilghman1-0/+1
Reported by: snuffy Patch by: snuffy,tilghman (Closes issue #11430) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90753 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03If both dbhost and dbsock were not set, a NULL deref could resulttilghman1-1/+3
Reported by: xrg Patch by: tilghman (Closes issue #11387) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90736 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03A big one...mmichelson8-73/+267
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-03Changing some bad logic when calculating the interdigit timeout.mmichelson1-1/+1
(closes issue #11402, reported and patched by eferro) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90639 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03Fix crash in ParkAndAnnounce application.qwell1-1/+1
Issue #11436, reported by lytledd, patch by eliel. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90607 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03Do not create a smoother for G723.1 frames, they need to be left alone to ↵file1-1/+1
their native 20/24 byte size. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90588 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03Preserve the indication currently playing on a channel when a masquerade ↵file3-2/+12
operation happens. (issue #BE-88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90548 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03Only log debug messages if debug is enabled.qwell1-33/+54
Closes issue #11416, patch by casper. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90546 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-12-02Clarify the return value on autoservice. Specifically, if you startedtilghman1-7/+11
autoservice and autoservice was already on, it would erroneously return an error. Reported by: adiemus Patch by: dimas (Closes issue #11433) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30Change the behavior of ao2_link(). Previously, in inherited a reference.russell5-18/+23
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-30Add some notes on the behavior of ao2_unlink() after a discussion with Tilghmanrussell1-1/+18
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90310 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30Fix locking issues under one legged replaces scenarios.file1-3/+6
(closes issue #11420) Reported by: irroot Patches: chan_sip_oneleg.patch uploaded by irroot (license 52) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90269 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30Clear the DTMF buffer if the call times out.mmichelson1-0/+1
(closes issue #11418, reported and patched by eferro) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90231 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29Properly escape cdr->src and cdr->dst and ensure we use thread-safe escapingtilghman1-11/+16
(Fixes AST-2007-026) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90166 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-29Properly escape input buffers (Fixes AST-2007-025)tilghman1-13/+66
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90160 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29Use of "private" as a field name in a header file messes with C++ projectstilghman9-22/+22
Reported by: chewbacca Patch by: casper (Closes issue #11401) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90155 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29Upgrade the core sounds release versiontilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90154 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29fix some formatting i accidentally changedrussell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90147 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29This set of changes is to make some callerID handling thread-safe.russell3-4/+17
The ast_set_callerid() function needed to lock the channel. Also, the handlers for the CALLERID() dialplan function needed to lock the channel when reading or writing callerid values directly on the channel structure. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90145 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29Merge a change from team/russell/chan_refcount ...russell2-3/+13
This makes ast_stopstream() thread-safe. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90142 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-28it is impossible to set permissions for manager accounts created by ↵kpfleming2-2/+14
users.conf (reported internally, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90098 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28Removing some seemingly pointless code. This sets a channel variable for ↵mmichelson1-6/+0
every priority executed in the dialplan if you have debug set to anything non-zero. This seems pointless due to the fact that these channel variables are not referenced anywhere else in the code and their names are esoteric enough that they would not be practical to reference in the dialplan. Plus the fact that this behavior isn't documented anywhere means that the change is not likely to cause any disruption. If anything, this may actually cause a slight performance increase if running with debug on. The motivating influence for this code change is the eventwhencalled option for queues. If set to vars, all channel variables will be output to the manager. These unnecessary channel variables make the output a lot more difficult to deal with. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90059 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