Commit Graph

325 Commits

Author SHA1 Message Date
Russell Bryant 54bc2c20b6 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: https://origsvn.digium.com/svn/asterisk/trunk@96717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-05 22:09:06 +00:00
Tilghman Lesher 9c00db7c16 Add coordination between AMI and AGI applications, with an asyncagi method
Feature proposed and patched by: moy
(Closes issue #11282)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03 06:16:48 +00:00
Tilghman Lesher ba57c36bbb Add channel thread ID to the information passed to AGI.
Reported by: dror99
Patch by: tilghman
(Closes issue #11162)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-25 02:57:58 +00:00
Tilghman Lesher 0fc70140a5 Publish the AGI events to manager.
Reported by: moy
Patch by: moy,tilghman
(Closes issue #11337)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 17:29:27 +00:00
Tilghman Lesher 05dc95d302 Merged revisions 92933 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r92933 | tilghman | 2007-12-14 09:01:10 -0600 (Fri, 14 Dec 2007) | 5 lines

Change help documentation to match actual behavior (FAILURE vs FAILED).
Reported by: angeloxx-sir
Patch by: tilghman
(Closes issue #11548)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 15:14:24 +00:00
Joshua Colp e941bbad0f Move usage of the old LOCAL_USER_* macros to the new ast_module_user_* functions in a few documentation places.
(closes issue #11533)
Reported by: IgorG
Patches:
      oldmacroclean.v1.diff uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 20:23:48 +00:00
Joshua Colp 9ebf3afe02 Only send a SIGHUP if the pid is greater than -1, otherwise all PIDs greater than -1 will get the SIGHUP... and that is bad.
(closes issue #11453)
Reported by: alanmcmillan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 16:07:33 +00:00
Tilghman Lesher 4aff884622 Pass the Asterisk version to AGI scripts as part of the initial dump of info
Reported by: acunningham
Patch by: acunningham
(Closes issue #11398)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 15:01:57 +00:00
Joshua Colp 8bfdea3160 Add AGI commands for speech recognition. These mirror the dialplan applications mostly but present the information in a nicer fashion. The SPEECH RECOGNIZE command for example will return the results instead of having to query the dialplan functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 21:03:05 +00:00
Joshua Colp 6aad89b97d Fix a few log messages.
(closes issue #11396)
Reported by: IgorG
Patches:
      spell.v1.diff uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-28 15:38:03 +00:00
Luigi Rizzo 3fc2646808 remove a number of #include <fcntl.h> which are either
useless or done elsewhere



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 01:03:02 +00:00
Luigi Rizzo e0ff5fef5c remove a bunch of useless #include "options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:09:02 +00:00
Luigi Rizzo a23c055c3d move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:16:15 +00:00
Luigi Rizzo 0595b5e2aa include "logger.h" and errno.h from asterisk.h - usage shows that they
were included almost everywhere.
Remove some of the instances.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 18:52:04 +00:00
Luigi Rizzo a0f06d0dd5 start using asterisk/network.h for network related headers.
Also remove some unnecessary includes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 14:11:53 +00:00
Luigi Rizzo 5490960453 remove a bunch of duplicate includes
Reproduce with

grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr 



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 23:54:45 +00:00
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Kevin P. Fleming edc78d6023 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:28:47 +00:00
Russell Bryant 4afb905cf0 Print out the channel name as a prefix to the "agi debug" output. This makes
AGI debugging on busy systems much easier.

(closes issue #10730)
Reported by: junky
Patches: 
      agi_debug_chan.diff uploaded by junky (license 177)
	  20070923_10730.diff uploaded by mvanbaak (license 7)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 00:00:38 +00:00
Steve Murphy 63f2f04cf4 This commits the performance mods that give the priority processing engine in the pbx, a 25-30% speed boost. The two updates used, are, first, to merge the ast_exists_extension() and the ast_spawn_extension() where they are called sequentially in a loop in the code, into a slightly upgraded version of ast_spawn_extension(), with a few extra args; and, second, I modified the substitute_variables_helper_full, so it zeroes out the byte after the evaluated string instead of demanding you pre-zero the buffer; I also went thru the code and removed the code that zeroed this buffer before every call to the substitute_variables_helper_full. The first fix provides about a 9% speedup, and the second the rest. These figures come from the 'PIPS' benchmark I describe in blogs, conf. reports, etc.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 22:26:51 +00:00
Jason Parker ebe4050128 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 20:05:18 +00:00
Jason Parker b0f3e6097e Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 18:29:40 +00:00
Russell Bryant efaa9cf607 Merged revisions 84236 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84236 | russell | 2007-10-01 14:56:28 -0500 (Mon, 01 Oct 2007) | 5 lines

Add another sanity check in the AGI read loop.  We really don't care about
EAGAIN unless we didn't read an entire line.  If there is a newline at the
end if the read buffer, break, because we got the whole thing.
(reported and patched by bmd)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 19:58:29 +00:00
Russell Bryant 0de872da8d Merged revisions 82929 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82929 | russell | 2007-09-18 17:42:27 -0500 (Tue, 18 Sep 2007) | 11 lines

Add a new patch to handle interrupting the fgets() call when using FastAGI.
This version of the patch maintains the original behavior of the code when
not using FastAGI.
(closes issue #10553)
Reported by: juggie
Patches:
      res_agi_fgets-4.patch uploaded by juggie (license 24)
      res_agi_fgets_1.4svn.patch uploaded by juggie (license 24)
	  Slight mods by me
Tested by: juggie, festr

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 22:46:05 +00:00
Jason Parker c7a9ec1691 (issue #10724)
Reported by: eliel
Patches:
      res_features.c.patch uploaded by eliel (license 64)
      res_agi.c.patch uploaded by seanbright (license 71)
      res_musiconhold.c.patch uploaded by seanbright (license 71)
      pbx.c.patch uploaded by moy (license 222)
      logger.c.patch uploaded by moy (license 222)
      frame.c.patch uploaded by moy (license 222)
      manager.c.patch uploaded by moy (license 222)
      http.c.patch uploaded by moy (license 222)
      dnsmgr.c.patch uploaded by moy (license 222)
      res_realtime.c.patch uploaded by eliel (license 64)
      res_odbc.c.patch uploaded by seanbright (license 71)
      res_jabber.c.patch uploaded by eliel (license 64)
      chan_local.c.patch uploaded by eliel (license 64)
      chan_agent.c.patch uploaded by eliel (license 64)
      chan_alsa.c.patch uploaded by eliel (license 64)
      chan_features.c.patch uploaded by eliel (license 64)
      chan_sip.c.patch uploaded by eliel (license 64)
      RollUp.1.patch (includes all of the above patches) uploaded by seanbright (license 71)

Convert many CLI commands to the NEW_CLI format.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 22:43:45 +00:00
Russell Bryant a955df8eb9 Merged revisions 82296 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82296 | russell | 2007-09-12 16:56:32 -0500 (Wed, 12 Sep 2007) | 3 lines

Fix a check of the wrong pointer, as pointed out by an XXX comment left in 
the code.  The problem was harmless, however.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 21:57:30 +00:00
Russell Bryant 83e24e0af2 Merged revisions 82278 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82278 | russell | 2007-09-12 10:11:11 -0500 (Wed, 12 Sep 2007) | 3 lines

revert patch from issue #10553, as someone not using fastagi reported that this
broke their system.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 15:12:52 +00:00
Russell Bryant b8ff60d307 Remove an unused variable. I have no idea why this was marked with the unused
attribute instead of just removing it.  :)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 15:31:04 +00:00
Russell Bryant 4eff19f413 Merged revisions 82245 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82245 | russell | 2007-09-11 10:26:51 -0500 (Tue, 11 Sep 2007) | 9 lines

(closes issue #10553)
Reported by: juggie
Patches:
      res_agi_fgets-2.patch uploaded by juggie (license 24)
Tested by: juggie

When using fastagi, fgets() can return before a full line is read.  Add explicit
handling for the case where it gets interrupted.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 15:28:46 +00:00
Joshua Colp 7cb698fb31 (closes issue #10684)
Reported by: junky
Patches:
      debug.diff uploaded by junky (license 177)
Fix issue with debug always showing up.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-10 13:41:54 +00:00
Russell Bryant 84643967e1 Merged revisions 80469 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80469 | russell | 2007-08-23 10:49:28 -0500 (Thu, 23 Aug 2007) | 2 lines

Revert res_agi fix that didn't quite work until we get it right ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 15:52:08 +00:00
Russell Bryant 44f70278a8 Merged revisions 80360 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80360 | russell | 2007-08-22 14:53:30 -0500 (Wed, 22 Aug 2007) | 5 lines

Juggie in #asterisk-dev was reporting problems where fgets would return
without reading  the whole line when using fastagi.  When this happens,
errno was set to EINTR or EAGAIN.  This patch accounts for the possibility
and lets fgets continue in that case.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 19:54:52 +00:00
Tilghman Lesher a19b2fe6e3 Twould help if we actually defined ->mod before comparing against it (reported and fixed by Juggie via IRC).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01 04:36:15 +00:00
Tilghman Lesher 20bbd09de3 Mostly cleanup of documentation to substitute the pipe with the comma, but a few other formatting cleanups, too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31 01:10:47 +00:00
Russell Bryant 048bb3d9e3 Fix the return value of ast_agi_fdprintf() to include the result from ast_carefulwrite()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 19:39:52 +00:00
Russell Bryant 38bb9400de Improve ast_agi_fdprintf() by using the ast_str() API.
* Use a thread local ast_str for building the string that will be written out
   to the console for debug, and to the FD for the AGI itself, instead of allocating
   a buffer on the heap every time the function is called.
 * Use the information contained within the ast_str to determine how many bytes
   need to be written instead of calling strlen().


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 19:35:33 +00:00
Russell Bryant 935982d15b Merged revisions 77788 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77788 | russell | 2007-07-30 14:13:31 -0500 (Mon, 30 Jul 2007) | 10 lines

(closes issue #10279)
Reported by: seanbright
Patches:
      res_agi.carefulwrite.1.4.07252007.patch uploaded by seanbright (license 71)
      res_agi.carefulwrite.trunk.07252007.patch uploaded by seanbright (license 71)

Allow the "agi_network: yes" line to be printed out in the AGI debug output.
Also, allow partial writes to be handled when writing out this line just like
it is for all of the others.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 19:18:24 +00:00
Tilghman Lesher 059a7aa862 Cleanup of res_agi, ensuring thread safety (closes issue #10288)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 19:11:28 +00:00
Tilghman Lesher 67bd05d9d1 Merged revisions 77783 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r77783 | tilghman | 2007-07-30 13:43:55 -0500 (Mon, 30 Jul 2007) | 10 lines

Merged revisions 77782 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r77782 | tilghman | 2007-07-30 13:40:54 -0500 (Mon, 30 Jul 2007) | 2 lines

Revert change in revision 71656, even though it fixed a bug, because many people were depending upon the (broken) behavior.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 18:45:09 +00:00
Russell Bryant f8483a0d04 Do a massive conversion for using the ast_verb() macro
(closes issue #10277, patches by mvanbaak)

Basically, this changes ...

if (option_verbose > 2)
   ast_verbose(VERBOSE_PREFIX_3, "Something\n");

to ...

ast_verb(3, "Something\n");


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 15:49:18 +00:00
Joshua Colp 3e9886598d You need to put static in front of a static RWLIST declaration to make it really static... and don't call AST_RWLIST_HEAD_DESTROY on a statically declared list.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 23:14:20 +00:00
Tilghman Lesher db9d7764e0 Enhance AGI with several fixes:
- Makes the structures handling external AGI commands a bit more thread-safe
 - Makes AGI transparently work with both live and hungup channels
 - DeadAGI is hence no longer necessary and is deprecated
 - CLI bug fixes
 - Commands will refuse to run if the channel is dead and the command is nonsensical
   for dead channels.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 22:02:05 +00:00
Tilghman Lesher a1fdc1c769 Missed one conversion to comma delimiter (thanks, Juggie) and add documentation on the
change to the Local channel name.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 20:27:26 +00:00
Russell Bryant a971b4bfc4 (closes issue #10210, reported and patched by juggie)
This merges the trunk only part of the patches from this issue.  In 1.4, res_agi
will issue a warning if you try to use DeadAGI on a channel that is not hung up.
Now, in trunk, it just plain won't let you do it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 15:59:19 +00:00
Russell Bryant 7743bed9f6 Merged revisions 75401 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75401 | russell | 2007-07-17 14:45:07 -0500 (Tue, 17 Jul 2007) | 3 lines

Remove a duplicated newline character in AGI debug output.
(closes issue #10207, patch by seanbright)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 19:46:13 +00:00
Joshua Colp 96a646734f It is no longer required for each module that deals with a channel to call ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 13:35:20 +00:00
Joshua Colp 48f166e87b Code cleanup of res_agi
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 21:09:42 +00:00
Russell Bryant d2a85e5f64 After some discussion on the asterisk-dev list, we determined that this approach
for extracting application, function, manager, and agi documentation is the wrong
one to take.  The most severe problem is that the output depends on which modules
are loaded as well as compile time options, which both determine which parts are
available.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 23:02:16 +00:00
Russell Bryant 8d99a2004b Fix up the AGI doc dump CLI command and update the AGI commands tex file to not
include a bunch of empty entries.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 20:45:53 +00:00
Russell Bryant 93229b0fed Add a CLI command to export the AGI command docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 19:29:50 +00:00
Russell Bryant 625dbb6f89 Add a note that the AGI commands array is not handled in a thread-safe way
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 19:01:16 +00:00
Tilghman Lesher 82e2033519 Merged revisions 71657 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r71657 | tilghman | 2007-06-25 13:14:59 -0500 (Mon, 25 Jun 2007) | 10 lines

Merged revisions 71656 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r71656 | tilghman | 2007-06-25 13:12:37 -0500 (Mon, 25 Jun 2007) | 2 lines

Issue 10035 - handle_exec returns a result inconsistent with all of the other AGI commands

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-25 18:20:18 +00:00
Joshua Colp 9b23b9b3b2 Minor header inclusion tweak for new usage of stat()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-25 13:00:49 +00:00
Joshua Colp c00428b0b0 Use stat to determine whether the file exists or not. (issue #10038 reported by Mike Anikienko)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22 16:19:53 +00:00
Jason Parker 68ac7f7633 Merged revisions 71068 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r71068 | qwell | 2007-06-22 10:00:30 -0500 (Fri, 22 Jun 2007) | 12 lines

Merged revisions 71065 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r71065 | qwell | 2007-06-22 09:52:18 -0500 (Fri, 22 Jun 2007) | 4 lines

Fix a few silly usages of ast_playstream() - it only ever returns 0...

Issue 10035

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22 15:03:32 +00:00
Joshua Colp fd9057423a Expand AGISTATUS variable to include NOTFOUND which is set when the AGI file could not be found. (issue #9285 reported by srdjan)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 15:58:05 +00:00
Russell Bryant 055d82cbce Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 19:39:12 +00:00
Russell Bryant 68492b239c Add an option for ControlPlayback to be able to start at an offset from
the beginning of the file.  Also, add a channel variable that indicates
the location in the file where the Playback was stopped.
(closes issue #7655, patch from sharkey)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-08 21:02:46 +00:00
Tilghman Lesher 9d05ff8ed5 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 21:20:11 +00:00
Joshua Colp 3f463b7668 Merged revisions 67597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67597 | file | 2007-06-06 08:34:06 -0400 (Wed, 06 Jun 2007) | 2 lines

Make the new "agi debug off" CLI command work. (issue #9890 reported by eliel)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 12:36:15 +00:00
Joshua Colp cc3c91edc2 Merged revisions 65250 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r65250 | file | 2007-05-20 13:59:58 -0400 (Sun, 20 May 2007) | 2 lines

res_agi needs to export two symbols (ast_agi_register and ast_agi_unregister) for usage by others. (issue #9755 reported by mnicholson)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-20 18:01:05 +00:00
Russell Bryant 0664aa2a73 Add gender support for AGI SAY NUMBER.
(issue #9537, patch by chappell)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11 16:16:50 +00:00
Olle Johansson 33915a153a Issue #9068 - make sure we quote HTML characters correctly too (seanbright)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 11:47:48 +00:00
Olle Johansson 71c7f6e32f Merged revisions 54772 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r54772 | oej | 2007-02-16 12:39:55 +0100 (Fri, 16 Feb 2007) | 10 lines

Merged revisions 54771 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r54771 | oej | 2007-02-16 12:38:03 +0100 (Fri, 16 Feb 2007) | 2 lines

Issue #9069 - If we open with TH we should not close with /TD. (seanbright)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 11:43:41 +00:00
Steve Murphy 7b338004bf a quick fix to app_sms.c to get rid of cursed compiler warnings so I can compile under --enable-dev-mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-21 19:44:20 +00:00
Tilghman Lesher d670858735 Merged revisions 48375 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48375 | tilghman | 2006-12-10 18:47:21 -0600 (Sun, 10 Dec 2006) | 13 lines

Merged revisions 48374 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48374 | tilghman | 2006-12-10 18:33:59 -0600 (Sun, 10 Dec 2006) | 5 lines

When doing a fork() and exec(), two problems existed (Issue 8086):
1) Ignored signals stayed ignored after the exec().
2) Signals could possibly fire between the fork() and exec(), causing Asterisk
signal handlers within the child to execute, which caused nasty race conditions.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 00:52:19 +00:00
Russell Bryant af870057c1 Constify a bunch of usage strings for CLI commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:31:28 +00:00
Luigi Rizzo ad2589bc01 useless cast removal...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 01:40:49 +00:00
Tilghman Lesher 79f75ec09a Merged revisions 47053 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47053 | tilghman | 2006-11-02 17:49:13 -0600 (Thu, 02 Nov 2006) | 2 lines

More changes making the CLI more consistent with "category verb arguments" (continuation of issue 8236)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:55:59 +00:00
Tilghman Lesher 10875731ec Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines

Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments"

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:16:09 +00:00
Russell Bryant f012ccd4a3 Merged revisions 46558 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r46558 | russell | 2006-10-31 01:14:13 -0500 (Tue, 31 Oct 2006) | 11 lines

Merged revisions 46557 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r46557 | russell | 2006-10-31 01:13:09 -0500 (Tue, 31 Oct 2006) | 3 lines

fix some copy/paste bugs in the checking of arguments for the 
"control stream file" AGI command (issue #8255, mnicholson)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 06:15:12 +00:00
Russell Bryant 4337a82563 Merged revisions 46363 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46363 | russell | 2006-10-27 12:39:31 -0500 (Fri, 27 Oct 2006) | 5 lines

We should always be using _exit() after a fork() or vfork() instead of exit().
This is because exit() does some extra cleanup which in some implementations
of vfork(), for example, can actually modify the state of the parent process,
causing very weird bugs or crashes.  (issue #7971, Nick Gavrikov)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-27 17:42:57 +00:00
Mark Spencer 9178e4223e Fix FastAGI to not wait for the non-existant pid
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-24 20:22:29 +00:00
Steve Murphy c474556659 As per bug 6779, this patch is now applied to trunk; while I was at it, I corrected a reference to a CLI command, to follow the new regime.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 23:06:13 +00:00
Matt O'Gorman ae8cc3e18b bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 15:53:07 +00:00
Tilghman Lesher 6ae8741518 Lots more removal of deprecated things
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 21:59:12 +00:00
Kevin P. Fleming ea399862c4 move more API into the ast_ namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 04:45:45 +00:00
Kevin P. Fleming fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
Joshua Colp 31cc08295c Merged revisions 42148 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42148 | file | 2006-09-06 16:02:59 -0400 (Wed, 06 Sep 2006) | 2 lines

Don't close the second file descriptor if it's the same as the first one, as it will have already been closed elsewhere and could cause massive panic. (issue #7699 reported by bn999)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 20:04:17 +00:00
Joshua Colp c6977b9983 Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 01:59:02 +00:00
Tilghman Lesher ec7bd6614a Merged revisions 40901 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40901 | tilghman | 2006-08-23 11:05:26 -0500 (Wed, 23 Aug 2006) | 2 lines

Revert last change - breaks retrieval of builtin variables

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 16:14:18 +00:00
Kevin P. Fleming 0a27d8bfe5 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00
Russell Bryant b6a99250ed Merged revisions 39935 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r39935 | russell | 2006-08-15 18:49:41 -0400 (Tue, 15 Aug 2006) | 3 lines

use pbx_builtin_getvar_helper() so that GET VARIABLE can retrieve global
variables (issue #7609)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 22:51:49 +00:00
Russell Bryant 92bd7f19f7 Merge team/russell/ast_verbose_threadstorage
- instead of defining a free() wrapper in a bunch of files, define it as
  ast_free() in utils.h and remove the copies from all the files.

- centralize and abstract the code used for doing thread storage. The code
  lives in threadstorage.h, with one function being implemented in utils.c.
  This new API includes generic thread storage as well as special functions
  for handling thread local dynamic length string buffers.

- update ast_inet_ntoa() to use the new threadstorage API
- update ast_state2str() to use the new threadstorage API
- update ast_cli() to use the new threadstorage API

- Modify manager_event() to use thread storage. Instead of using a buffer of
  4096 characters as the workspace for building the manager event, use a thread
  local dynamic string.  Now there is no length limitation on the length of the
  body of a manager event.

- Significantly simplify the handling of ast_verbose() ...
  - Instead of using a static char buffer and a lock to make sure only one
    thread can be using ast_verbose() at a time, use a thread local dynamic
    string as the workspace for preparing the verbose message. Instead of
    locking around the entire function, the only locking done now is when the
    message has been built and is being deliviered to the list of registered
    verbose message handlers.
  - This function was doing a strdup() on every message passed to it and
    keeping a queue of the last 200 messages in memory. This has been
    completely removed. The only place this was used was that if there were
    any messages in the verbose queue when a verbose handler was registered,
    all of the messages in the queue would be fed to it.  So, I just made sure
    that the console verbose handler and the network verbose handler (for
    remote asterisk consoles) were registered before any verbose messages.
    pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at
    startup, but I didn't feel the performance hit of this message queue was
    worth saving the initial verbose output for these very rarely used modules.
  - I have removed the last three arguments to the verbose handlers, leaving
    only the string itself because they aren't needed anymore. For example,
    ast_verbose had some logic for telling the verbose handler to add
    a newline if the buffer was completely full. Now that the buffer can grow
    as needed, this doesn't matter anymore.
  - remove unused function, ast_verbose_dmesg() which was to dispatch the
    message queue
  - Convert the list of verbose handlers to use the linked list macros.

- add missing newline characters to a few ast_verbose() calls

- convert the list of log channels to use the linked list macros in logger.c

- fix close_logger() to close all of the files it opened for logging

- update ast_log() to use a thread local dynamic string for its workspace
  for preparing log messages instead of a buffer of size BUFSIZ (8kB on my
  system) allocated on the stack.  The dynamic string in this case is limited
  to only growing to a maximum size of BUFSIZ.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 06:32:04 +00:00
Russell Bryant 233aab68a6 add a verbose message to the AGI command, STREAM FILE, similar to the
verbose messages when using Playback, Background, or the GET DATA command
(issue #7297, softins)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-20 16:18:07 +00:00
Kevin P. Fleming 6d0742fc16 merge Russell's 'hold_handling' branch, finally implementing music-on-hold handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 20:44:39 +00:00
Kevin P. Fleming 5b639e6135 Merged revisions 37419 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37419 | kpfleming | 2006-07-12 08:54:10 -0500 (Wed, 12 Jul 2006) | 2 lines

remove some more bad examples of using printf

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 14:04:16 +00:00
Russell Bryant a483f6eafc Merged revisions 33693 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33693 | russell | 2006-06-12 16:40:11 -0400 (Mon, 12 Jun 2006) | 2 lines

fix a place where a frame would be free'd twice

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:40:56 +00:00
Tilghman Lesher 1d8804c117 Merged revisions 33615 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33615 | tilghman | 2006-06-12 10:27:18 -0500 (Mon, 12 Jun 2006) | 4 lines

Move set priority up, because at this point in the code, stdout is no longer
the console.  If we're unable to set priority, the error goes to Asterisk as
if it were an AGI command (issue 7335).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 15:30:32 +00:00
Kevin P. Fleming 472c1ca282 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Russell Bryant 6ff6536f13 Merged revisions 31194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r31194 | russell | 2006-05-31 19:50:00 -0400 (Wed, 31 May 2006) | 3 lines

if the connection to a FastAGI server fails because of a timeout, log a more
informative log message

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 23:51:39 +00:00
Joshua Colp 1c158f0ea4 Add the video stream for AGI function STREAM FILE (issue #5392 reported by areski -- minor mods by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 17:43:11 +00:00
Russell Bryant 26271fbd3a allow setting a channel variable to disable sending SIGHUP to the AGI process
(issue #6491, original patch by juggie, channel variable patch by corydon,
 committed patch modified to change variable name and update documentation)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 19:01:26 +00:00
Russell Bryant 238cdb249f Add the ability to retrieve the exit code of the forked AGI process. If there
is an error executing the AGI script, or the AGI script itself returns a
non-zero value, the AGISTATUS variable will now be set to FAILURE instead of
SUCCESS.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 18:31:19 +00:00
Russell Bryant 0cccaf8408 - add support for setting an AGISTATUS variable that indicates successful
execution, failure, or if the channel requested hangup.
- only return -1 from the application if the application requested hangup. If
  there was just a failure in execution of the AGI, just set the status
  variable appropriately and move on in the dialplan.
(issue #7121, original patch by Alessandro Polverini, updated patch by srt,
 committed patch is heavily modified to allow still returning -1 on hangup)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 16:44:22 +00:00
Kevin P. Fleming dd45d18515 Merged revisions 29973 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29973 | kpfleming | 2006-05-24 11:59:20 -0500 (Wed, 24 May 2006) | 2 lines

support video recording via AGI 'RECORD FILE' command (issue #7068)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 17:02:54 +00:00
Kevin P. Fleming eeb01cda95 revert bogus change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 21:11:43 +00:00
Olle Johansson e274a70d52 Add missing argument to ast_carefulwrite
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 21:01:38 +00:00
Russell Bryant 04ecb29d03 remove almost all of the checks of the result from ast_strdupa() or alloca().
As it turns out, all of these checks were useless, because alloca will never
return NULL.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 13:22:15 +00:00
Russell Bryant 4fe3960478 move ast_carefulwrite from manager.c to utils.c so that cli.c and
res_agi.c no longer depend on manager.h (issue #6397, casper)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 21:01:39 +00:00
Russell Bryant 8085f4e14b a bunch of conversion to ast_channel_*lock (issue #7058)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 14:50:18 +00:00
Luigi Rizzo 7ecc442d77 more NULL "" equivalence in cid fields.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 11:02:28 +00:00
Joshua Colp 4657dc770c We are shaking up trunk tonight! allow data dir to be specified (issue #6967 reported by tzafrir)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 22:53:53 +00:00
Luigi Rizzo e43bc6634d This rather large commit changes the way modules are loaded.
As partly documented in loader.c and include/asterisk/module.h,
modules are now expected to return all of their methods and flags
into a structure 'mod_data', and are normally loaded with RTLD_NOW
| RTLD_LOCAL, so symbols are resolved immediately and conflicts
should be less likely.  Only in a small number of cases (res_*,
typically) modules are loaded RTLD_GLOBAL, so they can export
symbols.
 
The core of the change is only the two files loader.c and
include/asterisk/module.h, all the rest is simply adaptation of the
existing modules to the new API, a rather mechanical (but believe
me, time and finger-consuming!) process whose detail you can figure
out by svn diff'ing any single module.

Expect some minor compilation issue after this change, please
report it on mantis http://bugs.digium.com/view.php?id=6968
so we collect all the feedback in one place.

I am just sorry that this change missed SVN version number 20000!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 14:08:19 +00:00
Luigi Rizzo 7507309732 normalize code in preparation to module changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 10:01:00 +00:00
Kevin P. Fleming 699f55071b a few cleanups from the last commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:16:34 +00:00
Kevin P. Fleming f10f427d49 since the module API is changing, it's a good time to const-ify the description() and key() return values
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:01:19 +00:00
Luigi Rizzo c3249e2cb4 normalize repeated instances of code as follows:
-       if (res >= 0)
-               return RESULT_SUCCESS;
-       else
-               return RESULT_FAILURE;
+       return (res >= 0) ? RESULT_SUCCESS : RESULT_FAILURE;

 
(we should probably create a macro for this,

#define	RET(r) ((r) >= 0) ? RESULT_SUCCESS : RESULT_FAILURE)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 16:17:04 +00:00
Luigi Rizzo 6c232811c0 as discussed with Mark a few weeks ago, the 'newstack' argument
in pbx_exec is always 1 so it can be removed.

This change also takes away ast_exec_extension(), and lets all
switch functions (exists, canmatch, exec, matchmore) all use the same
prototype, which makes the code a bit cleaner.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:29:39 +00:00
Russell Bryant 0e611cb4b4 Merged revisions 11382 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11382 | russell | 2006-02-28 13:31:04 -0500 (Tue, 28 Feb 2006) | 2 lines

add a missing newline in the agi app description (thanks wunderkin!)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 18:34:45 +00:00
Kevin P. Fleming 302c943001 add 'consumed' argument to ast_get_time_t, so callers can know how many characters were used in the parser
update pbx_dundi to use ast_get_time_t
eliminate some compiler warnings


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 17:13:57 +00:00
Russell Bryant a0d438fb6c remove the uses of the deprecated STANDARD_LOCAL_USER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 20:11:56 +00:00
Kevin P. Fleming e6ca0f1fab Merged revisions 10021,10108 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10108 | kpfleming | 2006-02-14 18:36:57 -0600 (Tue, 14 Feb 2006) | 2 lines

ensure that FastAGI launcher can handle system call interruption (issue #6449)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:38:27 +00:00
Kevin P. Fleming 4662d58b01 add API function for parsing strings to time_t (issue #6320, with mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:24:24 +00:00
Kevin P. Fleming 96bf384e7d major dialplan functions update
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL()


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12 04:28:58 +00:00
Kevin P. Fleming a16ae226b6 use string fields for some stuff in ast_channel
const-ify some more APIs
remove 'type' field from ast_channel, in favor of the one in the channel's tech structure
allow string field module users to specify the 'chunk size' for pool allocations
update chan_alsa to be compatible with recent const-ification patches


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 23:05:28 +00:00
Matt O'Gorman f246b9fc64 reports why an agi script errors out on opening
file


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 20:40:45 +00:00
Tilghman Lesher 0f2a9df6aa Bug 4872 - Make Asterisk paths available to AGIs via environmental variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 05:22:18 +00:00
Russell Bryant a725468381 update doxygen docs to specify authors
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 21:18:06 +00:00
Russell Bryant 0da13c21b4 - move the string join() function to utils.c since it is used in both cli.c and res_agi.c
- reimplement ast_join to be of linear effieciency instead of quadratic
- remove some useless checks for "if (e)"
- reorder checks for strings starting with '_' to avoid a useless call to ast_join()
- check array bounds when parsing arguments to AGI
(issue #5868)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 20:20:04 +00:00
Kevin P. Fleming 2c65582b66 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Kevin P. Fleming a0a9769616 issue #5648
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-08 01:55:31 +00:00
Russell Bryant 8925c3834b issue #5589
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-03 21:25:57 +00:00
Russell Bryant 3453e3efa5 Doxygen documentation update from oej (issue #5505)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24 20:12:06 +00:00
Kevin P. Fleming 0c886c21c2 truncate last 200ms of DTMF-terminated recording to eliminate inband DTMF (issue #5383)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-04 22:35:43 +00:00
Kevin P. Fleming 5da915dcfd update MANY more files with proper copyright/license info (thanks Ian!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14 20:46:50 +00:00
Kevin P. Fleming 2cde73fddb make sure realtime/high scheduling priority is relinquished before executing an AGI script (issue #4930)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-23 01:30:22 +00:00
Kevin P. Fleming d69e96de11 allow custom dialplan functions to be called from AGI (issue #4855)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-22 23:00:23 +00:00
Kevin P. Fleming 3315ea79b9 add CONTROL STREAM FILE AGI command (issue #4738)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-22 21:59:24 +00:00
Josh Roberson 4e153882d7 Fix usage text for AGI recieve text (bug #4948)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-15 02:45:34 +00:00
Mark Spencer 4f0d1b8428 Fix sighup with AGI (bug #4854)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-03 04:17:12 +00:00
Kevin P. Fleming 22b0f5d306 add a library of timeval manipulation functions, and change a large number of usses to use the new functions (bug #4504)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-15 23:00:47 +00:00
Kevin P. Fleming 9d8d86e19d phase two of string portability stuff:
don't need ast_ prefixes on functions
  use individual #defines for function presence
  add vasprintf to portability library


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-15 22:06:15 +00:00
Kevin P. Fleming 8079f53c01 don't hangup the channel when a RECEIVE TEXT command times out (bug #4607)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-11 20:40:02 +00:00
Russell Bryant c18fd5cd8c more ast_copy_string conversions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-10 23:21:39 +00:00
Kevin P. Fleming 767f019264 add AGI 'RECEIVE TEXT' command (bug #4525)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-21 01:16:18 +00:00
Kevin P. Fleming 2b8338cb52 more file version tags
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 22:12:19 +00:00
Kevin P. Fleming 4f299de252 major Makefile and build process improvements, including removal of all hardcoded paths (modules must now use run-time paths as they should) (bug #4116)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 03:04:58 +00:00
Kevin P. Fleming 1bac31d6bd more efficient (and understandable) ast_channel_walk_locked, and vastly more efficient ast_channel_by_name_locked (bug #4265)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 02:29:18 +00:00
Kevin P. Fleming 8ad230082e make AGI 'TDD MODE' command behave as documented when the channel doesn't support options (bug #4370)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-05 21:00:33 +00:00
Kevin P. Fleming d83eec795f support labels as targets of SET PRIORITY command (bug #4057)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-05-19 02:57:45 +00:00
Kevin P. Fleming 2d643dbc42 don't use %i for numeric input in scanf (bug #4071)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-27 01:42:33 +00:00
Kevin P. Fleming 1f9ab2380a use double-quotes instead of angle-brackets for non-system include files (bug #4058)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-21 06:02:45 +00:00
Mark Spencer bb1abed78f Add datetime to AGI (bug #3984)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-11 03:23:54 +00:00
Mark Spencer b8a9e7558f Add say date to AGi (bug #3768)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-03-30 07:00:49 +00:00
Mark Spencer 6347ced74a Little say numer fix (bug #3884)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-03-29 06:21:21 +00:00
Mark Spencer 49ad55b85a Continue with GET_DATA if no file is there (bug #3878)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-03-28 07:08:39 +00:00
Mark Spencer e6e2e59b4d Make sure AGI continues even when files aren't there (bug #3862)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-03-26 05:33:48 +00:00
Mark Spencer 8aa722871d Add additional fields for calling parameters per BT request
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-03-24 16:38:13 +00:00
Mark Spencer f9cfe60312 Add support for Solaris/x86 (bug #3064)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-03-17 23:12:15 +00:00
Russell Bryant 0c30452423 update copyright headers for 2005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-21 07:06:25 +00:00
Mark Spencer 7af0234fa7 Various small fixups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-09 09:01:40 +00:00
Mark Spencer 2d8160ecd5 AGI formatting fixes (bug #3270)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-08 19:35:20 +00:00
Mark Spencer a2e70340b8 Don't die when a file is missing (bug #3212)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-12-31 21:52:56 +00:00
Mark Spencer 0255d5805f Merge gramatical fixes from corydon (bug #3180)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-12-28 23:01:22 +00:00
Mark Spencer 3fde2e56b8 Fix AGI to know about "builtin" variables, too (bug #2737)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-12-23 02:47:01 +00:00
Mark Spencer b3a0ef24ed Fix comment issues (bug #3089)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-12-18 22:04:07 +00:00
Mark Spencer 0f205bb079 Add "SAY ALPHA" (matt nicholson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-12-14 18:39:25 +00:00
Mark Spencer 17d5d7bdb7 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-11-17 04:36:39 +00:00
Mark Spencer eedf47ac8f Add GET FULL VARIABLE AGI command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-11-17 04:02:56 +00:00
Mark Spencer 94f6f76fbe Add get option command (bug #2868, thanks junky!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-11-16 03:37:07 +00:00
Mark Spencer 134e6180c5 Disable echo canceller for digital calls (bug #2785), fix build on MacOSX (bug #2803)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-11-07 16:21:01 +00:00
James Golovich 9f5f95fe87 Remove late-night excuse for wasting cpu cycles. revert previous res_agi change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-10-17 05:16:22 +00:00
James Golovich 8b8d26f9bc Fix pbx_builtin_setlanguage to not seg when data is a NULL ptr. Also fix AGI so we dont run into this with other specific problems as well. (bug 2641)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-10-13 22:47:42 +00:00
Mark Spencer 04fc29c8b2 Huge callerid rework (might break H.323, others)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-10-02 00:58:31 +00:00
James Golovich b1b4db95c2 Fix FastAGI working with non default ports (bug 2539)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-29 03:32:58 +00:00
Mark Spencer ddf2648326 Fix BSD build
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-28 14:14:00 +00:00
James Golovich aa2e435d82 Remove duplicate sys/socket.h include from res_agi.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-27 14:54:07 +00:00
Russell Bryant fda8fa2367 add includes in res_agi.c to fix BSD compatibility
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-26 17:01:39 +00:00
Mark Spencer bf4ca23372 Make holdtime announcement say "less than 2 minutes" instead of "1 minutes" (bug #2500)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-25 14:22:27 +00:00
James Golovich 9812bcc03c Include sys/socket.h in res/res_agi.c (bug 2490)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-23 18:10:46 +00:00
Mark Spencer 1597114535 Implement Fast AGI (agi://) over TCP socket (Astricon talk idea)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-22 15:21:36 +00:00
Mark Spencer 7acee329e1 Merge BSD stack size work (bug #2067)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-08 17:15:02 +00:00
Mark Spencer 57217916f1 First pass at AGI registration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 20:25:39 +00:00
Mark Spencer de4188df06 Merge musiconhold stuff (bug #2027), restructure AGI to eventually support registration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 20:12:28 +00:00