Commit Graph

1675 Commits

Author SHA1 Message Date
Joshua Colp e097cc7221 Add the ability to use a pattern match for a hint.
(closes issue #7767)
Reported by: Corydon76
Patches:
      20070314__simple_hint_lookup.diff.txt uploaded by Corydon76
      pbx-trunk-98436.diff uploaded by plack (license 365)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 16:54:12 +00:00
Steve Murphy 14e1d8c6d8 Merged revisions 109908 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109908 | murf | 2008-03-19 09:41:13 -0600 (Wed, 19 Mar 2008) | 72 lines

(closes issue #11442)
Reported by: tzafrir
Patches:
      11442.patch uploaded by murf (license 17)
Tested by: murf

I didn't give tzafrir very much time to test this, but if he does 
still have remaining issues, he is welcome to 
re-open this bug, and we'll do what is called for.

I reproduced the problem, and tested the fix, so I hope I
am not jumping by just going ahead and committing the fix.

The problem was with what file_save does with templates; 
firstly, it tended to print out multiple options:

[my_category](!)(templateref)

instead of 

[my_category](!,templateref)

which is fixed by this patch.


Nextly, the code to suppress output of duplicate declarations
that would occur because the reader copies inherited declarations
down the hierarchy, was not working. Thus:


 [master-template](!)
 mastervar = bar


 [template](!,master-template)
 tvar = value


 [cat](template)
 catvar = val


would be rewritten as:

 ;!
 ;! Automatically generated configuration file
 ;! Filename: experiment.conf (/etc/asterisk/experiment.conf)
 ;! Generator: Manager
 ;! Creation Date: Tue Mar 18 23:17:46 2008
 ;!
 
 [master-template](!)
 mastervar = bar

 
 [template](!,master-template)
 mastervar = bar
 tvar = value

 
 [cat](template)
 mastervar = bar
 tvar = value
 catvar = val

This has been fixed. Since the config reader 'explodes' inherited
vars into the category, users may, in certain circumstances, see
output different from what they originally entered, but it should
be both correct and equivalent.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 16:24:51 +00:00
Kevin P. Fleming 75cb5032e6 actually implement HTTP request dispatching based on both URI and method; reduce duplication of data when generating responses using ast_http_error()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 16:18:29 +00:00
Russell Bryant 4c6486782f Fix some more breakage that I introduced when changing extension state callbacks to the list macros.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 15:45:49 +00:00
Kevin P. Fleming 84b133bd81 clean up code to conform to coding guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 15:41:54 +00:00
Russell Bryant 89ad4ace67 Remove an unneeded variable. This compiled, but I missed the uninitialized warning
because I always compile without optimizations turned on.  Sorry!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 15:22:13 +00:00
Russell Bryant b47eee2187 Convert handling of extension state callbacks to the list macros.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 04:32:13 +00:00
Russell Bryant e1bd198bc0 Minor coding style changes, including adding handling for memory allocation failure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 04:14:12 +00:00
Russell Bryant f1d2a11aad Minor change to use Asterisk macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 04:09:55 +00:00
Russell Bryant c1cf92d304 Merged revisions 109838 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109838 | russell | 2008-03-18 23:06:05 -0500 (Tue, 18 Mar 2008) | 2 lines

Tweak spacing in a recent change because I'm very picky.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 04:06:31 +00:00
Kevin P. Fleming e191b51a08 start the process of changing HTTP request dispatching to do it based on *both* URI and method, so that POST support can move into a module; move http.c's private function prototypes into _private.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 22:32:26 +00:00
Terry Wilson b02bc230af Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:43:34 +00:00
Joshua Colp 760fc3403c Make sure values are interpreted as character strings and not format strings.
(AST-2008-004)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:13:07 +00:00
Joshua Colp 10cdbe28a8 Merged revisions 109386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109386 | file | 2008-03-18 11:58:39 -0300 (Tue, 18 Mar 2008) | 3 lines

Put a maximum limit on the number of payloads accepted, and also make sure a given payload does not exceed our maximum value.
(AST-2008-002)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:08:09 +00:00
Terry Wilson e727d15d34 Replace minimime with superior GMime library so that the entire contents of an http post are not read into memory.
This does introduce a dependency on the GMime library for handling HTTP POSTs, but it is available in most distros.

If the library is present, then the compile flag for ENABLE_UPLOADS is enabled by default in menuselect.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 22:10:06 +00:00
Mark Michelson b246e010d5 Merged revisions 109226 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109226 | mmichelson | 2008-03-17 17:05:49 -0500 (Mon, 17 Mar 2008) | 12 lines

Fix a logic flaw in the code that stores lock info which is displayed
via the "core show locks" command. The idea behind this section of code was
to remove the previous lock from the list if it was a trylock that had failed.
Unfortunately, instead of checking the status of the previous lock, we were referencing
the index immediately following the previous lock in the lock_info->locks array. 
The result of this problem, under the right circumstances, was that the lock which 
we currently in the process of attempting to acquire could "overwrite" the previous lock 
which was acquired. While this does not in any way affect typical operation, it *could*
lead to misleading "core show locks" output.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 22:06:44 +00:00
Steve Murphy 0af58d3f5c (closes issue #12238)
Reported by: mvanbaak
Tested by: murf, mvanbaak

Due to a bug that occurred when merge_contexts_and_delete scanned the "old" or existing contexts, and found a context
that doesn't exist in the new set, yet owned by a different registrar. The context is created in the new set, with the
old registrar, and and all the priorities and extens that have a different registrar are copied into it. But, not the
includes, ignorepats, and switches. I added code to do this immediately after the context is created.

This still leaves a logical hole in the code. If you define a context in two places, (eg. in extensions.conf and also 
in extensions.ael), and they both have includes, but different in composition, no new context will be generated, and
therefore the 'old' includes, switches, and ignorepats will not be copied. I'd have added code to simply add any non-duplicates
into the 'new' context that had a different registrar, but there is one big complication: includes, and switches are definitely
order dependent. (ignorepats I'm not sure about). And we'll have to develop some sort of policy about how we 
merge order dependent lists, especially if the intersection of the two sets is empty. (in other words, they do not have any
elements in common). Do the new go first, or the old? I've elected to punt this issue until a user complains. Hopefully,
this is pretty rare thing.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 17:47:36 +00:00
Michiel van Baak b311134430 Merged revisions 108961 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108961 | mvanbaak | 2008-03-16 22:47:10 +0100 (Sun, 16 Mar 2008) | 7 lines

add missing break to case AST_CONTROL_SRCUPDATE

(closes issue #12228)
Reported by: andrew
Patches:
      SRC.patch uploaded by andrew (license 240)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-16 21:50:58 +00:00
Russell Bryant 072eb8a913 Remove a double write lock of the contexts lock in ast_wrlock_contexts().
How did this ever work?

(closes issue #12219)
Reported by: ys
Patches: 
      pbx.c.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-15 16:21:04 +00:00
Mark Michelson 963a2cec51 Make this compile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 21:47:55 +00:00
Russell Bryant 835df7d30f Merged revisions 108583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108583 | russell | 2008-03-13 16:38:16 -0500 (Thu, 13 Mar 2008) | 11 lines

Fix another issue that was causing crashes in chanspy.  This introduces a new
datastore callback, called chan_fixup().  The concept is exactly like the
fixup callback that is used in the channel technology interface.  This callback
gets called when the owning channel changes due to a masquerade.  Before this
was introduced, if a masquerade happened on a channel being spyed on, the
channel pointer in the datastore became invalid.

(closes issue #12187)
(reported by, and lots of testing from atis)
(props to file for the help with ideas)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 21:40:43 +00:00
Mark Michelson d236e3d1b1 Fixing a potential buffer overflow in the manager command ModuleCheck.
Though this overflow is exploitable remotely, we are NOT issuing a security
advisory for this since in order to exploit the overflow, the attacker would
have to establish an authenticated manager session AND have the system privilege.
By gaining this privilege, the attacker already has more powerful weapons at his
disposal than overflowing a buffer with a malformed manager header, so the vulnerability
in this case really lies with the authentication method that allowed the attacker to 
gain the system privilege in the first place.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 20:59:00 +00:00
Russell Bryant c3c56990df Make the default prefix empty, like it was in Asterisk 1.4.
(closes issue #12198, reported by bkruse, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:49:26 +00:00
Russell Bryant 8bbef5f996 Rename ast_tcptls_server_instance to session_instance, since this pertains to
server and client usage.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:13:18 +00:00
Joshua Colp a3c7b08d19 Doxygenify slinfactory a bit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 21:06:50 +00:00
Russell Bryant b38cb44acd Merged revisions 108135 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108135 | russell | 2008-03-12 14:57:42 -0500 (Wed, 12 Mar 2008) | 40 lines

(closes issue #12187, reported by atis, fixed by me after some brainstorming
 on the issue with mmichelson)

- Update copyright info on app_chanspy.

- Fix a race condition that caused app_chanspy to crash.  The issue was that
  the chanspy datastore magic that was used to ensure that spyee channels did
  not disappear out from under the code did not completely solve the problem.
  It was actually possible for chanspy to acquire a channel reference out of
  its datastore to a channel that was in the middle of being destroyed.  That
  was because datastore destruction in ast_channel_free() was done near the
  end.  So, this left the code in app_chanspy accessing a channel that was
  partially, or completely invalid because it was in the process of being free'd
  by another thread.  The following sort of shows the code path where the race 
  occurred:

  =============================================================================
  Thread 1 (PBX thread for spyee chan)  ||   Thread 2 (chanspy)
  --------------------------------------||-------------------------------------
  ast_channel_free()                    ||
    - remove channel from channel list  ||
    - lock/unlock the channel to ensure ||
      that no references retrieved from ||
      the channel list exist.           ||
  --------------------------------------||-------------------------------------
                                        || channel_spy()
    - destroy some channel data         ||  - Lock chanspy datastore
                                        ||  - Retrieve reference to channel
                                        ||  - lock channel
                                        ||  - Unlock chanspy datastore
  --------------------------------------||-------------------------------------
     - destroy channel datastores       ||
        - call chanspy datastore d'tor  ||  
          which NULL's out the ds'      ||  - Operate on the channel ...
          reference to the channel      ||     
                                        ||
    - free the channel                  || 
                                        ||
                                        ||  - unlock the channel
  --------------------------------------||-------------------------------------
  =============================================================================

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 19:59:05 +00:00
Joshua Colp 5fc569f5f5 Merged revisions 108083 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108083 | file | 2008-03-12 15:26:37 -0300 (Wed, 12 Mar 2008) | 4 lines

Add a trigger mode that triggers on both read and write. The actual function that returns the combined audio frame though will wait until both sides have fed in audio, or until one side stops (such as the case when you call Wait).
(closes issue #11945)
Reported by: xheliox

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 18:29:33 +00:00
Russell Bryant f7e28b12fe Merged revisions 108031 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108031 | russell | 2008-03-12 11:59:07 -0500 (Wed, 12 Mar 2008) | 4 lines

Destroy the channel lock after the channel datastores.

(inspired by issue #12187)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 17:02:57 +00:00
Tilghman Lesher 10609251f9 Revert several changes from revision 102525, as the changes were not
compatible, and, in fact, introduced regressions.
(Closes issue #12190)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 05:46:39 +00:00
Tilghman Lesher d02f74ebfe An offhand comment from Russell made me realize that the configuration file
caching would not work properly for users.conf and any other file read from
more than one place.  I needed to add the filename which requested the config
file to get it to work properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 22:55:16 +00:00
Joshua Colp b84cdbfe38 Merged revisions 107646 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107646 | file | 2008-03-11 16:20:01 -0300 (Tue, 11 Mar 2008) | 4 lines

Make sure the visible indication is on the right channel so when the masquerade happens the proper indication is enacted.
(closes issue #11707)
Reported by: iam

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 19:23:28 +00:00
Joshua Colp f26ed3f4bf Clarify comment about masquerading and playback of the parking slot.
(closes issue #12180)
Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 15:05:17 +00:00
Kevin P. Fleming c7eebb3db8 Merged revisions 107408 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107408 | kpfleming | 2008-03-11 09:07:59 -0500 (Tue, 11 Mar 2008) | 5 lines

check for compiler support for -fno-strict-overflow before using it (tested with Debian's gcc 4.3, 4.1 and 3.4)

(closes issue #12179)
Reported by: Netview

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 14:09:49 +00:00
Kevin P. Fleming 79c3038ee5 Merged revisions 107352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107352 | kpfleming | 2008-03-11 06:04:29 -0500 (Tue, 11 Mar 2008) | 11 lines

fix up various compiler warnings found with gcc-4.3:

- the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function)

- main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement

- main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur

- main/editline/readline.c had an unused variable


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 11:36:51 +00:00
Tilghman Lesher bdad3c9889 (closes issue #6019)
Reported by: ssokol
 Patches: 
       20080304__bug6019.diff.txt uploaded by Corydon76 (license 14)
 Tested by: putnopvut


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 21:48:20 +00:00
Russell Bryant 0ee1f43b4a Merged revisions 107161 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107161 | russell | 2008-03-10 15:17:11 -0500 (Mon, 10 Mar 2008) | 8 lines

Fix another bug specifically related to asynchronous call origination.  Once the
PBX is started on the channel using ast_pbx_start(), then the ownership of the
channel has been passed on to another thread.  We can no longer access it in this
code.  If the channel gets hung up very quickly, it is possible that we could
access a channel that has been free'd.

(inspired by BE-386)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 20:17:37 +00:00
Russell Bryant 2d95fb33bd Merged revisions 107158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107158 | russell | 2008-03-10 15:04:27 -0500 (Mon, 10 Mar 2008) | 9 lines

Fix some bugs related to originating calls.  If the code failed to start a PBX
on the channel (such as if you set a call limit based on the system's load
average), then there were cases where a channel that has already been free'd
using ast_hangup() got accessed.  This caused weird memory corruption and
crashes to occur.

(fixes issue BE-386)
(much debugging credit goes to twilson, final patch written by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 20:05:12 +00:00
Russell Bryant 86fe5cc800 Merged revisions 107102 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107102 | russell | 2008-03-10 12:13:17 -0500 (Mon, 10 Mar 2008) | 2 lines

Resolve a compiler warning.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 17:13:34 +00:00
Russell Bryant 541039ce1b Merged revisions 107099 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107099 | russell | 2008-03-10 11:58:57 -0500 (Mon, 10 Mar 2008) | 3 lines

Fix a race condition where the generator can go away
(closes issue #12175, reported by edantie, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 16:59:13 +00:00
Steve Murphy dafa73bade way back in July, in r.75706, a fix was made ot the strftime usages, which was good, but in this case, the check for a nil time was accidentally removed, and now it is restored, to keep timevals like '1969-12-31 17:00:00' from showing up in the cdrs. No idea what databases will do with this. No bugs filed as yet, but it felt like a bug.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 14:55:21 +00:00
Joshua Colp af7e1964f2 Merged revisions 107016 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107016 | file | 2008-03-10 11:33:02 -0300 (Mon, 10 Mar 2008) | 7 lines

Move where unanswered CDRs are dropped to the CDR core, not everything uses app_dial.
(closes issue #11516)
Reported by: ys
Patches:
      branch_1.4_cdr.diff uploaded by ys (license 281)
Tested by: anest, jcapp, dartvader

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 14:36:16 +00:00
Jason Parker 8aa30ccf0b Merged revisions 106842 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106842 | qwell | 2008-03-07 16:14:45 -0600 (Fri, 07 Mar 2008) | 5 lines

Fix hardcoded grep in editline, were GNU grep is required.

(closes issue #12124)
Reported by: dmartin

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 22:15:20 +00:00
Joshua Colp 733a740922 Merged revisions 106788 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106788 | file | 2008-03-07 15:32:00 -0400 (Fri, 07 Mar 2008) | 4 lines

Ignore source update control frame.
(closes issue #12168)
Reported by: plack

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 19:33:09 +00:00
Steve Murphy 377e51c4d4 (closes issue #6002)
Reported by: rizzo
Tested by: murf

Proposal of the changes to be made, and then an announcement of how they were accomplished:

http://lists.digium.com/pipermail/asterisk-dev/2008-February/032065.html

and:

http://lists.digium.com/pipermail/asterisk-dev/2008-March/032124.html

Here is a recap, file by file, of what I have done:

pbx/pbx_config.c
pbx/pbx_ael.c

All funcs that were passed a ptr to the context list, now will ALSO be passed a hashtab ptr to the same set.
Why? because (for the time being), the dialplan is stored in both, to facilitate a quick, low-cost move to
hash-tables to speed up dialplan processing. If it was deemed necessary to pass the context LIST, well, it
is just as necessary to have the TABLE available. This is because the list/table in question might not be
the global one, but temporary ones we would use to stage the dialplan on, and then swap into the global
position when things are ready.

We now have one external function for apps to use, "ast_context_find_or_create()" instead of the pre-existing
"find" and "create", as all existing usages used both in tandem anyway.

pbx_config, and pbx_ael, will stage the reloaded dialplan into local lists and tables, and 
then call merge_contexts_and_delete, which will merge (now) existing contexts and 
priorities from other registrars into this local set by copying them. Then, merge_contexts_and_delete will
lock down the contexts, swap the lists and tables, and unlock (real quick), and then 
destroy the old dialplan.



chan_sip.c
chan_iax.c
chan_skinny.c

All the channel drivers that would add regcontexts now use the ast_context_find_or_create now.

chan_sip also includes a small fix to get rid of warnings about removing priorities that never got entered.


apps/app_meetme.c
apps/app_dial.c
apps/app_queue.c

All the apps that added a context/exten/priority were also modified to use ast_context_find_or_create instead.


include/asterisk/pbx.h

ast_context_create() is removed. Find_or_create_ is the new method.
ast_context_find_or_create()  interface gets the hashtab added.
ast_merge_contexts_and_delete() gets the local hashtab arg added.
ast_wrlock_contexts_version() is added so you can detect if someone else got a writelock between your readlocking and writelocking.
ast_hashtab_compare_contexts was made public for use in pbx_config/pbx_ael
ast_hashtab_hash_contexts was in like fashion make public.


include/asterisk/pval.h

ast_compile_ael2() interface changed to include the local hashtab table ptr.


main/features.c

For the sake of the parking context, we use ast_context_find_or_create().



main/pbx.c

I changed all the "tree" names to "table" instead. That's because the original
implementation was based on binary trees. (had a free library). Then I moved
to hashtabs. Now, the names move forward too.

refcount field added to contexts, so you can keep track of how many modules
wanted this context to exist.

Some log messages that are warnings were inflated from LOG_NOTICE to LOG_WARNING.

Added some calls to ast_verb(3,...) for debug messages

Lots of little mods to ast_context_remove_extension2, which is now excersized in ways
it was not previously; one definite bug fixed.

find_or_create was upgraded to handle both local lists/tables as well as the globals.

context_merge() was added to do the per-context merging of the old/present contexts/extens/prios into the new/proposed local list/tables

ast_merge_contexts_and_delete() was heavily modified.

ast_add_extension2() was also upgraded to handle changes. 

the context_destroy() code was re-engineered to handle the new way of doing things,
by exten/prio instead of by context.



res/ael/pval.c
res/ael/ael.tab.c
res/ael/ael.tab.h
res/ael/ael.y
res/ael/ael_lex.c
res/ael/ael.flex
utils/ael_main.c
utils/extconf.c
utils/conf2ael.c
utils/Makefile

Had to change the interface to ast_compile_ael2(), to include the hashtab ptr.
This ended up involving several external apps.  The main gotcha was I had to 
include lock.h and hashtab.h in several places.


As a side note, I tested this stuff pretty thoroughly, I replicated the problems
originally reported by Luigi, and made triply sure that reloads worked, and everything
worked thru "stop gracefully". I found a and fixed a few bugs as I was merging into
trunk, that did not appear in my tests of bug6002.

How's this for verbose commit messages?




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 18:57:57 +00:00
Tilghman Lesher a60f591c72 Merged revisions 106606 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106606 | tilghman | 2008-03-07 09:20:52 -0600 (Fri, 07 Mar 2008) | 3 lines

Properly initialize rtp->schedid
(Closes issue #12154)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 15:22:34 +00:00
Tilghman Lesher 8718878490 Merged revisions 106552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106552 | tilghman | 2008-03-07 00:36:33 -0600 (Fri, 07 Mar 2008) | 6 lines

Safely use the strncat() function.
(closes issue #11958)
 Reported by: norman
 Patches: 
       20080209__bug11958.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 06:54:47 +00:00
Russell Bryant 5ca5d97673 Merge changes from team/russell/g722-sillyness ...
Fix a number of other places where the number of samples in a G722 frame was
not properly handled because of various reasons.

main/rtp.c:
 - When a G722 frame is read from the smoother, the number of samples in the
   frame must be divided by 2 before being sent out over the network.  Even
   though G722 is 16 kHz, an error in some previous spec has made it so that
   we have to list the number of samples such as if it was 8 kHz.

main/file.c:
 - When scheduling the next time to expect a frame, take into account that the
   format of the file we're reading from may not be 8 kHz.

codecs/codec_g722.c:
 - When converting from G722 to slinear, g722_decode() expects its samples
   parameter to be in the silly (real samples / 2) format.  Make it so.
 - When converting from slinear to G722, properly set the number of samples in
   the frame to be the number of bytes of output * 2.

formats/format_pcm.c:
 - This format module handles G722, among a number of other formats.  However,
   the read() and seek() functions did not account for the fact that G722 has
   2 samples per byte.

(closes issue #12130, reported by rickross, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 00:24:58 +00:00
Jason Parker 49ef635a6d Fix file playback in many cases.
(closes issue #12115)
Reported by: pj
Patches:
      v2-fileexists.patch uploaded by dimas (license 88) (with modifications by me)
Tested by: dimas, qwell, russell


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-06 22:11:30 +00:00
Mark Michelson 924b7d3636 Merged revisions 106437 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106437 | mmichelson | 2008-03-06 16:10:07 -0600 (Thu, 06 Mar 2008) | 8 lines

Quell an annoying message that is likely to print every single time that 
ast_pbx_outgoing_app is called. The reason is that __ast_request_and_dial
allocates the cdr for the channel, so it should be expected that the channel
will have a cdr on it.

Thanks to joetester on IRC for pointing this out


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-06 22:11:26 +00:00
Joshua Colp 496adc6fc0 Merged revisions 106235 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines

Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue #12148)
Reported by: jcomellas

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:43:22 +00:00
Mark Michelson 2ed30d47e8 Adding the Atxfer manager command. With this, you may initiate
an attended transfer over AMI

(closes issue #10585)
Reported by: ornati
Patches:
      atxfer-trunk-r90428.diff uploaded by ornati (license 210)
	  (with modifications from me)
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:33:05 +00:00
Joshua Colp 455f6137b4 Fix code up to what it was meant to be.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 16:39:22 +00:00
Tilghman Lesher 8a411ccf83 Create a centralized configuration option for silencethreshold
(closes issue #11236)
 Reported by: philipps
 Patches: 
       20080218__bug11236.diff.txt uploaded by Corydon76 (license 14)
 Tested by: philipps


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 16:23:44 +00:00
Russell Bryant a760a033e9 Merged revisions 105932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105932 | russell | 2008-03-04 19:52:18 -0600 (Tue, 04 Mar 2008) | 5 lines

Fix a bug that I just noticed in the RTP code.  The calculation for setting the
len field in an ast_frame of audio was wrong when G.722 is in use.  The len field
represents the number of ms of audio that the frame contains.  It would have
set the value to be twice what it should be.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 01:54:16 +00:00
Mark Michelson 6cf6059402 There are several places in manager.c where BUFSIZ is used for a buffer
which will contain nowhere near that amount of data. This makes these buffers
more reasonably sized.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 23:24:56 +00:00
Tilghman Lesher 7007c565fe Fix minor misuses of snprintf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 23:10:45 +00:00
Tilghman Lesher cfc1df4c1a Whitespace changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 23:04:29 +00:00
Russell Bryant 96e04792bd add a destroy API call for a server instance
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 22:28:03 +00:00
Russell Bryant cc55483858 More public API name changes to use an appropriate ast_ prefix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 22:23:21 +00:00
Russell Bryant efb1e30a38 Rename public object server_instance to ast_tcptls_server_instance
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 22:15:18 +00:00
Joshua Colp 3b070a815d Merged revisions 105676 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105676 | file | 2008-03-04 14:10:34 -0400 (Tue, 04 Mar 2008) | 2 lines

In addition to setting the marker bit let's change our ssrc so they know for sure it is a different source.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 18:11:38 +00:00
Joshua Colp 4de0d8368f Merged revisions 105674 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105674 | file | 2008-03-04 14:05:28 -0400 (Tue, 04 Mar 2008) | 8 lines

When a new source of audio comes in (such as music on hold) make sure the marker bit gets set.
(closes issue #10355)
Reported by: wdecarne
Patches:
      10355.diff uploaded by file (license 11)
(closes issue #11491)
Reported by: kanderson

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 18:08:42 +00:00
Russell Bryant 7205c1f23c Make it so you don't have to cast away const in a couple places
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 04:47:32 +00:00
Russell Bryant 83002989a9 remove unnecessary casts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 04:44:28 +00:00
Russell Bryant 6d3b251588 - Add curly braces around the while loop
- Properly break out of the loop on error when an included context is not found


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 04:28:48 +00:00
Russell Bryant 71173779dc Use ast_copy_string() instead of strncpy(), and use sizeof() instead of
a magic number


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 04:26:39 +00:00
Russell Bryant f7467c83e6 Merged revisions 105565 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105565 | russell | 2008-03-03 10:01:50 -0600 (Mon, 03 Mar 2008) | 3 lines

Update the copyright information for autoservice.  Most of the code in this file
now is stuff that I have written recently ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 16:02:19 +00:00
Russell Bryant 8372a9bf08 3) In addition to merging the changes below, change trunk back to a regular
LIST instead of an RWLIST.  The way this list works makes it such that
   a RWLIST provides no additional benefit.  Also, a mutex is needed for
   use with the thread condition.


Merged revisions 105563 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105563 | russell | 2008-03-03 09:50:43 -0600 (Mon, 03 Mar 2008) | 24 lines

Merge in some changes from team/russell/autoservice-nochans-1.4

These changes fix up some dubious code that I came across while auditing what
happens in the autoservice thread when there are no channels currently in
autoservice.

1) Change it so that autoservice thread doesn't keep looping around calling
   ast_waitfor_n() on 0 channels twice a second.  Instead, use a thread condition
   so that the thread properly goes to sleep and does not wake up until a
   channel is put into autoservice.

   This actually fixes an interesting bug, as well.  If the autoservice thread
   is already running (almost always is the case), then when the thread goes
   from having 0 channels to have 1 channel to autoservice, that channel would
   have to wait for up to 1/2 of a second to have the first frame read from it.

2) Fix up the code in ast_waitfor_nandfds() for when it gets called with no
   channels and no fds to poll() on, such as was the case with the previous code
   for the autoservice thread.  In this case, the code would call alloca(0), and
   pass the result as the first argument to poll().  In this case, the 2nd
   argument to poll() specified that there were no fds, so this invalid pointer
   shouldn't actually get dereferenced, but, this code makes it explicit and
   ensures the pointers are NULL unless we have valid data to put there.

(related to issue #12116)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 15:59:50 +00:00
Joshua Colp b21ca22fb0 Merged revisions 105560 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105560 | file | 2008-03-03 11:28:59 -0400 (Mon, 03 Mar 2008) | 7 lines

It is possible for no audio to pass between the current digit and next digit so expand logic that clears emulation to AST_FRAME_NULL.
(closes issue #11911)
Reported by: edgreenberg
Patches:
      v1-11911.patch uploaded by dimas (license 88)
Tested by: tbsky

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 15:30:29 +00:00
Joshua Colp 00641af7d2 Add support for 16KHz signed linear.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-01 03:59:41 +00:00
Terry Wilson 7d1891d5c3 Asterisk, when parking can drop rights a caller when a parking timeout occurs. Also, when doing built-in attended transfers, sometimes incorrectly passes rights from the transferrer to the transferee. This patch tries to fixes the parking issue and lays some groundwork for later fixing the transfer issue.
(closes issue #11520)
Reported by: pliew
Tested by: otherwiseguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-01 01:30:37 +00:00
Russell Bryant 796780679e Merged revisions 105409 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105409 | russell | 2008-02-29 17:34:32 -0600 (Fri, 29 Feb 2008) | 23 lines

Fix a major bug in autoservice.  There was a race condition in the handling of
the list of channels in autoservice.  The problem was that it was possible for
a channel to get removed from autoservice and destroyed, while the autoservice
thread was still messing with the channel.  This led to memory corruption, and
caused crashes.  This explains multiple backtraces I have seen that have
references to autoservice, but do to the nature of the issue (memory corruption),
could cause crashes in a number of areas.

(fixes the crash in BE-386)
(closes issue #11694)
(closes issue #11940)

The following issues could be related.  If you are the reporter of one of these,
please update to include this fix and try again.

(potentially fixes issue #11189)
(potentially fixes issue #12107)
(potentially fixes issue #11573)
(potentially fixes issue #12008)
(potentially fixes issue #11189)
(potentially fixes issue #11993)
(potentially fixes issue #11791)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 23:36:46 +00:00
Russell Bryant 7da06e6cb8 Merged revisions 105116 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105116 | russell | 2008-02-28 16:23:05 -0600 (Thu, 28 Feb 2008) | 8 lines

Fix a bug in the lock tracking code that was discovered by mmichelson.  The issue
is that if the lock history array was full, then the functions to mark a lock as
acquired or not would adjust the stats for whatever lock is at the end of the array,
which may not be itself.  So, do a sanity check to make sure that we're updating
lock info for the proper lock.

(This explains the bizarre stats on lock #63 in BE-396, thanks Mark!)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28 22:39:26 +00:00
Mark Michelson beb7a540c1 Merged revisions 104841 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104841 | mmichelson | 2008-02-27 15:49:20 -0600 (Wed, 27 Feb 2008) | 17 lines

Two fixes:

1. Make the list of ast_dial_channels a lockable list. This is because in some cases,
   the ast_dial may exist in multiple threads due to asynchronous execution of its application, and
   I found some cases where race conditions could exist.

2. Check in ast_dial_join to be sure that the channel still exists before attempting to lock it, since
   it could have gotten hung up but the is_running_app flag on the ast_dial_channel may not have been
   cleared yet.

(closes issue #12038)
Reported by: jvandal
Patches:
      12038v2.patch uploaded by putnopvut (license 60)
Tested by: jvandal


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28 20:14:04 +00:00
Jason Parker 62c63a8412 Merged revisions 105005 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105005 | qwell | 2008-02-28 13:20:10 -0600 (Thu, 28 Feb 2008) | 9 lines

Make pbx_exec pass an empty string into applications, if we get NULL.
This protects against possible segfaults in applications that may try
 to use data before checking length (ast_strdupa'ing it, for example)

(closes issue #12100)
Reported by: foxfire
Patches:
      12100-nullappargs.diff uploaded by qwell (license 4)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28 19:21:15 +00:00
Tilghman Lesher 7d564048ed Merged revisions 104868 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104868 | tilghman | 2008-02-27 18:05:06 -0600 (Wed, 27 Feb 2008) | 7 lines

Compatibility fix for PPC64
(closes issue #12081)
 Reported by: jcollie
 Patches: 
       asterisk-1.4.18-funcdesc.patch uploaded by jcollie (license 412)
 Tested by: jcollie, Corydon76

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28 00:11:31 +00:00
Mark Michelson 10d9d1e5a1 Merged revisions 104783 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104783 | mmichelson | 2008-02-27 14:36:26 -0600 (Wed, 27 Feb 2008) | 4 lines

Bump a couple of more buffers up by 2 so that annoying warnings aren't generated
like crazy on every fileexists_core call.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 20:37:32 +00:00
Tilghman Lesher 133a18478c Merged revisions 104704 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104704 | tilghman | 2008-02-27 12:15:10 -0600 (Wed, 27 Feb 2008) | 2 lines

Ensure the session ID can't be 0.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 18:20:35 +00:00
Joshua Colp b21b5f5574 Merged revisions 104665 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104665 | file | 2008-02-27 13:41:40 -0400 (Wed, 27 Feb 2008) | 2 lines

Bump up the buffer by 2.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:45:55 +00:00
Jason Parker 5badb3c48a Merged revisions 104598 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104598 | qwell | 2008-02-27 11:26:55 -0600 (Wed, 27 Feb 2008) | 8 lines

Inherit language from the transfering channel on a blind transfer.

(closes issue #11682)
Reported by: caio1982
Patches:
      local_atxfer_lang3-1.4.diff uploaded by caio1982 (license 22)
Tested by: caio1982, victoryure

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:31:31 +00:00
Joshua Colp b868d44342 Merged revisions 104596 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104596 | file | 2008-02-27 13:07:33 -0400 (Wed, 27 Feb 2008) | 4 lines

Use the lock (which already existed, it just wasn't used) on the updaters list to protect the contents instead of the overall module list lock.
(closes issue #12080)
Reported by: ChaseVenters

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:12:08 +00:00
Kevin P. Fleming 892a6b95be Merged revisions 104593 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104593 | kpfleming | 2008-02-27 10:53:06 -0600 (Wed, 27 Feb 2008) | 8 lines

fallback to standard English prompts properly when using new prompt directory layout

(closes issue #11831)
Reported by: IgorG
Patches:
      fallbacken.v1.diff uploaded by IgorG (license 20) (modified by me to improve code and conform rest of function to coding guidelines)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 16:54:14 +00:00
Joshua Colp dca12f4aa7 Fix T38 passthrough regression introduced by state changes.
(closes issue #12078)
Reported by: dimas
Patches:
      v1-12078.patch uploaded by dimas (license 88)
(closes issue #12074)
Reported by: Ivan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 15:31:09 +00:00
Russell Bryant b0ba749ca1 I swear I compiled this ... *cough*
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 20:33:08 +00:00
Russell Bryant 0036cde5f3 Rename version.h to ast_version.h. Next, I will be re-adding version.h as an
automatically generated file like it used to be.  This still needs to be there
for modules that have to check it to compile against multiple asterisk versions.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 20:02:14 +00:00
Joshua Colp 2a7eac9940 Add an 'e' option to ResetCDR which re-enables a CDR that has been disabled.
(closes issue #11170)
Reported by: kratzers
Patches:
      ResetCDR.1.diff uploaded by kratzers (license 307)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 19:14:04 +00:00
Mark Michelson 9a9a4e9701 Remove more hardcoded pipe symbols and replace with commas.
(closes issue #12072)
Reported by: SimonSharman
Patches:
      features.patch uploaded by SimonSharman (license 410)
Tested by: SimonSharman



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 14:51:21 +00:00
Russell Bryant 16b84e260c Merged revisions 104102 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104102 | russell | 2008-02-25 17:19:05 -0600 (Mon, 25 Feb 2008) | 7 lines

Improve the lock tracking code a bit so that a bunch of old locks that threads
failed to lock don't sit around in the history.  When a lock is first locked,
this checks to see if the last lock in the list was one that was failed to be
locked.  If it is, then that was a lock that we're no longer sitting in a trylock
loop trying to lock, so just remove it.
(inspired by issue #11712)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 23:19:31 +00:00
Jason Parker 84e302bfe0 Merged revisions 104092 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104092 | qwell | 2008-02-25 14:49:42 -0600 (Mon, 25 Feb 2008) | 11 lines

Allow the use of #include and #exec in situations where the max include depth was only 1.
Specifically, this fixes using #include and #exec in extconfig.conf.

This was basically caused because the config file itself raises the include level to 1.

I opted not to raise the include limit, because recursion here could cause very bizarre behavior.

Pointed out, and tested by jmls

(closes issue #12064)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 20:50:57 +00:00
Tilghman Lesher f92a3e119e Move Originate to a separate privilege and require the additional System privilege to call out to a subshell.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-22 22:55:35 +00:00
Kevin P. Fleming 1a6711a42d Merged revisions 104015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104015 | kpfleming | 2008-02-21 08:33:51 -0600 (Thu, 21 Feb 2008) | 2 lines

reduce the likelihood that HTTP Manager session ids will consist of primarily '1' bits

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 14:44:04 +00:00
Jason Parker ea8c695a1c Largely refactor DSP tone detection routines.
Separate fax detection from digit detected.
Added CED (called) tone detection for fax (previously, only CNG (calling) was supported).
Separate DTMF/MF code paths where appropriate.
Allow detection of arbitary tones.

(closes issue #11796)
Reported by: dimas
Patches:
      v6-dsp-faxtones.patch uploaded by dimas (license 88)
Tested by: dimas, IgorG, Cache


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 21:36:46 +00:00
Tilghman Lesher 3dd4296de7 Merged revisions 103845 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103845 | tilghman | 2008-02-20 11:53:00 -0600 (Wed, 20 Feb 2008) | 7 lines

Compat fix for Solaris
(closes issue #12022)
 Reported by: asgaroth
 Patches: 
       20080219__bug12022.diff.txt uploaded by Corydon76 (license 14)
 Tested by: asgaroth

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 18:28:00 +00:00
Joshua Colp b0be65f2ef *mumble*
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 03:52:57 +00:00
Joshua Colp ddf7a8a2a0 file not found.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 03:44:40 +00:00
Joshua Colp ef7cfaa2f8 Minor test...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 03:38:13 +00:00
Jason Parker 63ab8ad66c Make sure to mask out non-audio first as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 22:35:23 +00:00
Jason Parker 59bdc278be Maybe we should set the value before we test it? Fixes an issue people have been seeing (unreported?) with file playback not working.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 22:23:04 +00:00
Joshua Colp ee5e39e04b Add a log message that appears when you try to unload a module that isn't loaded.
(closes issue #12033)
Reported by: jamesgolovich
Patches:
      asterisk-loader.diff.txt uploaded by jamesgolovich (license 176)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 21:54:09 +00:00
Joshua Colp c929c6abd9 Only output a log message saying the format does not exist if it actually does not exist, not if the file itself could not be opened.
(closes issue #11828)
Reported by: IgorG
Patches:
      readfile.v1.diff uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 21:38:39 +00:00
Tilghman Lesher 89567ef8bb Change verbosity into debug for Hebrew (and various whitespace fixes)
(Closes issue #12011)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 00:59:40 +00:00
Joshua Colp 227112138e Merged revisions 103801 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103801 | file | 2008-02-18 19:56:48 -0400 (Mon, 18 Feb 2008) | 10 lines

Ensure that emulated DTMFs do not get interrupted by another begin frame.
(closes issue #11740)
Reported by: gserra
Patches:
      v1-11740.patch uploaded by dimas (license 88)
(closes issue #11955)
Reported by: tsearle
(closes issue #10530)
Reported by: xmarksthespot

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 23:58:38 +00:00
Joshua Colp e54da94808 Add a non-invasive API for application level manipulation of T38 on a channel. This uses control frames (so they can even pass across IAX2) to negotiate T38 and provided a way of getting the current status of T38 using queryoption. This should by no means cause any issues and if it does I will take responsibility for it.
(closes issue #11873)
Reported by: dimas
Patches:
      v4-t38-api.patch uploaded by dimas (license 88)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 23:47:01 +00:00
Joshua Colp 6c3a7a3e51 Add some missing control frames.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 22:54:25 +00:00
Mark Michelson 80e2db47c2 Merged revisions 103786 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103786 | mmichelson | 2008-02-18 14:52:09 -0600 (Mon, 18 Feb 2008) | 10 lines

There was an invalid assumption when calculating the duration of a file that the filestream in question
was created properly. Unfortunately this led to a segfault in the situation where an unknown format was
specified in voicemail.conf and a voicemail was recorded. Now, we first check to be sure that the stream
was written correctly or else assume a zero duration.

(closes issue #12021)
Reported by: jakep
Tested by: putnopvut


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 20:53:25 +00:00
Michiel van Baak f7370d4831 make the output of 'core show settings' a bit nicer.
(closes issue #12020)
Reported by: seanbright
Patches:
      asterisk.c.patch uploaded by seanbright (license 71)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 19:47:40 +00:00
Tilghman Lesher 2c3c489ade Merged revisions 103780 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103780 | tilghman | 2008-02-18 11:31:52 -0600 (Mon, 18 Feb 2008) | 9 lines

When a SIP channel is being auto-destroyed, it's possible for it to still be
in bridge code.  When that happens, we crash.  Delay the RTP destruction until
the bridge is ended.
(closes issue #11960)
 Reported by: norman
 Patches: 
       20080215__bug11960__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: norman

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 17:45:48 +00:00
Olle Johansson f04d5fb83d Make sure we can set up calls without audio (text+video).
And ... it works!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 17:12:13 +00:00
Joshua Colp e6a260c747 Add an API call (ast_async_parseable_goto) which parses a goto string and does an async goto instead of an explicit goto.
(closes issue #11753)
Reported by: johan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 15:47:00 +00:00
Tilghman Lesher 26755e3882 Context tracing for channels
(closes issue #11268)
 Reported by: moy
 Patches: 
       chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 04:43:33 +00:00
Mark Michelson 566a005512 Add proper "false" case behavior to GotoIfTime
(closes issue #11719)
Reported by: kshumard
Patches:
      gotoiftime.twobranches.patch uploaded by kshumard (license 92)
	  Tested by: kshumard



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 23:07:12 +00:00
Russell Bryant 75fd299f1b Merged revisions 103728 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103728 | russell | 2008-02-15 13:50:11 -0600 (Fri, 15 Feb 2008) | 4 lines

In the case that you try to directly reload a module has returned 
AST_MODULE_LOAD_DECLINE, log a message indicating that the module is not fully
initialized and must be initialized using "module load".

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 19:50:47 +00:00
Russell Bryant 71646d663b Merged revisions 103726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103726 | russell | 2008-02-15 12:33:29 -0600 (Fri, 15 Feb 2008) | 6 lines

Don't attempt to execute the reload callback for a module that returned
AST_MODULE_LOAD_DECLINE.  This fixes a crash that was reported against
chan_console in trunk.

(closes issue #11953, reported by junky, fixed by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 18:34:42 +00:00
Jason Parker 72bc8a7c7d Fix up some doxygen issues.
(closes issue #11996)
Patches:
      bug_11996_doxygen.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 17:29:08 +00:00
Mark Michelson 23fc97480e Fix a small logic error in ast_event_iterator_next. The previous logic allowed for the iterator
to indicate there was more data than there really was, causing the iterator read beyond the end
of the event structure. This led to invalid memory reads and potential crashes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-13 00:55:09 +00:00
Jason Parker 2aa1c03667 Even more sane permissions. This should be handled via a umask, like in many other places.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 20:27:01 +00:00
Jason Parker 7dd21605f3 Use slight more sane permissions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 20:02:32 +00:00
Russell Bryant e29680ed66 Remove development version notice.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 15:39:44 +00:00
Russell Bryant d42f6f7ce5 Fix build on *BSD. These permissions constants are not available there.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 15:16:39 +00:00
Jeff Peeler 16a14a4cd8 Requested changes from Pari, reviewed by Russell.
Added ability to retrieve list of categories in a config file.
Added ability to retrieve the content of a particular category.
Added ability to empty a context.
Created new action to create a new file.
Updated delete action to allow deletion by line number with respect to category.
Added new action insert to add new variable to category at specified line.
Updated action newcat to allow new category to be inserted in file above another existing category.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 00:24:36 +00:00
Joshua Colp c81350d6f6 Just some minor coding style cleanup...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 18:27:47 +00:00
Joshua Colp ef267cd838 Fix Manager Redirect while in an AGI.
(closes issue #10661)
Reported by: junky


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 17:25:04 +00:00
Joshua Colp 9587f09103 Add support for allowing a native bridge to happen when the L option is enabled. The RTP bridging could already handle this, it just needed to be enabled in the main bridging code.
(issue #10647)
Reported by: samdell3


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 16:17:15 +00:00
Mark Michelson 9d683be81a Fix a problem regarding network vs. host byte order
in the event API.

ast_event_iterator_get_ie_type should return the ie type in
host byte order. Furthermore, ast_event_get_ie_raw should already
have its ie type argument in host byte order since it could be called
externally (and it in fact is called in this way by ast_event_get_cached).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 02:47:25 +00:00
Russell Bryant 1ec8cb41a8 Merge changes from team/mvanbaak/cli-command-audit
(closes issue #8925)

About a year ago, as Leif Madsen and Jim van Meggelen were going over the CLI
commands in Asterisk 1.4 for the next version of their book, they documented
a lot of inconsistencies.  This set of changes addresses all of these issues
and has been reviewed by Leif.

While this does introduce even more changes to the CLI command structure, it
makes everything consistent, which is the most important thing.

Thanks to all that helped with this one!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-08 21:26:32 +00:00
Jason Parker 1663494073 Merged revisions 102858 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r102858 | qwell | 2008-02-07 13:53:55 -0600 (Thu, 07 Feb 2008) | 7 lines

Specify which digit string was matched in debug message.

(closes issue #11949)
Reported by: dimas
Patches:
      v1-feature-debug.patch uploaded by dimas (license 88)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-07 20:02:17 +00:00
Mark Michelson fe9821cc10 Get rid of any remaining ast_verbose calls in the code in favor of
ast_verb

(closes issue #11934)
Reported by: mvanbaak
Patches:
      20080205_astverb-2.diff.txt uploaded by mvanbaak (license 7)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-05 23:00:15 +00:00
Jason Parker dc6e5d6aae Change where priority of a goto is adjusted.
Partially reverts 102272.

Closes issue #11929
(credit to file for fix suggestion - we still <3 you)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-05 20:51:50 +00:00
Tilghman Lesher 1dc86caf30 Merged revisions 102323 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r102323 | tilghman | 2008-02-04 15:06:09 -0600 (Mon, 04 Feb 2008) | 7 lines

Cross-platform fix:  OS X now deprecates the use of the daemon(3) API.
(closes issue #11908)
 Reported by: oej
 Patches: 
       20080204__bug11908.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-04 21:15:18 +00:00
Joshua Colp c6fc44f927 Update handling of asyncgoto so it properly works on channels that are currently executing a PBX.
(closes issue #11914)
Reported by: arnd
(closes issue #11753)
Reported by: johan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-04 15:16:05 +00:00
Tilghman Lesher fa4c9a958b CoreSettings and CoreStatus are missing the terminating "\r\n". Also, some
miscellaneous spacing and initialization issues.
(closes issue #11909)
 Reported by: srt
 Patches: 
       patch-11909-2.diff uploaded by srt (license 378)
 Tested by: srt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-03 17:40:48 +00:00
Tilghman Lesher 1ce6a2d5ec Merged revisions 101772 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101772 | tilghman | 2008-02-01 09:55:58 -0600 (Fri, 01 Feb 2008) | 2 lines

Compatibility fix for OpenWRT (reported by Brian Capouch via the mailing list)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 16:01:22 +00:00
Russell Bryant 1ce789336b Merged revisions 101601 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101601 | russell | 2008-01-31 17:10:06 -0600 (Thu, 31 Jan 2008) | 12 lines

Fix a couple of places where ast_frfree() was not called on a frame that came
from a translator.  This showed itself by g729 decoders not getting released.
Since the flag inside the translator frame never got unset by freeing the frame
to indicate it was no longer in use, the translators never got destroyed, and
thus the g729 licenses were not released.

(closes issue #11892)
Reported by: xrg
Patches:
      11892.diff uploaded by russell (license 2)
Tested by: xrg, russell

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 23:14:57 +00:00
Steve Murphy 671c08af6d Merged revisions 101480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101480 | murf | 2008-01-31 12:30:37 -0700 (Thu, 31 Jan 2008) | 1 line

closes issue #11845; that's the one where there's a 1004 byte cdr leak with every AMI Redirect to a zap channel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 19:43:40 +00:00
Olle Johansson 94325433a2 - doxygen fixes
- change function to void because it always returned the same value and no one read it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 16:39:14 +00:00
Olle Johansson e7bcc4e96c Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 16:22:06 +00:00
Joshua Colp cb8678b5da Merged revisions 101222 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101222 | file | 2008-01-30 11:41:04 -0400 (Wed, 30 Jan 2008) | 4 lines

Fix an issue where if a frame of higher sample size preceeded a frame of lower sample size and ast_slinfactory_read was called with a sample size of the combined values or higher a crash would happen.
(closes issue #11878)
Reported by: stuarth

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 15:42:29 +00:00
Russell Bryant 793edbecd0 Merged revisions 100932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100932 | russell | 2008-01-29 11:43:41 -0600 (Tue, 29 Jan 2008) | 4 lines

Fix the last couple of issues related to building from a path that contains spaces.

(closes issue #11834)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-29 17:44:05 +00:00
Tilghman Lesher 2f44f53ea4 Merged revisions 100675 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100675 | tilghman | 2008-01-28 15:02:02 -0600 (Mon, 28 Jan 2008) | 2 lines

WaitExten didn't handle AbsoluteTimeout properly (went to 't' instead of 'T')

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 21:05:29 +00:00
Russell Bryant bcf72e1adb Merge rev 100626 from Asterisk 1.4. The svnmerge of this commit was a NoOp, since
res_features doesn't exist in trunk.  Thanks to qwell for pointing it out!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 18:41:23 +00:00
Tilghman Lesher 8fd1e10d3d Normalize the detection for execinfo, so that Linux (glibc) and other platforms
with libexecinfo will generate inline stack backtraces correctly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 18:27:29 +00:00
Russell Bryant 1c74c549d7 Merged revisions 100581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100581 | russell | 2008-01-28 11:15:41 -0600 (Mon, 28 Jan 2008) | 9 lines

Make some deadlock related fixes.  These bugs were discovered and reported
internally at Digium by Steve Pitts.
 - Fix up chan_local to ensure that the channel lock is held before the local
   pvt lock.
 - Don't hold the channel lock when executing the timing function, as it can
   cause a deadlock when using chan_local.  This actually changes the code back
   to be how it was before the change for issue #10765.  But, I added some other
   locking that I think will prevent the problem reported there, as well.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 17:21:24 +00:00
Russell Bryant f877028d76 Clean up some formatting, and simplify a bit of code using ast_str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 14:27:28 +00:00
Russell Bryant 87800e1913 Make a couple more uses of ARRAY_LEN, and convert some spaces to tabs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 04:43:14 +00:00
Russell Bryant e8f7cbf358 - Simplify a line with ARRAY_LEN()
- Make a few little formatting changes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 04:30:44 +00:00
Russell Bryant 79be2b8b0e These readlocks always fail for me on my mac, and I saw it happen again
today on another mac.  We ignore the return value of locking operations almost
everywhere in Asterisk.  So, ignore these, as well, so Asterisk will actually
work on systems where this is occurring while I look into what the issue is.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 00:56:14 +00:00
Tilghman Lesher ac699196f5 Merged revisions 100465 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100465 | tilghman | 2008-01-27 15:59:53 -0600 (Sun, 27 Jan 2008) | 11 lines

When deleting a task from the scheduler, ignoring the return value could
possibly cause memory to be accessed after it is freed, which causes all
sorts of random memory corruption.  Instead, if a deletion fails, wait a
bit and try again (noting that another thread could change our taskid
value).
(closes issue #11386)
 Reported by: flujan
 Patches: 
       20080124__bug11386.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, flujan, stuarth`

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-27 22:35:29 +00:00
Joshua Colp 0b898073d1 Add an API call that steals the answered channel so that a destruction of the dialing structure does not hang it up.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-25 02:52:10 +00:00
Joshua Colp 65e684653d Minor cosmetic change...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 20:32:05 +00:00
James Golovich 8bcc2a55ae Increase the size of filenames stored when astmm is used. If the path
length was long they would be truncated and grouped together with 
whatever matches



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 18:35:04 +00:00
Joshua Colp 3bf7daa0c0 Merge in strictrtp branch. This adds a strictrtp option to rtp.conf which drops packets that do not come from the remote party.
(closes issue #8952)
Reported by: amorsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 17:47:50 +00:00
Russell Bryant ccdd466fab Merged revisions 100164 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100164 | russell | 2008-01-24 11:22:09 -0600 (Thu, 24 Jan 2008) | 2 lines

Update main Asterisk copyright info to 2008

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 17:24:08 +00:00
Jason Parker e88241c45b Merged revisions 100138 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100138 | qwell | 2008-01-24 10:41:29 -0600 (Thu, 24 Jan 2008) | 6 lines

Fix compilation on Solaris.

(closes issue #11832)
Patches:
      bug-11832.diff uploaded by snuffy (license 35)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 16:47:10 +00:00
Jason Parker 32989872dd Move chan_local dependency into places (only one) that previously depended on res_features, and used local channels
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 16:14:07 +00:00
Joshua Colp 1d47c036dd Some more cosmetic changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 03:34:57 +00:00
Joshua Colp 15515ec671 Add some spacing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 03:30:56 +00:00
Joshua Colp 9eff881130 Test hopefully over.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 03:25:52 +00:00
Joshua Colp 828124b0b0 Testing something...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 03:07:34 +00:00
Jason Parker 3bd33214b9 Move code from res_features into (new file) main/features.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 23:09:11 +00:00
Russell Bryant 6100ec9e7d Fix tcptls build when openssl isn't installed
(closes issue #11813)
Reported by: tzafrir
Patches:
      asterisk-tcptls.diff.txt uploaded by jamesgolovich (license 176)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 17:35:54 +00:00
Tilghman Lesher 42ee3b5b74 Merged revisions 99718 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99718 | tilghman | 2008-01-22 18:56:06 -0600 (Tue, 22 Jan 2008) | 2 lines

Just confirmed that all current platforms need this header file

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 01:06:27 +00:00
Tilghman Lesher 3d92f97722 Merged revisions 99643 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99643 | tilghman | 2008-01-22 14:34:55 -0600 (Tue, 22 Jan 2008) | 2 lines

Fix the defines for OS X (and Solaris, too)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 20:42:47 +00:00
Russell Bryant 90bc08362e Make sure the command is not just present but is also configured to be executed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 20:41:05 +00:00
Olle Johansson b8aa3248ec Add a generic function to set the bridged call PVT unique id string
as a channel variable BRIDGEPVTCALLID

This is important for call tracing in log files and CDRs, so that
the SIP callID can be traced along servers.

The CHANNEL dialplan function won't work here, since the outbound
channel is gone when we need the Call-ID.

Other channel drivers may now implement the same function :-),
but this patch only supports chan_sip.so.

Inspired by (issue #11816)
Reported by: ctooley

Patch by oej



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 20:35:10 +00:00
Russell Bryant d1ba37f1c9 Change the Asterisk CLI startup commands feature to read commands to run from cli.conf
after a discussion on the -dev list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 20:33:16 +00:00
Tilghman Lesher 54fc5f984b Merged revisions 99540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99540 | tilghman | 2008-01-22 10:54:06 -0600 (Tue, 22 Jan 2008) | 7 lines

Ensure that we can get an address even when we don't have a default route.
(closes issue #9225)
 Reported by: junky
 Patches: 
       20080122__bug9225.diff.txt uploaded by Corydon76 (license 14)
 Tested by: oej, loloski, sergee

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 17:15:08 +00:00
Olle Johansson 865bb84432 Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 08:58:46 +00:00
Russell Bryant aa7592f21a Merged revisions 99187 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99187 | russell | 2008-01-19 04:05:27 -0600 (Sat, 19 Jan 2008) | 4 lines

Fix a couple of memory leaks with frame handling.  Specifically,
ast_frame_free() needed to be called on the frame that came from the translator
to signed linear.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-19 10:06:02 +00:00
Russell Bryant b995c78c31 Merge changes from team/group/sip-tcptls
This set of changes introduces TCP and TLS support for chan_sip.  There are various
new options in configs/sip.conf.sample that are used to enable these features.  Also,
there is a document, doc/siptls.txt that describes some things in more detail.

This code was implemented by Brett Bryant and James Golovich.  It was reviewed
by Joshua Colp and myself.  A number of other people participated in the testing
of this code, but since it was done outside of the bug tracker, I do not have their
names.  If you were one of them, thanks a lot for the help!

(closes issue #4903, but with completely different code that what exists there.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-18 22:04:33 +00:00
Russell Bryant 1807acb9b0 Merged revisions 99081 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99081 | russell | 2008-01-18 15:37:21 -0600 (Fri, 18 Jan 2008) | 9 lines

Revert adding the packed attribute, as it really doesn't make sense why that
would do any good.  Fix the real bug, which is to do the check to see if the
frame came from a translator at the beginning of ast_frame_free(), instead of
at the end.  This ensures that it always gets checked, even if none of the
parts of the frame are malloc'd, and also ensures that we aren't looking at
free'd memory in the case that it is a malloc'd frame.

(closes issue #11792, reported by explidous, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-18 21:38:01 +00:00
Russell Bryant d09fdcf61d Add AST_FORMAT_SLINEAR16 to the list for ast_best_codec()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 23:20:37 +00:00
Russell Bryant 2a91da6613 Merged revisions 99004 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99004 | russell | 2008-01-17 16:37:22 -0600 (Thu, 17 Jan 2008) | 10 lines

Have IAX2 optimize the codec translation path just like chan_sip does it.  If
the caller's codec is in our codec list, move it to the top to avoid transcoding.

(closes issue #10500)
Reported by: stevedavies
Patches:
      iax-prefer-current-codec.patch uploaded by stevedavies (license 184)
      iax-prefer-current-codec.1.4.patch uploaded by stevedavies (license 184)
Tested by: stevedavies, pj, sheldonh

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 22:50:13 +00:00
Jason Parker 8dc5e09ccb Add several busy detection related defines to menuselect.
Allow better busy detect debugging (with BUSYDETECT_DEBUG).

Remove very old BUSYDETECT and BUSY_DETECT_MARTIN defines.

(closes issue #11107)
Patches:
      busydetect_enhancement.patch uploaded by agx (license 298)
      busydetect-r94975.diff uploaded by sergee (license 138)

Additional changes/cleanup by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 20:51:26 +00:00
Russell Bryant 8a5e93d766 Add support for an easy way to automatically execute some Asterisk CLI commands
immediately at startup.  Any commands in the startup_commands file in the Asterisk
config diretory will get executed.

(closes issue #11781)
Reported by: jamesgolovich
Patches:
      asterisk-startupcmds.diff.txt uploaded by jamesgolovich (license 176)
	    -- With some changes by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 00:05:13 +00:00
Tilghman Lesher 81e421284d New module res_config_curl (closes issue #11747)
Reported by: Corydon76
 Patches: 
       res_config_curl.c uploaded by Corydon76 (license 14)
       20080116__bug11747.diff.txt uploaded by Corydon76 (license 14)
 Tested by: jmls


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 22:20:45 +00:00
Joshua Colp bb08e13754 Merged revisions 98960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98960 | file | 2008-01-16 11:08:24 -0400 (Wed, 16 Jan 2008) | 6 lines

Introduce a lock into the dialing API that protects it when destroying the structure.
(closes issue #11687)
Reported by: callguy
Patches:
      11687.diff uploaded by file (license 11)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 15:09:37 +00:00
Joshua Colp 2ee416a55a Merged revisions 98958 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98958 | file | 2008-01-16 11:03:14 -0400 (Wed, 16 Jan 2008) | 4 lines

Add two more SDP names for ulaw and alaw.
(closes issue #11777)
Reported by: tootai

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 15:04:08 +00:00
Steve Murphy 241de02854 Terry found this problem with running the expr2 parser on OSX. Make the #defines come out the same between the parser & lexer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 01:35:10 +00:00
Russell Bryant 25e1c74bf1 Clean up something I did for ABI compatability in 1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:35:29 +00:00
Russell Bryant 4fb04cb58a Merged revisions 98943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98943 | russell | 2008-01-15 17:26:52 -0600 (Tue, 15 Jan 2008) | 25 lines

Commit a fix for some memory access errors pointed out by the valgrind2.txt
output on issue #11698.

The issue here is that it is possible for an instance of a translator to get
destroyed while the frame allocated as a part of the translator is still being
processed.  Specifically, this is possible anywhere between a call to ast_read()
and ast_frame_free(), which is _a lot_ of places in the code.  The reason this
happens is that the channel might get masqueraded during this time.  During a
masquerade, existing translation paths get destroyed.

So, this patch fixes the issue in an API and ABI compatible way.  (This one is
 for you, paravoid!)

It changes an int in ast_frame to be used as flag bits.  The 1 bit is still used
to indicate that the frame contains timing information.  Also, a second flag has
been added to indicate that the frame came from a translator.  When a frame with
this flag gets released and has this flag, a function is called in translate.c to
let it know that this frame is doing being processed.  At this point, the flag gets
cleared.  Also, if the translator was requested to be destroyed while its internal
frame still had this flag set, its destruction has been deffered until it finds out
that the frame is no longer being processed.

Admittedly, this feels like a hack.  But, it does fix the issue, and I was not able 
to think of a better solution ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:31:53 +00:00
Joshua Colp e8dee9f956 Make sure the user's manager secret exists, even if it is blank.
(closes issue #11749)
Reported by: srt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 20:01:19 +00:00
Russell Bryant 673d610b53 Merged revisions 98774 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98774 | russell | 2008-01-14 11:38:38 -0600 (Mon, 14 Jan 2008) | 3 lines

Revert a change that introduces an unacceptable performance hit and is causing
memory leaks ... (from rev 97973)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 17:39:31 +00:00
Joshua Colp 3a37332880 Print out a warning when spaces are used in the variable name in Set and MSet. It is extremely hard to debug this issue so this should make it easier.
(closes issue #11759)
Reported by: caio1982
Patches:
      setvar_space_warning1.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 15:07:30 +00:00
Russell Bryant b7425090c8 Remove a duplicate lock of the audiohook lock when destroying manipulate
audiohooks.  This causes an error when we attempt to destroy the lock later
when freeing the audiohook.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-13 00:10:00 +00:00
Russell Bryant d0c89ab7ed Add a new CLI command, "core set chanvar", which allows you to set a channel
variable (or function) on an active channel from the CLI.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-12 19:34:38 +00:00
Tilghman Lesher 3968dd1c3d Conversion to load manager.conf into memory did not convert the password
functions correctly.  (Closes issue #11749)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-12 18:12:56 +00:00
Pari Nannapaneni 0c33fdfb49 merging a comment added in 1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-12 05:13:04 +00:00
Joshua Colp 4fe093b821 Goodbye again drumkilla.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 23:09:31 +00:00
Joshua Colp e0532df614 drumkilla ftw.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 23:00:21 +00:00
Joshua Colp b8efdb304b I am no longer Rockin'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 22:59:13 +00:00
Joshua Colp 225f268e88 Testing something...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 22:57:39 +00:00
Joshua Colp 8e0dbcf7d7 Merged revisions 98325 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98325 | file | 2008-01-11 15:51:10 -0400 (Fri, 11 Jan 2008) | 6 lines

If the incoming RTP stream changes codec force the bridge to break if the other side does not support it.
(closes issue #11729)
Reported by: tsearle
Patches:
      new_codec_patch_udiff.patch uploaded by tsearle (license 373)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:53:01 +00:00
Mark Michelson e04aa9eed4 Merged revisions 98315 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98315 | mmichelson | 2008-01-11 13:10:57 -0600 (Fri, 11 Jan 2008) | 5 lines

Properly report the hangup cause as no answer when someone does not answer

(closes issue #10574, reported by boch, patched by moy)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:12:05 +00:00
Russell Bryant 9387f036d8 - Fix the last set of places where incorrect assumptions were made about the
sample length with g722.  It is _2_ samples per byte, not 1.  This was all
   over the place, and I believed it, and it is what caused me to take so long
   to figure out what was broken.
 - Update copyright information on codec_g722.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 03:37:19 +00:00
Mark Michelson e1e186471f Fix "core show translation" to not output information for "unknown" codecs.
This fix was made in favor of the proposed patch since it doesn't involve changing
a core codec define.

(closes issue #11722, reported and initially patched by caio1982, final patch by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 00:54:54 +00:00
Russell Bryant 7bb6547a71 Simplify this code with a suggestion from Luigi on the asterisk-dev list.
Instead of using is16kHz(), implement a format_rate() function.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 00:12:22 +00:00
Tilghman Lesher c88f243d8d Merged revisions 97973 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97973 | tilghman | 2008-01-10 17:08:36 -0600 (Thu, 10 Jan 2008) | 6 lines

1) When we get a translated frame out, clone it, because if the
translator pvt is freed before we use the frame, bad things happen.
2) Getting a failure from ast_sched_delete means that the schedule
ID is currently running.  Don't just ignore it.
(Closes issue #11698)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 23:40:13 +00:00
Russell Bryant 3d47a43ac2 Merged revisions 97976 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97976 | russell | 2008-01-10 17:30:40 -0600 (Thu, 10 Jan 2008) | 3 lines

Fix various timing calculations that made assumptions that the audio being
processed was at a sample rate of 8 kHz.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 23:33:24 +00:00
Steve Murphy 33fadcc67c Merged revisions 97849 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97849 | murf | 2008-01-10 13:21:27 -0700 (Thu, 10 Jan 2008) | 1 line

This is a fix for 2 things: a problem Terry was having in OSX with null pointers, which was my fault, as I probably forgot to run the sed script last time I made mods. So, I moved the fix into the flex input itself. Then, I found when I used flex 2.5.33, that it was using __STDC_VERSION__, and that's not real good; so I added back in a DIFFERENT sed script to fix that little mess. Tested everything, a couple different ways. Hope I did no harm, at the least.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 20:45:05 +00:00
Terry Wilson 4a403e3c33 heh, remove patch to generated file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 19:07:36 +00:00