dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

170 Commits

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

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


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

........
  r317478 | russell | 2011-05-05 17:53:45 -0500 (Thu, 05 May 2011) | 12 lines
  
  Fix some consistency issues with jitterbuffer config.
  
  Store the defaults noted in the sample config files in the jitterbuffer config
  data structure.  This makes the CLI commands that output these settings show
  the right thing.  Also only show the settings that are relevant in the settings
  CLI commands, based on which jitterbuffer is selected and whether it's enabled.
  
  (closes issue #19083)
  Reported by: rgagnon
  Patches:
        issue-19083-trunk-r313139.diff uploaded by rgagnon (license 1202)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@317479 f38db490-d61c-443f-a65b-d21fe96a405b
2011-05-05 22:55:09 +00:00
dvossel 4aca3187a3 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03 16:22:10 +00:00
tzafrir fa5c861170 Support for GNU/kFreeBSD
kFreeBSD is GNU (with glibc) on to of a FreeBSD kernel. See
http://glibc-bsd.alioth.debian.org/porting/PORTING

This patch gets Asterisk close to building on Debian kFreeBSD i386,
mainly by adding an extra test for __GLIBC__ in one or two (or more)
places.

OSARCH is set to 'kfreebsd-gnu'

DAHDI support (and support for chan_vpb) was not tested.

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@282397 f38db490-d61c-443f-a65b-d21fe96a405b
2010-08-15 13:08:45 +00:00
rmudgett d93fa33a75 Expand the caller ANI field to an ast_party_id
Expand the ani field in ast_party_caller and ast_party_connected_line to
an ast_party_id.

This is an extension to the ast_callerid restructuring patch in review:
https://reviewboard.asterisk.org/r/702/

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276393 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 16:58:03 +00:00
rmudgett ad58aa92a2 ast_callerid restructuring
The purpose of this patch is to eliminate struct ast_callerid since it has
turned into a miscellaneous collection of various party information.

Eliminate struct ast_callerid and replace it with the following struct
organization:

struct ast_party_name {
	char *str;
	int char_set;
	int presentation;
	unsigned char valid;
};
struct ast_party_number {
	char *str;
	int plan;
	int presentation;
	unsigned char valid;
};
struct ast_party_subaddress {
	char *str;
	int type;
	unsigned char odd_even_indicator;
	unsigned char valid;
};
struct ast_party_id {
	struct ast_party_name name;
	struct ast_party_number number;
	struct ast_party_subaddress subaddress;
	char *tag;
};
struct ast_party_dialed {
	struct {
		char *str;
		int plan;
	} number;
	struct ast_party_subaddress subaddress;
	int transit_network_select;
};
struct ast_party_caller {
	struct ast_party_id id;
	char *ani;
	int ani2;
};

The new organization adds some new information as well.

* The party name and number now have their own presentation value that can
be manipulated independently.  ISDN supplies the presentation value for
the name and number at different times with the possibility that they
could be different.

* The party name and number now have a valid flag.  Before this change the
name or number string could be empty if the presentation were restricted.
Most channel drivers assume that the name or number is then simply not
available instead of indicating that the name or number was restricted.

* The party name now has a character set value.  SIP and Q.SIG have the
ability to indicate what character set a name string is using so it could
be presented properly.

* The dialed party now has a numbering plan value that could be useful to
have available.

The various channel drivers will need to be updated to support the new
core features as needed.  They have simply been converted to supply
current functionality at this time.


The following items of note were either corrected or enhanced:

* The CONNECTEDLINE() and REDIRECTING() dialplan functions were
consolidated into func_callerid.c to share party id handling code.

* CALLERPRES() is now deprecated because the name and number have their
own presentation values.

* Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
contain garbage.  It also can only contain the caller id number so using
ast_callerid_parse() on it is silly.  There was also a typo in the
CALLERNAME if test.

* Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
number string.  ast_callerid_parse() alters the given buffer which in this
case is the channel's caller id number string.  Then using
ast_shrink_phone_number() could alter it even more.

* Fixed caller ID name and number memory leak in chan_usbradio.c.

* Fixed uninitialized char arrays cid_num[] and cid_name[] in
sig_analog.c.

* Protected access to a caller channel with lock in chan_sip.c.

* Clarified intent of code in app_meetme.c sla_ring_station() and
dial_trunk().  Also made save all caller ID data instead of just the name
and number strings.

* Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
function.

* Corrected some weirdness with app_privacy.c's use of caller
presentation.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276347 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 15:48:36 +00:00
russell 9eb7a04913 Merged revisions 269495 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r269495 | russell | 2010-06-09 17:18:37 -0500 (Wed, 09 Jun 2010) | 2 lines
  
  Don't stop Asterisk if chan_oss fails to register 'Console' (due to another channel driver already claiming it).
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@269497 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-09 22:19:20 +00:00
rmudgett f42e29b281 Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.
SWP-1229
ABE-2161

* Ensure chan_local.c:local_call() will not leak cid.cid_dnid when
copying.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256104 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-03 02:12:33 +00:00
dvossel 3b12e80473 fixes adaptive jitterbuffer configuration
When configuring the adaptive jitterbuffer, the target_extra
value not only could not be set from the configuration, but was
not even being set to its proper default.  This value is required
in order for the adaptive jitterbuffer to work correctly.  To resolve
this a config option has been added to expose this value to the conf
files, and a default value is provided when no config specific value
is present.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249893 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02 19:08:38 +00:00
qwell f1a42f813c Fix mute toggling on OSS channels.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@229750 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-12 23:30:10 +00:00
tilghman 3bacd4082e Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04 14:05:12 +00:00
tilghman d1ec1aa57d AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10 19:20:57 +00:00
kpfleming c268ce9100 Define side-effect-safe MIN and MAX macros and remove duplicate definitions from various files.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@209400 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-28 13:49:46 +00:00
russell ac3b35dcc7 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

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

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


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

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

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

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21 21:13:09 +00:00
tilghman e91d3bac13 Merged revisions 171187 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r171187 | tilghman | 2009-01-25 17:44:01 -0600 (Sun, 25 Jan 2009) | 6 lines
  
  Correctly track the hookstate
  (closes issue #13686)
   Reported by: itiliti
   Patches: 
         20081013__bug13686.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@171188 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-25 23:58:00 +00:00
file 6fff9b550d Numerous documentation updates.
(closes issue #13970)
Reported by: pkempgen
Patches:
      __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)


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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-05 10:31:25 +00:00
kpfleming a73e71ff1e improve configure script to remember the previous value of each dependency in build_tools/menuselect-deps, so that (once it has been written) menuselect can use this information to warn the user when a previously met dependency is no longer met
along the way, change tags used in configure script, menuselect-deps and code for various dependencies to be consistently named



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154151 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 15:07:54 +00:00
kpfleming cc1b2c100f bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02 18:52:13 +00:00
murf 6499c3c6d4 (closes issue #13557)
Reported by: nickpeirson
Patches:
      pbx.c.patch uploaded by nickpeirson (license 579)
      replace_bzero+bcopy.patch uploaded by nickpeirson (license 579)
Tested by: nickpeirson, murf

1. replaced all refs to bzero and bcopy to memset and memmove instead.
2. added a note to the CODING-GUIDELINES
3. add two macros to asterisk.h to prevent bzero, bcopy from creeping
   back into the source
4. removed bzero from configure, configure.ac, autoconfig.h.in




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-09 14:17:33 +00:00
mvanbaak b6fa2c3b98 Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak
during AstriDevCon.

This is the second audit the CLI got, and
this time lmadsen made sure he had _ALL_ modules
loaded that have CLI commands in them.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145121 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-28 23:32:14 +00:00
murf a1d03040c7 (closes issue #13557)
Reported by: nickpeirson

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

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




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

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

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

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12 23:30:03 +00:00
mmichelson 35cda8840d Fix a memory leak in chan_oss
(closes issue #13311)
Reported by: eliel
Patches:
      chan_oss.c.patch uploaded by eliel (license 64)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141995 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-09 10:20:58 +00:00
rizzo f9022c94cc implement the 'freeze' function for incoming frames;
fix a bug which caused a crash when a videodevice was
specified after startgui=1 in the config file. This also
involves a slightly different method to determine if the
gui is active or not.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126572 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-30 15:45:15 +00:00
rizzo 001a1d9968 implement a 'toggle' option for 'console mute' and 'console unmute'
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126311 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-29 13:02:54 +00:00
mvanbaak c1210321e7 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void

Recently the ast_queue_hangup function got a new parameter, the hangupcause
Feedback came in that this is no good and that instead a new function should be created.
This I did.

The hangupcause was stored in the seqno member of the ast_frame struct. This is not very
elegant, and since there's already a data member that one should be used.
Problem is, this member was a void *.
Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone
wants to store another type in there in the future.

This commit is so massive, because all ast_frame.data uses have to be
altered to ast_frame.data.data

Thanks russellb and kpfleming for the feedback.

(closes issue #12674)
Reported by: mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22 16:29:54 +00:00
mvanbaak 94979a8bde Pass the hangup cause all the way to the calling app/channel.
(closes issue #11328)
Reported by: rain
Patches:
      20071207__pass_cause_in_hangup_control_frame.diff.txt uploaded by Corydon76 (license 14)
brought up-to-date to trunk by me


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114637 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-24 22:16:48 +00:00
russell debe741e5e Merged revisions 108796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108796 | russell | 2008-03-14 15:09:22 -0500 (Fri, 14 Mar 2008) | 5 lines

Fix a channel name issue.  chan_oss registers the "Console" channel type,
but it created channels with an "OSS" prefix.

(closes issue #12194, reported by davidw, patched by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@108797 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-14 20:09:37 +00:00
file f6b76699b7 Merged revisions 106235 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines

Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue #12148)
Reported by: jcomellas

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106239 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05 22:43:22 +00:00
rizzo 82a06bcfb7 make get_video_desc() return the active console if
passed a null argument (channel).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97389 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09 12:13:32 +00:00
kpfleming a7ebd360e3 eliminiate sound_thread() and other stuff from chan_oss since Asterisk indications can handle it
remove gentone and all the headers containing tones that are no longer needed


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96270 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-03 19:56:29 +00:00
rizzo 99038eda0d remove useless casts
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95068 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27 23:00:55 +00:00
rizzo 86307f549a Build console_video support by linking in, as opposed to including,
console_video.c

This will ease the task of splitting console_video.c into its components
(V4L and X11 grabbers, various video codecs and packetizers, SDL),
as well as ease future extensions (e.g. additional video sources,
codecs and rendering engines).

For the time being nothing changes for users: video support is off by
default, and requires -DHAVE_VIDEO_CONSOLE on the command line to be included
(if SDL and FFMPEG are available).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94615 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-22 18:28:40 +00:00
rizzo 91f1b6959d add some macros to simplify parsing the config file,
see description in config.h .

They are a variant of the set of macros i used in chan_oss.c,
structured in a way to be more robust to the presence of
spurious ';' - basically, they define wrappers for 'do {'
and '} while (0)', plus some helper functions to deal with simple
cases such as ast_copy_string, ast_malloc, strtoul, ast_true ...

The prefix (CV_ as 'Config Variable') tries to be easy to remember
and has been chosen to not conflict with other existing macros in the tree.

For the time being, I have only updated the three source files in the
tree that used the old M_* macros. Hopefully, more files will be
converted.

NOTE:

    I understand that inventing my own dialect of C is generally wrong;
    however, the lack of adequate support in the language encourages
    lazy programming practices (such as ignoring errors, bounds, etc.)
    and this increases the chance of vulnerability in the code, especially
    because we are parsing user input here.
    Hopefully, these macros and the use of ast_parse_arg (in config.h)
    should encourage the programmer to write more robust code.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94191 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-20 12:56:07 +00:00
rizzo 8c46ccc6b2 surprising as it may be, chan_oss compiles correctly under cygwin as well,
provided you look for soundcard.h in the right place...



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93380 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17 22:38:48 +00:00
kpfleming dde59f4f62 make the configure script detect that it is running on a Windows platform, and report that information so that menuselect can use it (all information that is used to decide whether to build modules or not must be fed to menuselect so the user knows what will be built and why... don't make module build decisions in the makefiles, please)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93211 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17 17:11:06 +00:00
rizzo b1f507f5d4 remove some redundant headers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93143 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-15 00:11:04 +00:00
rizzo 5ccc5160d7 put in the necessary hooks for video support in the console.
This is a NOP as far as the current code is concerned,
but there is already support in ./configure and the
Makefiles for the various libraries used by console_video.c
(not yet in the tree) so addition is trivial.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89533 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-23 15:54:13 +00:00
rizzo 150b2c22ef remove another set of redundant #include "asterisk/options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:24:55 +00:00
rizzo 9cf442d7f7 include "logger.h" and errno.h from asterisk.h - usage shows that they
were included almost everywhere.
Remove some of the instances.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 18:52:04 +00:00
rizzo 883346d64a Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

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

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

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

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:04:58 +00:00
rizzo 0cb2dd9239 move the inner part of config file parsing to a separate function,
so it can be reused in the implementation of cli commands when
they have a similar syntax.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89320 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 09:51:41 +00:00
rizzo ea0d4674a6 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: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 13:18:40 +00:00
qwell 7756b987a0 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 20:05:18 +00:00
qwell d542122e6a Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85460 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-11 19:03:06 +00:00
tilghman dbec3d56c1 Don't reload a configuration file if nothing has changed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16 21:09:46 +00:00
file 2ca342ce99 Merged revisions 79174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79174 | file | 2007-08-13 11:18:04 -0300 (Mon, 13 Aug 2007) | 4 lines

(closes issue #10437)
Reported by: haklin
Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79175 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13 14:22:46 +00:00