Skip to content
Snippets Groups Projects
  1. Apr 03, 2009
    • Tilghman Lesher's avatar
      Compatibility fix for glibc 2.4 · 4aeb36b1
      Tilghman Lesher authored
      (Closes issue #14820)
      Reported by: phsultan
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      4aeb36b1
    • Mark Michelson's avatar
      Fix the ability to retrieve voicemail messages from IMAP. · 5c53b222
      Mark Michelson authored
      A recent change made interactive vm_states no longer get
      added to the list of vm_states and instead get stored in
      thread-local storage.
      
      In trunk and all the 1.6.X branches, the problem is that
      when we search for messages in a voicemail box, we would
      attempt to update the appropriate vm_state struct by directly
      searching in the list of vm_states instead of using the
      get_vm_state_by_imap_user function. This meant we could not
      find the interactive vm_state that we wanted.
      
      (closes issue #14685)
      Reported by: BlargMaN
      Patches:
            14685.patch uploaded by mmichelson (license 60)
      Tested by: BlargMaN, qualleyiv, mmichelson
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      5c53b222
    • Russell Bryant's avatar
      Merged revisions 186229 via svnmerge from · fde695bb
      Russell Bryant authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
      r186229 | russell | 2009-04-02 20:57:44 -0500 (Thu, 02 Apr 2009) | 21 lines
      
      Fix a memory leak in cdr_radius.
      
      I came across this while doing some testing of my ast_channel_ao2 branch.
      After running a test overnight that generated over 5 million calls, Asterisk
      had taken up about 1 GB of my system memory.  So, I re-ran the test with
      MALLOC_DEBUG turned on.  However, it showed no leaks in Asterisk during the
      test, even though Asterisk was still consuming it somehow.
      
      Instead, I turned to valgrind, which when run with --leak-check=full, told
      me exactly where the leak came from, which was from allocations inside the
      radiusclient-ng library.  This explains why MALLOC_DEBUG did not report it.
      
      After a bit of analysis, I found that we were leaking a little bit of memory
      every time a CDR record was passed to cdr_radius.
      
      I don't actually have a radius server set up to receive CDR records.  However,
      I always have my development systems compile and install all modules.  In
      addition to making sure there are not build errors across modules, always
      loading modules helps find bugs like this, too, so it is strongly recommend for
      all developers.
      
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fde695bb
  2. Apr 02, 2009
  3. Apr 01, 2009
  4. Mar 31, 2009
    • Kevin P. Fleming's avatar
      ignore copied (generated) file · d6b3031f
      Kevin P. Fleming authored
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d6b3031f
    • Mark Michelson's avatar
      Fix trunk's compilation. · f43159ba
      Mark Michelson authored
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f43159ba
    • Mark Michelson's avatar
      Merged revisions 185599 via svnmerge from · 5c0d934e
      Mark Michelson authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r185599 | mmichelson | 2009-03-31 17:00:01 -0500 (Tue, 31 Mar 2009) | 6 lines
        
        Fix crash that would occur if an empty member was specified in queues.conf.
        
        (closes issue #14796)
        Reported by: pida
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      5c0d934e
    • Kevin P. Fleming's avatar
      Optimizations to the stringfields API · a0090681
      Kevin P. Fleming authored
      This patch provides a number of optimizations to the stringfields API, focused around saving (not wasting) memory whenever possible. Thanks to Mark Michelson for inspiring this work and coming up with the first two optimizations that are represented here:
      
      Changes:
      
      - Cleanup of some code, fix incorrect doxygen comments
      
      - When a field is emptied or replaced with a new allocation, decrease the amount of 'active' space in the pool it was held in; if that pool reaches zero active space, and is not the current pool, then free it as it is no longer in use
      
      - When allocating a pool, try to allocate a size that will fit in a 'standard' malloc() allocation without wasting space
      
      - When allocating space for a field, store the amount of space in the two bytes immediately preceding the field; this eliminates the need to call strlen() on the field when overwriting it, and more importantly it 'remembers' the amount of space the field has available, even if a shorter string has been stored in it since it was allocated
      
      - Don't automatically double the size of each successive pool allocated; it's wasteful
      
      http://reviewboard.digium.com/r/165/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      a0090681
    • Mark Michelson's avatar
      Blocked revisions 185531 via svnmerge · d18a0cec
      Mark Michelson authored
      ........
        r185531 | mmichelson | 2009-03-31 15:55:47 -0500 (Tue, 31 Mar 2009) | 3 lines
        
        Use AST_SCHED_DEL_SPINLOCK instead of manually using the logic.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d18a0cec
    • Mark Michelson's avatar
      Merged revisions 185468 via svnmerge from · de8a0946
      Mark Michelson authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r185468 | mmichelson | 2009-03-31 14:45:30 -0500 (Tue, 31 Mar 2009) | 8 lines
        
        Fix Russian voicemail intro to say the word "messages" properly.
        
        (closes issue #14736)
        Reported by: chappell
        Patches:
              voicemail_no_messages.diff uploaded by chappell (license 8)
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      de8a0946
    • Russell Bryant's avatar
      Improve performance of the code handling the frame queue in chan_iax2. · 8dfcd7e4
      Russell Bryant authored
      In my tests that exercised full frame handling in chan_iax2, the version with
      these changes took 30% to 40% of the CPU time compared to the same test of
      Asterisk trunk before these modifications.
      
      While doing some profiling for <http://reviewboard.digium.com/r/205/>,
      one function that caught my eye was network_thread() in chan_iax2.c.
      After the things that I was working on there, it was the next target
      for analysis and optimization.  I used oprofile's source annotation
      functionality and found that the loop traversing the frame queue in
      network_thread() was to blame for the excessive CPU cycle consumption.
      
      The frame_queue in chan_iax2 previously held all frames that either were
      pending transmission or had been transmitted and are still pending
      acknowledgment.
      
      In network_thread(), the previous code would go back through the main
      for loop after reading a single incoming frame or after being signaled
      because a frame had been queued up for initial transmission.  In each
      iteration of the loop, it traverses the entire frame queue looking for
      frames that need to be transmitted.  On a busy server, this could easily
      be quite a few entries.
      
      This patch is actually quite simple.  The frame_queue has become only a list
      of frames pending acknowledgment.  Frames that need to be transmitted are
      queued up to a dedicated transmit thread via the taskprocessor API.
      
      As a result, the code in network_thread() becomes much simpler, as its only
      job is to read incoming frames.
      
      In addition to the previously described changes, this patch includes some
      additional changes to the frame_queue.  Instead of one big frame_queue, now
      there is a list per call number to further reduce wasted list traversals.
      The biggest impact of this change is in socket_process().
      
      For additional details on testing and test results, see the review request.
      
      Review: http://reviewboard.digium.com/r/212/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8dfcd7e4
    • 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
    • Mark Michelson's avatar
      Blocked revisions 185298 via svnmerge · 362dd833
      Mark Michelson authored
      ........
        r185298 | mmichelson | 2009-03-31 10:34:05 -0500 (Tue, 31 Mar 2009) | 10 lines
        
        Fix some state_interface stuff that was in trunk but not in the backport to 1.4.
        
        Issue #14359 was fixed between the time that I posted the review of the backport
        of the state interface change for 1.4. This merges the changes from that issue
        back into 1.4.
        
        (closes issue #14359)
        Reported by: francesco_r
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      362dd833
    • Russell Bryant's avatar
      Don't free() an astobj2 object. · c9c8758d
      Russell Bryant authored
      (closes issue #14672)
      Reported by: makoto
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c9c8758d
    • Joshua Colp's avatar
      Merged revisions 185196 via svnmerge from · d40f86db
      Joshua Colp authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r185196 | file | 2009-03-31 11:06:39 -0300 (Tue, 31 Mar 2009) | 8 lines
        
        Fix crash when moving audiohooks between channels.
        
        Handle the scenario where we are called to move audiohooks between channels
        and the source channel does not actually have any on it.
        
        (closes issue #14734)
        Reported by: corruptor
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d40f86db
  5. Mar 30, 2009
    • Richard Mudgett's avatar
      Merged revisions 185121 via svnmerge from · 9fd753a3
      Richard Mudgett authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r185121 | rmudgett | 2009-03-30 15:40:11 -0500 (Mon, 30 Mar 2009) | 1 line
        
        Update the channel allocation method documentation.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9fd753a3
    • Richard Mudgett's avatar
      Merged revisions 185120 via svnmerge from · 5e707f2d
      Richard Mudgett authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r185120 | rmudgett | 2009-03-30 15:38:11 -0500 (Mon, 30 Mar 2009) | 19 lines
        
        Make chan_misdn BRI TE side normally defer channel selection to the NT side.
        
        Channel allocation collisions are not handled by chan_misdn very well.
        This patch simply avoids the problem for BRI only.
        
        For PRI, allocation collisions are still possible but less likely since
        there are simply more channels available and each end could use a different
        allocation strategy.
        
        misdn.conf options available:
        te_choose_channel - Use to force the TE side to allocate channels.
        method - Specify the channel allocation strategy.
        
        (closes issue #13488)
        Reported by: Christian_Pinedo
        Patches:
              isdn_lib.patch.txt uploaded by crich
        Tested by: crich, siepkes, festr
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      5e707f2d
    • Mark Michelson's avatar
      Merged revisions 185031 via svnmerge from · c4e3bfb7
      Mark Michelson authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r185031 | mmichelson | 2009-03-30 11:17:35 -0500 (Mon, 30 Mar 2009) | 39 lines
        
        Fix queue weight behavior so that calls in low-weight queues are not inappropriately blocked.
        
        (This is copied and pasted from the review request I made for this patch)
        
        Asterisk has some odd behavior when queue weights are used. The current logic used when
        potentially calling a queue member is:
        
        If the member we are going to call is part of another queue and _that other queue has any 
        callers in it_ and has a higher weight than the queue we are calling from, then don't try 
        to contact that member. The issue here is what I have marked with underscores. If the 
        higher-weighted queue has any callers in it at all, then the queue member will be unreachable 
        from the lower-weighted queue. This has the potential to be really really bad if using a 
        queue strategy, such as leastrecent or fewestcalls, with the potential to call the same 
        member repeatedly.
        
        The fix proposed by garychen on issue 13220 is very simple and, as far as I can see, works 
        well for this situation. With this set of changes, the logic used becomes:
        
        If the member we are going to call is part of another queue, the other queue has a higher 
        weight than the queue we are calling from, and the higher weight queue has at least as many 
        callers as available members, then do not try to contact the queue member. If the higher 
        weighted queue has fewer callers than available members, then there is no reason to deny 
        the call to this member since the other queue can afford to spare a member.
        
        Since the fix involved writing a generic function for determining the number of available 
        members in the queue, I also modified the is_our_turn function to make use of the new 
        num_available_members function to determine if it is our turn to try calling a member. There 
        is one small behavior change. Before writing this patch, if you had autofill disabled, then 
        if you were the head caller in a queue, you would automatically be told that it was your 
        turn to try calling a member. This did not take into account whether there were actually any 
        queue members available to take the call. Now we actually make sure there is at least one 
        member available to take the call if autofill is disabled.
        
        (closes issue #13220)
        Reported by: garychen
        
        Review: http://reviewboard.digium.com/r/202/
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c4e3bfb7
    • Mark Michelson's avatar
      Blocked revisions 184980 via svnmerge · 0abfe4e9
      Mark Michelson authored
      ........
        r184980 | mmichelson | 2009-03-30 10:23:59 -0500 (Mon, 30 Mar 2009) | 22 lines
        
        Backport state interface changes to app_queue from trunk.
        
        After several issues raised on the Asterisk bugtracker against
        the 1.4 branch were determined to be fixable with the state interface
        change available in the 1.6.X series, it finally came time to just
        suck it up and backport the change.
        
        For a detailed explanation of what this change entails, the original
        trunk commit for this feature may be found here:
        
        http://svn.digium.com/view/asterisk?view=revision&revision=97203
        
        In addition, the details for the use of this change to fix the problems
        stated in issue #12970 may be found in the review request I made for
        this change. It is linked below.
        
        (closes issue #12970)
        Reported by: edugs15
        
        Review: http://reviewboard.digium.com/r/116
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0abfe4e9
    • Joshua Colp's avatar
      Merged revisions 184947 via svnmerge from · aa056be6
      Joshua Colp authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r184947 | file | 2009-03-30 11:35:47 -0300 (Mon, 30 Mar 2009) | 14 lines
        
        Improve our handling of T38 in the initial INVITE from a device.
        
        We now answer with matching media streams to what is requested. If an INVITE
        is received with both a T38 and RTP media stream this means we answer with both.
        For any outgoing calls created as a result of this inbound one no T38 is requested
        in the initial INVITE. Instead if we start receiving udptl packets we trigger a
        reinvite on the outbound side.
        
        (closes issue #12437)
        Reported by: marsosa
        Tested by: pinga-fogo, okrief, file, afu
        
        Review: http://reviewboard.digium.com/r/208/
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      aa056be6
    • Russell Bryant's avatar
      Fix build error when chan_h323 is not being built. · 3ec3742a
      Russell Bryant authored
      (reported by cai1982 in #asterisk-dev)
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      3ec3742a
  6. Mar 29, 2009
  7. Mar 27, 2009
Loading