Commit Graph

11491 Commits

Author SHA1 Message Date
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
Russell Bryant
99adc3f020 Juggie in #asterisk-dev was reporting problems where fgets would return
without reading  the whole line when using fastagi.  When this happens,
errno was set to EINTR or EAGAIN.  This patch accounts for the possibility
and lets fgets continue in that case.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 19:53:30 +00:00
Jason Parker
9b23ab95aa Fix a few build issues in Solaris (and likely others).
Use GREP and ID variables from autoconf.

Reported to me in #asterisk-dev
I forgot who reported this - sorry. :(


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 18:53:18 +00:00
Jason Parker
a7583cd240 Change a syntax that the GNU make in Solaris dislikes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 18:25:34 +00:00
Jason Parker
a2787080d9 Fix a bashism (we explicitly request /bin/sh).
Remove some oddly placed quotes I found in passing.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 18:06:00 +00:00
Russell Bryant
55bedc87b6 Honor the contents of the COPTS variable as custom target CFLAGS. Apparently
this is what openwrt does.  
(reported by Brian Capouch on the asterisk-dev list, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 16:21:58 +00:00
Joshua Colp
d13b192018 (closes issue #10526)
Reported by: sinistermidget
Revert commit from issue #10355 and return timestamp skew to 640. 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 16:14:38 +00:00
Russell Bryant
3c2eae9ab4 Don't record SIP dialog history if it's not turned on. Also, put an upper
limit on how many history entires will be stored for each SIP dialog.  It is
currently set to 50, but can be increased if deemed necessary.
(closes issue #10421, closes issue #10418, patches suggested by jmoldenhauer,
 patches updated by me)
(Security implications documented in AST-2007-020)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21 18:42:15 +00:00
Steve Murphy
b84f9590a0 ugh. removing the diffs from ulaw.h and alaw.h for now; accidentally added them in 80166
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21 16:39:09 +00:00
Steve Murphy
4b5a9ae533 This patch solves problem 1 in 8126; it should not slow down the alaw codec, but should prevent signal degradation via multiple trips thru the codec. Fossil estimates the twice thru this codec will prevent fax from working. 4-6 times thru would result hearable, noticeable, voice degradation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21 16:36:34 +00:00
Russell Bryant
db1f93048f Don't try to dereference the owner channel when it may not exist
(issue #10507, maxper)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21 15:22:22 +00:00
Jason Parker
8eda8a5fa6 (issue #10510)
Reported by: casper
Patches:
      cdr.conf.diff uploaded by casper (license 55)

Fix a few errors in sample cdr config file.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21 15:03:45 +00:00
Russell Bryant
108326e3d1 Fix the build of app_queue
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 21:57:08 +00:00
Mark Michelson
6268d2d7ec After a discussion on #asterisk-dev, it was decided that this should be in 1.4 as well.
(issue #10424, reported and patched by irroot)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 21:39:17 +00:00
Mark Michelson
d66e174242 Found a pointless ternary if. member->dynamic was set to 1 and has no opportunity to change
between then and this line, so "dynamic" will ALWAYS be output.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 16:17:43 +00:00
Jason Parker
46bc382bcc (issue #10499)
Reported by: casper
Patches:
      extensions.conf.sample.diff uploaded by casper (license 55)

Update CLI examples in extensions.conf.sample to reflect command changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 16:08:49 +00:00
Mark Michelson
7c7ec6a1da Ukrainian language voicemail support.
(closes issue #10458, reported and patched by Oleh)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 15:34:43 +00:00
Tilghman Lesher
e6768adf1b Missing curly braces. Oops. (Reported by snuffy via IRC)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 02:42:49 +00:00
Tilghman Lesher
d0469e3c42 Don't allocate vmu for messagecount when we could just use the stack instead (closes issue #10490)
Also, remove a useless (and leaky) SQLAllocHandle (closes issue #10480)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-18 14:30:44 +00:00
Russell Bryant
467ceebc82 Avoid a crash in the handling of DTMF based Caller ID. It is valid for
ast_read to return NULL in the case that the channel has been hung up.
(crash reported by anonymouz666 on IRC in #asterisk-dev)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 21:01:43 +00:00
Mark Michelson
403ee9194c Patch allows for more seamless transition from file storage voicemail to ODBC storage voicemail.
If a retrieval of a greeting from the database fails, but the file is found on the file system, then
we go ahead an insert the greeting into the database. The result of this is that people who
switch from file storage to ODBC storage do not need to rerecord their voicemail greetings.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 19:14:05 +00:00
Jason Parker
f1cb3f70b7 Don't send a semicolon over the wire in sip notify messages.
Caused by fix for issue 9938.

I basically took the code that existed before 9938 was fixed, and
 copied it into a new function - ast_unescape_semicolon

There should be very few places this will be needed (pbx_config
 does NOT need this (see issue 9938 for details))

Issue 10430, patch by me, with help/ideas from murf (thanks murf).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 19:12:19 +00:00
Jason Parker
e9ab13fa81 Re-add the setting of callerid name and number.
Issue 10485, reported by and fix explained by paradise.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 17:44:22 +00:00
Russell Bryant
9be377d89f Fix some crashes in chan_sip. This patch changes various places that add items
to the scheduler to ensure that they don't overwrite the ID of a previously
scheduled item.  If there is one, it should be removed.
(closes issue #10391, closes issue #10256, probably others, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 13:37:08 +00:00
Christian Richter
c71c5098b7 sometimes we don't need to signal dtmf tones to asterisk, we just want them to go through as inband. Otherwise they might be generated by the other channel partner and then there is a double tone.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 08:22:36 +00:00
Russell Bryant
e24788d06f Fix a little race condition that could cause a crash if two channels had MOH
stopped at the same time that were using a class that had been marked for
deletion when its use count hits zero.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 22:32:33 +00:00