Commit Graph

11816 Commits

Author SHA1 Message Date
Russell Bryant
828c0c1035 Fix a typo, update a reload command, and remove an unused configuration file.
(closes issue #10606, casper)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 15:33:48 +00:00
Joshua Colp
d080d7bfc4 (closes issue #10603)
Reported by: jmls
Patches:
      pbx.diff uploaded by jmls (license 141)
Backport changes from 81372. Add REASON dialplan variable for when an originated call fails and the failed extension is executed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 14:53:43 +00:00
Christian Richter
f4126ffe68 Fixed some warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 14:43:33 +00:00
Joshua Colp
a47dcc167c (issue #10599)
Reported by: dimas
Handle the -1 control subclass during feature dialing (it indicates to stop sounds).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 14:23:40 +00:00
Christian Richter
6576e93697 Fixed a severe issue where a misdn_read would lock the channel, but read would
not return because it blocks. later chan_misdn would try to queue a frame like
a AST_CONTROL_ANSWER which could result in a deadlock situation. misdn_read
will now not block forever anymore, and we don't queue the ANSWER frame at all
when we already was called with misdn_answer -> answer would be called twice.

Also we don't explicitly send a RELEASE_COMPLETE on receiption of a RELEASE
anymore, because mISDN does that for us, this resulted in a problem on some
switches, which would block our port after some calls for a short while.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 08:31:59 +00:00
Mark Michelson
dbe2d229a5 This patch, in essence, will correctly pause a realtime queue member and reflect those
changes in the realtime engine.

(issue #10424, reported by irroot, patch by me)

This patch creates a new function called update_realtime_member_field, which is a generic
function which will allow any one field of a realtime queue member to be updated. This patch
only uses this function to update the paused status of a queue member, but it lays the foundation
for persisting the state of a realtime member the same way that static members' state is maintained
when using the persistentmembers setting



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 16:35:29 +00:00
Mark Michelson
872ab1519e Changed some tabs to spaces
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 16:08:09 +00:00
Russell Bryant
8399112981 If chan_h323 is not being built, don't use g++ to do the final link of Asterisk.
(in response to a question on the asterisk-dev list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 15:57:29 +00:00
Mark Michelson
2772c71560 This fix creates a more accurate way of detecting whether realtime members were deleted.
(closes issue 10541, reported by Alric, patched by me)

The REALLY nice things about this patch is that queue members now have a "realtime" field
which will be true if the member is a realtime member. This means we can check this value
prior to certain processing if it should ONLY be done for realtime members.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 15:52:42 +00:00
Joshua Colp
8fcc537329 (closes issue #9690)
Reported by: mattv
Make rtp timeouts work even if two RTP streams are directly bridged in the RTP stack.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 14:13:55 +00:00
Russell Bryant
587478ac3f Change the message about receiving a mini-frame before the first full voice
frame to a DEBUG message.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 21:38:26 +00:00
Russell Bryant
dce43f8d32 revert unintentional changes in rev 81226
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 15:43:18 +00:00
Russell Bryant
9b1802ffa3 Add Russian tones. (closes issue #7953, hanabana)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 15:41:15 +00:00
Mark Michelson
ee44807d4b Fixes a forwarding problem when using res_config_mysql
(closes issue #10573, reported by chrisvaughan, patch suggested by chrisvaughan as well)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 14:12:14 +00:00
Mark Michelson
214d980f86 Resolve a potential deadlock. In this case, a single queue is locked, then the queue list. In changethread(), the queue list is
locked, and then each individual queue is locked. Under the right circumstances, this could deadlock. As such, I have unlocked
the individual queue before locking the queue list, and then locked the queue back after the queue list is unlocked.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 22:40:19 +00:00
Mark Michelson
284c7cde35 DTMF begin frames should be ignored so that when an agent acks a call with the '#' key,
he doesn't cause a queue's announce file to be interrupted. Also went ahead and did the
same for the '*' key and for ending a call.

(closes issue #10528, reported by deskhack, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 21:08:48 +00:00
Russell Bryant
a9c8aa431f Add a \todo to note that this module leaks most of the memory it allocates on
unload and should be fixed (when I'm not in the middle of something else ...).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 17:27:48 +00:00
Russell Bryant
264aeeca70 explicity define a variable as a boolean
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 16:38:33 +00:00
Russell Bryant
6e01a4ddaf (closes issue #10419)
Reported by: mustardman
Patches:
      asterisk-mohposition.diff.txt uploaded by jamesgolovich (license 176)

This patch fixes a few problems with music on hold.
 * Fix issues with starting at the beginning of a file when it shouldn't.
 * Fix the inuse counter to be decremented even if the class had not been
   set to be deleted when not in use anymore
 * Don't arbitrarily limit the number of MOH files to 255


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 16:16:25 +00:00
Joshua Colp
7a47ac4960 (closes issue #10561)
Reported by: jesselang
Patches:
      chan_sip-ChannelReload-20080825.patch uploaded by jesselang (license 202)
Remove an extra \r\n to make the ChannelReload event conform with every other event.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 15:01:59 +00:00
Mark Michelson
fe5489eead Found a case where the queue's membercount is off. It does not take into account dynamic members on a reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 14:55:44 +00:00
Joshua Colp
968be2def2 (closes issue #10562)
Reported by: idkpmiller
Correct jitter value output in the CLI to be as expected.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 13:20:31 +00:00
Russell Bryant
73275955bb Remove an extra signal_condition() for the scheduler thread.
(closes issue #10564, patch from casper)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-26 18:11:26 +00:00
Russell Bryant
f3d98a5f3c Fix some issues with the handling of the scheduler in chan_iax2. Most of the
places that scheduled items to be executed by the scheduler thread did not
signal the scheduler thread to wake up so that it could recalculate the time
until the next action.  These changes will make the scheduler thread more
responsive and ensure that actions get executed as close to when intended as
possible instead of it being possible for very long delays.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-25 17:37:39 +00:00
Dwayne M. Hubbard
5155d31036 An empty string is an empty callerid ... so zap it. This closes issue #10502, which was pointed out by dswartz. Thank you, and may the swartz be with you
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 22:59:52 +00:00
Russell Bryant
a4e418458b If dnsmgr is in use, and no DNS servers are available when Asterisk first
starts, then don't give up on poking peers.  Allow the poke to get rescheduled
so that it will work once the dnsmgr is able to resolve the host.
(closes issue #10521, patch by jamesgolovich)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 21:22:50 +00:00
Russell Bryant
1959929a2a Improve the debouncing logic in the DTMF detector to fix some reliability
issues.  Previously, this code used a shift register of hits and non-hits.
However, if the start of the digit isn't clean, it is possible for the
leading edge detector to miss the digit.  These changes replace the flawed
shift register logic and also does the debouncing on the trailing edge as well.
(closes issue #10535, many thanks to softins for the patch)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 20:24:05 +00:00
BJ Weschke
318f0f6e46 A minor correction to the available logic of autofill. If a queue member is paused, they're not really "available" so don't count them as such. Somewhat related to issue #10155
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 19:52:06 +00:00
Steve Murphy
d96548ab3c From a complaint by jmls, I realize that the message in cdr_disposition is unnecessary. To get failure disposition, just return -1; no use having more than one case do that.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 18:52:15 +00:00
Mark Michelson
09fc9c894e Fix a possible crash in IMAP voicemail.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 15:51:03 +00:00
Tilghman Lesher
02d6a884bb Make the deprecation warning inline with the code, instead of only in documentation (closes issue #10549)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 15:41:43 +00:00
Russell Bryant
e56cb20774 Tweak the formatting of this MODULEINFO block. I think this would have caused
a "*" to get in the menuselect-tree file.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 15:28:05 +00:00
Steve Murphy
3e5c8457e1 This change addresses JerJer's complaint that aelparse builds and installs even if pbx_ael is unchecked in the menuselect stuff.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 14:48:49 +00:00
Steve Murphy
765b1af228 backport of 80649, a fix to an unreported problem in the ael parser, that results in a crash on a 64bit machine
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 13:20:18 +00:00
Philippe Sultan
0518339c30 Closes issue #10509
Googletalk calls are answered too early, which results in CDRs wrongly
stating that a call was ANSWERED when the calling party cancelled a
call before before being established.

We must not answer the call upon reception of a 'transport-accept' iq
packet, but this packet still needs to be acknowledged, otherwise the
remote peer would close the call (like in #8970).

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 11:42:46 +00:00
Dwayne M. Hubbard
2aff2acf0a make misdn/isdn_lib compile without warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 21:34:16 +00:00
Dwayne M. Hubbard
4cf31ac7e1 make chan_misdn compile without warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 21:07:50 +00:00
Russell Bryant
ed6d4ec72c When executing a dynamic feature, don't look it up a second time by digit pattern
after we already looked it up by name.  This causes broken behavior if there is
more than one feature defined with the same digit pattern.
(closes issue #10539, reported by bungalow, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 20:16:41 +00:00
Russell Bryant
7b1aaf8791 Revert very broken fix for issue #10540 ... none of these values take ms so I
don't know what I was thinking


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 19:29:44 +00:00
Russell Bryant
e5be9cb65f Fix func_timeout to take values in floating point so 1.5 actually means
1.5 seconds instead of being rounded.
(closes issue #10540, reported by spendergrass, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 19:21:53 +00:00
Jason Parker
4037855a28 *sigh*
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 17:14:05 +00:00
Jason Parker
64bec1f2e3 use autotagged externals
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 17:11:48 +00:00
Kevin P. Fleming
9a118809b4 report the actual channel number that was unregistered, instead of assuming that the interface list consists of channels 1 through <x> with no gaps in the sequence
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 17:08:25 +00:00
Russell Bryant
a44c1d55a2 Fix some code where it was possible for a reference to a peer to not get
released when it should.  Thank you to Marta Carbone for pointing this out!


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 17:02:50 +00:00
Russell Bryant
b2c65cf51d This is a hack to maintain old behavior of chan_iax2. This ensures that if
the peers and users are being stored in a linked list, that they go in the
list in the same order that the older code used.  This is necessary to maintain
the behavior of which peers and users get matched when traversing the container.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 16:53:52 +00:00
Russell Bryant
fa1bc2a13b Revert res_agi fix that didn't quite work until we get it right ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 15:49:28 +00:00
Russell Bryant
e8c2f715b5 Add some more documentation on iterating ao2 containers. The documentation
implies that is possible to miss an object or see an object twice while
iterating.  After looking through the code and talking with mmichelson, I have
documented the exact conditions under which this can happen (which are rare and
harmless in most cases).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 22:54:03 +00:00
Russell Bryant
851b4e474c When converting this code to use the list macros, I changed it so objects are
added to the head of a bucket instead of the tail.  However, while looking over
code with mmichelson, we noticed that the algorithm used in ao2_iterator_next
requires that items are added to the tail.  This wouldn't have caused any huge
problem, but it wasn't correct.  It meant that if an object was added to a
container while you were iterating it, and it was added to the same bucket that
the current element is in, then the new object would be returned by 
ao2_iterator_next, and any other objects in the bucket would be bypassed in
the traversal.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 22:40:27 +00:00
Russell Bryant
c5cf1e50ac Don't crash when using realtime in chan_sip without an insecure setting in the database.
(closes issue #10348, reported by link55, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 21:00:44 +00:00
Russell Bryant
566371bd50 Merge changes from team/russell/iax_refcount.
This set of changes fixes problems with the handling of iax2_user and iax2_peer
objects.  It was very possible for a thread to still hold a reference to one of
these objects while a reload operation tries to delete them.  The fix here is to
ensure that all references to these objects are tracked so that they can't go away
while still in use.

To accomplish this, I used the astobj2 reference counted object model.  This
code has been in one of Luigi Rizzo's branches for a long time and was primarily
developed by one of his students, Marta Carbone.  I wanted to go ahead and bring
this in to 1.4 because there are other problems similar to the ones fixed by these
changes, so we might as well go ahead and use the new astobj if we're going to go
through all of the work necessary to fix the problems.

As a nice side benefit of these changes, peer and user handling got more efficient.
Using astobj2 lets us not hold the container lock for peers or users nearly as long
while iterating.  Also, by changing a define at the top of chan_iax2.c, the objects
will be distributed in a hash table, drastically increasing lookup speed in these
containers, which will have a very big impact on systems that have a large number of
users or peers.

The use of the hash table will be made the default in trunk.  It is not the default
in 1.4 because it changes the behavior slightly.  Previously, since peers and users
were stored in memory in the same order they were specified in the configuration file,
you could influence peer and user matching order based on the order they are specified
in the configuration.  The hash table does not guarantee any order in the container,
so this behavior will be going away.  It just means that you have to be a little
more careful ensuring that peers and users are matched explicitly and not forcing
chan_iax2 to have to guess which user is the right one based on secret, host, and
access list settings, instead of simply using the username.

If you have any questions, feel free to ask on the asterisk-dev list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 20:21:36 +00:00