dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

577 Commits

Author SHA1 Message Date
tilghman d562aee1a3 Allow locks to be inherited through a masquerade without causing starvation.
(closes issue #14859)
 Reported by: atis
 Patches: 
       20090821__issue14859.diff.txt uploaded by tilghman (license 14)
       20090925__issue14859__1.6.1.diff.txt uploaded by tilghman (license 14)
 Tested by: atis, tilghman


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@221044 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-30 04:32:36 +00:00
mvanbaak c2a0f204a3 add name argument for the CALLERID dialplan function to the xml documentation.
Pointed out to me on IRC by snuff-home. Thanks


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@220629 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-27 20:40:16 +00:00
tilghman 40563b4d1c Allow multiple rows to be fetched within the normal mode of operation.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@216846 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-07 17:15:37 +00:00
tilghman dc61593f9a Add MASTER_CHANNEL() dialplan function, as well as a useful usage.
(closes issue #13140)
 Reported by: cpina
 Patches: 
       20090807__issue13140.diff.txt uploaded by tilghman (license 14)
 Tested by: lmadsen
 Change-type: feature


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@215301 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-01 23:41:06 +00:00
oej d000fabce0 By copying this code I got bad comments in reviewboard... Better fix the original.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@215023 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-31 18:17:38 +00:00
tilghman 3203e40f43 Add SSL_VERIFYPEER, as requested on the -users list
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@212249 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-14 17:36:40 +00:00
tilghman d1ec1aa57d AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10 19:20:57 +00:00
dbrooks 041c6da20c Fixes numerous spelling errors. Patch submitted by alecdavis.
(closes issue #15595)
Reported by: alecdavis



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@209554 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-30 16:07:05 +00:00
tilghman a9f8de0420 Merged revisions 207945 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r207945 | tilghman | 2009-07-21 17:38:54 -0500 (Tue, 21 Jul 2009) | 8 lines
  
  Force an error if a blank is passed to QUOTE (because the documentation states the argument is not optional).
  This change makes URIENCODE and QUOTE behave similarly, since the documentation
  states that the argument is not optional, for both.
  (closes issue #15439)
   Reported by: pkempgen
   Patches: 
         20090706__issue15439.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@207946 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-21 22:45:32 +00:00
kpfleming 3dbaf0de9a Merged revisions 207647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
  
  Ensure that user-provided CFLAGS and LDFLAGS are honored.
  
  This commit changes the build system so that user-provided flags (in ASTCFLAGS
  and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
  by the build system itself, so that the user can effectively override the
  build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
  be provided *either* in the environment before running 'make', or as variable
  assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
  is no longer necessary, so they are no longer documented, but are still supported
  so as not to break existing build systems that supply them when building Asterisk.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@207680 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-21 13:28:04 +00:00
dvossel 189a5d94f5 TIMEOUT(absolute) returned negative value.
(closes issue #15513)
Reported by: ys



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@206877 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-16 21:45:14 +00:00
tilghman 44d46d056f Merged revisions 206807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r206807 | tilghman | 2009-07-16 11:27:35 -0500 (Thu, 16 Jul 2009) | 6 lines
  
  Fix a memory leak.
  (closes issue #15517)
   Reported by: adomjan
   Patches: 
         func_realtime.c-ast_variable_destroy.diff uploaded by adomjan (license 487)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@206808 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-16 16:51:05 +00:00
mnicholson 965fcb9d6f Convert func_odbc to use ast_dummy_alloc_channel()
Review: https://reviewboard.asterisk.org/r/290/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@205666 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-09 20:04:43 +00:00
seanbright 0071975778 Support setting and receiving Reverse Charging Indication over ISDN PRI.
This is a continuation of revision 885 to LibPRI (Capture and expose the Reverse
Charging Indication IE on ISDN PRI) which added the ability to get/set Reverse
Charging Indication in LibPRI.  This patch adds the ability to specify RCI on
the outbound leg of a PRI call from within Asterisk, by prefixing the dialed
number with a capital 'C' like:

...,Dial(DAHDI/g1/C4445556666)

And to read it off an inbound channel:

exten => s,1,Set(RCI=${CHANNEL(reversecharge)})

Thanks again to rmudgett for the thorough review.

(closes issue #13760)
Reported by: mrgabu

Review: https://reviewboard.asterisk.org/r/303/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@204749 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-02 17:46:14 +00:00
russell ac3b35dcc7 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

Review: https://reviewboard.asterisk.org/r/239/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203638 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26 15:28:53 +00:00
tilghman b6e8c84d13 Clarify CUT code, and in the process, fix a bug in trunk only
(closes issue #15320)
 Reported by: chappell
 Patches: 
       cut_fix.patch uploaded by chappell (license 8)
       cut_clarify.patch uploaded by chappell (license 8)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@201745 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-18 18:24:23 +00:00
kpfleming 5fa0b7c277 More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200620 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-15 17:34:30 +00:00
eliel 501ad299ad Move function SYSINFO documentation to XML.
Move function SYSINFO static documentation to the new AstXML form.

(issue #15245)
Reported by: eliel
Patches:
      func_sysinfo_static_conversion.txt uploaded by lmadsen (license 10)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@199374 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-06 21:56:58 +00:00
tilghman d79b32623f Add INCrement and DECrement functions
(closes issue #15025)
 Reported by: greenfieldtech
 Patches: 
       func_math.c.patch_v4 uploaded by greenfieldtech (license 369)
       slightly modified by me
 Tested by: greenfieldtech, lmadsen


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198725 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-01 20:33:50 +00:00
tilghman b28431fd17 Fix documentation for FIELDQTY.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198470 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-31 17:52:28 +00:00
tilghman 15b8686c57 Recorded merge of revisions 197194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r197194 | tilghman | 2009-05-27 14:09:42 -0500 (Wed, 27 May 2009) | 5 lines
  
  Use a different determinator on whether to print the delimiter, since leading fields may be blank.
  (closes issue #15208)
   Reported by: ramonpeek
   Patch by me, though inspired in part by a patch from ramonpeek
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@197209 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-27 19:20:56 +00:00
kpfleming 230a66da7d Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21 21:13:09 +00:00
kpfleming f58bc31e46 add 'const' qualifiers in various places where they should have been
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193832 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-12 13:59:35 +00:00
lmadsen c23b7c5d12 Recorded merge of revisions 193544 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193544 | lmadsen | 2009-05-11 13:35:17 -0400 (Mon, 11 May 2009) | 7 lines
  
  Document CHANNEL(transfercapability) in CLI documentation.
  
  (issue #15073)
  Reported by: pkempgen
  Patches:
        20090511__issue15073.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193545 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-11 18:01:44 +00:00
seanbright 5c6e7815cb Fix the spelling of UNAVAILABLE in func_devstate CLI completion.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193274 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-08 15:18:40 +00:00
tilghman ad0a92b9a4 Second result should not contain data from the first result.
(closes issue #15039)
 Reported by: jims
 Patches: 
       20090506__issue15039.diff.txt uploaded by tilghman (license 14)
 Tested by: jims


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193006 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-07 17:51:13 +00:00
tilghman 8fc2c0f724 Merge str_substitution branch.
This branch adds additional methods to dialplan functions, whereby the result
buffers are now dynamic buffers, which can be expanded to the size of any
result.  No longer are variable substitutions limited to 4095 bytes of data.
In addition, the common case of needing buffers much smaller than that will
enable substitution to only take up the amount of memory actually needed.
The existing variable substitution routines are still available, but users
of those API calls should transition to using the dynamic-buffer APIs.
Reviewboard: http://reviewboard.digium.com/r/174/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191140 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29 18:53:01 +00:00
rmudgett 36963c1bce Make PTP DivertingLegInformation3 message behavior closer to the specifications.
*  Wait for a DivertingLegInformation3 message after receiving a
DivertingLegInformation1 message to complete the redirecting-to information
before queuing a redirecting update to the other channel.

*  A DivertingLegInformation2 message should be responded to with a
DivertingLegInformation3 when the COLR is determined.  If the call
could or does experience another redirection, you should manually
determine the COLR to send to the switch by setting REDIRECTING(to-pres)
to the COLR and setting REDIRECTING(to-num) = ${EXTEN}.

*  A DivertingLegInformation2 message must have an original called number
if the redirection count is greater than one.  Since Asterisk does
not keep track of this information, we can only indicate that the
number is not available due to interworking.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190735 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-27 20:03:49 +00:00
rmudgett baf54d0843 There is no need to use the struct ast_party_connected_line.source update values.
The messages sent by a technology when a connected line update is received
are best determined by the current call state of the channel.  The struct
ast_party_connected_line.source value is really only useful as a possible
tracing aid.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190517 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-24 17:59:01 +00:00
russell 89175b7e04 Convert the ast_channel data structure over to the astobj2 framework.
There is a lot that could be said about this, but the patch is a big 
improvement for performance, stability, code maintainability, 
and ease of future code development.

The channel list is no longer an unsorted linked list.  The main container 
for channels is an astobj2 hash table.  All of the code related to searching 
for channels or iterating active channels has been rewritten.  Let n be 
the number of active channels.  Iterating the channel list has gone from 
O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).  
Searching for a channel by extension is still O(n), but uses a new method 
for doing so, which is more efficient.

The ast_channel object is now a reference counted object.  The benefits 
here are plentiful.  Some benefits directly related to issues in the 
previous code include:

1) When threads other than the channel thread owning a channel wanted 
   access to a channel, it had to hold the lock on it to ensure that it didn't 
   go away.  This is no longer a requirement.  Holding a reference is 
   sufficient.

2) There are places that now require less dealing with channel locks.

3) There are places where channel locks are held for much shorter periods 
   of time.

4) There are places where dealing with more than one channel at a time becomes 
   _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the 
   future that deals with multiple channels will be much easier.

Some additional information regarding channel locking and reference count 
handling can be found in channel.h, where a new section has been added that 
discusses some of the rules associated with it.

Mark Michelson also assisted with the development of this patch.  He did the 
conversion of ChanSpy and introduced a new API, ast_autochan, which makes it 
much easier to deal with holding on to a channel pointer for an extended period 
of time and having it get automatically updated if the channel gets masqueraded.
Mark was also a huge help in the code review process.

Thanks to David Vossel for his assistance with this branch, as well.  David 
did the conversion of the DAHDIScan application by making it become a wrapper 
for ChanSpy internally.

The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.

Review: http://reviewboard.digium.com/r/203/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190423 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-24 14:04:26 +00:00
twilson f9a7e89b8a Fix example that could fail in certain circumstances
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190154 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-23 00:44:18 +00:00
jpeeler f3943d3662 Fix building of chan_h323 with gcc-3.3
There seems to be a bug with old versions of g++ that doesn't allow a structure
member to use the name list. Rename list member to group_list in ast_group_info
and change the few places it is used.

(closes issue #14790)
Reported by: stuarth


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190057 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-22 21:15:55 +00:00
twilson a4012d9519 Add funcs for manipulating delimited lists in the dialplan
Adds PUSH and POP for appending to and retrieving/removing from the
end of a list and UNSHIFT and SHIFT for insert to and retrieiving/
removing from the beginning of a list.

Review: http://reviewboard.digium.com/r/230


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190000 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-22 20:07:41 +00:00
tilghman f0f84bc88d If the first column is empty, output a delimiter anyway.
(closes issue #14848)
 Reported by: john8675309
 Patches: 
       20090408__bug14848.diff.txt uploaded by tilghman (license 14)
 Tested by: john8675309


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187050 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08 17:08:43 +00:00
mmichelson 85bd9cd2bf Silly svn. These files didn't get merged over in the merge of the issue8824 branch.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186620 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-06 16:06:25 +00:00
russell 42822e71ab Add support for the "name" option in the CHANNEL() function.
Review: http://reviewboard.digium.com/r/199/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182762 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17 21:28:04 +00:00
tilghman f19163cc1f Fix an off-by-one error in the FILE() function, and extend FILE()'s length parameter to work like variable substitution.
Previously, FILE() returned one less character than specified, due to the
terminating NULL.  Both the offset and length parameters now behave
identically to the way variable substitution offsets and lengths also work.
(closes issue #14670)
 Reported by: BMC


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182278 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-16 17:33:38 +00:00
tilghman 48707e53d9 ODBC transaction support
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177320 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-19 00:26:01 +00:00
russell 1f57cd4e51 Merge a large set of updates to the Asterisk indications API.
This patch includes a number of changes to the indications API.  The primary
motivation for this work was to improve stability.  The object management
in this API was significantly flawed, and a number of trivial situations could
cause crashes.

The changes included are:

1) Remove the module res_indications.  This included the critical functionality
   that actually loaded the indications configuration.  I have seen many people
   have Asterisk problems because they accidentally did not have an
   indications.conf present and loaded.  Now, this code is in the core,
   and Asterisk will fail to start without indications configuration.

   There was one part of res_indications, the dialplan applications, which did
   belong in a module, and have been moved to a new module, app_playtones.

2) Object management has been significantly changed.  Tone zones are now
   managed using astobj2, and it is no longer possible to crash Asterisk by
   issuing a reload that destroys tone zones while they are in use.

3) The API documentation has been filled out.

4) The API has been updated to follow our naming conventions.

5) Various bits of code throughout the tree have been updated to account
   for the API update.

6) Configuration parsing has been mostly re-written.

7) "Code cleanup"

The code is from svn/asterisk/team/russell/indications/.

Review: http://reviewboard.digium.com/r/149/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176627 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 20:41:24 +00:00
tilghman 2a22b3a479 Add assertions in the quest to track down a refcount leak.
(closes issue #14485)
 Reported by: davevg


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176592 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 18:49:20 +00:00
tilghman 1846b2ef9d Don't increment the loop, now that incrementing is taken care of by the
decoder function.
(closes issue #14363)
 Reported by: andrew53
 Patches: 
       func_strings_filter.patch uploaded by andrew53 (license 519)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172706 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-31 16:40:59 +00:00
tilghman 1241cff712 Parameter position reversed in documentation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172548 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-30 18:36:56 +00:00
mmichelson 4070819100 Fix some signedness problems in func_aes.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@171797 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-28 00:17:55 +00:00
dvossel 904a944798 Adding AES_ENCRYPT and AES_DECRYPT dialplan functions.
(closes issue #14301)
Reported by: amorsen

review: http://reviewboard.digium.com/r/128/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@171757 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-27 22:43:36 +00:00
kpfleming a343f7a275 ast_str_SQLGetData is *not* part of the ast_str API, it's part of the ast_odbc API and just happens to use an ast_str as the buffer; move all of it to res_odbc.c and res_odbc.h, renaming appropriately
along the way fix some minor coding style issues in strings.h and add some attribute_pure annotations to functions in the ast_str API



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169438 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-19 21:42:46 +00:00
kpfleming fe480759d9 remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC
this stops modules from being linked against both sets of libraries on systems that have both installed



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168734 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-15 20:18:53 +00:00
russell d056b18a40 Merged revisions 168561 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines

Revert unnecessary indications API change from rev 122314

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168562 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13 19:22:13 +00:00
tilghman 343bfdb0d8 Merged revisions 168546 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168546 | tilghman | 2009-01-13 11:48:00 -0600 (Tue, 13 Jan 2009) | 6 lines
  
  If either conditional is NULL, don't try copying it.
  (closes issue #14226)
   Reported by: caspy
   Patches: 
         20090113__bug14226.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168547 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13 17:51:12 +00:00
eliel 217a9f1849 Fix a typo in the XML documentation of the AUDIOHOOK_INHERIT dialplan function.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166823 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-28 15:36:25 +00:00
mmichelson 55fa1516d4 Fix a file playback crash and explicitly initialize values in func_timeout.c
A crash was brought up on the bugtracker. The first run through valgrind
was full of legitimate complaints of uninitialized values in func_timeout when
setting a response timeout. These were fixed but the crash persisted.

A second run through showed the real problem. The reference counting used
for filestreams was incorrect because there were some missing increments
when a frame was read from a format module.

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166267 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-22 16:07:59 +00:00
mmichelson f288f37352 Remove the verbatim tag from the author line
I could have sworn I already did that before, though...



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166095 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19 22:40:57 +00:00
mmichelson 1a28ef410a Adding a new dialplan function AUDIOHOOK_INHERIT
This function is being added as a method to allow for
an audiohook to move to a new channel during a channel
masquerade. The most obvious use for such a facility is
for MixMonitor when a transfer is performed. Prior to
the addition of this functionality, if a channel 
running MixMonitor was transferred by another party, then
the recording would stop once the transfer had completed.
By using AUDIOHOOK_INHERIT, you can make MixMonitor 
continue recording the call even after the transfer
has completed.

It has also been determined that since this is seen
by most as a bug fix and is not an invasive change,
this functionality will also be backported to 1.4 and
merged into the 1.6.0 branches, even though they are
feature-frozen.

(closes issue #13538)
Reported by: mbit
Patches:
      13538.patch uploaded by putnopvut (license 60)
	  Tested by: putnopvut

Review: http://reviewboard.digium.com/r/102/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166092 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19 22:26:16 +00:00
tilghman 0bb7f0ce94 Add timezone to the possible fields in a timespec.
(closes issue #14028)
 Reported by: mostyn
 Patches: 
       timezone-v2.patch uploaded by mostyn (license 398)
       (with additional code guideline fixes and a memory leak fix by me - license 14)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164976 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16 22:57:17 +00:00
tilghman a41b34a63c Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13 08:36:35 +00:00
russell 3bd44b188a Merged revisions 163253 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r163253 | russell | 2008-12-11 15:46:29 -0600 (Thu, 11 Dec 2008) | 8 lines

Fix some observed slowdowns in dialplan processing.

The change is to remove autoservice usage from dialplan functions that do not
need it because they do not perform operations that potentially block.

(closes issue #13940)
Reported by: tbelder

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163254 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-11 21:48:08 +00:00
eliel cf6cd2d414 Avoid allocating memory for a thread that don't need it. Also, this memory was not being freed until the
main thread ends. (That is never).

(closes issue #14040)
Reported by: eliel
Patches:
      func_odbc.c.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161947 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-09 14:49:30 +00:00
rmudgett 1142abdad6 Jcolp pointed out that num will also match number
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160856 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-04 01:36:39 +00:00
rmudgett 75d0381a62 * Found a couple more places where num/number needed to be done
so 1.4 upgraders will not have problems.
*  Added curly braces and minor tweaks.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160854 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-04 01:14:22 +00:00
murf 79abcd111f Merged revisions 160703 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r160703 | murf | 2008-12-03 13:41:42 -0700 (Wed, 03 Dec 2008) | 11 lines

(closes issue #13597)
Reported by: john8675309
Patches:
      patch.13597 uploaded by murf (license 17)
Tested by: murf, john8675309

This patch causes the setcid func to update the CDR
clid after setting the channel field.

I also notice that in trunk, the num/number of 1.4 is
left out; I decided to include the option to use
either in trunk, so as not to have 1.4 upgraders
not to have problems.


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160760 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-03 21:09:15 +00:00
kpfleming bc729d661c we can now build with -Wformat=2, which found a couple of real bugs
because SPRINTF() use non-literal format strings (which cannot be checked), move it into its own module so the rest of func_strings can benefit from format string checking



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159774 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29 15:29:33 +00:00
seanbright 3ce5f8f4ee This is basically a complete rollback of r155401, as it was determined that
it would be best to maintain API compatibility.  Instead, this commit introduces
ao2_callback_data() which is functionally identical to ao2_callback() except
that it allows you to pass arbitrary data to the callback.

Reviewed by Mark Michelson via ReviewBoard:
	http://reviewboard.digium.com/r/64


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158959 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25 01:01:49 +00:00
mvanbaak 94f173ef51 last commit worked on OpenBSD but still generated warning on Ubuntu.
Initialise a variable so --enable-dev-mode does not complain


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158723 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-22 17:17:33 +00:00
mvanbaak 9106a36bea make this compile under devmode
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158686 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-22 15:58:49 +00:00
tilghman 873bae3754 Two new functions, REALTIME_FIELD, and REALTIME_HASH, which should make
querying realtime from the dialplan a little more consistent and easy to use.
The original REALTIME function is preserved, for those who are already
accustomed to that interface.
(closes issue #13651)
 Reported by: Corydon76
 Patches: 
       20081119__bug13651__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage, Corydon76


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157870 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19 21:54:39 +00:00
mvanbaak e005e919bd This commit does two things:
- Add CLI aliases module to asterisk.
- Remove all deprecated CLI commands from the code

Initial work done by file.
Junk-Y and lmadsen did a lot of work and testing to
get the list of deprecated commands into the configuration file.

Deprecated CLI commands are now handled by this new module,
see cli_aliases.conf for more info about that.

ok russellb@ via reviewboard

(closes issue #13735)
Reported by: mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156120 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 06:46:04 +00:00
seanbright a7a95954c8 Add ability to pass arbitrary data to the ao2_callback_fn (called from
ao2_callback and ao2_find).  Currently, passing OBJ_POINTER to either
of these mandates that the passed 'arg' is a hashable object, making
searching for an ao2 object based on outside criteria difficult.

Reviewed by Russell and Mark M. via ReviewBoard:
    http://reviewboard.digium.com/r/36/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155401 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 22:39:30 +00:00
tilghman b19af8bce9 Two bugs relating to colnames found by Marquis42 on #asterisk-dev
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155395 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 22:03:50 +00:00
tilghman 7c5853a25d Add LISTFILTER dialplan function, along with supporting documentation. See
documentation for more information on how to use it.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154915 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 21:58:48 +00:00
eliel 8de203d766 - Add some see-also references based on TFOT.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154542 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 12:13:57 +00:00
kpfleming a73e71ff1e improve configure script to remember the previous value of each dependency in build_tools/menuselect-deps, so that (once it has been written) menuselect can use this information to warn the user when a previously met dependency is no longer met
along the way, change tags used in configure script, menuselect-deps and code for various dependencies to be consistently named



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154151 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 15:07:54 +00:00
tilghman dc7f2ff761 Should have passed the string pointer, not the ast_str structure.
(closes issue #13830)
 Reported by: Marquis


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154023 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-03 21:01:30 +00:00
kpfleming cc1b2c100f bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02 18:52:13 +00:00
russell 44147470e5 Fix various spelling and grammatical issues in documentation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153468 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02 02:50:33 +00:00
russell b1f91b97d2 Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format.  Currently, a new format is available for
applications and dialplan functions.  A good number of conversions to the new format
are also included.

For more information, see the following message to asterisk-dev:

http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-01 21:10:07 +00:00
tilghman 3fef013539 Failover for func_odbc, allowing an INSERT query to be performed when the UPDATE query initially
affects 0 rows.
(closes issue #13083)
 Reported by: Corydon76
 Patches: 
       20081031__bug13083.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153124 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-31 17:18:49 +00:00
russell eb11d23297 - spaces to tabs
- add some braces
 - remove unnecessary cast


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152875 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30 19:18:16 +00:00
seanbright e5ab99ee4c Merged revisions 152059 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152059 | seanbright | 2008-10-26 16:23:36 -0400 (Sun, 26 Oct 2008) | 7 lines

Since passing \0 as the second argument to strchr is valid (and will
match the trailing \0 of a string) we need to check that first, otherwise
we end up with incorrect results.  Fix suggested by reporter.

(closes issue #13787)
Reported by: meitinger

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152060 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-26 20:25:08 +00:00
twilson ca8d93281c allow to compile under --enable-dev-mode (gcc didn't actually complain when I was using ccache...)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@151830 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-23 21:27:35 +00:00
tilghman f6b3409059 Simplify some nested functions, as suggested by Russell on -dev
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@151732 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-23 15:28:43 +00:00
tilghman d0c024c267 Added debugging CLI functions
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@151682 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-22 22:11:31 +00:00
tilghman e1326331cd Permit data fields to contain more than 255 characters.
(closes issue #13631)
 Reported by: seanbright
 Patches: 
       20081015__bug13631.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149687 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-15 19:07:39 +00:00
tilghman 26f51f8717 Only set buf to blank before the goto.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149640 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-15 17:16:00 +00:00
seanbright fffaf0b978 Keep up with shadow warnings. One day I'll actually enable this in the Makefile.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147457 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-08 12:15:06 +00:00
rmudgett 3f89bf605b Independent change from branch issue8824 that is not part of COLP. (-r142574 rmudgett)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147011 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-07 02:02:39 +00:00
mvanbaak 7c30763fbe All ODBC parts can now use either unixodbc or iodbc.
This allows for the ODBC parts to work on OpenBSD as well.

99.99% of the work is done by seanbright (bow, bow) and I actually
did nothing but test and yell at him that it still didn't work :)

Thanks for helping out !


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146925 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06 23:14:33 +00:00
tilghman 74ecba3091 Merged revisions 146799 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines
  
  Dialplan functions should not actually return 0, unless they have modified the
  workspace.  To signal an error (and no change to the workspace), -1 should be
  returned instead.
  (closes issue #13340)
   Reported by: kryptolus
   Patches: 
         20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06 21:09:05 +00:00
tilghman f4d219cb3a Permit the syntax and synopsis fields to be set (for func_odbc).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145846 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-02 17:16:54 +00:00
tilghman 0c8cf106ef Add schedule extensions to app_meetme. In addition, the reporter found a
problem within strptime(3), which we are correcting here with ast_strptime().
(closes issue #11040)
 Reported by: DEA
 Patches: 
       20080910__bug11040.diff.txt uploaded by Corydon76 (license 14)
 Tested by: DEA


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145649 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-01 23:02:25 +00:00
murf a1d03040c7 (closes issue #13557)
Reported by: nickpeirson

The user attached a patch, but the license is not yet
recorded. I took the liberty of finding and replacing
ALL index() calls with strchr() calls, and that
involves more than just main/pbx.c;

chan_oss, app_playback, func_cut also had calls
to index(), and I changed them out. 1.4 had no
references to index() at all.




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@144569 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-25 22:21:28 +00:00
tilghman 04a25e0658 Create a 'hashcompat' option that permits the results of a CURL() able to be
passed directly into the HASH() function.  Requested via the -users list, and
committed at Astricon in the Code Zone.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@144199 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-24 06:43:05 +00:00
tilghman 95bae85759 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12 23:30:03 +00:00
mvanbaak 28709af313 make func_curl.c compile under devmode.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141626 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-07 00:04:05 +00:00
tilghman 6381f87739 Get rid of the casts that cause warnings on OpenBSD. The compiler is errantly
detecting warnings when we redefine a structure each time it is used, even
though the structure is identical.
Reported by: mvanbaak, via #asterisk-dev


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141507 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-06 15:40:15 +00:00
mmichelson 3ddf849214 Fix func_curl compilation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141425 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-05 22:03:26 +00:00
tilghman 7fd9e30c2a Add the CURLOPT dialplan function, which permits setting various options for
use with the CURL dialplan function.
(closes issue #12920)
 Reported by: davevg
 Patches: 
       20080904__bug12920.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, davevg


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141328 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-05 19:12:03 +00:00
mmichelson 91df49dd46 Merged revisions 140488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines

After working on the ao2_containers branch, I noticed
something a bit strange. In all cases where we provide
a callback function to ao2_container_alloc, the callback
function would only return 0 or CMP_MATCH. After inspecting
the ao2_callback() code carefully, I found that if you're
only looking for one specific item, then you should return
CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue
traversing the current bucket until the end searching for
more matches.

In cases like chan_iax2 where in 1.4, all the peers are
shoved into a single bucket, this makes for potentially
terrible performance since the entire bucket will be
traversed even if the peer is one of the first ones come
across in the bucket.

All the changes I have made were for cases where the 
callback function defined was passed to ao2_container_alloc
so that calls to ao2_find could find a unique instance
of whatever object was being stored in the container.


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140489 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-29 17:47:17 +00:00
tilghman 9a40998bb3 Merged revisions 138023 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r138023 | tilghman | 2008-08-15 09:51:12 -0500 (Fri, 15 Aug 2008) | 8 lines

Additional check for more string specifiers than arguments.
(closes issue #13299)
 Reported by: adomjan
 Patches: 
       20080813__bug13299.diff.txt uploaded by Corydon76 (license 14)
       func_strings.c-sprintf.patch uploaded by adomjan (license 487)
 Tested by: adomjan

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@138024 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-15 15:03:32 +00:00
seanbright 6fee1d1683 Continue merging in changes from resolve-shadow-warnings. funcs/ this time.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136302 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07 01:07:40 +00:00
tilghman a9e48cc3f2 Persist DIALGROUP() values in astdb
(closes issue #13138)
 Reported by: Corydon76
 Patches: 
       20080725__bug13138.diff.txt uploaded by Corydon76 (license 14)
 Tested by: pj


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136112 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-06 16:58:42 +00:00
tilghman c64707ef77 Use a dynamic buffer for rendered SQL, instead of hardcoding 2048 bytes. Also,
switch to using RWLISTs for the linked list of queries.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136034 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-06 14:51:51 +00:00
kpfleming 0891b8a53c make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135680 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-05 16:56:11 +00:00
russell 3ffd7f4411 Merged revisions 134540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r134540 | russell | 2008-07-30 14:52:53 -0500 (Wed, 30 Jul 2008) | 4 lines

Fix a memory leak in func_curl.  Every thread that used this function leaked
an allocation the size of a pointer.
(reported by jmls in #asterisk-dev)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134541 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-30 19:55:31 +00:00
russell f4056d9f18 Add a missing unlock within error handling
(closes issue #13176)
Reported by: pj


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134005 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-27 21:12:14 +00:00
bbryant 2457589b81 Fixes sysinfo operator issue also fixed elsewhere in r131445.
(issue #13057)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@131484 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-16 21:54:08 +00:00
russell 011a5fcff5 Add a \todo
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127210 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-01 21:43:55 +00:00
tilghman dbef4854a5 Separate the global initialization routines for cURL into its own separate
module.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@125055 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-25 16:00:54 +00:00
mvanbaak c342cdeaf3 Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)

All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@124127 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-19 20:48:33 +00:00
tilghman 86f9034a9f Add some more IAX2-specific information about the channel to the CHANNEL()
function and begin the transition from SIPCHANINFO() to just using CHANNEL().
(closes issue #12856)
 Reported by: mostyn
 Patches: 
       iax_and_sip_channel_info.patch uploaded by mostyn (license 398)
       (with some additional cleanup by me)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-15 15:21:16 +00:00
murf b3ef5ade57 Merged revisions 122046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122046 | murf | 2008-06-12 07:47:34 -0600 (Thu, 12 Jun 2008) | 37 lines

(closes issue #10668)
Reported by: arkadia
Tested by: murf, arkadia

Options added to forkCDR() app and the CDR() func to
remove some roadblocks for CDR applications.

The "show application ForkCDR" output was upgraded
to more fully explain the inner workings of forkCDR.

The A option was added to forkCDR to force the
CDR system to NOT change the disposition on the
original CDR, after the fork. This involves
ast_cdr_answer, _busy, _failed, and so on.

The T option was added to forkCDR to force 
obedience of the cdr LOCKED flag in the
ast_cdr_end, all the disposition changing
funcs (ast_cdr_answer, etc), and in the
ast_cdr_setvar func.

The CHANGES file was updated to explain ALL
the new options added to satisfy this bug report
(and some requests made verbally and via 
email, irc, etc, over the past months/year)

The 's' option was added to the CDR() func,
to force it to skip LOCKED cdr's in the
chain.

Again, the new options should be totally transparent
to existing apps! Current behavior of CDR,
forkCDR, and the rest of the CDR system should
not change one little bit. Until you add the
new options, at least!


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122091 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12 14:28:01 +00:00
bbryant 68dea9b6d6 This patch adds more detailed statistics for RTP channels, and provides an API call to access it, including maximums, minimums, standard deviatinos,
and normal deviations. Currently this is implemented for chan_sip, but could be added to the func_channel_read callbacks for the CHANNEL function 
for any channel that uses RTP.

(closes issue #10590)
Reported by: gasparz
Patches:
      chan_sip_c.diff uploaded by gasparz (license 219)
      rtp_c.diff uploaded by gasparz (license 219)
      rtp_h.diff uploaded by gasparz (license 219)
      audioqos-trunk.diff uploaded by snuffy (license 35)
      rtpqos-trunk-r119891.diff uploaded by sergee (license 138)
Tested by: jsmith, gasparz, snuffy, marsosa, chappell, sergee


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120635 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-05 16:24:19 +00:00
tilghman e8d263f344 Add a function, CHANNELS(), which retrieves a list of all active channels.
(closes issue #11330)
 Reported by: rain
 Patches: 
       func_channel-channel_list_function.diff uploaded by rain (license 327)
       (with some additional changes by me, mostly to meet coding guidelines)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120230 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-03 23:17:33 +00:00
qwell dac7a3528e Fix a few places where frame data was used directly.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117828 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22 17:10:53 +00:00
rizzo b19d55996c Use casts or intermediate variables to remove a number
of platform/compiler-dependent warnings when handing
struct timeval fields, both reading and printing them.

It is a lost battle to handle the different ways struct timeval
is handled on the various platforms and compilers, so try
to be pragmatic and go through int/long which are universally
supported.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@116557 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-15 10:56:29 +00:00
russell a505dcedc6 Re-introduce proper error handling that was removed in recent commits.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115850 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-13 17:42:17 +00:00
junky a3a5ab6ce0 since we unregister, that has not been properly registered, i standardized this.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115593 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-10 03:04:25 +00:00
bbryant 856468a462 The following patch adds new options and alters the default behavior of the ENUM* functions. The TXCIDNAME lookup function has also gotten a
new paramater. The new options for ENUM* functions include 'u', 's', 'i', and 'd' which return the full uri, trigger isn specific rewriting, look 
for branches into an infrastructure enum tree, or do a direct dns lookup of a number respectively. The new paramater for TXCIDNAME adds a 
zone-suffix argument for looking up caller id's in DNS that aren't e164.arpa.

This patch is based on the original code from otmar, modified by snuffy, and tested by jtodd, me, and others.

(closes issue #8089)
Reported by: otmar
Patches:
      20080508_bug8089-1.diff 
	- original code by otmar (license 480), 
	- revised by snuffy (license 35)
Tested by: oej, otmar, jtodd, Corydon76, snuffy, alexnikolov, bbryant


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115584 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-09 19:54:45 +00:00
file 82f9045435 Merged revisions 115327 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115327 | file | 2008-05-05 19:10:05 -0300 (Mon, 05 May 2008) | 2 lines

Make sure that either the main speex library contains preprocess functions or that speexdsp does. If both fail then speex stuff can not be built.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115328 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-05 22:13:57 +00:00
tilghman d1cc29c9c1 Modify TIMEOUT() to be accurate down to the millisecond.
(closes issue #10540)
 Reported by: spendergrass
 Patches: 
       20080417__bug10540.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115076 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-01 23:06:23 +00:00
bbryant 3aaef20558 Add "read" capability to new libspeex functions in func_speex.c.
func_speex.c is based on contributions from Switchvox.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114977 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-01 18:28:38 +00:00
bbryant 26a549ebfb Add two new dialplan functions from libspeex for applying audio gain control
and denoising to a channel, AGC() and DENOISE(). Also included, is a change 
to the audiohook API to add a new function (ast_audiohook_remove) that can 
remove an audiohook from a channel before it is detached.

This code is based on a contribution from Switchvox.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114926 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-01 16:57:19 +00:00
jpeeler 11ee51ef7d (closes issue #6113)
Reported by: oej
Tested by: jpeeler

This patch implements multiple parking lots for parked calls. The default parkinglot is used by default, however setting the channel variable PARKINGLOT in the dialplan will allow use of any other configured parkinglot. See configs/features.conf.sample for more details on setting up another non-default parkinglot. Also, one can (currently) set the default parkinglot to use in the driver configuration file via the parkinglot option.

Patch initially written by oej, brought up to date and finalized by mvanbaak, and then stabilized and converted to astobj2 by me.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114487 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-21 23:42:45 +00:00
tilghman e7c5b61dbe Merged revisions 113117 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r113117 | tilghman | 2008-04-07 12:51:49 -0500 (Mon, 07 Apr 2008) | 3 lines

Force ast_mktime() to check for DST, since strptime(3) does not.
(Closes issue #12374)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@113172 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-07 19:06:46 +00:00
twilson 9e8ebe6a94 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: http://svn.digium.com/svn/asterisk/trunk@109447 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18 15:43:34 +00:00
russell 6fb0c142de - Add Tilghman to the copyright info ... he wrote the hard part :)
- Remove some magic in unload_module that isn't needed.  Module use counts
   already ensure that the function isn't going to be in use at this point.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@108034 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12 17:06:37 +00:00
tilghman 97993e3cd9 Cache config files, when possible, for speed
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107928 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12 02:53:21 +00:00
russell d2d92188c2 remove documentation of an argument that i did not implement
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107790 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11 22:54:25 +00:00
russell c685c2e7f3 Add a trivial new dialplan function, AST_CONFIG(), which allows you to access
a variable from an Asterisk configuration file in the dialplan, or anywhere
else where dialplan functions can be used.

(Inspired by a discussion with Tilghman and Pari)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107787 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11 22:21:19 +00:00
tilghman 84aa522629 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: http://svn.digium.com/svn/asterisk/trunk@106553 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07 06:54:47 +00:00
russell 4be40c5d13 Fix the SHARED() read callback to properly unlock the channel. This function
could not have worked, as it left the channel locked in all cases.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105899 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05 00:45:39 +00:00
russell 9569a28575 Simplify a trivial snprintf() with ast_copy_string()
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105595 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-04 04:57:29 +00:00
russell af55d60c2d Add a "devstate change" CLI command to control custom device states. Also,
do some additional code cleanup and improvement in passing.

(closes issue #12106)
Reported by: nizon
Patches:
      devstate-patch.txt uploaded by nizon (license 415)
        -- Updated to trunk, and tab completion added by me


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105461 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-01 00:53:25 +00:00
russell 9a20658728 fix this module
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104251 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26 20:28:47 +00:00
tilghman 48f20af14d Use the readhandle for reads (closes issue #12069)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104125 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26 06:43:16 +00:00
tilghman e323ca23a7 Shared space for variables (instead of letting other channels muck with your own)
(closes issue #11943)
 Reported by: ramonpeek
 Patches: 
       20080208__bug11943__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: jmls


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104098 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25 21:56:19 +00:00
tilghman a5efdcb361 Context tracing for channels
(closes issue #11268)
 Reported by: moy
 Patches: 
       chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103754 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18 04:43:33 +00:00
qwell 587bd0e26f Merged revisions 103683 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103683 | qwell | 2008-02-14 13:51:10 -0600 (Thu, 14 Feb 2008) | 5 lines

Document the 'l' option to the CDR() function.
(Thanks voipgate for pointing out the option, and Leif for providing text for it.)

Closes issue #11695.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103685 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-14 19:52:21 +00:00
russell e9d6c2ff9b 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: http://svn.digium.com/svn/asterisk/trunk@103171 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-08 21:26:32 +00:00
twilson 3074bbe01d Add REALTIME_STORE and REALTIME_DESTROY dialplan functions provided by sergee.
I just added the ability to set multiple fields at once after discussions with
Tilghman and Russell.  Currently limited to 30 fields.

(closes issue #11887)
Reported by: sergee
Patches: 
      rt-func-store-destroy-multivalue.diff uploaded by otherwiseguy (license 396)
Tested by: sergee, otherwiseguy


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@102700 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-06 16:23:22 +00:00
tilghman ed36de6492 Merged revisions 102214 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r102214 | tilghman | 2008-02-03 23:10:02 -0600 (Sun, 03 Feb 2008) | 6 lines

Missing braces.
(closes issue #11912)
 Reported by: dimas
 Patches: 
       sprintf.patch uploaded by dimas (license 88)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@102238 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-04 05:32:00 +00:00
file 2272efb190 Add missing braces.
(closes issue #11886)
Reported by: sergee
Patches:
      func_realtime_fix-r101392.diff uploaded by sergee (license 138)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@101393 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-31 15:36:11 +00:00
tilghman c7e5938e48 Convert func_odbc to use SQLExecDirect for speed
(closes issue #10723)
 Reported by: mnicholson
 Patches: 
       func-odbc-direct-execute1.diff uploaded by mnicholson (license 96)
 Tested by: Corydon76, mnicholson, falves11


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99018 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18 06:58:35 +00:00
tilghman f73ae1be9b Reset default CUT delimiter back to '-'
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99015 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18 02:06:27 +00:00
file d3421c995a Merged revisions 97697 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97697 | file | 2008-01-10 11:07:12 -0400 (Thu, 10 Jan 2008) | 6 lines

Don't try to copy the category from the group if no category exists.
(closes issue #11724)
Reported by: IgorG
Patches:
      group_count.v1.patch uploaded by IgorG (license 20)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97698 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10 15:12:08 +00:00
twilson 11f6af8c7b Added a new module, res_phoneprov, which allows auto-provisioning of phones
based on configuration templates that use Asterisk dialplan function and
variable substitution.  It should be possible to create phone profiles and
templates that work for the majority of phones provisioned over http. It
is currently only intended to provision a single user account per phone.
An example profile and set of templates for Polycom phones is provided.
NOTE: Polycom firmware is not included, but should be placed in
AST_DATA_DIR/phoneprov/configs to match up with the included templates.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97634 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09 21:37:26 +00:00
file 76f4abf3f4 Merged revisions 97152 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97152 | file | 2008-01-08 15:53:52 -0400 (Tue, 08 Jan 2008) | 4 lines

If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel.
(closes issue #11077)
Reported by: m4him

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97153 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-08 19:55:56 +00:00
russell ab908a2a8b Now that the version.h file was getting properly regenerated every time the svn
revision changed, every module that used the version was getting rebuilt after
every svn update.  This severly annoyed me pretty quickly, so I have improved
the situation.

Now, instead of generating version.h, main/version.c is generated.  version.c
includes the version information, as well as a couple of API calls for modules
to retrieve the version.  So now, only version.c will get rebuilt, and the main
asterisk binary relinked, which is must faster than rebuilding http.c, manager.c,
asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ...

The only minor change in behavior here is that the version information reported by
chan_sip, for example, is the version of the Asterisk core, and not necessarily the
Asterisk version that the chan_sip module came from.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96717 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-05 22:09:06 +00:00
mmichelson eff3a6e5af Change instances of AST_NONSTANDARD_APP_ARGS(foo, bar, ',') to AST_STANDARD_APP_ARGS(foo, bar)
(closes issue #11668, reported and patched by mvanbaak)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95994 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02 21:08:33 +00:00
rizzo 206811e881 implement "configure" checks for libiconv, and add the
iconv dependency for func_iconv.
This fixes some build issues on CYGWIN and FreeBSD and probably
other platforms where libiconv is not there by default



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95624 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-01 22:08:32 +00:00
tilghman 9c384ade94 Merged revisions 95470 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r95470 | tilghman | 2007-12-31 14:27:26 -0600 (Mon, 31 Dec 2007) | 3 lines

Allow the default "0" to be returned if the STAT fails
(Closes issue #11659)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95490 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-31 20:33:21 +00:00
oej 086b05e131 This function checks more than just contexts...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94827 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27 09:13:07 +00:00