Skip to content
Snippets Groups Projects
  1. Nov 14, 2016
    • Sebastien Duthil's avatar
      res_ari: Add support for channel variables in ARI events. · c6d755de
      Sebastien Duthil authored
      This works the same as for AMI manager variables. Set
      "channelvars=foo,bar" in your ari.conf general section, and then the
      channel variables "foo" and "bar" (along with their values), will
      appear in every Stasis websocket channel event.
      
      ASTERISK-26492 #close
      patches:
        ari_vars.diff submitted by Mark Michelson
      
      Change-Id: I5609ba239259577c0948645df776d7f3bc864229
      c6d755de
  2. Oct 20, 2016
    • Mark Michelson's avatar
      ARI: Add duplicate channel ID checking for channel creation. · 3bd76dd6
      Mark Michelson authored
      This is similar to what is done for origination, but for the 14 and up
      channel creation method. When attempting to create a channel, if a
      channel ID is specified and a channel already exists with that ID, then
      a 409 is returned.
      
      Change-Id: I77f9253278c6947939c418073b6b31065489187c
      3bd76dd6
    • Mark Michelson's avatar
      ARI: Detect duplicate channel IDs · e459b8da
      Mark Michelson authored
      ARI and AMI allow for an explicit channel ID to be specified
      when originating channels. Unfortunately, there is nothing in
      place to prevent someone from using the same ID for multiple
      channels. Further complicating things, adding ID validation to channel
      allocation makes it impossible for ARI to discern why channel allocation
      failed, resulting in a vague error code being returned.
      
      The fix for this is to institute a new method for channel errors to be
      discerned. The method mirrors errno, in that when an error occurs, the
      caller can consult the channel errno value to determine what the error
      was. This initial iteration of the feature only introduces "unknown" and
      "channel ID exists" errors. However, it's possible to add more errors as
      needed.
      
      ARI uses this feature to determine why channel allocation failed and can
      return a 409 error during origination to show that a channel with the
      given ID already exists.
      
      ASTERISK-26421
      
      Change-Id: Ibba7ae68842dab6df0c2e9c45559208bc89d3d06
      e459b8da
  3. Oct 17, 2016
    • Matt Jordan's avatar
      res/ari: Add the Asterisk EID field to outgoing events · dd5129d8
      Matt Jordan authored
      This patch adds the Asterisk EID field to all outgoing ARI events.
      Because this field should be added to all events as they are
      transmitted, it is appended to the JSON message just prior to it being
      handed off to the application message handler. This makes it somewhat
      resilient to both new events being added to ARI, as well as other
      potential event transport mechanisms.
      
      ASTERISK-26470 #close
      
      Change-Id: Ieff0ecc24464e83f3f44e9c3e7bd9a5d70b87a1d
      dd5129d8
  4. Aug 31, 2016
    • Jean Aunis's avatar
      resource_channels.c: add hangup reason "answered_elsewhere". · 91993eba
      Jean Aunis authored
      In ARI, the channels API allows to hangup a channel with a hangup reason.
      This commit adds a new reason "answered_elsewhere".
      When using a SIP channel, this will eventually allow Asterisk to add a proper
      "Reason" header to a CANCEL message.
      
      ASTERISK-26321
      
      Change-Id: Ia97675bd4acd6a7f58eb467953dfb94559f6583d
      91993eba
  5. Jul 24, 2016
    • Joshua Colp's avatar
      ari: Update version. · 9db420c6
      Joshua Colp authored
      New functionality has been added so the version has been
      bumped to one over the 13 version.
      
      Change-Id: I5d30077f62640c0ac83599b4e9a9b657bf184f69
      9db420c6
  6. Jun 09, 2016
    • Mark Michelson's avatar
      ARI: Ensure proper channel state on operations. · 1fd3a784
      Mark Michelson authored
      ARI was recently outfitted with operations to create and dial channels.
      This leads to the ability to try funny stuff. You could create a channel
      and then immediately try to play back media on it. You could create a
      channel, dial it, and while it is ringing attempt to make it continue in
      the dialplan.
      
      This commit attempts to fix this by adding a channel state check to
      operations that should not be able to operate on outbound channels that
      have not yet answered. If a channel is in an invalid state, we will send
      a 412 response.
      
      ASTERISK-26047 #close
      Reported by Mark Michelson
      
      Change-Id: I2ca51bf9ef2b44a1dc5a73f2d2de35c62c37dfd8
      1fd3a784
  7. Jun 03, 2016
    • George Joseph's avatar
      ari/resource_channels: Add 'formats' to channel create/originate · a2f820e8
      George Joseph authored
      If you create a local channel and don't specify an originator channel
      to take capabilities from, we automatically add all audio formats to
      the new channel's capabilities. When we try to make the channel
      compatible with another, the "best format" functions pick the best
      format available, which in this case will be slin192.  While this is
      great for preserving quality, it's the worst for performance and
      overkill for the vast majority of applications.
      
      In the absense of any other information, adding all formats is the
      correct thing to do and it's not always possible to supply an
      originator so a new parameter 'formats' has been added to the channel
      create/originate functions. It's just a comma separated list of formats
      to make availalble for the channel. Example: "ulaw,slin,slin16".
      'formats' and 'originator' are mutually exclusive.
      
      To facilitate determination of format names, the format name has been
      added to "core show codecs".
      
      ASTERISK-26070 #close
      
      Change-Id: I091b23ecd41c1b4128d85028209772ee139f604b
      a2f820e8
  8. May 20, 2016
    • Matt Jordan's avatar
      ARI: Add the ability to download the media associated with a stored recording · e773e3a9
      Matt Jordan authored
      This patch adds a new feature to ARI that allows a client to download
      the media associated with a stored recording. The new route is
      /recordings/stored/{name}/file, and transmits the underlying binary file
      using Asterisk's HTTP server's underlying file transfer facilities.
      
      Because this REST route returns non-JSON, a few small enhancements had
      to be made to the Python Swagger generation code, as well as the
      mustache templates that generate the ARI bindings.
      
      ASTERISK-26042 #close
      
      Change-Id: I49ec5c4afdec30bb665d9c977ab423b5387e0181
      e773e3a9
  9. May 17, 2016
    • Matt Jordan's avatar
      ARI: Add the ability to play multiple media URIs in a single operation · 03d88b56
      Matt Jordan authored
      Many ARI applications will want to play multiple media files in a row to
      a resource. The most common use case is when building long-ish IVR prompts
      made up of multiple, smaller sound files. Today, that requires building a
      small state machine, listening for each PlaybackFinished event, and triggering
      the next sound file to play. While not especially challenging, it is tedious
      work. Since requiring developers to write tedious code to do normal activities
      stinks, this patch adds the ability to play back a list of media files to a
      resource.
      
      Each of the 'play' operations on supported resources (channels and bridges)
      now accepts a comma delineated list of media URIs to play. A single Playback
      resource is created as a handle to the entire list. The operation of playing
      a list is identical to playing a single media URI, save that a new event,
      PlaybackContinuing, is raised instead of a PlaybackFinished for each non-final
      media URI. When the entire list is finished being played, a PlaybackFinished
      event is raised.
      
      In order to help inform applications where they are in the list playback, the
      Playback resource now includes a new, optional attribute, 'next_media_uri',
      that contains the next URI in the list to be played.
      
      It's important to note the following:
       - If an offset is provided to the 'play' operations, it only applies to the
         first media URI, as it would be weird to skip n seconds forward in every
         media resource.
       - Operations that control the position of the media only affect the current
         media being played. For example, once a media resource in the list
         completes, a 'reverse' operation on a subsequent media resource will not
         start a previously completed media resource at the appropiate offset.
       - This patch does not add any new operations to control the list. Hopefully,
         user feedback and/or future patches would add that if people want it.
      
      ASTERISK-26022 #close
      
      Change-Id: Ie1ea5356573447b8f51f2e7964915ea01792f16f
      03d88b56
  10. Apr 05, 2016
    • Mark Michelson's avatar
      ARI: Add method to Dial a created channel. · abbb2edd
      Mark Michelson authored
      This adds a new ARI method that allows for you to dial a channel that
      you previously created in ARI.
      
      By combining this with the create method for channels, it allows for a
      workflow where a channel can be created, manipulated, and then dialed.
      The channel is under control of the ARI application during all stages of
      the Dial and can even be manipulated based on channel state changes
      observed within an ARI application.
      
      The overarching goal for this is to eventually be able to add a dialed
      channel to a Stasis bridge earlier than the "Up" state. However, at the
      moment more work is needed in the Dial and Bridge APIs in order to
      facilitate that.
      
      ASTERISK-25889 #close
      
      Change-Id: Ic6c399c791e66c4aa52454222fe4f8b02483a205
      abbb2edd
    • Mark Michelson's avatar
      ARI: Add method to create a new channel. · dd48d60c
      Mark Michelson authored
      This adds a new ARI method to the channels resource that allows for the
      creation of a new channel. The channel is created and then placed into
      the specified Stasis application.
      
      This is different from the existing originate method that creates a
      channel, dials it, and then places the answered channel into the
      dialplan or a Stasis application. This method does not attempt to call
      the channel at all. Dialing is left as a later step after channel
      creation. This allows for pre-dialing channel manipulation if desired.
      
      ASTERISK-25889
      
      Change-Id: I3c96a0aba914b08e39f6256371a5bd4c92cbded8
      dd48d60c
  11. Sep 22, 2015
    • Matt Jordan's avatar
      ARI: Add the ability to subscribe to all events · b99a7052
      Matt Jordan authored
      This patch adds the ability to subscribe to all events. There are two possible
      ways to accomplish this:
      (1) On initial WebSocket connection. This patch adds a new query parameter,
          'subscribeAll'. If present and True, Asterisk will subscribe the
          applications to all ARI events.
      (2) Via the applications resource. When subscribing in this manner, an ARI
          client should merely specify a blank resource name, i.e., 'channels:'
          instead of 'channels:12354'. This will subscribe the application to all
          resources of the 'channels' type.
      
      ASTERISK-24870 #close
      
      Change-Id: I4a943b4db24442cf28bc64b24bfd541249790ad6
      b99a7052
  12. Sep 21, 2015
    • Matt Jordan's avatar
      ARI: Add events for Contact and Peer Status changes · 5206aa9d
      Matt Jordan authored
      This patch adds support for receiving events regarding Peer status changes
      and Contact status changes. This is particularly useful in scenarios where
      we are subscribed to all endpoints and channels, where we often want to know
      more about the state of channel technology specific items than a single
      endpoint's state.
      
      ASTERISK-24870
      
      Change-Id: I6137459cdc25ce27efc134ad58abf065653da4e9
      5206aa9d
  13. Aug 07, 2015
    • Scott Emidy's avatar
      ARI: Retrieve existing log channels · 12e6f5ac
      Scott Emidy authored
      An http request can be sent to get the existing Asterisk logs.
      
      The command "curl -v -u user:pass -X GET 'http://localhost:8088
      /ari/asterisk/logging'" can be run in the terminal to access the
      newly implemented functionality.
      
      * Retrieve all existing log channels
      
      ASTERISK-25252
      
      Change-Id: I7bb08b93e3b938c991f3f56cc5d188654768a808
      12e6f5ac
    • Scott Emidy's avatar
      ARI: Creating log channels · b91ca7ba
      Scott Emidy authored
      An http request can be sent to create a log channel
      in Asterisk.
      
      The command "curl -v -u user:pass -X POST
      'http://localhost:088/ari/asterisk/logging/mylog?
      configuration=notice,warning'" can be run in the terminal
      to access the newly implemented functionality for ARI.
      
      * Ability to create log channels using ARI
      
      ASTERISK-25252
      
      Change-Id: I9a20e5c75716dfbb6b62fd3474faf55be20bd782
      b91ca7ba
  14. Aug 06, 2015
    • Scott Emidy's avatar
      ARI: Deleting log channels · f19c4930
      Scott Emidy authored
      An http request can be sent to delete a log channel
      in Asterisk.
      
      The command "curl -v -u user:pass -X DELETE 'http://localhost:8088
      /ari/asterisk/logging/mylog'" can be run in the terminal
      to access the newly implemented functionally for ARI.
      
      * Able to delete log channels using ARI
      
      ASTERISK-25252
      
      Change-Id: Id6eeb54ebcc511595f0418d586ff55914bc3aae6
      f19c4930
  15. Jul 31, 2015
    • Benjamin Ford's avatar
      ARI: Rotate log channels. · 1f02d20d
      Benjamin Ford authored
      An http request can be sent to rotate a specified log channel.
      If the channel does not exist, an error response will be
      returned.
      
      The command "curl -v -u user:pass -X PUT 'http://localhost:8088
      /ari/asterisk/logging/logChannelName/rotate'" can be run in the
      terminal to access this new functionality.
      
      * Added the ability to rotate log files through ARI
      
      ASTERISK-25252
      
      Change-Id: Iaefa21cbbc1b29effb33004ee3d89c977e76ab01
      1f02d20d
  16. Jul 17, 2015
    • Matt Jordan's avatar
      ARI: Add support for push configuration of dynamic object · 254d07b1
      Matt Jordan authored
      This patch adds support for push configuration of dynamic, i.e.,
      sorcery, objects in Asterisk. It adds three new REST API calls to the
      'asterisk' resource:
       * GET /asterisk/{configClass}/{objectType}/{id}: retrieve the current
         object given its ID. This returns back a list of ConfigTuples, which
         define the fields and their present values that make up the object.
       * PUT /asterisk/{configClass}/{objectType}/{id}: create or update an
         object. A body may be passed with the request that contains fields to
         populate in the object. The same format as what is retrieved using
         the GET operation is used for the body, save that we specify that the
         list of fields to update are contained in the "fields" attribute.
       * DELETE /asterisk/{configClass}/{objectType}/{id}: remove a dynamic
         object from its backing storage.
      
      Note that the success/failure of these operations is somewhat
      configuration dependent, i.e., you must be using a sorcery wizard that
      supports the operation in question. If a sorcery wizard does not support
      the create or delete mechanisms, then the REST API call will fail with a
      403 forbidden.
      
      ASTERISK-25238 #close
      
      Change-Id: I28cd5c7bf6f67f8e9e437ff097f8fd171d30ff5c
      254d07b1
  17. Jul 14, 2015
  18. Jul 13, 2015
  19. Jul 10, 2015
  20. May 21, 2015
    • Matt Jordan's avatar
      ARI: Update version to 1.7.0 · 3e2a994c
      Matt Jordan authored
      This patch updates the version of ARI to 1.7.0 to reflect the backwards
      compatible changes that will be introduced in 13.4.0.
      
      Change-Id: I6c36e6144da426412f25828a868e4df916bff60a
      (cherry picked from commit 9d8a4623)
      3e2a994c
  21. Apr 10, 2015
  22. Apr 07, 2015
    • Matthew Jordan's avatar
      ARI: Add the ability to intercept hold and raise an event · c2f50ba6
      Matthew Jordan authored
      For some applications - such as SLA - a phone pressing hold should not behave
      in the fashion that the Asterisk core would like it to. Instead, the hold
      action has some application specific behaviour associated with it - such as
      disconnecting the channel that initiated the hold; only playing MoH to channels
      in the bridge if the channels are of a particular type, etc.
      
      One way of accomplishing this is to use a framehook to intercept the
      hold/unhold frames, raise an event, and eat the frame. Tasty. This patch
      accomplishes that using a new dialplan function, HOLD_INTERCEPT.
      
      In addition, some general cleanup of raising hold/unhold Stasis messages was
      done, including removing some RAII_VAR usage.
      
      Review: https://reviewboard.asterisk.org/r/4549/
      
      ASTERISK-24922 #close
      ........
      
      Merged revisions 434216 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c2f50ba6
  23. Feb 27, 2015
  24. Feb 21, 2015
  25. Feb 12, 2015
    • Matthew Jordan's avatar
      ARI/PJSIP: Add the ability to redirect (transfer) a channel in a Stasis app · 29f66b04
      Matthew Jordan authored
      This patch adds a new feature to ARI to redirect a channel to another server,
      and fixes a few bugs in PJSIP's handling of the Transfer dialplan
      application/ARI redirect capability.
      
      *New Feature*
      A new operation has been added to the ARI channels resource, redirect. With
      this, a channel in a Stasis application can be redirected to another endpoint
      of the same underlying channel technology.
      
      *Bug fixes*
      In the process of writing this new feature, two bugs were fixed in the PJSIP
      stack:
      (1) The existing .transfer channel callback had the limitation that it could
          only transfer channels to a SIP URI, i.e., you had to pass
          'PJSIP/sip:foo@my_provider.com' to the dialplan application. While this is
          still supported, it is somewhat unintuitive - particularly in a world full
          of endpoints. As such, we now also support specifying the PJSIP endpoint to
          transfer to.
      (2) res_pjsip_multihomed was, unfortunately, trying to 'help' a 302 redirect by
          updating its Contact header. Alas, that resulted in the forwarding
          destination set by the dialplan application/ARI resource/whatever being
          rewritten with very incorrect information. Hence, we now don't bother
          updating an outgoing response if it is a 302. Since this took a looong time
          to find, some additional debug statements have been added to those modules
          that update the Contact headers.
      
      Review: https://reviewboard.asterisk.org/r/4316/
      
      ASTERISK-24015 #close
      Reported by: Private Name
      
      ASTERISK-24703 #close
      Reported by: Matt Jordan
      ........
      
      Merged revisions 431717 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      29f66b04
  26. Feb 09, 2015
  27. Jan 27, 2015
    • Matthew Jordan's avatar
      ARI: Improve wiki documentation · fb8a2e03
      Matthew Jordan authored
      This patch improves the documentation of ARI on the wiki. Specifically, it
      addresses the following:
      * Allowed values and allowed ranges weren't documented. This was particularly
        frustrating, as Asterisk would reject query parameters with disallowed values
        - but we didn't tell anyone what the allowed values were.
      * The /play/id operation on /channels and /bridges failed to document all of
        the added media resource types.
      * Documentation for creating a channel into a Stasis application failed to
        note when it occurred, and that creating a channel into Stasis conflicts with
        creating a channel into the dialplan.
      * Some other minor tweaks in the mustache templates, including italicizing the
        parameter type, putting the default value on its own sub-bullet, and some
        other nicities.
      
      Review: https://reviewboard.asterisk.org/r/4351
      ........
      
      Merged revisions 431145 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fb8a2e03
  28. Jan 07, 2015
  29. Dec 09, 2014
  30. Dec 08, 2014
  31. Sep 20, 2014
  32. Aug 20, 2014
Loading