Skip to content
Snippets Groups Projects
  1. Dec 20, 2010
    • Russell Bryant's avatar
      Some scheduler API cleanup and improvements. · cc0b7e7d
      Russell Bryant authored
      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
      cc0b7e7d
  2. Dec 09, 2010
  3. Nov 02, 2010
  4. Oct 14, 2010
    • David Vossel's avatar
      Merged revisions 291827 via svnmerge from · 58ea3034
      David Vossel authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ........
        r291827 | dvossel | 2010-10-14 16:27:42 -0500 (Thu, 14 Oct 2010) | 18 lines
        
        Safer xml parsing, treat all clients the same, and better local candidate selection.
        
        The gtalk channel driver was doing several unsafe operations
        in regards to how it parsed incoming XML messages.  I have cleaned
        that code up so it should be much safer now.
        
        We now treat all clients types the same.  We have no reason to
        distinguish between GMAIL and GOOGLE VOICE clients anymore because
        they all work the same way.
        
        I also modified how the local ip is found.  If no bindaddress is provided
        in the config file, we attempt to determine the local ip we
        would use to connect to google.com.  If that fails, then
        we fall back to the ast_find_ourip() function as a last resort.
        Using the new method makes it much less likely that we would ever
        advertise a local RTP candidate as a loopback address.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      58ea3034
    • Paul Belanger's avatar
      Merged revisions 291758 via svnmerge from · b1cc567e
      Paul Belanger authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ........
        r291758 | pabelanger | 2010-10-14 11:15:12 -0400 (Thu, 14 Oct 2010) | 11 lines
        
        Add the ability for ast_find_ourip to return IPv4, IPv6 or both.
        
        While testing chan_gtalk I noticed jabber was using my IPv6 address
        and not IPv4. When using bindaddr=0.0.0.0 it is possible for ast_find_ourip()
        to return both IPv6 and IPv4 results.  Adding a family parameter gives you
        the ablility to choose.
        
        Since jabber/gtalk/h323 do not support IPv6, we should only return IPv4 results.
        
        Review: https://reviewboard.asterisk.org/r/973/
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b1cc567e
  5. Oct 13, 2010
  6. Oct 11, 2010
    • David Vossel's avatar
      Merged revisions 291192 via svnmerge from · 0736871c
      David Vossel authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ........
        r291192 | dvossel | 2010-10-11 16:38:39 -0500 (Mon, 11 Oct 2010) | 19 lines
        
        Gtalk enhancements and general code cleanup.
        
        This patch includes several chan_gtalk enhancements.
        Two new gtalk.conf options have been added, externip
        and stunadd.  Setting externip allows us to
        manually specify what the external IP address is
        outside of a NAT environment.  Setting the stunaddr
        option to a valid stun server allows for that external
        ip to be retrieved via a STUN server automatically.  This
        external IP is then advertised during call setup as
        a possible candidate.
        
        I have also attempted to clean up chan_gtalk's code
        so it meets our coding guidelines. During this cleanup
        I noticed several things that need to be done in the
        code and made a TODO section at the top of the file.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0736871c
  7. Oct 08, 2010
  8. Oct 07, 2010
  9. Oct 06, 2010
  10. Oct 05, 2010
  11. Jul 20, 2010
  12. Jul 14, 2010
    • Richard Mudgett's avatar
      ast_callerid restructuring · ec37ffbd
      Richard Mudgett authored
      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: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ec37ffbd
  13. Jul 08, 2010
  14. Mar 02, 2010
    • David Vossel's avatar
      fixes adaptive jitterbuffer configuration · 862ebf4d
      David Vossel authored
      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: https://origsvn.digium.com/svn/asterisk/trunk@249893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      862ebf4d
  15. Nov 04, 2009
  16. Sep 25, 2009
  17. Aug 12, 2009
  18. Jun 26, 2009
    • Russell Bryant's avatar
      Merge the new Channel Event Logging (CEL) subsystem. · 0264eef1
      Russell Bryant authored
      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: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0264eef1
  19. May 22, 2009
  20. Apr 24, 2009
    • Russell Bryant's avatar
      Convert the ast_channel data structure over to the astobj2 framework. · cba19c8a
      Russell Bryant authored
      There is a lot that could be said about this, but the patch is a big 
      improvement for performance, stability, code maintainability, 
      and ease of future code development.
      
      The channel list is no longer an unsorted linked list.  The main container 
      for channels is an astobj2 hash table.  All of the code related to searching 
      for channels or iterating active channels has been rewritten.  Let n be 
      the number of active channels.  Iterating the channel list has gone from 
      O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).  
      Searching for a channel by extension is still O(n), but uses a new method 
      for doing so, which is more efficient.
      
      The ast_channel object is now a reference counted object.  The benefits 
      here are plentiful.  Some benefits directly related to issues in the 
      previous code include:
      
      1) When threads other than the channel thread owning a channel wanted 
         access to a channel, it had to hold the lock on it to ensure that it didn't 
         go away.  This is no longer a requirement.  Holding a reference is 
         sufficient.
      
      2) There are places that now require less dealing with channel locks.
      
      3) There are places where channel locks are held for much shorter periods 
         of time.
      
      4) There are places where dealing with more than one channel at a time becomes 
         _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the 
         future that deals with multiple channels will be much easier.
      
      Some additional information regarding channel locking and reference count 
      handling can be found in channel.h, where a new section has been added that 
      discusses some of the rules associated with it.
      
      Mark Michelson also assisted with the development of this patch.  He did the 
      conversion of ChanSpy and introduced a new API, ast_autochan, which makes it 
      much easier to deal with holding on to a channel pointer for an extended period 
      of time and having it get automatically updated if the channel gets masqueraded.
      Mark was also a huge help in the code review process.
      
      Thanks to David Vossel for his assistance with this branch, as well.  David 
      did the conversion of the DAHDIScan application by making it become a wrapper 
      for ChanSpy internally.
      
      The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.
      
      Review: http://reviewboard.digium.com/r/203/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      cba19c8a
  21. Apr 10, 2009
  22. Apr 02, 2009
  23. Mar 31, 2009
    • David Brooks's avatar
      Merged revisions 185362 via svnmerge from · b90ee93f
      David Brooks authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r185362 | dbrooks | 2009-03-31 11:37:12 -0500 (Tue, 31 Mar 2009) | 35 lines
        
        Fix incorrect parsing in chan_gtalk when xmpp contains extra whitespaces
        
        To drill into the xmpp to find the capabilities between channels, chan_gtalk 
        calls iks_child() and iks_next(). iks_child() and iks_next() are functions in 
        the iksemel xml parsing library that traverse xml nodes. The bug here is that 
        both iks_child() and iks_next() will return the next iks_struct node 
        *regardless* of type. chan_gtalk expects the next node to be of type IKS_TAG, 
        which in most cases, it is, but in this case (a call being made from the 
        Empathy IM client), there exists iks_struct nodes which are not IKS_TAG data 
        (they are extraneous whitespaces), and chan_gtalk doesn't handle that case, 
        so capabilities don't match, and a call cannot be made.
        
        iks_first_tag() and iks_next_tag(), on the other hand, will not return the 
        very next iks_struct, but will check to see if the next iks_struct is of 
        type IKS_TAG. If it isn't, it will be skipped, and the next struct of type 
        IKS_TAG it finds will be returned. This assures that chan_gtalk will find 
        the iks_struct it is looking for.
        
        This fix simply changes all calls to iks_child() and iks_next() to become 
        calls to iks_first_tag() and iks_next_tag(), which resolves the capability 
        matching.
        
        The following is a payload listing from Empathy, which, due to the extraneous 
        whitespace, will not be parsed correctly by iksemel:
        
        <iq from='dbrooksjab@235-22-24-10/Telepathy' to='astjab@235-22-24-10/asterisk' type='set' id='542757715704'> <session xmlns='http://www.google.com/session' initiator='dbrooksjab@235-22-24-10/Telepathy' type='initiate' id='1837267342'> <description xmlns='http://www.google.com/session/phone'> <payload-type clockrate='16000' name='speex' id='96'/>
         <payload-type clockrate='8000' name='PCMA' id='8'/>
         <payload-type clockrate='8000' name='PCMU' id='0'/>
         <payload-type clockrate='90000' name='MPA' id='97'/>
         <payload-type clockrate='16000' name='SIREN' id='98'/>
         <payload-type clockrate='8000' name='telephone-event' id='99'/>
        </description>
        </session>
        </iq>
      
      Review: http://reviewboard.digium.com/r/181/
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b90ee93f
  24. Feb 12, 2009
  25. Sep 12, 2008
    • Tilghman Lesher's avatar
      Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating · 08af5bb3
      Tilghman Lesher authored
      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
      08af5bb3
  26. Aug 21, 2008
  27. Jul 11, 2008
  28. Jun 02, 2008
  29. May 23, 2008
  30. May 22, 2008
    • Michiel van Baak's avatar
      - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause · f1e9371d
      Michiel van Baak authored
      - 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
      f1e9371d
  31. Apr 28, 2008
  32. Apr 24, 2008
  33. Apr 21, 2008
    • Jeff Peeler's avatar
      (closes issue #6113) · 41fd7a6a
      Jeff Peeler authored
      Reported by: oej
      Tested by: jpeeler
      
      This patch implements multiple parking lots for parked calls. The default parkinglot is used by default, however setting the channel variable PARKINGLOT in the dialplan will allow use of any other configured parkinglot. See configs/features.conf.sample for more details on setting up another non-default parkinglot. Also, one can (currently) set the default parkinglot to use in the driver configuration file via the parkinglot option.
      
      Patch initially written by oej, brought up to date and finalized by mvanbaak, and then stabilized and converted to astobj2 by me.
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      41fd7a6a
  34. Apr 04, 2008
Loading