Skip to content
Snippets Groups Projects
  1. Oct 23, 2015
  2. Oct 22, 2015
    • Mark Michelson's avatar
      format_cap: Detect vector allocation failures. · 5dd9e193
      Mark Michelson authored
      A crash was seen on a system that ran out of memory due to Asterisk not
      checking for vector allocation failures in format_cap.c. With this
      change, if either of the AST_VECTOR_INIT calls fail, we will return a
      value indicating failure.
      
      Change-Id: Ieb9c59f39dfde6d11797a92b45e0cf8ac5722bc8
      5dd9e193
  3. Oct 21, 2015
  4. Oct 20, 2015
    • Jonh Wendell's avatar
      main/cdr: Allow modules to modify CDR fields before dispatching them · 77780790
      Jonh Wendell authored
      This patch adds the functions
      
      	ast_cdr_modifier_register()
      	ast_cdr_modifier_unregister()
      
      That work much like ast_cdr_register() and ast_cdr_unregister().
      
      Modules registered will be given a chance to modify (or to do whatever
      they want) CDR fields just before they are passed to registered engines.
      
      Thus, for instance, if a module change the "userfield" field of a CDR,
      the modified value will be passed to every registered CDR backend for
      logging.
      
      ASTERISK-25479 #close
      
      Change-Id: If11d8fd19ef89b1a66ecacf1201e10fcf86ccd56
      77780790
    • Matt Jordan's avatar
      contrib/scripts/autosupport: Update for Asterisk 13 · b9bd249a
      Matt Jordan authored
      This patch adds some minor tweaks for autosupport to update it for Asterisk 13.
      This includes:
      * Finally removing most references to Zaptel
      * Adding support for some additional 'core' commands, and fixing nomenclature
        that generally hasn't been used for some time
      * Adding some PJSIP/SIP commands to gather endpoints/peers and active channels
      
      Change-Id: Ic997b418cbd9313588b6608e50f47b0ce6f4f1f1
      (cherry picked from commit 9fc9777f)
      b9bd249a
  5. Oct 17, 2015
  6. Oct 16, 2015
    • Matt Jordan's avatar
      Merge topic 'ASTERISK-25461' · 2581e460
      Matt Jordan authored
      * changes:
        config.c: Fix off-nominal memory leak.
        config.c: Fix potential memory corruption after [section](+).
        config.c: Fix #include after [section](+).
      2581e460
  7. Oct 15, 2015
  8. Oct 14, 2015
    • Richard Mudgett's avatar
      res_config_pgsql.c: Fix deadlock loading realtime configuration. · d799bcf3
      Richard Mudgett authored
      On v13, loading several thousand PJSIP endpoints on Asterisk start causes
      a deadlock most of the time.
      
      Thanks to mdu113 for discovering that there was a call to pgsql_exec() not
      protected by the pgsql_lock reentrancy lock.
      
      {quote}
      I believe a code path exists that attempts to use pgsql connection without
      locking pgsql_lock.  I believe what happens during that deadlock that I
      see is two concurrent threads are both attempting to send query to pgsql,
      one of the thread is using a code path without locking pgsql_lock.  If
      they managed to send queries at the same time, it seems postgres ignores
      one of the queries and replies only to the one of them.  If it happens so
      that the thread holding the lock didn't receive the reply it will wait for
      it (and hold the lock) forever (or at least for very long time), thus
      completely blocking all access to db.
      {quote}
      
      * Added missing reentrancy locking around pgsql_exec() in find_table().
      
      * Moved unlock of pgsql_lock in unload_module() to avoid locking inversion
      between the psql_tables list lock and the pgsql_lock.
      
      ASTERISK-25455 #close
      Reported by:  mdu113
      Patches:
            res_config_pgsql.c-connlock2.diff (license #5543) patch uploaded by mdu113
      
      Change-Id: Id9e7cdf8a3b65ff19964b0cf942ace567938c4e2
      d799bcf3
  9. Oct 13, 2015
  10. Oct 12, 2015
    • Richard Mudgett's avatar
      config.c: Fix off-nominal memory leak. · 984f100d
      Richard Mudgett authored
      Change-Id: I06e346e9a5c63cc5071e7eda537310c4b43bffe0
      984f100d
    • Richard Mudgett's avatar
      config.c: Fix potential memory corruption after [section](+). · 99512557
      Richard Mudgett authored
      The memory corruption could happen if the [section](+) is the last section
      in the file with trailing comments.  In this case process_text_line() has
      left *last_cat is set to newcat and newcat is destroyed.
      
      Change-Id: I0d1d999f553986f591becd000e7cc6ddfb978d93
      99512557
    • Richard Mudgett's avatar
      config.c: Fix #include after [section](+). · c1ed11ee
      Richard Mudgett authored
      An #include right after a [section](+) would associate any variable
      assignments before a new section in the #include with the wrong section.
      
      * Fix section association by setting the current section to the appended
      section.
      
      * Fix '+' and '!' section flag interaction corner case depending upon
      which flag came first.  If the '!' came first then it would be ignored.
      If the '!' came after then it would affect the appended section.  The '!'
      will now no longer be ignored.
      
      ASTERISK-25461 #close
      Reported by: Sean Pimental
      
      Change-Id: Ic9d3191c8758048e2cbce6432f854b32531731c3
      c1ed11ee
  11. Oct 10, 2015
  12. Oct 09, 2015
  13. Oct 08, 2015
  14. Oct 07, 2015
    • Richard Mudgett's avatar
      res_pjsip: Fix deadlock when sending out-of-dialog requests. · 34d7fa6c
      Richard Mudgett authored
      The struct send_request_wrapper has a pjsip lock associated with it that
      is created non-recursive.  There is a code path for the struct
      send_request_wrapper lock that will attempt to lock it recursively.  The
      reporter's deadlock showed that the thread calling endpt_send_request()
      deadlocked itself right after the wrapper object got created.
      
      Out-of-dialog requests such as MESSAGE, qualify OPTIONS, and unsolicited
      MWI NOTIFY messages can hit this deadlock.
      
      * Replaced the struct send_request_wrapper pjsip lock with the mutex lock
      that can come with an ao2 object since all of Asterisk's mutexes are
      recursive.  Benefits include removal of code maintaining the pjsip
      non-recursive lock since ao2 objects already know how to maintain their
      own lock and the lock will show up in the CLI "core show locks" output.
      
      ASTERISK-25435 #close
      Reported by: Dmitriy Serov
      
      Change-Id: I458e131dd1b9816f9e963f796c54136e9e84322d
      34d7fa6c
    • Joshua Colp's avatar
    • StefanEng86's avatar
      res/res_rtp_asterisk.c: Fix incorrect assignment of frame->subclass.frame_ending · cc131832
      StefanEng86 authored
      In ast_rtp_read, the value of the variable 'mark' which we try to assign to a
      frame->subclass.frame_ending may be 0, 1 or (1<<23), but we should translate
      it to 0 or 1.
      
      ASTERISK-25451 #close
      Change-Id: I53bdf5c026041730184a6a809009c028549ce626
      cc131832
    • Ivan Poddubny's avatar
      func_presencestate: Return "not_set" when no data is set in AstDB · c944263e
      Ivan Poddubny authored
      Return AST_PRESENCE_NOT_SET when CustomPresence AstDB key does not
      exist, i.e. when a new CustomPresence is added in the dialplan.
      
      ASTERISK-25400 #close
      Reported by: Andrew Nagy
      
      Change-Id: I6fb17b16591b5a55fbffe96f3994ec26b1b1723a
      c944263e
    • Matt Jordan's avatar
      res/res_rtp_asterisk: Fix assignment after ao2 decrement · 4bf395e8
      Matt Jordan authored
      When we decide we will no longer schedule an RTCP write, we remove the
      reference to the RTP instance, then assign -1 to the stored scheduler ID
      in case something else comes along and wants to see if anything is scheduled.
      
      That scheduler ID is on the RTP instance. After 60a9172d was merged to
      fix the regression introduced by 3cf0f293, this improper assignment on a
      potentially destroyed object started getting tripped on the build agents.
      
      Frankly, this should have been crashing a lot more often earlier. I can only
      assume that the timing was changed just enough by both changes to start
      actually hitting this problem.
      
      As it is, simply moving the assignment prior to the ao2 deference is sufficient
      to keep the RTP instance from being referenced when it is very, truly,
      aboslutely dead.
      
      (Note that it is still good practice to assign -1 to the scheduler ID when we
      know we won't be scheduling it again, as the ao2 deref *may* not always destroy
      the ao2 object.)
      
      ASTERISK-25449
      
      Change-Id: Ie6d3cb4adc7b1a6c078b1c38c19fc84cf787cda7
      4bf395e8
  15. Oct 06, 2015
    • Florian Sauerteig's avatar
      chan_sip: Fix port parsing for IPv6 addresses in SIP Via headers. · 3ec9cf7d
      Florian Sauerteig authored
      If a Via header containes an IPv6 address and a port number is ommitted,
      as it is the standard port, we now leave the port empty and to not set it
      to the value after the first colon of the IPv6 address.
      
      ASTERISK-25443 #close
      
      Change-Id: Ie3c2f05471cd006bf04ed15598589c09577b1e70
      3ec9cf7d
    • Richard Mudgett's avatar
      chan_pjsip: Fix crash on reINVITE before initial INVITE completes. · 8fe9350b
      Richard Mudgett authored
      Apparently some endpoints attempt to send a reINVITE before completing the
      initial INVITE transaction.  In this case PJSIP responds appropriately to
      the reINVITE with a 491 INVITE request pending.  Unfortunately chan_pjsip
      is using the initial INVITE transaction state to determine if an INVITE is
      the initial INVITE or a reINVITE.  Since the initial INVITE transaction
      has not been confirmed yet chan_pjsip thinks the reINVITE is an initial
      INVITE and starts another PBX thread on the channel.  The extra PBX thread
      ensures that hilarity ensues.
      
      * Fix checks for a reINVITE on incoming requests to look for the presence
      of a to-tag instead of the initial INVITE transaction state.
      
      * Made caller_id_incoming_request() determine what to do if there is a
      channel on the session or not.  After a channel is created it is too late
      to just store the new party id on the session because the session's party
      id has already been copied to the channel's caller id.
      
      ASTERISK-25404 #close
      Reported by: Chet Stevens
      
      Change-Id: Ie78201c304a2b13226f3a4ce59908beecc2c68be
      8fe9350b
    • Matt Jordan's avatar
Loading