Commit Graph

927 Commits

Author SHA1 Message Date
Russell Bryant 8555b694ee make trunk build again. murf will have to review this to see if it was the right fix, as it is related to his last change.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 21:25:07 +00:00
Steve Murphy b5cd67adc3 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 20:55:40 +00:00
Russell Bryant 8a6c04a0a9 Try to clarify the rules on changing ast_event and ast_event_ie
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 19:41:16 +00:00
Russell Bryant 94d9d29f18 Fix parenthesis from my last commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 19:33:57 +00:00
Russell Bryant 22de9a1c68 Change pointer aritmetic on void * to char *
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 18:33:31 +00:00
Russell Bryant dce06fed1d there is not actually code that sends these over the network in trunk yet
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 18:27:48 +00:00
Joshua Colp e311ae98d1 Return ast_event_get_ie_raw to using an iterator and fix logic in ast_event_iterator_next.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 16:25:30 +00:00
Joshua Colp a3b8cb670e This concludes bringing trunk back to a working state.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 16:07:35 +00:00
Joshua Colp c9445d4a68 To keep others happy... revert part of my additions so trunk works.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 16:03:51 +00:00
Russell Bryant d99440e2ed Merged revisions 81342 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81342 | russell | 2007-08-29 10:57:29 -0500 (Wed, 29 Aug 2007) | 3 lines

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/trunk@81343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 15:59:10 +00:00
Joshua Colp 2351d789fd Add API calls for iterating through an event. This should allow events to have multiple information elements (while there was nothing preventing it before you could not actually access any except the first one).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 15:19:11 +00:00
Joshua Colp f4fa5a228a Add some read/write locking magic to make logger reload operate again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 21:35:20 +00:00
Tilghman Lesher f5a14167f3 Support better rotation of log files to be more like system logging (closes issue #10398)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 20:03:48 +00:00
Russell Bryant 040a5f20f9 * Constify the uid field of channel datastores
* Convert some spaces to tabs in func_volume
* Add a note in channel.h making it clear that none of the datastore API calls
  lock the channel they are given, so the channel should be locked before
  calling the functions that take a channel argument.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 18:32:56 +00:00
Russell Bryant 43e9b0f67c (closes issue #7852)
Reported by: nic_bellamy
Patches:
      2006-10-03_svn_44249_voicemail_lockmode_v3.patch uploaded by nic_bellamy (license 213)

Add support for configurable file locking methods.  The default is "lockfile",
which is the old behavior.  There is an additional option, "flock", which is
intended for use in situations where the lockfile method will not work, such as
with SMB/CIFS mounts.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 16:28:26 +00:00
Joshua Colp 44aacc96f1 Merged revisions 80974 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80974 | file | 2007-08-27 10:20:31 -0300 (Mon, 27 Aug 2007) | 4 lines

(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/trunk@80975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 13:23:36 +00:00
Russell Bryant 7ddccc897f Merged revisions 80820 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80820 | russell | 2007-08-24 15:24:05 -0500 (Fri, 24 Aug 2007) | 7 lines

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/trunk@80821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 20:25:39 +00:00
Tilghman Lesher f8c93488d5 Fix documentation for Set (closes issue #10549)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 19:50:16 +00:00
Steve Murphy 9931947a6e Merged revisions 80789 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80789 | murf | 2007-08-24 12:52:15 -0600 (Fri, 24 Aug 2007) | 1 line

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/trunk@80790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 19:03:39 +00:00
Joshua Colp c755851bc8 Return trunk to a working state by including compat.h in minimime.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 13:37:20 +00:00
Jason Parker b875ca68e1 Convert minimime to use the proper uint*_t types, rather than u_int*_t
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 23:26:02 +00:00
Russell Bryant 4328c75281 Merged revisions 80424 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80424 | russell | 2007-08-22 17:40:27 -0500 (Wed, 22 Aug 2007) | 10 lines

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/trunk@80425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 22:43:12 +00:00
Russell Bryant 50d7fc81aa Merged revisions 80362 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80362 | russell | 2007-08-22 15:21:36 -0500 (Wed, 22 Aug 2007) | 34 lines

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/trunk@80387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 20:44:23 +00:00
Joshua Colp 91d9c110af Merged revisions 80255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80255 | file | 2007-08-22 13:14:38 -0300 (Wed, 22 Aug 2007) | 4 lines

(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/trunk@80256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 16:16:01 +00:00
Steve Murphy 6f9f77e0ca Merged revisions 80166 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80166 | murf | 2007-08-21 10:36:34 -0600 (Tue, 21 Aug 2007) | 1 line

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/trunk@80241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 14:12:24 +00:00
Joshua Colp 937d83f7e4 Minor tweak. Don't manipulate volume of the audio in the buffer if no audio is actually there.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21 15:51:49 +00:00
Steve Murphy 337c44236d This change set fixes bug 8126 in trunk. It is implemented via compile time options, activated via the menuselect stuff, which defaults to the old way. non-zero sample data added. Translate tables expressed in microseconds instead of milliseconds, with 5-digit data now instead of 3, giving 2 more digits of precision.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 22:53:48 +00:00
Jason Parker 100e2387db Merged revisions 79904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10430)
........
r79904 | qwell | 2007-08-17 14:12:19 -0500 (Fri, 17 Aug 2007) | 11 lines

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/trunk@79905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 19:13:25 +00:00
Tilghman Lesher 8b63009338 Change this flag... might not otherwise unlock in an OOM situation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 14:41:33 +00:00
Russell Bryant f5bf66bcd7 This commit adds a scheduler API call, ast_sched_replace that can be used
in place of a very common construct.  I also used it in a number of places
in chan_sip.

  if (id > -1)
     ast_sched_del(sched, id);
  id = ast_sched_add(sched, ...);

changes to:

  ast_sched_replace(id, sched, ...);


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 14:07:44 +00:00
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:09:46 +00:00
Steve Murphy 9836efb5fb This commit closes bug 7605, and half-closes 7638. The AEL code has been redistributed/repartitioned to allow code re-use both inside and outside of Asterisk. This commit introduces the utils/conf2ael program, and an external config-file reader, for both normal config files, and for extensions.conf (context, exten, prio); It provides an API for programs outside of asterisk to use to play with the dialplan and config files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 19:21:27 +00:00
Joshua Colp 5fbd7ebd24 Merged revisions 79553 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79553 | file | 2007-08-15 11:40:23 -0300 (Wed, 15 Aug 2007) | 6 lines

(closes issue #10440)
Reported by: irroot
(closes issue #10454)
Reported by: flo_turc
Increase maximum timestamp skew to 120. 20 was apparently far too low.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 14:42:49 +00:00
Joshua Colp 9264d5007a (closes issue #10427)
Reported by: pj
Two of the three places ast_waitfor_nandfds could branch off to did not clear outfd and exception. If the calling function did not clear these there was a chance they could get a false positive on testing to see whether they were set.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 14:17:43 +00:00
Steve Murphy 4f98b05cd5 Don't ask me why, but waitfordigit will immediately return a 1 on my system, unless the outfd is initialized to -1 before calling the nandfds func
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 13:46:58 +00:00
Russell Bryant 5f0c3e7dbc constify the return value of reason2str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:23:38 +00:00
Steve Murphy 526d1f39a2 Merged revisions 79099 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79099 | murf | 2007-08-10 14:53:43 -0600 (Fri, 10 Aug 2007) | 1 line

From a user complaint on #asterisk, I have forced pbx_spool to explain what reason codes mean, when they are logged
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 21:03:06 +00:00
Joshua Colp e927902fe7 Bring up to date with poll changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 18:37:32 +00:00
Steve Murphy cc6a96c580 Merged revisions 79049 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79049 | murf | 2007-08-10 12:25:51 -0600 (Fri, 10 Aug 2007) | 1 line

Re bug behavior mentioned in #asterisk, made this tweak to code, to prevent hundreds of log messages from being generated
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 18:35:15 +00:00
Steve Murphy f223818927 Merged revisions 79044 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79044 | murf | 2007-08-10 11:43:49 -0600 (Fri, 10 Aug 2007) | 1 line

This will help debug; from a question asked on #asterisk
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 17:48:19 +00:00
Russell Bryant e113d36aa4 Merge a set of device state improvements from team/russell/events.
The way a device state change propagates is kind of silly, in my opinion.  A
device state provider calls a function that indicates that the state of a
device has changed.  Then, another thread goes back and calls a callback for
the device state provider to find out what the new state is before it can go
send it off to whoever cares.

I have changed it so that you can include the state that the device has changed
to in the first function call from the device state provider.  This removes the
need to have to call the callback, which locks up critical containers to go find
out what the state changed to.

This change set changes the "simple" device state providers to use the new method.
This includes parking, meetme, and SLA.

I have also mostly converted chan_agent in my branch, but still have some more
things to think through before presenting the plan for converting channel drivers
to ensure all of the right events get generated ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 16:24:11 +00:00
Joshua Colp 845cba6792 Merged revisions 78955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78955 | file | 2007-08-10 11:15:53 -0300 (Fri, 10 Aug 2007) | 2 lines

Don't bother having the core pass through or emulate begin DTMF frames when in an ast_waitstream. It only cares about the end of DTMF.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 14:17:42 +00:00
Joshua Colp 22114b509d Add support for using epoll instead of poll. This should increase scalability and is done in such a way that we should be able to add support for other poll() replacements.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 21:44:58 +00:00
Joshua Colp 602198c402 Merge audiohooks branch into trunk. This is a new API for developers to listen and manipulate the audio going through a channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 19:30:52 +00:00
Russell Bryant 668a334f85 Add another big set of doxygen documentation improvements from snuffy.
(closes issue #9892)
(closes issue #10395)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 23:04:01 +00:00
Joshua Colp 218241f174 Use the linkedlists.h macros for the manager action list.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 22:13:40 +00:00
Joshua Colp b4778de562 (closes issue #10225)
Reported by: klaus3000
Clean up AST_FORMAT_LIST list. It may have mattered in the old days to have undefined entries but these days it does not.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 15:40:43 +00:00
Joshua Colp 9ef1b0a974 Extend the ast_senddigit and ast_dtmf_stream API calls to allow the duration of the DTMF digit(s) to be specified and make the SendDTMF application have the capability to use it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 21:52:30 +00:00
Joshua Colp 431c60f818 Merged revisions 78275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78275 | file | 2007-08-06 18:41:13 -0300 (Mon, 06 Aug 2007) | 2 lines

Add additional DTMF log messages to help when debugging issues.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 21:43:09 +00:00
Doug Bailey 3e426df072 Change the fsk filter used in CID and TDD decode to an integer based implementation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 19:52:40 +00:00