Commit Graph

65 Commits

Author SHA1 Message Date
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Walter Doekes db24fc2523 Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: Clod Patry
Review: https://reviewboard.asterisk.org/r/1651


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08 20:49:48 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.

This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.

The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.

The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 22:15:50 +00:00
Walter Doekes 00a522c000 Correct the default udptl port range.
The udptl port range was defined as 4000-4999 in the udptl.conf.sample,
as 4500-4599 if you didn't have a config and 4500-4999 if your config
was broken. Default is now 4000-4999.

(closes issue ASTERISK-16250)
Reviewed by: Tilghman Lesher

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

Merged revisions 343580 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 19:58:44 +00:00
Richard Mudgett 2f82296096 Merged revisions 339626 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r339626 | rmudgett | 2011-10-06 12:53:00 -0500 (Thu, 06 Oct 2011) | 25 lines
  
  Merged revisions 339625 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r339625 | rmudgett | 2011-10-06 12:49:38 -0500 (Thu, 06 Oct 2011) | 18 lines
    
    Fix debugging messages generated by 'udptl debug'.
    
    * Makes chan_sip set the tag to the channel name.
    
    * Fixes received debug message sequence number.
    
    * Removed tx/rx debug message type since it was hard coded to 0.
    
    * Made udptl.c logged message header consistent if possible: "UDPTL (%s): ".
    
    * Removed unused rx_expected_seq_no from struct ast_udptl.
    
    (closes issue ASTERISK-18401)
    Reported by: Kevin P. Fleming
    Patches:
          jira_asterisk_18401_v1.8.patch (license #5621) patch uploaded by rmudgett
    Tested by: Matthew Nicholson
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-06 17:54:42 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Matthew Nicholson 0658c5ec2e Merged revisions 308723 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r308723 | mnicholson | 2011-02-24 09:06:14 -0600 (Thu, 24 Feb 2011) | 16 lines
  
  Merged revisions 308722 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r308722 | mnicholson | 2011-02-24 08:59:41 -0600 (Thu, 24 Feb 2011) | 9 lines
    
    Merged revisions 308721 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r308721 | mnicholson | 2011-02-24 08:54:56 -0600 (Thu, 24 Feb 2011) | 2 lines
      
      silence gcc 4.2 compiler warning
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-24 15:10:58 +00:00
Matthew Nicholson dad4fecc03 Merged revisions 308416 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r308416 | mnicholson | 2011-02-21 09:02:20 -0600 (Mon, 21 Feb 2011) | 19 lines
  
  Merged revisions 308414 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r308414 | mnicholson | 2011-02-21 09:00:22 -0600 (Mon, 21 Feb 2011) | 12 lines
    
    Merged revisions 308413 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r308413 | mnicholson | 2011-02-21 08:57:15 -0600 (Mon, 21 Feb 2011) | 5 lines
      
      Properly check the bounds of arrays when decoding UDPTL packets.  Also, remove broken support for receiving UDPTL packets larger than 16k.  That shouldn't ever happen anyway.
      
      AST-2011-002
      FAX-281
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-21 15:04:19 +00:00
David Vossel c26c190711 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: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Mark Michelson 3efc46080a Merged revisions 304250 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r304250 | mmichelson | 2011-01-26 15:02:10 -0600 (Wed, 26 Jan 2011) | 9 lines
  
  Merged revisions 304242 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r304242 | mmichelson | 2011-01-26 14:38:37 -0600 (Wed, 26 Jan 2011) | 3 lines
    
    Get rid of unused 'verbose' field in ast_udptl
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26 21:03:44 +00:00
Russell Bryant cc0b7e7df5 Some scheduler API cleanup and improvements.
Previously, I had added the ast_sched_thread stuff that was a generic scheduler
thread implementation.  However, if you used it, it required using different
functions for modifying scheduler contents.  This patch reworks how this is
done and just allows you to optionally start a thread on the original scheduler
context structure that has always been there.  This makes it trivial to switch
to the generic scheduler thread implementation without having to touch any of
the other code that adds or removes scheduler entries.

In passing, I made some naming tweaks to add ast_ prefixes where they were not
there before.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 17:15:54 +00:00
Mark Michelson 57a92a6a7c Allow IPv6 addresses for UDPTL streams.
Review: https://reviewboard.asterisk.org/r/795



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 15:16:33 +00:00
David Vossel d7e9d07156 fixes infinite loop during udptl.c's decode_open_type
When decode_length returns the length there is a check to see if that
length is negative, if so the decode loop breaks as this means the
limit has been reached.  The problem here is that length is an
unsigned int, so length can never be negative.  This resulted in
an infinite loop.

(issue #17352)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@264400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-19 20:30:33 +00:00
Matthew Nicholson 6eaf9b874f Cast an unsigned int to a signed int when comparing it with 0.
(AST-377)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@264379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-19 20:26:27 +00:00
David Vossel 36bbf8f902 fixes crash during T.38 negotiation caused by invalid or missing FaxMaxDatagram field
AST-2010-001

(closes issue #16634)
Reported by: krn

(closes issue #16724)
Reported by: barthpbx

(closes issue #16517)
Reported by: bklang

(closes issue #16485)
Reported by: elsto




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-02 22:27:23 +00:00
Matthew Nicholson ef0da09c74 This change fixes a few bugs in the way the far max IFP was calculated that were introduced in r231692.
(closes issue #16497)
Reported by: globalnetinc
Patches:
      udptl-max-ifp-fix1.diff uploaded by mnicholson (license 96)
Tested by: globalnetinc



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-14 16:14:35 +00:00
Kevin P. Fleming 5ba2b689b2 Another round of UDPTL stack fixes/improvements:
1) Allow users of UDPTL stack to associate a character-string tag with a UDPTL
   session, so that log/error/debug messages generated by the UDPTL stack can
   be 'connected' to the endpoint that caused them to be generated.

2) Improve comments (and process) of calculating the far end's maximum IFP size
   when redundancy mode is in use for error correction.

3) When an IFP larger than the calculated 'far max IFP' size is presented for
   writing, truncate it rather than putting in the buffer and allowing the buffer
   to overflow; this will cause the ends to retrain to a lower bit rate that
   produces IFPs of an appropriate size if possible, and if not possible, the
   FAX transfer will fail completely. In these cases, it is due to the one endpoint
   supplying a T38FaxMaxDatagram value that is improperly calculated and is
   too low to be of use; we have configuration options available to override
   this behavior.

4) Eliminate use of T38FaxMaxDatagram value in udptl.conf; it is no longer
   needed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-30 21:47:42 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Kevin P. Fleming 20743ec07d Allow non-compliant T.38 endpoints to be supportable via configuration option.
Many T.38 endpoints incorrectly send the maximum IFP frame size they can accept
as the T38FaxMaxDatagram value in their SDP, when in fact this value is
supposed to be the maximum UDPTL payload size (datagram size) they can accept.
If the value they supply is small enough (a commonly supplied value is '72'),
T.38 UDPTL transmissions will likely fail completely because the UDPTL packets
will not have enough room for a primary IFP frame and the redundancy used for
error correction. If this occurs, the Asterisk UDPTL stack will emit log messages
warning that data loss may occur, and that the value may need to be overridden.

This patch extends the 't38pt_udptl' configuration option in sip.conf to allow
the administrator to override the value supplied by the remote endpoint and
supply a value that allows T.38 FAX transmissions to be successful with that
endpoint. In addition, in any SIP call where the override takes effect, a debug
message will be printed to that effect. This patch also removes the
T38FaxMaxDatagram configuration option from udptl.conf.sample, since it has not
actually had any effect for a number of releases.

In addition, this patch cleans up the T.38 documentation in sip.conf.sample
(which incorrectly documented that T.38 support was passthrough only).

(issue #15586)
Reported by: globalnetinc


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-05 19:45:00 +00:00
Kevin P. Fleming 19ba91cd22 Remove ability to control T.38 FAX error correction from udptl.conf.
chan_sip has had the ability to control T.38 FAX error correction mode on a per-peer
(or global) basis for a couple of releases now, which is where it should have been
all along. This patch removes the ability to configure it in udptl.conf, but issues
a warning if the user tries to do, telling them to look at sip.conf.sample for how
to configure it now. For any SIP peers that are T.38 enabled in sip.conf, there is
already a default for FEC error correction even if the user does not specify any mode,
so this change will not turn off error correction by default, it will have the same
default value that has been in the udptl.conf sample file.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-01 16:16:09 +00:00
Kevin P. Fleming 92ed7f8929 Workaround broken T.38 endpoints that offer tiny MaxDatagram sizes.
Some T.38 endpoints treat T38FaxMaxDatagram as the maximum IFP size that should
be sent to them, rather than the maximum packet payload size. If such an
endpoint also requests UDPRedundancy as the error correction mode, we'll end
up calculating a tiny maximum IFP size, so small as to be unusable. This patch
sets a lower bound on what we'll consider the remote's maximum IFP size to be,
assuming that endpoints that do this really can accept larger packets than
they've offered to accept.

(closes issue #15649)
Reported by: dazza76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-07 13:08:00 +00:00
Mark Michelson ba8dcde549 Merged revisions 209131 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r209131 | mmichelson | 2009-07-27 12:44:06 -0500 (Mon, 27 Jul 2009) | 18 lines
  
  Allow for UDPTL to use only even-numbered ports if desired.
  
  There are some VoIP providers out there that will not accept SDP
  offers with odd numbered UDPTL ports. While it is my personal opinion
  that these VoIP providers are misinterpreting RFC 2327, it really is
  not a big deal to play along with their silly little games. Of course,
  since restricting UDPTL ports to only even numbers reduces the range
  of available ports by half, so the option to use only even port numbers
  is off by default. A user can enable the behavior by setting
  use_even_ports=yes in udptl.conf.
  
  (closes issue #15182)
  Reported by: CGMChris
  Patches:
        15182.patch uploaded by mmichelson (license 60)
  Tested by: CGMChris
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 17:50:04 +00:00
Kevin P. Fleming 17e2d9fdbc Resolve a T.38 negotiation issue left over from the udptl-updates merge.
The udptl-updates branch that was merged yesterday failed to properly send back
T.38 SDP responses with the correct error correction mode, if the incoming SDP
from the other end caused us to change error correction modes. This patch
corrects that situation.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-24 15:02:53 +00:00
Kevin P. Fleming 0a6e06c7ff Rework of T.38 negotiation and UDPTL API to address interoperability problems
Over the past couple of months, a number of issues with Asterisk
negotiating (and successfully completing) T.38 sessions with various
endpoints have been found. This patch attempts to address many of
them, primarily focused around ensuring that the endpoints'
MaxDatagram size is honored, and in addition by ensuring that T.38
session parameter negotiation is performed correctly according to the
ITU T.38 Recommendation.

The major changes here are:

1) T.38 applications in Asterisk (app_fax) only generate/receive IFP
packets, they do not ever work with UDPTL packets. As a result of
this, they cannot be allowed to generate packets that would overflow
the other endpoints' MaxDatagram size after the UDPTL stack adds any
error correction information. With this patch, the application is told
the maximum *IFP* size it can generate, based on a calculation using
the far end MaxDatagram size and the active error correction mode on
the T.38 session. The same is true for sending *our* MaxDatagram size
to the remote endpoint; it is computed from the value that the
application says it can accept (for a single IFP packet) combined with
the active error correction mode.

2) All treatment of T.38 session parameters as 'capabilities' in
chan_sip has been removed; these parameters are not at all like
audio/video stream capabilities. There are strict rules to follow for
computing an answer to a T.38 offer, and chan_sip now follows those
rules, using the desired parameters from the application (or channel)
that wants to accept the T.38 negotiation.

3) chan_sip now stores and forwards ast_control_t38_parameters
structures for tracking 'our' and 'their' T.38 session parameters;
this greatly simplifies negotiation, especially for pass-through
calls.

4) Since T.38 negotiation without specifying parameters or receiving
the final negotiated parameters is not very worthwhile, the
AST_CONTROL_T38 control frame has been removed. A note has been added
to UPGRADE.txt about this removal, since any out-of-tree applications
that use it will no longer function properly until they are upgraded
to use AST_CONTROL_T38_PARAMETERS.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-23 21:57:24 +00:00
Kevin P. Fleming 7574941cb4 Update comments about the level of T.38 support in Asterisk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-10 18:44:09 +00:00
Kevin P. Fleming e6b2e9a750 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: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Tilghman Lesher 9e0f5d2afe Merged revisions 175311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r175311 | tilghman | 2009-02-12 15:19:40 -0600 (Thu, 12 Feb 2009) | 9 lines
  
  Fix crashes when receiving certain T.38 packets.  Also, increase the maximum
  size of T.38 packets and warn users when they try to set the limits above those
  maximums.
  (closes issue #13050)
   Reported by: schern
   Patches: 
         20090212__bug13050.diff.txt uploaded by Corydon76 (license 14)
   Tested by: schern
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12 21:25:14 +00:00
Tilghman Lesher 72fc03b6c6 Merged revisions 168603 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168603 | tilghman | 2009-01-14 13:02:55 -0600 (Wed, 14 Jan 2009) | 7 lines
  
  Don't read into a buffer without first checking if a value is beyond the end.
  (closes issue #13600)
   Reported by: atis
   Patches: 
         20090106__bug13600.diff.txt uploaded by Corydon76 (license 14)
   Tested by: atis
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 19:11:14 +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 6e6e02ce1f If the config file does not exist, then the first use crashes Asterisk.
(closes issue #13848)
 Reported by: klaus3000
 Patches: 
       udptl.c.patch uploaded by eliel (license 64)
 Tested by: blitzrage


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-26 18:33:04 +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
Tilghman Lesher 08af5bb312 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: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 23:30:03 +00:00
Sean Bright 74bf61579f That's all, folks. Not going to update the Makefile until res_jabber is
converted (snuffy, you there? :))


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10 20:57:25 +00:00
Michiel van Baak f1e9371da8 - 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: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 16:29:54 +00:00
Russell Bryant 08f91c1192 Merged revisions 116463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r116463 | russell | 2008-05-14 16:32:00 -0500 (Wed, 14 May 2008) | 4 lines

Add ast_assert(), which can be used to handle fatal errors.  It is only compiled
in if dev-mode is enabled, and only aborts if DO_CRASH is defined.
(inspired by issue #12650)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 21:40:43 +00:00
Tilghman Lesher ef4eff9a9b Add the "config reload <conffile>" command, which allows you to tell Asterisk
to reload any file that references a given configuration file.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 18:39:06 +00:00
Kevin P. Fleming 79c3038ee5 Merged revisions 107352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107352 | kpfleming | 2008-03-11 06:04:29 -0500 (Tue, 11 Mar 2008) | 11 lines

fix up various compiler warnings found with gcc-4.3:

- the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function)

- main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement

- main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur

- main/editline/readline.c had an unused variable


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 11:36:51 +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
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
Joshua Colp 6e238eba40 Merged revisions 91450 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r91450 | file | 2007-12-06 12:49:42 -0400 (Thu, 06 Dec 2007) | 6 lines

Fix various in the udptl implementation. It could return empty modem frames, have an incorrect sequence number on packets, and display the wrong sequence number in the debug messages.
(closes issue #11228)
Reported by: Cache
Patches:
      udptl-4.patch uploaded by dimas (license 88)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 16:51:09 +00:00
Luigi Rizzo e0ff5fef5c remove a bunch of useless #include "options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:09:02 +00:00
Luigi Rizzo 9335ace850 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 19:09:03 +00:00
Luigi Rizzo 5663ff6518 fix breakage induced by previous mistake
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 14:45:46 +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
Jason Parker ebe4050128 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 20:05:18 +00:00
Jason Parker b0f3e6097e Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 18:29:40 +00:00
Russell Bryant 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
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
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