https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r79756 | russell | 2007-08-16 16:29:24 -0500 (Thu, 16 Aug 2007) | 11 lines
Fix more deadlocks in chan_iax2 that were introduced by making frame handling
and scheduling multi-threaded. Unfortunately, we have to do some expensive
deadlock avoidance when queueing frames on to the ast_channel owner of the IAX2
pvt struct. This was already handled for regular frames, but ast_queue_hangup
and ast_queue_control were still used directly. Making these changes introduced
even more places where the IAX2 pvt struct can disappear in the context of a
function holding its lock due to calling a function that has to unlock/lock it
to avoid deadlocks. I went through and fixed all of these places to account for
this possibility.
(issue #10362, patch by me)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79764 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r79276 | russell | 2007-08-13 15:18:30 -0500 (Mon, 13 Aug 2007) | 4 lines
Release the pvt lock before calling find_peer in register_verify to avoid a
deadlock. Also, remove some unnecessary locking in auth_fail that was only done
recursively.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79277 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r79272 | russell | 2007-08-13 14:27:39 -0500 (Mon, 13 Aug 2007) | 9 lines
I am fighting deadlocks in chan_iax2. I have tracked them down to a single
core issue. You can not call find_callno() while holding a pvt lock as this
function has to lock another (every) other pvt lock. Doing so can lead to a
classic deadlock. So, I am tracking down all of the code paths where this
can happen and fixing them.
The fix I committed earlier today was along the same theme. This patch fixes
some code down the path of authenticate_reply.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79273 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r79214 | russell | 2007-08-13 10:28:13 -0500 (Mon, 13 Aug 2007) | 4 lines
Fix a potential deadlock in socket_process. check_provisioning can eventually
call find_callno. You can't hold a pvt lock while calling find_callno because
it goes through and locks every single one looking for a match.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79222 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r79174 | file | 2007-08-13 11:18:04 -0300 (Mon, 13 Aug 2007) | 4 lines
(closes issue #10437)
Reported by: haklin
Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79175 f38db490-d61c-443f-a65b-d21fe96a405b
the mailbox context. Now, all related MWI event dealings pay attention
to the context as well.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78747 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r78063 | russell | 2007-08-03 12:01:07 -0500 (Fri, 03 Aug 2007) | 4 lines
Only pass through HOLD and UNHOLD control frames when the mohinterpret option
is set to "passthrough". This was pointed out by Kevin in the middle of a
training session.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78064 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r78028 | russell | 2007-08-02 21:04:22 -0500 (Thu, 02 Aug 2007) | 6 lines
Don't reuse the timespec that was set to 0 in the previous timedwait as it
will just return immediately. Also, fix some logic so the thread's lock
isn't unlocked twice in the weird case of dynamic threads getting acquired
right after a timeout.
(pointed out by SteveK)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78029 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77949 | russell | 2007-08-02 14:25:14 -0500 (Thu, 02 Aug 2007) | 5 lines
Fix the case where a dynamic thread times out waiting for something to do
during the first time it runs. This shouldn't ever happen, but we should
account for it anyway.
(pointed out by pete, who works with mihai)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77950 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77943 | russell | 2007-08-02 13:04:43 -0500 (Thu, 02 Aug 2007) | 9 lines
Fix another race condition in the handling of dynamic threads. If the dynamic
thread timed out waiting for something to do, but was acquired to perform an
action immediately afterwords, then wait on the condition again to give the
other thread a chance to finish setting up the data for what action this thread
should perform. Otherwise, if it immediately continues, it will perform the
wrong action.
(reported on IRC by mihai, patch by me)
(related to issue #10289)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77944 f38db490-d61c-443f-a65b-d21fe96a405b
trunk version of find_idle_thread() where the old full frame processing
information was not cleared out. This would have caused full frames to get
deferred for processing by threads that weren't actually processing frames for
that call. Nice catch!!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77941 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77939 | russell | 2007-08-02 11:56:04 -0500 (Thu, 02 Aug 2007) | 4 lines
Add another sanity check to vnak_retransmit(). This check ensures that frames
that have already been marked for deletion don't get retransmitted.
(closes issue #10361, patch from mihai)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77940 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77887 | russell | 2007-08-01 17:16:17 -0500 (Wed, 01 Aug 2007) | 23 lines
Fix some race conditions which have been causing weird problems in chan_iax2.
The most notable problem is that people have been seeing storms of VNAK frames
being sent due to really old frames mysteriously being in the retransmission
queue and never getting removed.
It was possible that a dynamic thread got created, but did not acquire its lock
before the thread that created it signals it to perform an action. When this
happens, the thread will sleep until it hits a timeout, and then get destroyed.
So, the action never gets performed and in some cases, means a frame doesn't
get transmitted and never gets freed since the scheduler never gets a chance
to reschedule transmission.
Another less severe race condition is in the handling of a timeout for a dynamic
thread. It was possible for it to be acquired to perform at action at the same
time that it hit a timeout. When this occurs, whatever action it was acquired
for would never get performed.
(patch contributed by Mihai and SteveK)
(closes issue #10289)
(closes issue #10248)
(closes issue #10232)
(possibly related to issue #10359)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77889 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77794 | russell | 2007-07-30 15:16:43 -0500 (Mon, 30 Jul 2007) | 8 lines
Fix an issue that could potentially cause corruption of the global iax frame
queue. In the network_thread() loop, it traverses the list using the
AST_LIST_TRAVERSE_SAFE macro. However, to remove an element of the list within
this loop, it used AST_LIST_REMOVE, instead of AST_LIST_REMOVE_CURRENT, which I
believe could leave some of the internal variables of the SAFE macro invalid.
Mihai says that he already made this change in his local copy and it didn't help
his VNAK storm issues, but I still think it's wrong. :)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77797 f38db490-d61c-443f-a65b-d21fe96a405b
At first sight (but the function is very large so i am not 100% sure)
the code seems correct, so maybe my compiler is just not smart
enough to figure that out at the optimization level it has.
Not worthwhile merging to 1.4 i believe.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77156 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r76485 | russell | 2007-07-23 07:25:01 -0500 (Mon, 23 Jul 2007) | 6 lines
Use a signed integer for storing the number of bytes in the packet read from
the network. Using an unsigned value here made it impossible to handle an
error returned from recvfrom(). Furthermore, in the case that recvfrom()
did return an error, this would cause a crash due to a heap overflow.
(closes issue #10265, reported by and fix suggested by timrobbins)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76486 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75928 | russell | 2007-07-19 10:53:15 -0500 (Thu, 19 Jul 2007) | 14 lines
Merged revisions 75927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75927 | russell | 2007-07-19 10:49:42 -0500 (Thu, 19 Jul 2007) | 6 lines
When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75929 f38db490-d61c-443f-a65b-d21fe96a405b
list were not destroyed when the module is unloaded. However, after reading
the code related to the use of this list a lot today, I realized that it isn't
necessary. So, I have added a comment to explain why it isn't necessary.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75806 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75759 | russell | 2007-07-18 16:09:46 -0500 (Wed, 18 Jul 2007) | 13 lines
Merged revisions 75757 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75757 | russell | 2007-07-18 16:09:13 -0500 (Wed, 18 Jul 2007) | 5 lines
When traversing the queue of frames for possible retransmission after
receiving a VNAK, handle sequence number wraparound so that all frames that
should be retransmitted actually do get retransmitted.
(issue #10227, reported and patched by mihai)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75761 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75445 | russell | 2007-07-17 15:48:21 -0500 (Tue, 17 Jul 2007) | 13 lines
Merged revisions 75444 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75444 | russell | 2007-07-17 15:45:27 -0500 (Tue, 17 Jul 2007) | 5 lines
Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75446 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r74767 | russell | 2007-07-11 17:57:07 -0500 (Wed, 11 Jul 2007) | 13 lines
Merged revisions 74766 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r74766 | russell | 2007-07-11 17:53:26 -0500 (Wed, 11 Jul 2007) | 5 lines
The function make_trunk() can fail and return -1 instead of a valid new call
number. Fix the uses of this function to handle this instead of treating it
as the new call number. This would cause a deadlock and memory corruption.
(possible cause of issue #9614 and others, patch by me)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74769 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r73551 | russell | 2007-07-05 17:31:31 -0500 (Thu, 05 Jul 2007) | 6 lines
* Store the call number that a thread is processing without the full frame bit
set to ease debugging
* When deferring a full frame for processing, stick it into the queue for the
thread that is processing frames for that call, not the one that read the
current frame and is about to go back into the idle list
(related to issue #9937)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73552 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r70866 | russell | 2007-06-21 16:07:04 -0500 (Thu, 21 Jun 2007) | 5 lines
If a full frame is received while one of the iax2 threads is in the middle
of handling a full frame for the same call, queue it up for processing by that
same thread later instead of dropping it.
(issue #9937, patch by me)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70877 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r68313 | kpfleming | 2007-06-07 17:14:35 -0500 (Thu, 07 Jun 2007) | 6 lines
some improvements to the IAX2 full frame dropping logic recently added:
- use inaddrcmp(), since we have it
- output the type of frame and subclass being dropped, and the type/subclass that is already being processed (which caused the drop)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68321 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67270 | kpfleming | 2007-06-05 09:35:52 -0500 (Tue, 05 Jun 2007) | 3 lines
ensure that a burst of full frames (AST_FRAME_DTMF being the prime example) will not be processed out of order... this is a brute force fix, but seems to be the safest fix for now (thanks to the Digium PQ department for finding this bug)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67271 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67158 | russell | 2007-06-04 18:31:40 -0500 (Mon, 04 Jun 2007) | 5 lines
Fix up a bunch of places where the iax2 pvt structure can disappear and the
code did not account for it and crashes.
(issues #9642, #9569, #9666, probably others ... based on the work by
stevedavies and mihai, with additional changes from me)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67160 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67119 | russell | 2007-06-04 17:28:55 -0500 (Mon, 04 Jun 2007) | 6 lines
Add comments for two functions that get called with the appropriate call locked,
but perform operations that could result in the pvt structure getting destroyed
before returning again, causing numerous seg faults all over the module.
(inspired by issues #9642, #9569, and #9666, and the work done by stevedavies
and mihai)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67120 f38db490-d61c-443f-a65b-d21fe96a405b
over from my attempt at putting pvt structs in a hash table. It can cause
seg faults, and has no reason to stay.
(issue #9642, pointed out by stevedavies)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67070 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67020 | russell | 2007-06-04 10:47:40 -0500 (Mon, 04 Jun 2007) | 7 lines
Resolve a deadlock in chan_iax2. When handling an implicit ACK to a frame that
was marked as the final transmission for a call, don't call iax2_destroy() for
that call while the global frame queue is still locked. There is a very nice
explanation of the deadlock in the report.
(issue #9663, thorough report and patch from stevedavies, additional positive
test reports from mihai and joff_oconnell)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67022 f38db490-d61c-443f-a65b-d21fe96a405b
places in the code where the same block of code for creating detached threads
was replicated. (patch from bbryant)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65968 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r65679 | kpfleming | 2007-05-23 16:30:24 -0400 (Wed, 23 May 2007) | 2 lines
don't start a PBX on a new incoming IAX2 channel until we have some sort of response to our ACCEPT (ACK or anything else)
........
r65680 | kpfleming | 2007-05-23 16:35:50 -0400 (Wed, 23 May 2007) | 2 lines
clear the 'delay PBX' flag when we are ready to start the PBX
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65681 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r62692 | tilghman | 2007-05-02 12:43:48 -0500 (Wed, 02 May 2007) | 12 lines
Merged revisions 62691 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r62691 | tilghman | 2007-05-02 12:38:16 -0500 (Wed, 02 May 2007) | 4 lines
Issue 9638 - if a text frame is sent with no terminating NULL through a bridged
IAX connection, the remote end will receive garbage characters tacked onto the
end.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@62693 f38db490-d61c-443f-a65b-d21fe96a405b
file doc/qos.tex has been updated to document the new functionality.
(issue #9540, patch submitted by IgorG)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@62457 f38db490-d61c-443f-a65b-d21fe96a405b
This set of changes introduces a new generic event API for use within Asterisk.
I am still working on a way for events to be shared between servers, but this
part is ready and can already be used inside of Asterisk.
This set of changes introduces the first use of the API, as well. I have
restructured the way that MWI (message waiting indication) is handled. It is
now event based instead of polling based. For example, if there are a bunch
of SIP phones subscribed to mailboxes, then chan_sip will not have to
constantly poll the mailboxes for changes. app_voicemail will generate events
when changes occur.
See UPGRADE.txt and CHANGES for some more information on the effects of these
changes from the user perspective. For developer information, see the text in
include/asterisk/event.h.
As always, additional feedback is welcome on the asterisk-dev mailing list.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@62292 f38db490-d61c-443f-a65b-d21fe96a405b
This set of changes adds OSP support to chan_iax2. However, I have modified
the patch a bit from what was submitted. You now use the CHANNEL() function
to get and set the OSP token for IAX2.
(issue #8531, reported by and original patch by homesick, patch updated by me)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61702 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r60989 | murf | 2007-04-09 12:32:07 -0600 (Mon, 09 Apr 2007) | 1 line
This is a big improvement over the current CDR fixes. It may still need refinement, but this won't have as many folks bothered.
This also adds the mods from 1.4/r.61136;
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61152 f38db490-d61c-443f-a65b-d21fe96a405b
"ChannelDriver" and "Channel", previously used to indicate channel driver. ChannelType is more
in line with "core show channeltypes"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60987 f38db490-d61c-443f-a65b-d21fe96a405b
probably others, too. I don't really have time to work on it at the moment,
so I am just going to revert it for now.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59693 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r59341 | russell | 2007-03-29 11:55:39 -0500 (Thu, 29 Mar 2007) | 8 lines
When the IAX2 read callback gets called, return NULL instead of a "null frame".
This will cause Asterisk to hangup the call instead of keep trying whatever it
was doing. Under normal conditions, this function would *never* be called.
However, the author of this patch says an error will occur that will cause it
to get called every 100 thousand calls or so. When this does happen, it puts
the channel in a loop that eventually brings down the system. So, hangup up
the call is certainly a better alternative. (issue #8286, john)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59343 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r58705 | russell | 2007-03-10 12:11:11 -0600 (Sat, 10 Mar 2007) | 6 lines
Fix a few more places in chan_iax2 where the ast_frame used for receiving a
frame was not properly initialized.
- Interpolating a frame when the jitterbuffer is in use
- decrypting a frame when IAX2 encryption is on
- frames in an IAX2 trunk
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@58706 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r58243 | russell | 2007-03-07 12:19:19 -0600 (Wed, 07 Mar 2007) | 17 lines
(This bug was reported to me by Kinsey Moore)
Merged revisions 58242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r58242 | russell | 2007-03-07 12:17:07 -0600 (Wed, 07 Mar 2007) | 7 lines
Fix a problem where the Asterisk channel name could be that of the wrong IAX2
user for a call. This is because the first step of choosing this name is to
look for an IAX2 peer that happens to have the same IP/port number that this
call is coming from and assuming that is it. However, this is not always
correct. So, I have made it change this name after authentication happens
since at that point, we have an exact match.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@58244 f38db490-d61c-443f-a65b-d21fe96a405b
There is not a large amount of code here and the changes are not very invasive.
However, they should significantly improve performance of chan_iax2 under load.
IAX2 media frames only carry the *source* call number. So, when one arrives,
the correct session that it is a part of has to be matched on IP address, port
number, and call number, instead of just a call number. Had these frames
carried the *destination* call number, this would not be an issue, because that
would be a unique identifier that would make it easy to immediately identify
the correct session.
The way that chan_iax2 did this matching was extremely inefficient. It starts
at the first available call number and traverses each call number sequentially,
locking and unlocking a mutex for each one, to try to match against it. It
would do this regardless of whether the call number was in use or not. So,
for a call with a local call number of 25000, every single incoming media
frame would require a traversal that required 25000 mutex lock and unlock
operations. (Note that the max call number is about 32k).
I have introduced a hash table of active IAX2 calls to improve this lookup
process. The hash is done on the IP address, port number, and call number.
So, for the previous example, a few lock/unlock operations may be done versus
25000 for each frame.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56447 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r56407 | russell | 2007-02-23 14:20:00 -0600 (Fri, 23 Feb 2007) | 12 lines
Merged revisions 56406 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r56406 | russell | 2007-02-23 14:17:56 -0600 (Fri, 23 Feb 2007) | 4 lines
Don't destroy mutexes before unregistering all of the entry points from the core.
Also, fix a potential memory leak from not destroying the locks for all of the
possible call numbers (about 32k of them).
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56408 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r55397 | dbailey | 2007-02-19 08:52:59 -0600 (Mon, 19 Feb 2007) | 3 lines
Changed iax2 process thread to detached to correct memory leak due to left over thread context on thread exit.
Modified module unload process to avoid deadlocks on pthread cancels
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@55409 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r52763 | russell | 2007-01-29 18:15:50 -0600 (Mon, 29 Jan 2007) | 13 lines
Merged revisions 52762 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r52762 | russell | 2007-01-29 18:15:06 -0600 (Mon, 29 Jan 2007) | 5 lines
Fix the extraction of the timestamp from video frames. It was using the
mapping for a mini-frame instead of a video-frame, which caused it to
get invalid data.
(issue #8795, mihai)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@52764 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r51311 | russell | 2007-01-19 11:49:38 -0600 (Fri, 19 Jan 2007) | 23 lines
Merge the changes from the /team/group/vldtmf_fixup branch.
The main bug being addressed here is a problem introduced when two SIP
channels using SIP INFO dtmf have their media directly bridged. So, when a
DTMF END frame comes into Asterisk from an incoming INFO message, Asterisk
would try to emulate a digit of some length by first sending a DTMF BEGIN
frame and sending a DTMF END later timed off of incoming audio. However,
since there was no audio coming in, the DTMF_END was never generated. This
caused DTMF based features to no longer work.
To fix this, the core now knows when a channel doesn't care about DTMF BEGIN
frames (such as a SIP channel sending INFO dtmf). If this is the case, then
Asterisk will not emulate a digit of some length, and will instead just pass
through the single DTMF END event.
Channel drivers also now get passed the length of the digit to their digit_end
callback. This improves SIP INFO support even further by enabling us to put
the real digit duration in the INFO message instead of a hard coded 250ms.
Also, for an incoming INFO message, the duration is read from the frame and
passed into the core instead of just getting ignored.
(issue #8597, maybe others...)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51314 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r49581 | kpfleming | 2007-01-04 17:50:15 -0600 (Thu, 04 Jan 2007) | 3 lines
create the IAX2 processing threads as background threads so they will use smaller stacks
when we create a dynamic thread, put it on the dynamic_list right away so we don't lose track of it
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49584 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r49259 | file | 2007-01-02 20:19:53 -0500 (Tue, 02 Jan 2007) | 2 lines
Check pvt structure presence before passing to send_command. This gets rid of the irritating message about a packet without pvt structure. This happens because the scheduled item is getting cancelled at almost the exact moment it is getting executed.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49260 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r48564 | file | 2006-12-18 12:15:49 -0500 (Mon, 18 Dec 2006) | 2 lines
Put thread into proper list if we abort handling due to an error, and also hold the lock while putting it back into the proper idle list so we don't prematurely get a signal. (issue #8604 reported by arkadia)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48565 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r48363 | russell | 2006-12-09 10:59:42 -0500 (Sat, 09 Dec 2006) | 8 lines
Use locking when accessing the registrations list. This list is not actually
used very often, so the likelihood of there being a problem is pretty small,
but still possible. For example, if the CLI command to list the registrations
was called at the same time that a reload was occurring and the registrations
list was getting destroyed and rebuilt, a crash could occur.
In passing, go ahead and convert this list to use the linked list macros.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48364 f38db490-d61c-443f-a65b-d21fe96a405b
frames. The function, before this commit, was roughly 1400 lines long. So, I
am working on breaking this up into functions so that the code is easier to
follow and debug. Also, I will be committing these changes in chunks as I do
them to ease tracking down any potentially introduced problems.
Break out roughly 150 lines from socket_process() and introduce a new function,
socket_process_meta() which handles the parsing of an incoming meta frame.
Also, restructure some of this code a bit to reduce the deep nesting that was
in this code.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48360 f38db490-d61c-443f-a65b-d21fe96a405b
- Use sizeof() to pass an array size to a function
- Use a single bit for a variable in the chan_iax2_pvt stuct since that is all
it needs.
- Add some comments about the iaxs, iaxl, and lastused arrays.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48359 f38db490-d61c-443f-a65b-d21fe96a405b
versions of the format string are identical. Also, since each format is only
used once, get rid of the use of defines all together. (issue #8344, julieng)
In passing, also clean up the formatting a but to get rid of the nesting
without the use of braces, as defined in the coding guidelines.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47520 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r47497 | russell | 2006-11-12 01:23:23 -0500 (Sun, 12 Nov 2006) | 12 lines
Merged revisions 47496 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r47496 | russell | 2006-11-12 01:09:03 -0500 (Sun, 12 Nov 2006) | 4 lines
Only do the check to determine whether the channel calling this function is an
IAX2 channel when getting the IP address using the special argument,
CURRENTCHANNEL. (issue #8341, jcovert)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47498 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r46775 | file | 2006-11-01 13:21:34 -0500 (Wed, 01 Nov 2006) | 2 lines
It's another round of chan_iax2 fixes! Should hopefully fix the deadlock issues people have been reporting. IAXtel now has qualify turned on for 800 peers and it is handling it fine.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46777 f38db490-d61c-443f-a65b-d21fe96a405b