Commit Graph

861 Commits

Author SHA1 Message Date
Kevin P. Fleming a3af213506 Remove rarely-used event_log/LOG_EVENT support
In discussions today at the Europe Asterisk Developer Meet-Up, we determined that
the event_log was used in only 9 places in the entire tree, and really was not needed
at all. The users have been converted to use LOG_NOTICE, or the messages have been
removed since other messages were already in place that provided the same information.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02 19:02:22 +00:00
David Brooks 0ea83eab48 Removing crufty code that is no longer necessary. Code cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 18:32:58 +00:00
Russell Bryant b564b2105f Change g_eid to ast_eid_default.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 14:00:18 +00:00
Jeff Peeler 58cf8b69da Fix malloc debug macros to work properly with h323.
The main problem here was that cstdlib was undefining free thereby causing the
proper debug macros to not be used. ast_h323.cxx has been changed to call
ast_free instead to avoid the issue. 

A few other issues were addressed:
- There were a few instances of functions improperly passing ast_free instead
of ast_free_ptr.
- Some clean up was done to avoid the debug macros intentionally being redefined.
(copied below from Kevin's commit, appreciate the help)
- disable astmm.h from doing anything when STANDALONE is defined, which is used
by the tools in the utils/ directory that use parts of Asterisk header files in
hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are
compiled with STANDALONE defined.

(closes issue #13593)
Reported by: pj



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 04:06:44 +00:00
Mark Michelson 7824d71998 Convert pbx_spool to use string fields instead of statically-sized buffers.
In tests run after making this conversion, I noticed an approximate 85% 
reduction in memory usage for call file processing.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 17:03:47 +00:00
Tilghman Lesher f90021fdd0 Ensure that commas placed in the middle of extension character classes do not
interfere with correct parsing of the extension.  Also, if an unterminated
character class DOES make its way into the pbx core (through some other
method), ensure that it does not crash Asterisk.
(closes issue #14362)
 Reported by: Nick_Lewis
 Patches: 
       20090129__bug14362.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04 00:43:52 +00:00
Tilghman Lesher 53ddd52fc4 Merged revisions 170158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170158 | tilghman | 2009-01-22 11:18:07 -0600 (Thu, 22 Jan 2009) | 6 lines
  
  Allow global variables after substitution to be as long as other variables.
  (closes issue #14263)
   Reported by: markd
   Patches: 
         20090120__bug14263.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 17:19:28 +00:00
Sean Bright 5183cbccfc Change intializer types. Found while working on asterisk-cpp. I have a new
favorite error message from g++:

    pbx_dundi.c:4580: sorry, unimplemented: non-trivial designated
                      initializers not supported

I like it when compilers are apologetic.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-17 02:52:30 +00:00
Joshua Colp 654ea55a65 Numerous documentation updates.
(closes issue #13970)
Reported by: pkempgen
Patches:
      __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 21:21:44 +00:00
Steve Murphy 1a37ee4025 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: https://origsvn.digium.com/svn/asterisk/trunk@165071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 05:04:56 +00:00
Steve Murphy eaafc96872 fixed the regressions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 02:32:58 +00:00
Joshua Colp 601176cb6e Be more detailed about why the include did not get included.
(closes issue #14071)
Reported by: kshumard
Patches:
      pbx_config.patch.improvederroroutput.txt uploaded by kshumard (license 92)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 16:50:11 +00:00
Tilghman Lesher e62193f887 Allow disabling pattern match searches within the Realtime dialplan switch.
(closes issue #13698)
 Reported by: fhackenberger
 Patches: 
       20081211__bug13698.diff.txt uploaded by Corydon76 (license 14)
 Tested by: fhackenberger


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 21:17:07 +00:00
Russell Bryant 1238488319 When a reload is issued, always process the configuration for dundi.conf.
The reason is that a reload can be used to refresh DNS lookups for defined peers.
Even if the config file hasn't changed, we want to process it for that purpose.

(closes issue #13776)
Reported by: kombjuder


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 16:17:55 +00:00
Russell Bryant 92e1619bab Merged revisions 163511 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r163511 | russell | 2008-12-12 08:40:31 -0600 (Fri, 12 Dec 2008) | 5 lines

Specify uint32_t for variables storing a CRC32 so that it is actually 32 bits
on 64-bit machines, as well.

(inspired by issue #13879)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 14:44:06 +00:00
Matthew Nicholson c6244cca48 Merged revisions 163316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r163316 | mnicholson | 2008-12-11 16:44:31 -0600 (Thu, 11 Dec 2008) | 9 lines
  
  Clean up the dundi cache every 5 minutes.
  
  (closes issue #13819)
  Reported by: adomjan
  Patches:
        pbx_dundi.c-clearcache.patch uploaded by adomjan (license 487)
        dundi_clearecache3.diff uploaded by mnicholson (license 96)
  Tested by: adomjan
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 22:49:59 +00:00
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 10:31:25 +00:00
Tilghman Lesher b1824992a9 Merged revisions 160558 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r160558 | tilghman | 2008-12-03 11:34:34 -0600 (Wed, 03 Dec 2008) | 7 lines
  
  If an entry is added to the directory during a scan when another entry expires,
  then that new entry will not be processed promptly, but must wait for either a
  future entry to start or a current entry's retry to occur.  If no other entries
  exist in the directory (other than the new entries) when a bunch expire, then
  the new entries must wait until another new entry is added to be processed.
  This was a rather weird race condition, really.  Fixes AST-147.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 17:38:59 +00:00
Tilghman Lesher efa00e7038 Merged revisions 160551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r160551 | tilghman | 2008-12-03 10:58:34 -0600 (Wed, 03 Dec 2008) | 4 lines
  
  Don't start scanning the directory until all modules are loaded, because some
  required modules (channels, apps, functions) may not yet be in memory yet.
  Fixes AST-149.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 17:01:03 +00:00
Tilghman Lesher 1b0d3db863 Don't actually do anything with a negative priority, because we ignore it in
the result, anyway.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 18:01:02 +00:00
Kevin P. Fleming 8d5deb312b Merged revisions 157859 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines
  
  the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
  
  with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).
  
  while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 00:08:12 +00:00
Terry Wilson d66a8cd264 Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon trying to parse an invalid config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 19:25:14 +00:00
Michiel van Baak 86f900b201 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: https://origsvn.digium.com/svn/asterisk/trunk@156120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 06:46:04 +00:00
Kevin P. Fleming 210df649a2 correct logic error noticed by rmudgett (thanks!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 03:09:16 +00:00
Kevin P. Fleming 9153827d56 coding style/guidelines cleanup, plus use new side-effect safe S_OR
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-06 21:12:03 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
BJ Weschke 9aefadd7c1 Do NOT attempt to do anything with the ast_config struct when it's been returned as INVALID by the config file interpreter.
(closes issue #13741)
 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-20 05:07:25 +00:00
Tilghman Lesher d5837ba8c2 Add additional memory debugging to several core APIs, and fix several memory
leaks found with these changes.
(Closes issue #13505, closes issue #13543)
Reported by: mav3rick, triccyx
 Patches: 
       20081001__bug13505.diff.txt uploaded by Corydon76 (license 14)
 Tested by: mav3rick, triccyx


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 22:38:06 +00:00
Tilghman Lesher 038b588ee8 Reset continuation items at the beginning of each context (suggested by
kpfleming).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10 18:59:58 +00:00
Tilghman Lesher 5c32f80a61 Add keyword "same", which allows you to create multiple steps in a dialplan,
without needing to respecify an extension pattern multiple times.
(closes issue #13632)
 Reported by: blitzrage
 Patches: 
       20081006__bug13632.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage, Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10 18:31:38 +00:00
Kevin P. Fleming 629861a705 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: https://origsvn.digium.com/svn/asterisk/trunk@144949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27 15:52:56 +00:00
Steve Murphy 1c2b1eb928 (closes issue #13564)
Reported by: mnicholson
Patches:
      pbx_lua9.diff uploaded by mnicholson (license 96)

Many thanks to Matt for his upgrade to the lua dialplan
option! 

the Description from the bug:

This patch adds a stack trace to errors encountered while executing lua extensions. The patch also handles out of memory errors reported by lua.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-26 18:02:06 +00:00
Steve Murphy a36696f2e7 (closes issue #13559)
Reported by: mnicholson
Patches:
      pbx_lua8.diff uploaded by mnicholson (license 96)




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 21:54:11 +00:00
Steve Murphy 38028fa641 I added a little verbage to hashtab for the hashtab_destroy func.
It was pretty sparsely documented.

This update fleshes out the pbx_lua module, to 
add the switch statements to the extensions in the
extensions.lua file, as well as removing them when
the module is unloaded.

Many thanks to Matt Nicholson for his fine
contribution!




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 21:18:12 +00:00
Steve Murphy f8ddaae70b (closes issue #13558)
Reported by: mnicholson

Considering that the example extensions.lua used nothing but ["12345"] notation,
and that the resulting error message: 

[Sep 24 17:01:16] ERROR[12393]: pbx_lua.c:1204 exec: Error executing lua extension: attempt to call a nil value

is not very informative as to the nature of the problem, I think this bug
fix is a big win!





git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 17:51:11 +00:00
Steve Murphy ec25f4be4d Merged revisions 141094 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141094 | murf | 2008-09-04 17:15:07 -0600 (Thu, 04 Sep 2008) | 70 lines

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

(closes issue #13416)
Reported by: yarns
Tested by: murf

If you find this message overly verbose, relax, it's probably
not meant for you. This message is meant for probably only
two people in the whole world: me, or the poor schnook that
has to maintain this code because I'm either dead or unavailable
at the moment.

This fix solves two reports, both having to do with embedding
a function call in a ${} construct. It was tricky because the
funccall syntax has parenthesis () in it. And up till now,
the 'word' token in the flex stuff didn't allow that, because
it would tend to steal the LP and RP tokens. To be truthful,
the "word" token was the trickiest, most unstable thing in
the whole lexer. I was lucky it made this long without complaints.
I had to choose every character in the pattern with extreme
care, and I knew that someday I'd have to revisit it. Well,
the day has come.

So, my brilliant idea (and I'm being modest), was to use the 
surrounding ${} construct to make a state machine and capture 
everything in it, no matter what it contains. But, I have to now
treat the word token like I did with comments, in that I turn
the whole thing into a state-machine sort of spec, with new
contexts "curlystate", "wordstate", and "brackstate".

Wait a minute, "brackstate"? Yes, well, it didn't take very many
regression tests to point out if I do this for ${} constructs,
I also have to do it with the $[] constructs, too.

I had to create a separate pcbstack2 and pcbstack3 because
these constructs can occur inside macro argument lists, and
when we have two state machines operating on the same structures
we'd get problems otherwise. I guess I could have stopped at
pcbstack2 and had the brackstate stuff share it, but it doesn't
hurt to be safe. So, the pcbpush and pcbpop routines also now
have versions for "2" and "3".

I had to add the {KEYWORD} construct to the initial pattern for
"word", because previously word would match stuff like "default7",
because it was a longer match than the keyword "default". But,
not any more, because the word pattern only matches only one or
two characters now, and it will always lose. So, I made it the
winner again by making an optional match on any of the keywords
before it's normal pattern.

I added another regression test to make sure we don't
lose this in future edits, and had to fix just one regression,
where it no longer reports a 'cascaded' error, which I guess
is a plus.

I've given some thought as to whether to apply these fixes to
1.4 and the 1.6.x releases, vs trunk; I decided to put it in
1.4 because one of the bug reports was against 1.4; and it
is unexpected that AEL cannot handle this situation. It actually
reduced the amount of useless "cascade" error messages that
appeared in the regressions (by one line, ehhem). There is
a possible side-effect in that it does now do more careful
checking of what's in those ${} constructs, as far as matching
parens, and brackets are concerned. Some users may find a an
insidious problem and correct it this way. This should be 
exceedingly rare, I hope.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-04 23:31:41 +00:00
Steve Murphy a40f1cc1c5 Merged revisions 136726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r136726 | murf | 2008-08-07 18:15:34 -0600 (Thu, 07 Aug 2008) | 32 lines


(closes issue #13236)
Reported by: korihor

Wow, this one was a challenge!

I regrouped and ran a new strategy for
setting the ~~MACRO~~ value; I set it once
per extension, up near the top. It is only
set if there is a switch in the extension.

So, I had to put in a chunk of code to detect
a switch in the pval tree.

I moved the code to insert the set of ~~exten~~
up to the beginning of the gen_prios routine, 
instead of down in the switch code.

I learned that I have to push the detection
of the switches down into the code, so everywhere
I create a new exten in gen_prios, I make sure
to pass onto it the values of the mother_exten
first, and the exten next.

I had to add a couple fields to the exten
struct to accomplish this, in the ael_structs.h
file. The checked field makes it so we don't
repeat the switch search if it's been done.

I also updated the regressions.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-08 00:48:35 +00:00
Sean Bright b7a4db0ced Start moving in changes from my resolve-shadow-warnings branch. Going to do
this in pieces so the diffs are a little bit smaller and more reviewable.

pbx/ and formats/ first.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 00:44:55 +00:00
Kevin P. Fleming 7df8b8b848 make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-05 16:56:11 +00:00
Russell Bryant 8c29e699fe Merged revisions 134595 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r134595 | russell | 2008-07-30 15:37:17 -0500 (Wed, 30 Jul 2008) | 6 lines

Reduce stack consumption by 12.5% of the max stack size to fix a crash when
compiled with LOW_MEMORY.

(closes issue #13154)
Reported by: edantie

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-30 20:38:35 +00:00
Kevin P. Fleming 6291cd19bf remove remaining Zaptel references in various places
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-28 16:42:00 +00:00
Brett Bryant 5b7933fe5e Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054)
Reported by: pabelanger
Patches:
      ARRAY_LEN.patch2 uploaded by pabelanger (license 224)
Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 18:09:35 +00:00
Tilghman Lesher 4ff527903e Code wasn't ready to be merged - see -dev list discussion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-09 03:39:59 +00:00
Brett Bryant d185405755 Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:40:28 +00:00
Olle Johansson 6f400edeab Changing name of global api call to ast_*
My mistake, pointed out by Russell.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-06 08:28:58 +00:00
Olle Johansson 45e79490ba Implement flags for AGI in the channel structure so taht "show channels" and
AMI commands can display that a channel is under control of an AGI.

Work inspired by work at customer site, but paid for by Edvina AB


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-05 20:54:30 +00:00
Tilghman Lesher 12e5c68622 Merged revisions 127973 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127973 | tilghman | 2008-07-03 22:30:30 -0500 (Thu, 03 Jul 2008) | 8 lines

Fix the 'dialplan remove extension' logic, so that it a) works with cidmatch,
and b) completes contexts correctly when the extension is ambiguous.
(closes issue #12980)
 Reported by: licedey
 Patches: 
       20080703__bug12980.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-04 16:06:34 +00:00
Kevin P. Fleming 71b3fd1ef7 various minor fixes created while i worked on getting *every* Asterisk module to build on laptop in dev mode:
remove weird pre-setting of LUA paths; they are not necessary; also use the proper path for including the files in pbx_lua.c

add searching for OpenAIS libraries in /usr/lib/openais if a path is not specified; not sure if this is really the optimal solution, but it works

make the compiler shut up about some ignored function results in pbx_gtkconsole; this module is badly coded anyway



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29 16:19:29 +00:00
Michiel van Baak 8e8359465b Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 20:48:33 +00:00
Tilghman Lesher 122486b263 Allow alternative extensions to be specified for a user.
(closes issue #12830)
 Reported by: jcollie
 Patches: 
       astertisk-trunk-121496-alternate-extensions.patch uploaded by jcollie (license 412)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 19:22:59 +00:00
Tilghman Lesher c86e26e66b Merged revisions 123710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123710 | tilghman | 2008-06-18 15:22:42 -0500 (Wed, 18 Jun 2008) | 7 lines

Set the variables top-down, so that if a script sets a variable more than once,
the last one will take precedence.
(closes issue #12673)
 Reported by: phber
 Patches: 
       20080519__bug12673.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-18 20:23:58 +00:00
Jeff Peeler ef3b214728 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:27:55 +00:00
Russell Bryant f4a8062e93 Merge another change from team/russell/events ...
DUNDi uses a concept called the Entity ID for unique server identifiers.  I have
pulled out the handling of EIDs and made it something available to all of Asterisk.
There is now a global Entity ID that can be used for other purposes as well, such
as code providing distributed device state, which is why I did this.  The global
Entity ID is set automatically, just like it was done in DUNDi, but it can also be
set in asterisk.conf.  DUNDi will now use this global EID unless one is specified
in dundi.conf.

The current EID for the system can be seen in the "core show settings" CLI command.
It is also available in the dialplan via the ENTITYID variable.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 12:48:50 +00:00
Joshua Colp 270bad99c8 We like tabs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-04 15:38:00 +00:00
Joshua Colp db9d25d32e Merged revisions 120282 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r120282 | file | 2008-06-04 10:31:09 -0300 (Wed, 04 Jun 2008) | 6 lines

Fix a log message and add a message for when the dialplan is done reloading.
(closes issue #12716)
Reported by: chappell
Patches:
      dialplan_reload_2.diff uploaded by chappell (license 8)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-04 13:33:59 +00:00
Tilghman Lesher 5b5a84676a Merged revisions 120226 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r120226 | tilghman | 2008-06-03 17:41:04 -0500 (Tue, 03 Jun 2008) | 8 lines

Due to incorrect use of the AST_LIST_INSERT_HEAD() macro the loopback switch
cannot perform any translation on the extension number before searching for it
in the target context.
(closes issue #12473)
 Reported by: chappell
 Patches: 
       pbx_loopback.c.diff uploaded by chappell (license 8)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 22:42:03 +00:00
Tilghman Lesher 76506b7baa Move compatibility options into asterisk.conf, default them to on for upgrades,
and off for new installations.  This includes the translation from pipes to commas
for pbx_realtime and the EXEC command for AGI, as well as the change to the Set
application not to support multiple variables at once.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 22:05:16 +00:00
Steve Murphy f40f170eea Merged revisions 119966 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r119966 | murf | 2008-06-03 09:26:56 -0600 (Tue, 03 Jun 2008) | 8 lines

Updated the regressions on AEL. Hadn't updated
this for the changes I made to preserve ${EXTEN}
in switches, which affected several tests because
it adds extra priorities, and at least one needed to be updated
because of the removal of the empty extension warning
message.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 15:49:34 +00:00
Tilghman Lesher 1c51fec08c In compat14 mode, don't translate pipes inside expressions, as they aren't
argument delimiters, but rather 'or' symbols.
(Closes issue #12723)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 13:13:17 +00:00
Tilghman Lesher 9276a4370c Add a compatibility option for upgrading realtime extensions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 21:42:50 +00:00
Russell Bryant 457dbc1b4f Merged revisions 117507 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r117507 | russell | 2008-05-21 13:19:34 -0500 (Wed, 21 May 2008) | 7 lines

1) Don't print the verbose marker in front of every message from ast_verbose()
   being sent to remote consoles.

2) Fix pbx_gtkconsole to filter out the verbose marker.

(related to issue #12702)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:20:11 +00:00
Olle Johansson 29b1d73567 Add support for codec settings in originate via call file and manager.
This is to enable video and text in originated calls. Development sponsored
by Omnitor AB, Sweden. (http://www.omnitor.se)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 12:32:57 +00:00
Olle Johansson cc6d4100ad Doxygen formatting change only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 08:16:25 +00:00
Russell Bryant 9eb8e7d665 Lock the channel around datastore access
(closes issue #12527)
Reported by: mnicholson
Patches:
      pbx_lua4.diff uploaded by mnicholson (license 96)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-25 22:04:46 +00:00
Steve Murphy c0b8f57b9d (closes issue #12467)
Reported by: atis
Tested by: murf

This upgrade adds the ~~ (concatenation) string operator to expr2.
While not needed in normal runtime pbx operation, it is needed when
raw exprs are being syntax checked. This plays into future syntax-
unification plans. By permission of atis, this addition in trunk 
and the reason of why things are as they are will suffice to close
this bug.

I also added a short note about the previous addition of "sip show sched"
to the CLI in CHANGES, which I discovered I forgot in a previous commit.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-21 21:13:02 +00:00
Steve Murphy 2427603eaf 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: https://origsvn.digium.com/svn/asterisk/trunk@111360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 04:47:12 +00:00
Steve Murphy 4e29ae8806 Merged revisions 109309 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109309 | murf | 2008-03-18 00:37:15 -0600 (Tue, 18 Mar 2008) | 17 lines

(closes issue #11903)
Reported by: atis

Many thanks to atis for spotting this problem and reporting it.
The fix was to straighten out how items are placed on and removed
from the file stack. Regressions as well as the provided test case
helped to straighten out all code paths. valgrind was used to make
sure all memory allocated was freed.

Sorry for not solving this earlier. I got distracted.

Added the ntest23 regression test, which is mainly a copy of ntest22, 
but with a few juicy errors thrown in, to replicate the kind of 
error that atis spotted.



........


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


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

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

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

and:

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

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

pbx/pbx_config.c
pbx/pbx_ael.c

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

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

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



chan_sip.c
chan_iax.c
chan_skinny.c

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

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


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

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


include/asterisk/pbx.h

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


include/asterisk/pval.h

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


main/features.c

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



main/pbx.c

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

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

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

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

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

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

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

ast_merge_contexts_and_delete() was heavily modified.

ast_add_extension2() was also upgraded to handle changes. 

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



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

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


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

How's this for verbose commit messages?




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

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

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

Thanks to all that helped with this one!


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

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

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

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-27 22:35:29 +00:00
Russell Bryant cc4a630cd7 Merged revisions 98390 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98390 | russell | 2008-01-11 16:46:21 -0600 (Fri, 11 Jan 2008) | 9 lines

Fix up setting the EID on BSD based systems.

(closes issue #11646)
Reported by: caio1982
Patches:
      dundi_osx_eid6.diff.txt uploaded by caio1982 (license 22)
      dundi_osx_eid6-1.4.diff uploaded by caio1982 (license 22)
Tested by: caio1982, mvanbaak

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 22:52:41 +00:00
Russell Bryant 234b856d17 Merged revisions 97753 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97753 | russell | 2008-01-10 10:19:47 -0600 (Thu, 10 Jan 2008) | 2 lines

Remove other remnants of pbx_kdeconsole

........


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

........
r97734 | russell | 2008-01-10 10:10:09 -0600 (Thu, 10 Jan 2008) | 4 lines

Remove pbx_kdeconsole from the tree.  It hasn't worked in ages, and nobody has
complained.
(closes issue #11706, reported by caio1982)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 16:15:43 +00:00
Tilghman Lesher 857e3412f4 Several manager changes:
1) Add the Dialplan class, for NewExten and VarSet events, which should cut
down on the volume of traffic in the Call class.
2) Permit some commands to be run from multiple classes, such as allowing
DBGet to be run from either the System or the Reporting class.
3) Heavily document each class in the sample config, as there were several
that made no sense to be in the write= line, and two that made no sense to be
in the read= line (since they controlled no permissions there).

(Closes issue #10386)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:12:35 +00:00
Russell Bryant 372dd125dc Merged revisions 97645 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97645 | russell | 2008-01-09 17:01:48 -0600 (Wed, 09 Jan 2008) | 2 lines

Strip terminal sequences from the verbose messages

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 23:02:19 +00:00
Russell Bryant ddc0fbfc98 Merged revisions 97640 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97640 | russell | 2008-01-09 16:26:33 -0600 (Wed, 09 Jan 2008) | 3 lines

Make pbx_gtkconsole build ... but doesn't actually load on my system still
(related to issue #11706)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 22:27:50 +00:00
Jason Parker eea428cf76 Use defined return values in load_module in more places.
(closes issue #11096)
Patches:
      pbx_config.c.patch uploaded by moy (license 222)
      pbx_dundi.c.patch uploaded by moy (license 222)
      pbx_gtkconsole.c.patch uploaded by moy (license 222)
      pbx_loopback.c.patch uploaded by moy (license 222)
      pbx_realtime.c.patch uploaded by moy (license 222)
      pbx_spool.c.patch uploaded by moy (license 222)
      app_adsiprog.c.patch uploaded by moy (license 222)
      app_alarmreceiver.c.patch uploaded by moy (license 222)
      app_amd.c.patch uploaded by moy (license 222)
      app_authenticate.c.patch uploaded by moy (license 222)
      app_cdr.c.patch uploaded by moy (license 222)
      app_zapateller.c.patch uploaded by moy (license 222)
      app_zapbarge.c.patch uploaded by moy (license 222)
      app_zapras.c.patch uploaded by moy (license 222)
      app_zapscan.c.patch uploaded by moy (license 222)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 20:02:27 +00:00
Kevin P. Fleming 100ef27af9 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: https://origsvn.digium.com/svn/asterisk/trunk@93184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:25:35 +00:00
Olle Johansson 940f8f6276 Convert from LOG_DEBUG etc to ast_debug. Thanks, dimas!
(closes issue #11572)
Reported by: dimas
Patches: 
      dundilog-trunk.patch uploaded by dimas (license 88)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-16 13:38:25 +00:00
Olle Johansson 17afebc1a6 HUGE improvements to QoS/CoS handling by IgorG
- Refer to the proper documentation
- Implement separate signalling/media QoS/CoS in many channels using RTP
- Improve warnings and verbose messages
- Deprecate some old settings

Minor modifications by me, a big effort from IgorG.
Thanks!


Reported by: IgorG
Patches: 
      qoscleanup-89394-4-trunk.patch uploaded by IgorG (license 20)
Tested by: IgorG
(closes issue #11145)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-16 10:51:53 +00:00
Russell Bryant 04ab19aef5 make something static
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 19:31:25 +00:00
Luigi Rizzo 5490889153 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: https://origsvn.digium.com/svn/asterisk/trunk@92082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 03:50:38 +00:00
Luigi Rizzo d652be0930 normalize subdirs' Makefile by using ASTTOPDIR and not .. to reference
the top level directory.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-09 21:29:37 +00:00
Jason Parker fc607d5be4 Update documentation for pbx_lua.
Closes issue #11492, patch by mnicholson.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 21:28:49 +00:00
Steve Murphy 1f792f1745 closes issue #11294; missed the conditional unlock of the contexts when the hash table is used instead; also, used the ast_free_ptr as advised.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 22:14:55 +00:00
Steve Murphy ab92fc1f35 made AEL 8-bit transparent; mainly the lexer was tossing chars with the hi-order bit set. Not nice. Also, allow @ in extension names, and a backslash, also.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 18:50:44 +00:00
Mark Michelson 180c3fb60e Change all instances of "CALLERID(number)" to "CALLERID(num)" for
consistency's sake

(closes issue #11381, reported and patched by jon)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 23:15:53 +00:00
Joshua Colp 9910b7d9a7 Merged revisions 89592 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89592 | file | 2007-11-26 13:36:45 -0400 (Mon, 26 Nov 2007) | 6 lines

Use ast_free to free memory, or else we shall implode if MALLOC_DEBUG is enabled.
(closes issue #11347)
Reported by: ys
Patches:
      pbx.pbx_config.c.diff uploaded by ys (license 281)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:38:57 +00:00
Steve Murphy a63f6be669 closes issue #11363; where the pattern _20x. buried in an included context, didn't match 2012; There were a small set of problems to fix: 1. I needed NOT to score patterns unless you are at the end of the data string. 2. Capital N,X,Z and small n,x,z are OK in patterns. I canonicalize the patterns in the trie to caps. 3. When a pattern ends with dot or exclamation, CANMATCH/MATCHMORE should always report this pattern, no matter the length. With this commit, I also supplied the wish of Luigi, where the user can select which pattern matching algorithm to use, the old (legacy) pattern matcher, or the new, trie based matcher. The OLD matcher is the default. A new [general] section variable, extenpatternmatchnew, is added to the extensions.conf, and the example config has it set to false. If true, the new matcher is used. In all other respects, the context/exten structs are the same; the tries and hashtabs are formed, but in the new mode the tries are not used. A new CLI command 'dialplan set extenpatternmatch true/false' is provided to allow switching at run time. I beg users that are forced to return to the old matcher to please report the reason in the bug tracker. Measured the speed benefit of the new matcher against an impossibly large context with 10,000 extensions: the new matcher is 374 times faster.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-24 21:00:26 +00:00
Luigi Rizzo 51391e6b09 shuffle a little bit the content of header files to reduce dependencies.
In this commit:
- move the ast_register/unregister_app functions to module.h
  to avoid the need to include pbx.h for the simpler apps;
- move the ast_group structure to channel.h to remove the
  dependency of app.h on linkedlists.h

Note, this is a long process that I am doing in small steps.

The main difficulty is that now for each subsystem we
have a single header (e.g. channel.h) included by the subsystem
provider (usually one file, e.g. channel.c) and by its clients
(dozens of them, e.g. we have some 70+ apps and 30+ functions).

This requires the clients to include all the extra headers
required by the provider (eg. lock.h, linkedlists.h, definitions
of substructures...) even though many of the clients would be
just happy with opaque struct declarations and function prototypes.

The long term plan is to eventually rectify this structure
so that the compilation can become faster, and also APIs
are more stable.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 03:50:04 +00:00
Luigi Rizzo 7e8835e0d7 remove another set of redundant #include "asterisk/options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:24:55 +00:00
Tilghman Lesher cbfc6dcbea Make trunk build again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:29:33 +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 6938f4b2b0 Fix building of modules under cygwin.
After this commit we can actually load modules under windows,
and we can start debugging more interesting problems related
to the load order and functionality of modules.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 16:12:10 +00:00
Luigi Rizzo ffd86fc964 more errno.h removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 21:12:08 +00:00
Steve Murphy 1a5cdeb138 a quick fix to pbx_dundi.c to make it so it will compile. Hope I did the right thing. And some additions to removal of extens to take care of hashtab pointers in all cases.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 17:46:36 +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
Russell Bryant 49d1248c55 fix the build of pbx_lua
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 06:34:10 +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
Luigi Rizzo 7f8ecd2cd3 make the 'name' and 'value' fields in ast_variable const char *
This prevents modifying the strings in the stored variables, 
and catched a few instances where this was actually done.

Given the differences between trunk and 1.4 (and the fact that this
is effectively an API change) it is better to fix 1.4 independently.
These are

chan_sip.c::sip_register()
chan_skinny.c:: near line 2847
config.c:: near line 1774
logger.c::make_components()
res_adsi.c:: near line 1049

I may have missed some instances for modules that do not build here.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 13:18:40 +00:00
Jason Parker cfbc4f5fb8 Doxygen fixes.
Also fix a common typo I kept seeing (arguement) in various files.

Closes issue #11222, patch by snuffy (with arguement > argument by me).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 23:44:20 +00:00
Steve Murphy 98429d37b2 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: https://origsvn.digium.com/svn/asterisk/trunk@89186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 18:44:36 +00:00
Steve Murphy a897556f7f 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: https://origsvn.digium.com/svn/asterisk/trunk@89129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-09 16:00:22 +00:00
Jason Parker 267e829cbd Add check_hangup() method to pbx_lua, which can be used to check whether it is time to hangup a channel.
Closes issue #11202, patch by mnicholson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 23:38:30 +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 c93520b88b propagate the DECLINE return value back to the loader
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-02 21:39:36 +00:00
Russell Bryant 9a47852673 Don't kill asterisk if extensions.lua is not present.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-02 21:36:37 +00:00
Tilghman Lesher ca55e2f671 Oops, some dev-mode changes for ISO C90
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-02 17:34:33 +00:00
Tilghman Lesher e8c781b215 Add pbx_lua as a method of doing extensions
Reported by: mnicholson
Patch by: mnicholson
Closes issue #11140


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-02 15:36:34 +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
Russell Bryant 1c7eb1d82b Change some uses of free() to ast_free(). (No functional differences.)
(closes issue #11138)
Reported by: eliel
Patches: 
      pbx_dundi.c.patch uploaded by eliel (license 64)
	  chan_sip.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 15:56:25 +00:00
Steve Murphy c9f3efc381 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: https://origsvn.digium.com/svn/asterisk/trunk@87187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-26 17:39:39 +00:00
Steve Murphy b7ef49c931 closes issue #11005, where #include uses the current dir instead of the config dir (/etc/asterisk) for relative path includes for AEL
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-24 13:21:29 +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
Joshua Colp 9409a33900 Merged revisions 86661 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86661 | file | 2007-10-22 11:05:26 -0300 (Mon, 22 Oct 2007) | 6 lines

Fix tab completion for dundi show peer.
(closes issue #11041)
Reported by: jsmith
Patches:
      asterisk-dundicomplete.diff.txt uploaded by jamesgolovich (license 176)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 14:07:14 +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
Jason Parker ed690fc348 Switch dundi to new tos config format.
Remove old unused defines for old style.

Closes issue 10860, patch by IgorG.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15 23:20:40 +00:00
Russell Bryant be54dc15e5 Simplify buffer handling in dundi-parser.c. This also makes the code a bit
safer by removing various assumptions about sizes. (No vulnerabilities, though)

(closes issue #10977)
Reported by: dimas
Patches: 
      dundiparser.patch uploaded by dimas (license 88)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15 15:55:23 +00:00
Russell Bryant 3f2e8db598 Merged revisions 85556 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85556 | russell | 2007-10-15 10:40:45 -0500 (Mon, 15 Oct 2007) | 9 lines

Ensure the buffer passed to ast_canmatch_extension() is properly initialized so
that it is null terminated.

(issue #10977)
Reported by: dimas
Patches: 
      pbxdundi.patch uploaded by dimas (license 88)
	    - small mods by me

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15 15:47:46 +00:00
Russell Bryant ac46e63a41 Merged revisions 85540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85540 | russell | 2007-10-14 10:24:52 -0500 (Sun, 14 Oct 2007) | 7 lines

Don't create the context for users in users.conf until we know at least one user exists.

(closes issue #10971)
Reported by: dimas
Patches: 
      pbxconfig.patch uploaded by dimas (license 88)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-14 15:34:54 +00:00
Russell Bryant e5853d8409 Merged revisions 85515 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85515 | russell | 2007-10-12 10:40:35 -0500 (Fri, 12 Oct 2007) | 7 lines

Fix the potential use of an uninitialized buffer in a log message.

(closes issue #10958)
Reported by: dimas
Patches: 
      realtime.patch uploaded by dimas (license 88)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-12 15:41:27 +00:00
Russell Bryant e97a723cf1 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: https://origsvn.digium.com/svn/asterisk/trunk@85460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-11 19:03:06 +00:00
Steve Murphy 3ffa04bbd3 Merged revisions 84511 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84511 | murf | 2007-10-03 08:23:00 -0600 (Wed, 03 Oct 2007) | 1 line

closes issue #10834 ; where a null input to a switch statement results in a hangup; since switch is implemented with extensions, and the default case is implemented with a '.', and the '.' matches 1 or more remaining characters, the case where 0 characters exist isn't matched, and the extension isn't matched, and the goto fails, and a hangup occurs. Now, when a default case is generated, it also generates a single fixed extension that will match a null input. That extension just does a goto to the default extension for that switch. I played with an alternate solution, where I just tack an extra char onto all the patterns and the goto, but not the default case's pattern. Then even a null input will still have at least one char in it. But it made me nervous, having that extra char in , even if that's a pretty secret and low-level issue.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-03 14:39:05 +00:00
Steve Murphy b3168a76c9 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: https://origsvn.digium.com/svn/asterisk/trunk@84327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 23:03:50 +00:00
Russell Bryant d78463be1e Corydon posted this janitor project to the bug tracker and mvanbaak provided
a patch for it.  It replaces a bunch of simple calls to snprintf with ast_copy_string

(closes issue #10843)
Reported by: Corydon76
Patches: 
      2007092900_10843.diff uploaded by mvanbaak (license 7)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 15:23:19 +00:00
Steve Murphy c782398ca4 the last commit for AEL affected a small number of tests. Added a regression test for glob'd includes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-29 22:40:58 +00:00
Russell Bryant 41d513f443 Merged revisions 83976 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83976 | russell | 2007-09-26 19:01:29 -0500 (Wed, 26 Sep 2007) | 1 line

remove a todo item that has been completed
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-27 00:02:18 +00:00
Steve Murphy f2b38cf2f3 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: https://origsvn.digium.com/svn/asterisk/trunk@83575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-22 17:39:37 +00:00
Russell Bryant 9f64905d4e Merged revisions 83432 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83432 | russell | 2007-09-21 09:37:20 -0500 (Fri, 21 Sep 2007) | 4 lines

gcc 4.2 has a new set of warnings dealing with cosnt pointers.  This set of
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2.
(closes issue #10774, patch from qwell)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21 14:40:10 +00:00
Joshua Colp 6489076887 Fix memory leaks in pbx_dundi, cdr_pgsql, and the configuration file parser.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-20 16:10:57 +00:00
Russell Bryant 3d7cf301d8 Merged revisions 82802 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82802 | russell | 2007-09-18 11:31:01 -0500 (Tue, 18 Sep 2007) | 4 lines

When copying the contents from the wildcard peer, do a deep copy instead of
shallow copy so that it doesn't crash when beging destroyed.
(closes issue #10546, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 16:34:05 +00:00
Russell Bryant 9388173f85 Make the MALLOC_DEBUG output for free() useful again. After changing calls to
free to be ast_free, astmm said all calls to free were coming from utils.h


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 18:57:56 +00:00
Jason Parker 584a510d20 Merged revisions 82358 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82358 | qwell | 2007-09-13 18:11:27 -0500 (Thu, 13 Sep 2007) | 4 lines

Fix a small typo.

retrytime > waittime

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13 23:12:16 +00:00
Russell Bryant c0f72f5311 Merged revisions 82250 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82250 | russell | 2007-09-11 11:03:42 -0500 (Tue, 11 Sep 2007) | 4 lines

The sample dundi.conf claims support for a wildcard peer entry - [*], but the
code did not support it.  This patch makes it work.
(closes issue #10546, patch by dds, with some changes by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 16:05:03 +00:00
Joshua Colp 078595f5c5 Merged revisions 82243 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82243 | file | 2007-09-11 11:56:39 -0300 (Tue, 11 Sep 2007) | 6 lines

(closes issue #10577)
Reported by: jamesgolovich
Patches:
      asterisk-dundifree.diff.txt uploaded by jamesgolovich (license 176)
Don't leak memory when unloading DUNDi.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 14:58:11 +00:00
Steve Murphy b5cd67adc3 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 20:55:40 +00:00
Russell Bryant 2f4a2811b6 Add proper channel locking around the uses of datastore_add and _find. There
are still more places in the tree that I have not yet changed if someone wants
to go through and find the places they are used without the channel locked.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 18:41:18 +00:00
Russell Bryant 44795584b2 This should have been trunk only, I guess. oh well ... it's harmless.
Merged revisions 81065 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81065 | russell | 2007-08-27 11:38:33 -0500 (Mon, 27 Aug 2007) | 1 line

explicity define a variable as a boolean
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 17:44:24 +00:00
Russell Bryant adcd4d4ab4 Merged revisions 81074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81074 | russell | 2007-08-27 12:27:48 -0500 (Mon, 27 Aug 2007) | 3 lines

Add a \todo to note that this module leaks most of the memory it allocates on
unload and should be fixed (when I'm not in the middle of something else ...).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 17:28:14 +00:00
Russell Bryant 8d4761f8d3 localize a variable and remove a duplicate error message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-25 17:49:51 +00:00
Steve Murphy 83e28341b5 an unreported crash I debugged, looked like it was backing up way too far after hitting the syntax error. An inspection of the code revealed that error tokens in lists were not rearranged when the rules were rearranged as part of a code neatening-up process. By moving the error tokens to where they should be, I also reduced the number of shift/reduce conflicts to 3 instead of 8. This introduces subtle differences in error messages, so the regressions had to be updated.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 23:37:33 +00:00
Jason Parker fafa7d93e4 Correct the argument separator for a Dial statement in pbx_dundi.
Closes issue #10483, patch by lunn


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 15:27:19 +00:00
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:09:46 +00:00
Joshua Colp 3f998a86a1 (closes issue #10467)
Reported by: lunn
Patches:
      pbx_dundi.diff uploaded by lunn (license 179)
Don't print a warning saying an ethernet interface was found when it indeed was.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 15:29:44 +00:00
Steve Murphy 9836efb5fb 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: https://origsvn.digium.com/svn/asterisk/trunk@79595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 19:21:27 +00:00
Steve Murphy d9b52497f0 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: https://origsvn.digium.com/svn/asterisk/trunk@79392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 14:32:21 +00:00
Steve Murphy 526d1f39a2 Merged revisions 79099 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79099 | murf | 2007-08-10 14:53:43 -0600 (Fri, 10 Aug 2007) | 1 line

From a user complaint on #asterisk, I have forced pbx_spool to explain what reason codes mean, when they are logged
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 21:03:06 +00:00
Russell Bryant 668a334f85 Add another big set of doxygen documentation improvements from snuffy.
(closes issue #9892)
(closes issue #10395)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 23:04:01 +00:00
Russell Bryant 4e0947c5f1 Convert code that checks the _softhangup member of ast_channel directory to use
the ast_check_hangup() funciton.  This function takes scheduled hangups into
account.
(closes issue #10230, patch by Juggie)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01 15:39:54 +00:00
Tilghman Lesher 8f1c914c89 'dialplan save' shouldn't be converting '|' back to ',' anymore.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-27 16:20:55 +00:00
Steve Murphy ceca4d97e1 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: https://origsvn.digium.com/svn/asterisk/trunk@77520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-27 15:46:20 +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
Steve Murphy f7213d2411 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: https://origsvn.digium.com/svn/asterisk/trunk@77218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 01:33:55 +00:00
Tilghman Lesher 55b1ee298e Merge the dialplan_aesthetics branch. Most of this patch simply converts applications
using old methods of parsing arguments to using the standard macros.  However, the big
change is that the really old way of specifying application and arguments separated by
a comma will no longer work (e.g. NoOp,foo|bar).  Instead, the way that has been
recommended since long before 1.0 will become the only method available (e.g. NoOp(foo,bar).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 19:51:41 +00:00
Steve Murphy 0e969271ae After some study, thought, comparing, etc. I've backed out the previous universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 23:24:27 +00:00
Steve Murphy 5ac24b25d3 This corrects the problem with flags and %lld formats on 64-bit machines, where uint64_t is NOT acceptable for %lld, and also works on 32-bit machines. At least, with gcc.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 14:35:07 +00:00
Joshua Colp 674dbeb0cf Merged revisions 75583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75583 | file | 2007-07-18 11:18:53 -0300 (Wed, 18 Jul 2007) | 5 lines

(closes issue #10224)
Reported by: irroot

Record the threadid of each running thread before shutting them down as the thread themselves may change the value.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 14:20:19 +00:00
Joshua Colp 4003b31fc5 Minor code tweaks. Variables were being checked wrong in some situations and didn't need to be checked in others.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 13:59:01 +00:00
Steve Murphy 8b0b74c9b0 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: https://origsvn.digium.com/svn/asterisk/trunk@75505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 21:52:51 +00:00
Steve Murphy 8a7732f067 via 10206, I have added an option (e) to Dial to allow the h exten to get run on peer. Had to upgrade ast_flag stuff to 64 bits to do this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 19:40:29 +00:00
Joshua Colp 1040d3f64b Clean up pbx_spool. So many nested if statements...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 20:40:33 +00:00
Joshua Colp 836ea36d3c Merged revisions 74045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74045 | file | 2007-07-09 11:49:05 -0300 (Mon, 09 Jul 2007) | 2 lines

Few minor thread synchronization tweaks. (issue #10124 reported by gzero)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 14:50:04 +00:00
Joshua Colp d61056132a Merged revisions 73930 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r73930 | file | 2007-07-08 22:13:57 -0300 (Sun, 08 Jul 2007) | 2 lines

Add a few sanity checks when writing out the dialplan. (issue #10157 reported by dome)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 01:17:28 +00:00
Steve Murphy 6a4efe5d5a 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: https://origsvn.digium.com/svn/asterisk/trunk@73449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 18:15:22 +00:00
Russell Bryant 3b0f89dae6 Merged revisions 72806 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r72806 | russell | 2007-07-01 18:52:45 -0500 (Sun, 01 Jul 2007) | 13 lines

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

........
r72805 | russell | 2007-07-01 18:51:34 -0500 (Sun, 01 Jul 2007) | 5 lines

When appending lines to call files to keep track of retries, write a leading
newline just in case the original call file did not have a newline at the end.
This fix is in response to a problem I saw reported on the asterisk-users
mailing list.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-01 23:53:13 +00:00
Russell Bryant 8d89f741a5 Merged revisions 72272 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r72272 | russell | 2007-06-27 16:08:34 -0500 (Wed, 27 Jun 2007) | 13 lines

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

........
r72267 | russell | 2007-06-27 16:06:45 -0500 (Wed, 27 Jun 2007) | 5 lines

Fix a minor issue with parsing the priority number.  You could have as much
whitespace as you want around a numeric priority, but you couldn't have any
whitespace around a special priority like "n" or "hint".
(issue #10039, reported by mitheloc, fixed by me)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 21:09:24 +00:00
Joshua Colp 36668045a6 Merged revisions 72006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r72006 | file | 2007-06-26 20:58:35 -0400 (Tue, 26 Jun 2007) | 2 lines

Make unloading of pbx_dundi actually work.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 01:00:47 +00:00
Tilghman Lesher a1bc823136 Issue 9990 - New API ast_mkdir, which creates parent directories as necessary (and is faster than an outcall to mkdir -p)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22 04:35:12 +00:00
Steve Murphy c1bb0fc34b This finishes the changes for making Macro args LOCAL to the call, and allowing users to declare local variables.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 20:10:19 +00:00
Tilghman Lesher 704c756c4a Merge work to make U(...) option work for Dial
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 17:35:08 +00:00
Russell Bryant 9e0458e9f1 Completely remove all of the code related to jumping to priority n + 101. yay!
(issue #9926, caio1982)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 15:58:28 +00:00
Tilghman Lesher 7e52b8620b Merged revisions 68595 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r68595 | tilghman | 2007-06-10 23:21:30 -0500 (Sun, 10 Jun 2007) | 2 lines

"dialplan save" produced garbage in the config file

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 04:28:08 +00:00
Steve Murphy 52efde5c65 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: https://origsvn.digium.com/svn/asterisk/trunk@67529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 22:04:22 +00:00
Steve Murphy 00b33aaa49 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: https://origsvn.digium.com/svn/asterisk/trunk@67423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 18:23:53 +00:00
Russell Bryant e1375b96c2 Change javadoc style code documentation to the same format we use elsewhere.
(issue #9864, patch from snuffy)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 15:56:13 +00:00
Kevin P. Fleming 4573b36af1 use the OpenSSL AES implementation if it's available (unless configured not to)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 22:07:50 +00:00
Russell Bryant 4b3a3fb14c Add a new API call for creating detached threads. Then, go replace all of the
places in the code where the same block of code for creating detached threads
was replicated.  (patch from bbryant)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 18:30:19 +00:00
Russell Bryant f02e26feff Make sure that DUNDIRESULT is given an ID.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-15 22:57:01 +00:00
Steve Murphy dc8f6a9473 Merged revisions 62883 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62883 | murf | 2007-05-03 07:54:56 -0600 (Thu, 03 May 2007) | 1 line

These mods fix bug 9623, where an '@' in the eswitch contents causes a syntax error. I also updated the regressions.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 14:24:00 +00:00
Russell Bryant b419fc1134 Add support for setting the CoS for VLAN traffic (802.1p) in Linux. The
file doc/qos.tex has been updated to document the new functionality.
(issue #9540, patch submitted by IgorG)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-30 16:16:26 +00:00
Russell Bryant c59b8876aa Merge changes from team/russell/dundi_results
This introduces two new dialplan functions: DUNDIQUERY and DUNDIRESULT.
DUNDIQUERY lets you intitiate a DUNDi query from the dialplan.  Then,
DUNDIRESULT will let you find out how many results there are, and access each
one without having to the query again.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-28 19:52:37 +00:00
Steve Murphy f120c26ec1 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: https://origsvn.digium.com/svn/asterisk/trunk@59692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-02 17:38:12 +00:00
Steve Murphy e1476b8aab 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: https://origsvn.digium.com/svn/asterisk/trunk@59264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 18:21:50 +00:00
Steve Murphy 2ca78b4a6e added the no. 18 regression test
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 22:24:16 +00:00
Steve Murphy 589a8f9214 updated the regressions with regards to 9373, the crash on double contexts, and brought other regressions up to date
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 22:17:37 +00:00
Steve Murphy 3433b64703 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: https://origsvn.digium.com/svn/asterisk/trunk@59233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 21:47:37 +00:00
Steve Murphy 834f783edf Merged revisions 59206 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59206 | murf | 2007-03-26 11:38:29 -0600 (Mon, 26 Mar 2007) | 1 line

A fix for the flex input files, DONT_COMPILE, and STANDALONE_AEL
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 17:56:26 +00:00
Joshua Colp 133f26f977 Merged revisions 59200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59200 | file | 2007-03-26 11:16:29 -0400 (Mon, 26 Mar 2007) | 2 lines

Have ast_copy_string magically appear in the aelparse binary! DONT_OPTIMIZE should now work once again.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 15:20:17 +00:00
Steve Murphy e6d32d3132 The fix for the AEL <<security hole>> (bug 9316) is here...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-20 18:18:06 +00:00
Russell Bryant 32e03f9e4a Add the ability to dynamically specify weights for responses to DUNDi queries.
This can be done using a global variable or a dialplan function.  Using the
SHELL() function will allow you to use an external script to determine what the
weight in the response should be.  This can be very useful in load balancing
applications.
(inspired by discussions with blitzrage and jsmith in #asterisk-bugs)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-07 22:30:52 +00:00
Steve Murphy 67df5b67ee updated the regression tests
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-03 15:35:44 +00:00
Steve Murphy 91a9b97a73 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: https://origsvn.digium.com/svn/asterisk/trunk@57438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-02 05:57:06 +00:00
Joshua Colp e7b03a991e Convert the PBX core to use read/write locks. This yields a nifty performance improvement when it comes to simultaneous calls going through the dialplan. Using murf's test the old mutex based core took an average of 57.3 seconds while the rwlock based core took 31.1 seconds. That's a nifty 26.2 seconds performance improvement. The other good part is that if we do need to switch back then we just have to change the lock/unlock API calls. I converted everywhere that used to touch the mutex locks directly to use them.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-28 20:46:01 +00:00
Steve Murphy bca20ed71e 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: https://origsvn.digium.com/svn/asterisk/trunk@57050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-28 17:22:45 +00:00
Joshua Colp e83cff1c23 Merged revisions 56856 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r56856 | file | 2007-02-26 15:07:18 -0500 (Mon, 26 Feb 2007) | 10 lines

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

........
r56850 | file | 2007-02-26 15:05:02 -0500 (Mon, 26 Feb 2007) | 2 lines

Obey the clearglobalvars option in extensions reload (or dialplan reload depending on your version). (issue #9146 reported by ramonpeek)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-26 20:09:06 +00:00
Olle Johansson 75d387acbc Doxygen additions, corrections
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-24 20:29:41 +00:00
Kevin P. Fleming 74f31a51bc add -Wundef to the --enable-dev-mode flags, so that mistyped macro names in #if expressions will be caught
convert various #if expressions to #ifdef for macros that may not be defined (and where the value is not important)
Note: two of these changes are in bison generated files which is going to be inconvenient when they are regenerated


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 15:03:42 +00:00
Russell Bryant 84718d10c4 Merged revisions 54898 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r54898 | russell | 2007-02-16 12:03:41 -0600 (Fri, 16 Feb 2007) | 4 lines

Fix setting "autofallthrough" to yes by default.  It was set to enabled in
pbx.c.  However, if the option was not present in extensions.conf, then
pbx_config.c would set it back to disabled.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 18:04:34 +00:00
Russell Bryant b233892198 Merged revisions 53046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r53046 | russell | 2007-01-31 15:32:08 -0600 (Wed, 31 Jan 2007) | 11 lines

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

........
r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines

Fix a bunch of places where pthread_attr_init() was called, but
pthread_attr_destroy() was not.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 21:35:15 +00:00
Tilghman Lesher a3ce6f5f8c Merged revisions 52679 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r52679 | tilghman | 2007-01-29 16:12:12 -0600 (Mon, 29 Jan 2007) | 2 lines

Argument number correction

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-29 22:13:56 +00:00
Steve Murphy 85f65b1ff0 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: https://origsvn.digium.com/svn/asterisk/trunk@51413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-22 19:42:28 +00:00
Jason Parker 5abda34cd9 Merged revisions 49742 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49742 | qwell | 2007-01-05 18:24:38 -0600 (Fri, 05 Jan 2007) | 7 lines

Save 1 whopping byte of allocated memory!

This looks like it may have been a chicken/egg scenario..

You had to call a cleanup func, because everything was allocated.
Then since you had to call a cleanup func, you were forced to allocate - ie; strdup("").

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-06 00:28:16 +00:00
Kevin P. Fleming cd73a483f1 const-ify some more APIs, and fix rev 49710 from branch-1.4 in a better way here
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 23:32:42 +00:00
Steve Murphy 7c6b71df21 Merged revisions 49237 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49237 | murf | 2007-01-02 15:30:53 -0700 (Tue, 02 Jan 2007) | 1 line

This is a slight modification to Josh's edits for #8579; both files edited were the produced by flex; so the source files need to be changed instead, and the generated files regenerated.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-02 22:43:36 +00:00
Joshua Colp 858796affa Merged revisions 49073 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49073 | file | 2006-12-30 13:31:17 -0500 (Sat, 30 Dec 2006) | 2 lines

IAX has been deprecated for quite some time so we had better use IAX2 when creating the dial string for users. (issue #8697 reported by ssokol)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-30 18:32:31 +00:00
Steve Murphy b96a97e315 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: https://origsvn.digium.com/svn/asterisk/trunk@49062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-30 00:51:07 +00:00
Steve Murphy 6c7f4c1e32 Jason is having problems with the inclusion of <err.h>; it appears to be unnecessary for sucessful builds, so I either removed or commented out the inclusions from all the AEL related code. New outputs from bison/flex are included, etc.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-28 17:56:21 +00:00
Joshua Colp 7231cc108a Merged revisions 49009 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49009 | file | 2006-12-27 17:28:46 -0500 (Wed, 27 Dec 2006) | 2 lines

ast_copy_string is not available when LOW_MEMORY is used and things are being built in the utils directory, so we need to resort to the old method of strncpy. (issue #8579 reported by mottano)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-27 22:30:28 +00:00
Steve Murphy f92697c5fc This small update will generate WARNINGS if there is garbage in your extensions.conf file (liken extem => instead of exten => !)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-21 15:52:44 +00:00
Russell Bryant 17a2888d2e Staticize one, and Constify a bunch of usage strings for CLI commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:28:56 +00:00
Joshua Colp 4e333a782c More fixes for referencing a structure after it has been freed. (issue #8425 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-27 15:48:57 +00:00
Joshua Colp 237c8be66c Merged revisions 48038 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48038 | file | 2006-11-27 10:32:19 -0500 (Mon, 27 Nov 2006) | 10 lines

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

........
r48037 | file | 2006-11-27 10:30:37 -0500 (Mon, 27 Nov 2006) | 2 lines

Do not reference the freed outgoing structure in the debug message. (issue #8425 reported by arkadia)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-27 15:33:56 +00:00
Steve Murphy 2bdd7b7790 Eager people beat me to fixing the messed if, but we all forgot to update the regressions. Until now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 18:20:56 +00:00
Joshua Colp 23ebec40a5 Clean up last commit to better conform to standards.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 17:36:28 +00:00
Steve Murphy 4115ea029d AEL need not complain about parkedcalls not being found... just confuses users
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 17:32:16 +00:00
Joshua Colp eceb5c60d7 Fine, take this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 20:05:31 +00:00
Joshua Colp 3521586712 Hello compiler working, goodbye compiler warning. (fix compiler warning introduced from pbx_dundi optimizations)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 19:42:15 +00:00
Russell Bryant 74b6314d50 Various little bits of code cleanup to reduce nesting, remove useless casts,
and to remove a duplicated error message after a memory allocation error


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 04:30:23 +00:00
Russell Bryant 908b6ed6bc Make pbx_dundi compile again. Sorry. :(
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-05 01:04:29 +00:00
Russell Bryant b1e7dd843a use the AST_MODULE_LOAD_* return codes from load_module()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 22:08:35 +00:00
Russell Bryant 121bd75fcc simplify a couple of loops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 21:54:37 +00:00
Russell Bryant 4b5ad8fb98 Do some minor cleanup to the section of code that sets the EID by getting the
mac address for an ethernet interface


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 21:44:48 +00:00
Russell Bryant 4ffc388358 Add the ability to pass options to the Dial application when using the DUNDi
switch in the dialplan by setting the DUNDIDIALARGS channel variable.
(issue #8084, patch by bluecrow76, with small modifications and documentation
updates)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 18:40:13 +00:00
Kevin P. Fleming 749029de38 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: https://origsvn.digium.com/svn/asterisk/trunk@46201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 14:44:50 +00:00
Steve Murphy 8567b0ee84 Correction for bug 8128 in trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 18:08:33 +00:00
Russell Bryant fef9ec96c7 put flags in an enum and remove a couple of unused defines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 16:51:31 +00:00
Steve Murphy 6f34a8d78d 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: https://origsvn.digium.com/svn/asterisk/trunk@44489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 18:29:06 +00:00
Kevin P. Fleming 3c876af5cf Merged revisions 44378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines

update thread creation code a bit
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space
add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 19:51:38 +00:00
Steve Murphy de7a85105a These changes resolve the problems in bug 8090, where there's a crash compiling an empty context
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 19:33:37 +00:00
Steve Murphy 19dc73ad40 These changes correspond to the changes to app_stack's Gosub() application
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 16:42:26 +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
Paul Cadach b4ef9599de Merged revisions 44186 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44186 | pcadach | 2006-10-03 00:52:56 +0600 (Втр, 03 Окт 2006) | 1 line

Missed part of userconf functionality for chan_h323
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 19:01:10 +00:00
Kevin P. Fleming e92c34cc38 Merged revisions 44055 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44055 | kpfleming | 2006-09-29 17:47:40 -0500 (Fri, 29 Sep 2006) | 2 lines

fix a few build system bugs, and convert Makefiles to be compatible with GNU make 3.80

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-29 22:48:43 +00:00
Kevin P. Fleming 89050169c8 Merged revisions 43996-43997,44008,44011-44012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43996 | kpfleming | 2006-09-29 11:47:05 -0500 (Fri, 29 Sep 2006) | 2 lines

another cross-compile fix

........
r43997 | kpfleming | 2006-09-29 11:52:27 -0500 (Fri, 29 Sep 2006) | 2 lines

support --without-curl in configure script

........
r44008 | kpfleming | 2006-09-29 13:25:49 -0500 (Fri, 29 Sep 2006) | 2 lines

don't abuse CFLAGS and LDFLAGS for build of Asterisk components, because they are also then used for non-Asterisk components (like menuselect); use our own variables instead

........
r44011 | kpfleming | 2006-09-29 13:40:17 -0500 (Fri, 29 Sep 2006) | 2 lines

missed one conversion to ASTCFLAGS

........
r44012 | kpfleming | 2006-09-29 13:49:07 -0500 (Fri, 29 Sep 2006) | 2 lines

yet another place where we were not using the correct CFLAGS by default

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-29 18:54:21 +00:00
Steve Murphy 35b951d2ac 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: https://origsvn.digium.com/svn/asterisk/trunk@43747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 03:45:22 +00:00
Steve Murphy bcdb270c57 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: https://origsvn.digium.com/svn/asterisk/trunk@43507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-22 21:34:04 +00:00
Steve Murphy 13ceee6333 As per bug 8004, we now return AST_MODULE_LOAD_DECLINE when we can't read extensions.ael
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-22 21:17: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
Tilghman Lesher 70af28270d Constify the result of a config retrieval function, to avoid mutilation (issue 7983).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:40:39 +00:00
Matthew Fredrickson 33ddb53663 Various updates from PCadach's chan_h323-live branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 21:07:49 +00:00
Matt O'Gorman d0a1a0033d similar patch for verbose vs debug with minor changes
bug 2617


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 16:23: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
Kevin P. Fleming c2c4f86c72 merge markster's usersconf branch with some slight changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 23:53:58 +00:00
Matt O'Gorman 05a695af72 everything that loads a config that needs a config file to run
now reports AST_MODULE_LOAD_DECLINE when loading if config file
is not there, also fixed an error in res_config_pgsql where it 
had a non static function when it should.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:00:20 +00:00
Steve Murphy 6557d250c8 This commit is a basic AEL enhancement: c-style comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 02:53:15 +00:00
Russell Bryant f7cac071d9 Merged revisions 41269 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41269 | russell | 2006-08-29 09:33:34 -0400 (Tue, 29 Aug 2006) | 3 lines

clean up last commit ... most notably, there is no reason to do heap
allocations here, and it also included a potential memory leak

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 13:40:04 +00:00
Steve Murphy 8efd121371 Bugfix for 7813 applied to trunk as per patch supplied by stevens
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 12:24:01 +00:00
Kevin P. Fleming d12f54f90b GNU make already knows how to quietly ignore non-existent files in 'include' directives
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-26 23:58:47 +00:00