Skip to content
Snippets Groups Projects
  1. Dec 19, 2013
    • Joshua Colp's avatar
      res_pjsip_session: Fix SDP negotiation when resending an INVITE with authentication. · 8402cd4c
      Joshua Colp authored
      The process for resending an INVITE with authentication involves restarting the UAC
      session. We were incorrectly passing in that a new offer is being sent, causing the
      SDP negotiation to get into a (technically speaking) funky state.
      ........
      
      Merged revisions 404369 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8402cd4c
    • Mark Michelson's avatar
      Fix a deadlock that occurred due to a conflict of masquerades. · 1b91ee6c
      Mark Michelson authored
      For the explanation, here is a copy-paste of the review board explanation:
      
      Initially, it was discovered that performing an attended transfer of a
      multiparty bridge with a PJSIP channel would cause a deadlock. A PBX thread
      started a masquerade and reached the point where it was calling the fixup()
      callback on the "original" channel. For chan_pjsip, this involves pushing a
      synchronous task to the session's serializer. The problem was that a task ahead
      of the fixup task was also attempting to perform a channel masquerade. However,
      since masquerades are designed in a way to only allow for one to occur at a
      time, the task ahead of the fixup could not continue until the masquerade
      already in progress had completed. And of course, the masquerade in progress
      could not complete until the task ahead of the fixup task had completed.
      Deadlock.
      
      The initial fix was to change the fixup task to be asynchronous. While this
      prevented the deadlock from occurring, it had the frightful side effect of
      potentially allowing for tasks in the session's serializer to operate on a
      zombie channel.
      
      Taking a step back from this particular deadlock, it became clear that the
      problem was not really this one particular issue but that masquerades
      themselves needed to be addressed. A PJSIP attended transfer operation calls
      ast_channel_move(), which attempts to both set up and execute a masquerade. The
      problem was that after it had set up the masquerade, the PBX thread had swooped
      in and tried to actually perform the masquerade. Looking at changes that had
      been made to Asterisk 12, it became clear that there never is any time now that
      anyone ever wants to set up a masquerade and allow for the channel thread to
      actually perform the masquerade. Everyone always is calling ast_channel_move(),
      performs the masquerade itself before returning.
      
      In this patch, I have removed all blocks of code from channel.c that will
      attempt to perform a masquerade if ast_channel_masq() returns true. Now, there
      is no distinction between setting up a masquerade and performing the
      masquerade. It is one operation. The only remaining checks for
      ast_channel_masq() and ast_channel_masqr() are in ast_hangup() since we do not
      want to interrupt a masquerade by hanging up the channel. Instead, now
      ast_hangup() will wait for a masquerade to complete before moving forward with
      its operation.
      
      The ast_channel_move() function has been modified to basically in-line the
      logic that used to be in ast_channel_masquerade(). ast_channel_masquerade() has
      been killed off for real. ast_channel_move() now has a lock associated with it
      that is used to prevent any simultaneous moves from occurring at once. This
      means there is no need to make sure that ast_channel_masq() or
      ast_channel_masqr() are already set on a channel when ast_channel_move() is
      called. It also means the channel container lock is not pulling double duty by
      both keeping the container locked and preventing multiple masquerades from
      occurring simultaneously.
      
      The ast_do_masquerade() function has been renamed to do_channel_masquerade()
      and is now internal to channel.c. The function now takes explicit arguments of
      which channels are involved in the masquerade instead of a single channel.
      While it probably is possible to do some further refactoring of this method, I
      feel that I would be treading dangerously. Instead, all I did was change some
      comments that no longer are true after this changeset.
      
      The other more minor change introduced in this patch is to res_pjsip.c to make
      ast_sip_push_task_synchronous() run the task in-place if we are already a SIP
      servant thread. This is related to this patch because even when we isolate the
      channel masquerade to only running in the SIP servant thread, we would still
      deadlock when the fixup() callback is reached since we would essentially be
      waiting forever for ourselves to finish before actually running the fixup. This
      makes it so the fixup is run without having to push a task into a serializer at
      all.
      
      (closes issue ASTERISK-22936)
      Reported by Jonathan Rose
      
      Review: https://reviewboard.asterisk.org/r/3069
      ........
      
      Merged revisions 404356 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      1b91ee6c
    • Richard Mudgett's avatar
      udptl: Dead code elimination. ast_udptl_bridge was not used. · 3ccd5dee
      Richard Mudgett authored
      Removing dead code starting with ast_udptl_bridge() eliminated the code in
      this change.
      
      Note: This code has actually been dead since Asterisk v1.4 when it was
      first put in.
      
      Review: https://reviewboard.asterisk.org/r/3079/
      ........
      
      Merged revisions 404354 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      3ccd5dee
    • Scott Griepentrog's avatar
      res_fax.c: crash on framehook with no dsp in fax detect · c061f634
      Scott Griepentrog authored
      In fax_detect_framehook() a null pointer reference can occur where a
      voice frame is processed but no dsp is attached to the fax detection
      structure.  The code block that rejects frames that detection cannot
      be processed on is checking for dsp but falls through when it should
      instead return, as this change implements.
      
      (closes issue ASTERISK-22942)
      Reported by: adomjan
      Review: https://reviewboard.asterisk.org/r/3076/
      ........
      
      Merged revisions 404351 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 404352 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c061f634
    • Richard Mudgett's avatar
      Voicemail: Remove mailbox identifier format (box@context) assumptions in the system. · e4803bbd
      Richard Mudgett authored
      This change is in preparation for external MWI support.
      
      Removed code from the system for normal mailbox handling that appends
      @default to the mailbox identifier if it does not have a context.  The
      only exception is the legacy hasvoicemail users.conf option.  The legacy
      option will only work for app_voicemail mailboxes.  The system cannot make
      any assumptions about the format of the mailbox identifer used by
      app_voicemail.
      
      chan_sip and chan_dahdi/sig_pri had the most changes because they both
      tried to interpret the mailbox identifier.  chan_sip just stored and
      compared the two components.  chan_dahdi actually used the box
      information.
      
      The ISDN MWI support configuration options had to be reworked because
      chan_dahdi was parsing the box@context format to get the box number.  As a
      result the mwi_vm_boxes chan_dahdi.conf option was added and is documented
      in the chan_dahdi.conf.sample file.
      
      Review: https://reviewboard.asterisk.org/r/3072/
      ........
      
      Merged revisions 404348 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e4803bbd
    • Scott Griepentrog's avatar
      astdb: crash in sqlite3 during shutdown · 2882c5f9
      Scott Griepentrog authored
      When Asterisk is shut down, the astdb_atexit() function releases
      (finalize) the previously initiated (prepared) SQL statements in
      sqlite3.  Another thread making a subsequent request can cause a
      crash in sqlite3.  This patch eliminates that issue by resetting
      the statement pointer after it is released/cleared.  The sqlite3
      code detects the null pointer, and aborts the operation cleanly.
      
      (closes issue AST-1265)
      Reported by: Alexander Hömig
      (closes issue ASTERISK-22350)
      Reported by: Birger "WIMPy" Harzenetter
      Review: https://reviewboard.asterisk.org/r/3078/
      ........
      
      Merged revisions 404344 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 404345 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      2882c5f9
    • Joshua Colp's avatar
      channel: Add a missing ast_channel_unlock when allocating a Surrogate channel. · eb235ad0
      Joshua Colp authored
      ........
      
      Merged revisions 404332 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      eb235ad0
    • Alexandr Anikin's avatar
      Handle temporary failures on gk registration · 1370d405
      Alexandr Anikin authored
      Introduce new 'stopped' state for gk client and restart gk client
      on failures
      Remove ooh323 stack command lock as it is not need now.
      (closes issue ASTERISK-21960)
      Reported by: Dmitry Melekhov
      Patches:
      	ASTERISK-21960.patch
      	ASTERISK-21960-stacklockup-2.patch
      Tested by: Dmitry Melekhov
      ........
      
      Merged revisions 404318 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 404320 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      1370d405
    • Damien Wedhorn's avatar
      Fixup some skinny bugs causing Fracks and ao2 cleanup issues. · c2fd229f
      Damien Wedhorn authored
      Moved channel locking into setsubstate so that a process can complete
      working on a sub before another starts changing it. The existing code
      was causing some Fracks with schedule deletion.
      
      Removed multiple rtp cleanup. Now only cleansup up once, fixing ao2 
      object cleanup issues.
      ........
      
      Merged revisions 404306 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c2fd229f
    • Matthew Jordan's avatar
      app_cdr,app_forkcdr,func_cdr: Synchronize with engine when manipulating state · 7e9febbf
      Matthew Jordan authored
      When doing the rework of the CDR engine that pushed all of the logic into cdr.c
      and made it respond to changes in channel state over Stasis, we knew that
      accessing the CDR engine from the dialplan would be "slightly"
      non-deterministic. Dialplan threads would be accessing CDRs while Stasis
      threads would be updating the state of said CDRs - whereas in the past,
      everything happened on the dialplan threads. Tests have shown that "slightly"
      is in reality "very".
      
      This patch synchronizes things by making the dialplan applications/functions
      that manipulate CDRs do so over Stasis. ForkCDR, NoCDR, ResetCDR, CDR, and
      CDR_PROP now all use Stasis to send their requests over to the CDR engine,
      and synchronize on the channel Stasis topic via a subscription so that they
      return their values/control to the dialplan at the appropriate time.
      
      While going through this, the following changes were also made:
       * DISA, which can reset the CDR when a user successfully authenticates, now
         just uses the ResetCDR app to do this. This prevents having to duplicate
         the same Stasis synchronization logic in that application.
       * Answer no longer disables CDRs. It actually didn't work anyway - calling
         DISABLE on the channel's CDR doesn't stop the CDR from getting the Answer
         time - it just kills all CDRs on that channel, which isn't what the caller
         would intend.
      
      (closes issue ASTERISK-22884)
      (closes issue ASTERISK-22886)
      
      Review: https://reviewboard.asterisk.org/r/3057/
      ........
      
      Merged revisions 404294 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7e9febbf
    • Damien Wedhorn's avatar
      Fixup skinny registration following network issues. · af723c65
      Damien Wedhorn authored
      On session registration, if device is already reporting that it is
      connected to a device, an innocuous packet (update time) is sent to
      the already connected device. If the tcp connection is down, the
      device will be unregistered and the new connection allowed.
      
      Without this patch, network issues can see a situation where a device
      can not reregister until after 3*timeout.
      ........
      
      Merged revisions 404292 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      af723c65
  2. Dec 18, 2013
  3. Dec 17, 2013
  4. Dec 16, 2013
  5. Dec 15, 2013
  6. Dec 14, 2013
  7. Dec 13, 2013
Loading