dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

92 Commits

Author SHA1 Message Date
lmadsen e73cab2f3f Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328259 f38db490-d61c-443f-a65b-d21fe96a405b
2011-07-14 20:28:54 +00:00
tilghman b760c34658 Merged revisions 310462 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r310462 | tilghman | 2011-03-12 14:27:54 -0600 (Sat, 12 Mar 2011) | 45 lines
  
  Merged revisions 310448 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r310448 | tilghman | 2011-03-12 14:24:54 -0600 (Sat, 12 Mar 2011) | 38 lines
    
    Recorded merge of revisions 310435 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r310435 | tilghman | 2011-03-12 14:22:07 -0600 (Sat, 12 Mar 2011) | 31 lines
      
      Add AELSub, which provides a stable entry point into AEL subroutines.
      
      This commit needs some explanation, given that we're adding a new application
      into an existing release branch.  This is generally a violation of our release
      policy, except in very limited circumstances, and I believe this is one of
      those circumstances.
      
      The problem that this solves is one of the sanity of using multiple dialplan
      languages to define a dialplan.  In the case of the reporter, he or she is
      using AEL is define subroutines, while using Realtime extensions to invoke
      those subroutines.  While you can do this, it's based upon the reality of AEL
      using actual dialplan extensions; however, there is no guarantee that the
      details of _how_ AEL is compiled into extensions will remain stable.  In fact,
      at the time of this commit, it has already changed twice, once in a
      fundamental way.
      
      Now normally, a new application would only be added to trunk.  However, this
      application is explicitly to create a stable user-level API between versions,
      and adding it to trunk only will not solve the user's problem of switching
      between 1.6.2 and 1.8, nor will it help anybody switching from 1.8 to 1.10.
      Therefore, it needs to go into existing release branches.  For the sake of
      consistency, and also because one of the changes was between 1.4 and 1.6.x,
      I am also electing to commit this to 1.4.
      
      (closes issue #18910)
       Reported by: alexandrekeller
       Patches: 
             20110304__issue18919__1.6.2.diff.txt uploaded by tilghman (license 14)
             20110304__issue18919__1.4.diff.txt uploaded by tilghman (license 14)
       Tested by: alexandrekeller
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@310500 f38db490-d61c-443f-a65b-d21fe96a405b
2011-03-12 20:42:33 +00:00
jpeeler deebb3f0dd Merged revisions 271399 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r271399 | jpeeler | 2010-06-18 14:28:24 -0500 (Fri, 18 Jun 2010) | 11 lines
  
  Fix crash when parsing some heavily nested statements in AEL on reload.
  
  Due to the recursion used when compiling AEL in gen_prios, all the stack space 
  was being consumed when parsing some AEL that contained nesting 13 levels deep.
  Changing a few large buffers to be heap allocated fixed the crash, although I
  did not test how many more levels can now be safely used.
  
  (closes issue #16053)
  Reported by: diLLec
  Tested by: jpeeler
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@271483 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-18 21:32:09 +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
file 6fff9b550d Numerous documentation updates.
(closes issue #13970)
Reported by: pkempgen
Patches:
      __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165792 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18 21:21:44 +00:00
murf af3763f18f A possibly "horrible fix" for a "horribly broken"
situation.

As stuff shifts around in the asterisk code, the
miscellaneous inclusions from the standalone stuff
gets broken. There's no easy fix for this situation.

I made sure that everything in utils builds without
problem ***AND*** that aelparse runs the regressions
correctly with the following make menuselect options
both on and off:

DONT_OPTIMIZE
DEBUG_THREADS
DEBUG_CHANNEL_LOCKS
MALLOC_DEBUG
MTX_PROFILE
DEBUG_SCHEDULER
DEBUG_THREADLOCALS
DETECT_DEADLOCKS
CHANNEL_TRACE

I think from now on, I'm going to #undef
all these features in the various utils native
files; I guess I could do the same for the
copied-in files, surrounded by STANDALONE ifdef.

A standalone isn't going to care about threads,
mutexes, etc.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165071 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-17 05:04:56 +00:00
eliel 6e243a5434 Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-05 10:31:25 +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
kpfleming db07a1f968 Merged revisions 144924-144925 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r144924 | kpfleming | 2008-09-27 10:00:48 -0500 (Sat, 27 Sep 2008) | 6 lines
  
  improve header inclusion process in a few small ways:
  
    - it is no longer necessary to forcibly include asterisk/autoconfig.h; every module already includes asterisk.h as its first header (even before system headers), which serves the same purpose
    - astmm.h is now included by asterisk.h when needed, instead of being forced by the Makefile; this means external modules will build properly against installed headers with MALLOC_DEBUG enabled
    - simplify the usage of some of these headers in the AEL-related stuff in the utils directory
........
  r144925 | kpfleming | 2008-09-27 10:13:30 -0500 (Sat, 27 Sep 2008) | 2 lines
  
  fix some minor issues with rev 144924
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@144949 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-27 15:52:56 +00:00
murf 2e62b3038f Merged revisions 111341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111341 | murf | 2008-03-26 21:21:05 -0600 (Wed, 26 Mar 2008) | 15 lines


(closes issue #12302)
Reported by: pj
Tested by: murf

These changes will set a channel variable ~~EXTEN~~ just before generating code
for a switch, with the value of ${EXTEN}. The exten is marked as having a switch, 
and ever after that, till the end of the exten, we substitute any ${EXTEN} 
with ${~~EXTEN~~} instead in application arguments; (and the ${EXTEN: also). 
The reason for this, is that because switches are coded using 
separate extensions to provide pattern matching, and
jumping to/from these switch extensions messes up the ${EXTEN} value, 
which blows the minds of users.


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111360 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-27 04:47:12 +00:00
murf 2be361fbb9 (closes issue #6002)
Reported by: rizzo
Tested by: murf

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

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

and:

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

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

pbx/pbx_config.c
pbx/pbx_ael.c

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

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

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



chan_sip.c
chan_iax.c
chan_skinny.c

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

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


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

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


include/asterisk/pbx.h

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


include/asterisk/pval.h

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


main/features.c

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



main/pbx.c

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

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

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

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

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

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

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

ast_merge_contexts_and_delete() was heavily modified.

ast_add_extension2() was also upgraded to handle changes. 

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



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

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


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

How's this for verbose commit messages?




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106757 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07 18:57:57 +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
rizzo 7f3cce8be2 more errno.h removal
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 21:12:08 +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 aef44ae684 This is the perhaps the biggest, boldest, most daring change I've ever committed to trunk. Forgive me in advance any disruption this may cause, and please, report any problems via the bugtracker. The upside is that this can speed up large dialplans by 20 times (or more). Context, extension, and priority matching are all fairly constant-time searches. I introduce here my hashtables (hashtabs), and a regression for them. I would have used the ast_obj2 tables, but mine are resizeable, and don't need the object destruction capability. The hashtab stuff is well tested and stable. I introduce a data structure, a trie, for extension pattern matching, in which knowledge of all patterns is accumulated, and all matches can be found via a single traversal of the tree. This is per-context. The trie is formed on the first lookup attempt, and stored in the context for future lookups. Destruction routines are in place for hashtabs and the pattern match trie. You can see the contents of the pattern match trie by using the 'dialplan show' cli command when 'core set debug' has been done to put it in debug mode. The pattern tree traversal only traverses those parts of the tree that are interesting. It uses a scoreboard sort of approach to find the best match. The speed of the traversal is more a function of the length of the pattern than the number of patterns in the tree. The tree also contains the CID matching patterns. See the source code comments for details on how everything works. I believe the approach general enough that any issues that might come up involving fine points in the pattern matching algorithm, can be solved by just tweaking things. We shall see. The current pattern matcher is fairly involved, and replicating every nuance of it is difficult. If you find and report problems, I will try to resolve than as quickly as I can. The trie and hashtabs are added to the existing context and exten structs, and none of the old machinery has been removed for the sake of the multitude of functions that use them. In the future, we can (maybe) weed out the linked lists and save some space.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89129 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-09 16:00:22 +00:00
murf 15b76d347e Merged revisions 87168 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87168 | murf | 2007-10-26 10:34:02 -0600 (Fri, 26 Oct 2007) | 1 line

closes issue #11086 where a user complains that references to following contexts report a problem; The problem was REALLy that he was referring to empty contexts, which were being ignored. Reporter stated that empty contexts should be OK. I checked it out against extensions.conf, and sure enough, empty contexts ARE ok. So, I removed the restriction from AEL. This, though, highlighted a problem with multiple contexts of the same name. This should be OK, also. So, I added the extend keyword to AEL, and it can preceed the 'context' keyword (mixed with 'abstract', if nec.). This will turn off the warnings in AEL if the same context name is used 2 or more times. Also, I now call ast_context_find_or_create for contexts now, instead of just ast_context_create; I did this because pbx_config does this. The 'extend' keyword thus becomes a statement of intent. AEL can now duplicate the behavior of pbx_config,
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87187 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26 17:39:39 +00:00
qwell 7756b987a0 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 20:05:18 +00:00
qwell d542122e6a Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19 18:29:40 +00:00
russell 13b9c5237c Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)
(closes issue #10724)
Reported by: eliel
Patches: 
      chan_skinny.c.patch uploaded by eliel (license 64)
      chan_oss.c.patch uploaded by eliel (license 64)
      chan_mgcp.c.patch2 uploaded by eliel (license 64)
      pbx_config.c.patch uploaded by seanbright (license 71)
      iax2-provision.c.patch uploaded by eliel (license 64)
      chan_gtalk.c.patch uploaded by eliel (license 64)
      pbx_ael.c.patch uploaded by seanbright (license 71)
      file.c.patch uploaded by seanbright (license 71)
      image.c.patch uploaded by seanbright (license 71)
      cli.c.patch uploaded by moy (license 222)
      astobj2.c.patch uploaded by moy (license 222)
      asterisk.c.patch uploaded by moy (license 222)
      res_limit.c.patch uploaded by seanbright (license 71)
      res_convert.c.patch uploaded by seanbright (license 71)
      res_crypto.c.patch uploaded by seanbright (license 71)
      app_osplookup.c.patch uploaded by seanbright (license 71)
      app_rpt.c.patch uploaded by seanbright (license 71)
      app_mixmonitor.c.patch uploaded by seanbright (license 71)
      channel.c.patch uploaded by seanbright (license 71)
      translate.c.patch uploaded by seanbright (license 71)
      udptl.c.patch uploaded by seanbright (license 71)
      threadstorage.c.patch uploaded by seanbright (license 71)
      db.c.patch uploaded by seanbright (license 71)
      cdr.c.patch uploaded by moy (license 222)
      pbd_dundi.c.patch uploaded by moy (license 222)
      app_osplookup-rev83558.patch uploaded by moy (license 222)
      res_clioriginate.c.patch uploaded by moy (license 222)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85460 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-11 19:03:06 +00:00
murf 9d3e81a7d8 Merged revisions 84239 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84239 | murf | 2007-10-01 14:27:52 -0600 (Mon, 01 Oct 2007) | 1 line

closes issue #10777 -- by returning a null for the parse tree when there's really nothing there, and making sure we don't try to do checking on a null tree.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84327 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01 23:03:50 +00:00
murf 2451fd1ebf Merged revisions 83558 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83558 | murf | 2007-09-22 10:41:43 -0600 (Sat, 22 Sep 2007) | 1 line

This closes issue #10788 -- the 3rd arg in the for statement is now wrapped in Set() only if there's an '=' in that string. Otherwise, if it begins with '&', then a Macro call is generated; otherwise it is made into an app call. A bit more accomodating, keeps the new guys happy, and the guys with ael-1 code should be happy, too
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83575 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-22 17:39:37 +00:00
murf e897b4499e This commit closes bug 7605, and half-closes 7638. The AEL code has been redistributed/repartitioned to allow code re-use both inside and outside of Asterisk. This commit introduces the utils/conf2ael program, and an external config-file reader, for both normal config files, and for extensions.conf (context, exten, prio); It provides an API for programs outside of asterisk to use to play with the dialplan and config files.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79595 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-15 19:21:27 +00:00
murf 66add1d2ba Merged revisions 79255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79255 | murf | 2007-08-13 11:49:54 -0600 (Mon, 13 Aug 2007) | 1 line

This patch fixes bug 10411. I added a new regression test, some regression test cleanups
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79392 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-14 14:32:21 +00:00
murf bd5486e7f8 These fixes take care of two problems: a complaint in asterisk-dev that goto's aren't working in trunk, a side effect of the move to commas as arg seps in apps and funcs; and a problem I spotted myself with dial's 'e' option, where gotos were off by one, because I forgot to set the AUTOLOOP flag in the peer channel.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77520 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-27 15:46:20 +00:00
murf e46c65efba The upgrade of application argument separators to comma has an effect on AEL; I commented out the code that substitutes commas with vertbars, so we can get apps to parse their args correctly.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77218 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-26 01:33:55 +00:00
murf 83c356e0a7 Spotted this bug today myself, trying to reproduce a BE bug. Use a vert bar instead of a comma, when calling RAND.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75505 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17 21:52:51 +00:00
murf c66181df61 In regards to changes for 9508, expr2 system choking on floating point numbers, I'm adding this update to round out (no pun intended) and make this FP-capable version of the Expr2 stuff interoperate better with previous integer-only usage, by providing Functions syntax, with 20 builtin functions for floating pt to integer conversions, and some general floating point math routines that might commonly be used also. Along with this, I made it so if a function was not a builtin, it will try and find it in the ast_custom_function list, and if found, execute it and collect the results. Thus, you can call system functions like CDR(), CHANNEL(), etc, from within $\[..\] exprs, without having to wrap them in $\{...\} (curly brace) notation. Did a valgrind on the standalone and made sure there's no mem leaks. Looks good. Updated the docs, too.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73449 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-05 18:15:22 +00:00
murf a5df6622bc This finishes the changes for making Macro args LOCAL to the call, and allowing users to declare local variables.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70461 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20 20:10:19 +00:00
tilghman 535b46fc6f Merge work to make U(...) option work for Dial
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70358 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20 17:35:08 +00:00
murf 1de82b08fc Merged revisions 67526 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67526 | murf | 2007-06-05 15:30:18 -0600 (Tue, 05 Jun 2007) | 1 line

this fixes bug 9883, wherein macros were not allowing the includes construct. fixed and tested, looks OK. Now includes can serve as an adjunct to catch.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67529 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05 22:04:22 +00:00
murf 2acb6eaa29 Merged revisions 67420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67420 | murf | 2007-06-05 12:17:28 -0600 (Tue, 05 Jun 2007) | 1 line

Added code to automatically add a default case to switches that don't have one. In some cases, rather than fall thru, it results in a goto with -1 result, which terminates the extension; a sort of dialplan seqfault, sort of. This was required to fix bug reported in 9881
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67423 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05 18:23:53 +00:00
murf b631bce5c3 Merged revisions 59688 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59688 | murf | 2007-04-02 11:31:32 -0600 (Mon, 02 Apr 2007) | 1 line

continue in for-loop should go to the incrementer, not the test. As per 9435, thanks to marcelbarbulescu
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59692 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-02 17:38:12 +00:00
murf e861d1ce31 Merged revisions 59261 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59261 | murf | 2007-03-27 12:16:32 -0600 (Tue, 27 Mar 2007) | 1 line

via 9373 (duplicate context in AEL crashes asterisk), kpfleming pointed on asterisk-dev, that DECLINE in this case the proper thing to do. This change now has it doing the proper thing.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59264 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-27 18:21:50 +00:00
murf 4e3fe3a800 Merged revisions 59228 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59228 | murf | 2007-03-26 15:41:32 -0600 (Mon, 26 Mar 2007) | 1 line

fix for 9373 (duplicate context in AEL crashes asterisk). I turned a duplicate context from a WARNING to an ERROR. Now you get a module load failure, and asterisk just exits. That's better than a crash, right\?
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59233 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-26 21:47:37 +00:00
murf 22043a6e79 The fix for the AEL <<security hole>> (bug 9316) is here...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59073 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-20 18:18:06 +00:00
murf 40b2713d84 Merged revisions 57426 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r57426 | murf | 2007-03-01 22:21:36 -0700 (Thu, 01 Mar 2007) | 1 line

I almost had comma escapes right, but 9184 points out the problem-- the escape is removed by pbx_config, and pbx_ael should also, before sending it down into the pbx engine. Also, you have to insert it back in, if you are generating extensions.conf code from the AEL.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57438 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-02 05:57:06 +00:00
murf 54fef797d3 Merged revisions 57049 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r57049 | murf | 2007-02-28 10:15:27 -0700 (Wed, 28 Feb 2007) | 1 line

I was surprised that I had not yet downgraded missing goto targets and macro call defs to a warning, in case they are in extensions.conf; I rectified this problem. Also, A goto in a macro to a target in a catch block was not being found; I fixed this too; the cause was that I needed to treat catch statements like an extension in the find_match code.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57050 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-28 17:22:45 +00:00
oej 10edb20a8e Doxygen additions, corrections
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56665 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-24 20:29:41 +00:00
murf 47046d0ba7 Merged revisions 51409 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51409 | murf | 2007-01-22 12:28:51 -0700 (Mon, 22 Jan 2007) | 1 line

This fixes 8836, according to dnatural
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51413 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-22 19:42:28 +00:00
murf fc79f14afc Merged revisions 49061 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49061 | murf | 2006-12-29 17:40:37 -0700 (Fri, 29 Dec 2006) | 1 line

A fix for 8661, where the CUT func needed to have comma args converted to vertical bars. I hope this change does little harm.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49062 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-30 00:51:07 +00:00
file 289bbd4bb1 Clean up last commit to better conform to standards.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47556 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-13 17:36:28 +00:00
murf 95c4f20c77 AEL need not complain about parkedcalls not being found... just confuses users
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47554 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-13 17:32:16 +00:00
kpfleming 470f688a28 Merged revisions 46200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46200 | kpfleming | 2006-10-25 09:32:08 -0500 (Wed, 25 Oct 2006) | 2 lines

apparently developers are still not aware that they should be use ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46201 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25 14:44:50 +00:00
murf e38441a0ee Correction for bug 8128 in trunk
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45078 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-13 18:08:33 +00:00
murf 5f6e374d84 These mods fix a problem pointed out by dgartang, where in certain situations, the target of a goto cannot be found, even right under your nose. This is because the current context is not updated properly, and rather than waste time and find why and where the context should have been updated, I just use my newly added 'dad' ptrs, and pop until I have either the context or extension, and use that instead.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44489 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-05 18:29:06 +00:00
murf a2c2aa216d These changes resolve the problems in bug 8090, where there's a crash compiling an empty context
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44377 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04 19:33:37 +00:00
murf c54501d641 These changes correspond to the changes to app_stack's Gosub() application
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44263 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-03 16:42:26 +00:00
murf 52da543985 This commits the changes to AEL to use the gosub-with-args from Tilghman to perform macro calls. This results in substantially smaller stack footprint, which allows macro call depths in excess of 100,000 levels, rather than the limit of 7 calls deep, which the Macro app is subject to.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43747 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-27 03:45:22 +00:00
murf 03723031d2 This commits a change to return MODULE_LOAD_FAILURE on error, and SUCCESS (instead of 0) when all goes well for bug 8004
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43507 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-22 21:34:04 +00:00
murf d55e6f507d As per bug 8004, we now return AST_MODULE_LOAD_DECLINE when we can't read extensions.ael
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43506 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-22 21:17:07 +00:00