Skip to content
Snippets Groups Projects
  1. Jan 06, 2014
  2. Jan 02, 2014
  3. Dec 20, 2013
    • Matthew Jordan's avatar
      res_pjsip: Add PJSIP CLI commands · b172d369
      Matthew Jordan authored
      Implements the following cli commands:
      pjsip list aors
      pjsip list auths
      pjsip list channels
      pjsip list contacts
      pjsip list endpoints
      pjsip show aor(s)
      pjsip show auth(s)
      pjsip show channels
      pjsip show endpoint(s)
      
      Also...
      Minor modifications made to the AMI command implementations to facilitate
      reuse.
      
      New function ast_variable_list_sort added to config.c and config.h to implement
      variable list sorting.
      
      (issue ASTERISK-22610)
      patches:
        pjsip_cli_v2.patch uploaded by george.joseph (License 6322)
      ........
      
      Merged revisions 404480 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b172d369
    • Matthew Jordan's avatar
      manager: bump version to 2.0.0 · c2fd2ac8
      Matthew Jordan authored
      AMI has received substantial updates over the past year. Not only has the
      syntax been vastly improved and made consistent (which entails many event
      changes), but the underlying things that those events convey have changed
      substantially as well.
      
      After some conversation in #asterisk-dev, it was agreed that this is a good
      time to jump to 2.
      
      At the same time, since ARI will most likely use semantic versioning, we
      might as well use that for AMI as well. That also affords us greater meaning
      for the AMI version.
      ........
      
      Merged revisions 404421 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c2fd2ac8
  4. Dec 19, 2013
    • 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
    • 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
    • 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
  5. Dec 18, 2013
  6. Dec 17, 2013
  7. Dec 16, 2013
  8. Dec 14, 2013
  9. Dec 13, 2013
  10. Dec 11, 2013
  11. Dec 09, 2013
  12. Dec 05, 2013
  13. Dec 03, 2013
  14. Dec 01, 2013
  15. Nov 28, 2013
  16. Nov 27, 2013
    • Richard Mudgett's avatar
      astdb: Tweak some doxygen comments. · 48c2b40f
      Richard Mudgett authored
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      48c2b40f
    • David M. Lee's avatar
      ari:Add application/json parameter support · fccb427c
      David M. Lee authored
      The patch allows ARI to parse request parameters from an incoming JSON
      request body, instead of requiring the request to come in as query
      parameters (which is just weird for POST and DELETE) or form
      parameters (which is okay, but a bit asymmetric given that all of our
      responses are JSON).
      
      For any operation that does _not_ have a parameter defined of type
      body (i.e. "paramType": "body" in the API declaration), if a request
      provides a request body with a Content type of "application/json", the
      provided JSON document is parsed and searched for parameters.
      
      The expected fields in the provided JSON document should match the
      query parameters defined for the operation. If the parameter has
      'allowMultiple' set, then the field in the JSON document may
      optionally be an array of values.
      
      (closes issue ASTERISK-22685)
      Review: https://reviewboard.asterisk.org/r/2994/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fccb427c
  17. Nov 26, 2013
  18. Nov 23, 2013
    • Kevin Harwell's avatar
      ARI: Implement device state API · ed483779
      Kevin Harwell authored
      Created a data model and implemented functionality for an ARI device state
      resource.  The following operations have been added that allow a user to
      manipulate an ARI controlled device:
      
      Create/Change the state of an ARI controlled device
      PUT    /deviceStates/{deviceName}&{deviceState}
      
      Retrieve all ARI controlled devices
      GET    /deviceStates
      
      Retrieve the current state of a device
      GET    /deviceStates/{deviceName}
      
      Destroy a device-state controlled by ARI
      DELETE /deviceStates/{deviceName}
      
      The ARI controlled device must begin with 'Stasis:'.  An example controlled
      device name would be Stasis:Example.  A 'DeviceStateChanged' event has also
      been added so that an application can subscribe and receive device change
      events.  Any device state, ARI controlled or not, can be subscribed to.
      
      While adding the event, the underlying subscription control mechanism was
      refactored so that all current and future resource subscriptions would be
      the same.  Each event resource must now register itself in order to be able
      to properly handle [un]subscribes.
      
      (issue ASTERISK-22838)
      Reported by: Matt Jordan
      Review: https://reviewboard.asterisk.org/r/3025/
      ........
      
      Merged revisions 403134 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ed483779
    • Kevin Harwell's avatar
      res_pjsip: AMI commands and events. · 05cbf8df
      Kevin Harwell authored
      Created the following AMI commands and corresponding events for res_pjsip:
      
      PJSIPShowEndpoints - Provides a listing of all pjsip endpoints and a few
                           select attributes on each.
        Events:
          EndpointList - for each endpoint a few attributes.
          EndpointlistComplete - after all endpoints have been listed.
      
      PJSIPShowEndpoint - Provides a detail list of attributes for a specified
                          endpoint.
        Events:
          EndpointDetail - attributes on an endpoint.
          AorDetail - raised for each AOR on an endpoint.
          AuthDetail - raised for each associated inbound and outbound auth
          TransportDetail - transport attributes.
          IdentifyDetail - attributes for the identify object associated with
                           the endpoint.
          EndpointDetailComplete - last event raised after all detail events.
      
      PJSIPShowRegistrationsInbound - Provides a detail listing of all inbound
                                      registrations.
        Events:
          InboundRegistrationDetail - inbound registration attributes for each
                                      registration.
          InboundRegistrationDetailComplete - raised after all detail records have
                                      been listed.
      
      PJSIPShowRegistrationsOutbound  - Provides a detail listing of all outbound
                                        registrations.
        Events:
          OutboundRegistrationDetail - outbound registration attributes for each
                                       registration.
          OutboundRegistrationDetailComplete - raised after all detail records
                                       have been listed.
      
      PJSIPShowSubscriptionsInbound - A detail listing of all inbound subscriptions
                                      and their attributes.
        Events:
          SubscriptionDetail - on each subscription detailed attributes
          SubscriptionDetailComplete - raised after all detail records have
                                       been listed.
      
      PJSIPShowSubscriptionsOutbound - A detail listing of all outboundbound
                                      subscriptions and their attributes.
        Events:
          SubscriptionDetail - on each subscription detailed attributes
          SubscriptionDetailComplete - raised after all detail records have
                                       been listed.
      
      (issue ASTERISK-22609)
      Reported by: Matt Jordan
      Review: https://reviewboard.asterisk.org/r/2959/
      ........
      
      Merged revisions 403131 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      05cbf8df
    • Joshua Colp's avatar
      ari: Add Snoop operation for spying/whispering on channels. · eda71268
      Joshua Colp authored
      The Snoop operation can be invoked on a channel to spy or
      whisper on it. It returns a channel that any channel operations
      can then be invoked on (such as record to do monitoring).
      
      (closes issue ASTERISK-22780)
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/3003/
      ........
      
      Merged revisions 403117 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      eda71268
  19. Nov 22, 2013
    • Kinsey Moore's avatar
      ARI: Don't leak implementation details · d9015a53
      Kinsey Moore authored
      This change prevents channels used as implementation details from
      leaking out to ARI. It does this by preventing creation of JSON blobs
      of channel snapshots created from those channels and sanitizing JSON
      blobs of bridge snapshots as they are created. This introduces a
      framework for excluding information from output targeted at Stasis
      applications on a consumer-by-consumer basis using channel sanitization
      callbacks which could be extended to bridges or endpoints if necessary.
      
      This prevents unhelpful error messages from being generated by
      ast_json_pack.
      
      This also corrects a bug where BridgeCreated events would not be
      created.
      
      (closes issue ASTERISK-22744)
      Review: https://reviewboard.asterisk.org/r/2987/
      Reported by: David M. Lee
      ........
      
      Merged revisions 403069 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d9015a53
  20. Nov 21, 2013
  21. Nov 16, 2013
Loading