dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

349 Commits

Author SHA1 Message Date
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
russell 22436a9c1b Add a new dialplan function, DIALPLAN_EXISTS(), which allows you to check for
the existence of a dialplan target.

(closes issue #11579)
Reported by: irroot
Patches: 
      func_dialplan2.c uploaded by irroot (license 52)
	  -- Additional changes by me.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94799 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-26 18:54:21 +00:00
kpfleming d4e966efcc Merged revisions 93180 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93180 | kpfleming | 2007-12-16 22:44:51 -0800 (Sun, 16 Dec 2007) | 23 lines

In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.

While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93184 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17 07:25:35 +00:00
mmichelson 7e035d675e I needed to increment the numbers used on the VERBOSITY_ATLEAST calls by 1.
Thanks to kpfleming for pointing this out.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93065 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14 19:19:07 +00:00
mmichelson 3838d4b2c6 Changed VERBOSITY_LEVEL to VERBOSITY_ATLEAST to be more accurate.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93063 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14 18:54:48 +00:00
mmichelson 0fecfb254c After reading Russell's e-mail to the dev list stating that checking option_verbose is not
equivalent to the check done by ast_verb, I wrote a macro, VERBOSITY_LEVEL, which does this
check. I did a quick look in the source and used this macro in some places where option_verbose
was used.

I also converted some verbose messages in logger.c to use ast_verb instead of ast_verbose.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93042 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14 18:47:44 +00:00
mmichelson 06927ebe43 Reintroduce an optimization that was lost when converting trunk to use ast_verb.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92976 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14 15:59:09 +00:00
rizzo aa85540763 Put into Makefile.moddir_rules the common instructions used to
generate loadable and embedded module lists.

Individual Makefiles now are a lot simpler, possibly as simple as this:

    -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
    MODULE_PREFIX=cdr_
    all: _all
    include $(ASTTOPDIR)/Makefile.moddir_rules

and also more flexible because in a single directory we can combine
various types of modules (app_, cdr_, func_, ... ) by simply
listing them in the MODULE_PREFIX variable.

The individual Makefiles can also create list of modules to be
excluded by listing them in the variablel MODULE_EXCLUDE (see an
example in channels/Makefile).

With this change it becomes trivial to integrate a directory with
locally created/modified sources into the main build.




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92082 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10 03:50:38 +00:00
rizzo b50ce18fe8 normalize subdirs' Makefile by using ASTTOPDIR and not .. to reference
the top level directory.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92022 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-09 21:29:37 +00:00
russell 4efbdfc704 Merged revisions 90145 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90145 | russell | 2007-11-28 18:20:34 -0600 (Wed, 28 Nov 2007) | 5 lines

This set of changes is to make some callerID handling thread-safe.
The ast_set_callerid() function needed to lock the channel.  Also, the handlers
for the CALLERID() dialplan function needed to lock the channel when reading
or writing callerid values directly on the channel structure.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90146 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29 00:28:10 +00:00
tilghman 2135451113 Merged revisions 89631 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89631 | tilghman | 2007-11-27 09:38:03 -0600 (Tue, 27 Nov 2007) | 3 lines

Default result of STAT should be "0" not "".
Reported via the -users mailing list, fixed by me.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89632 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27 15:41:46 +00:00
rizzo 15e517d2ae remove some useless includes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89521 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 02:30:58 +00:00
rizzo 150b2c22ef remove another set of redundant #include "asterisk/options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:24:55 +00:00
russell 6c73909270 Make the SYSINFO documentation reflect which options were compiled in
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89439 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 23:03:02 +00:00
rizzo 144827d5ec remove unnecessary headers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89431 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 21:04:04 +00:00
rizzo 5e75696a42 remove some unnecessary includes.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89430 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 20:42:06 +00:00
rizzo 0cc47e4221 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 19:09:03 +00:00
mmichelson 9f89c21eaa Adding SYSINFO() dialplan function for retrieval of system information
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89421 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 16:29:07 +00:00
rizzo ba761e2427 more removal of duplicate #include lines
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89349 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 00:02:33 +00:00
rizzo 18911d90cb 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: http://svn.digium.com/svn/asterisk/trunk@89348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 23:54:45 +00:00
rizzo 883346d64a 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: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:04:58 +00:00
murf 91879350be Based on a note in asterisk-dev by Brian Capouch, I determined I too agressive in not initializing arrays passed to pbx_substitute_variables_xxxx; I reviewed the code (again) and hopefully found every possible spot where substitute_variables is called conditionally, and made sure the char array involved was set to a null string.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89186 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12 18:44:36 +00:00
file dedd2f770b Make func_env build again.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89121 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 21:27:37 +00:00
tilghman 59654dd845 Add the FILE() dialplan function and deprecate ReadFile.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89114 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 17:32:15 +00:00
kpfleming a45a413db3 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: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 05:28:47 +00:00
murf 47c8ea00b8 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: http://svn.digium.com/svn/asterisk/trunk@88166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 22:26:51 +00:00
tilghman 87971c627a Add a simple dialgroup function. By taking one of the simpler uses of Queue
away from Queue, we simplify the lives of people who do not need all the bells
and whistles.  Also, this is part of the functions that people need to
reimplement Queue in the dialplan, as a set of logic, rather than as a single
app with hundreds of options.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87264 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-28 14:16:45 +00:00
tilghman 01a542af5a Merged revisions 87262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87262 | tilghman | 2007-10-28 08:46:55 -0500 (Sun, 28 Oct 2007) | 7 lines

Add autoservice to several more functions which might delay in their responses.
Also, make sure that func_odbc functions have a channel on which to set
variables.
Reported by russell
Fixed by tilghman
Closes issue #11099

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87263 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-28 14:11:01 +00:00
russell 9a3872cc77 Make sure a channel exists before attempting to start or stop channel
autoservice in func_lock and func_shell.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87233 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-27 01:15:02 +00:00