Skip to content
Snippets Groups Projects
  1. May 15, 2020
    • Joshua C. Colp's avatar
      ari: Allow variables to be set on channel create. · 15cbff9d
      Joshua C. Colp authored
      This change adds the same variable functionality that
      is available for originating a channel to the create
      call. Now when creating a channel you can specify
      dialplan variables to set instead of having to do another
      API call.
      
      ASTERISK-28896
      
      Change-Id: If13997ba818136d7c070585504fc4164378aa992
      15cbff9d
  2. Mar 02, 2020
    • Kevin Harwell's avatar
      message & stasis/messaging: make text message variables work in ARI · a715cf5a
      Kevin Harwell authored
      When a text message was received any associated variable was not written to
      the ARI TextMessageReceived event. This occurred because Asterisk only wrote
      out "send" variables. However, even those "send" variables would fail ARI
      validation due to a TextMessageVariable formatting bug.
      
      Since it seems the TextMessageReceived event has never been able to include
      actual variables it was decided to remove the TextMessageVariable object type
      from ARI, and simply return a JSON object of key/value pairs for variables.
      This aligns more with how the ARI sendMessage handles variables, and other
      places in ARI.
      
      ASTERISK-28755 #close
      
      Change-Id: Ia6051c01a53b30cf7edef84c27df4ed4479b8b6f
      a715cf5a
  3. Jan 14, 2020
  4. Jan 02, 2020
    • Jean Aunis's avatar
      ARI: Ability to inhibit COLP frames when adding channels to a bridge · 034ac357
      Jean Aunis authored
      This patch adds a new flag "inhibitConnectedLineUpdates" to the 'addChannel'
      operation in the Bridges REST API. When set, this flag avoids generating COLP
      frames when the specified channels enter the bridge.
      
      ASTERISK-28629
      
      Change-Id: Ib995d4f0c6106279aa448b34b042b68f0f2ca5dc
      034ac357
  5. Oct 18, 2019
    • George Joseph's avatar
      ExternalMedia: Change return object from ExternalMedia to Channel · d71d0f94
      George Joseph authored
      When we created the External Media addition to ARI we created an
      ExternalMedia object to be returned from the channels/externalMedia
      REST endpoint.  This object contained the channel object that was
      created plus local_address and local_port attributes (which are
      also in the Channel variables).  At the time, we thought that
      creating an ExternalMedia object would give us more flexibility
      in the future but as we created the sample speech to text
      application, we discovered that it doesn't work so well with ARI
      client libraries that a) don't have the ExternalMedia object
      defined and/or b) can't promote the embedded channel structure
      to a first-class Channel object.
      
      This change causes the channels/externalMedia REST endpoint to
      return a Channel object (like channels/create and channels/originate)
      instead of the ExternalMedia object.
      
      Change-Id: If280094debd35102cf21e0a31a5e0846fec14af9
      d71d0f94
  6. Sep 10, 2019
    • George Joseph's avatar
      ARI: External Media · 2ae1a22e
      George Joseph authored
      The Channel resource has a new sub-resource "externalMedia".
      This allows an application to create a channel for the sole purpose
      of exchanging media with an external server.  Once created, this
      channel could be placed into a bridge with existing channels to
      allow the external server to inject audio into the bridge or
      receive audio from the bridge.
      See https://wiki.asterisk.org/wiki/display/AST/External+Media+and+ARI
      for more information.
      
      Change-Id: I9618899198880b4c650354581b50c0401b58bc46
      2ae1a22e
  7. Jul 29, 2019
  8. Jun 27, 2019
    • sungtae kim's avatar
      res/ari/resource_channels.c: Added hangup reason code for channels · 613a335d
      sungtae kim authored
      Currently, DELETE /ari/channels/<channelID> supports only few hangup reasons.
      It's good enough for simple use, but when it needs to set the detail reason,
      it comes challenges.
      Added reason_code query parameter for that.
      
      ASTERISK-28385
      
      Change-Id: I1cf1d991ffd759d0591b347445a55f416ddc3ff2
      613a335d
  9. Mar 26, 2019
    • sungtae kim's avatar
      main/json.c: Added app_name, app_data to channel type · 76768ad6
      sungtae kim authored
      It was difficult to check the channel's current application and
      parameters using ARI for current channels. Added app_name, app_data
      items to show the current application information.
      
      ASTERISK-28343
      
      Change-Id: Ia48972b3850e5099deab0faeaaf51223a1f2f38c
      76768ad6
  10. Mar 13, 2019
  11. Mar 11, 2019
    • sungtae kim's avatar
      res/res_ari: Added timestamp as a requirement for all ARI events · e2eb19b3
      sungtae kim authored
      Changed to requirement to having timestamp for all of ARI events.
      The below ARI events were changed to having timestamp.
      PlaybackStarted, PlaybackContinuing, PlaybackFinished,
      RecordingStarted, RecordingFinished, RecordingFailed,
      ApplicationReplaced, ApplicationMoveFailed
      
      ASTERISK-28326
      
      Change-Id: I382c2fef58f5fe107e1074869a6d05310accb41f
      e2eb19b3
  12. Mar 07, 2019
    • Ben Ford's avatar
      res_stasis: Add ability to switch applications. · 6626df58
      Ben Ford authored
      Added the ability to move between Stasis applications within Stasis.
      This can be done by calling 'move' in an application, providing (at
      minimum) the channel's id and the application to switch to. If the
      application is not registered or active, nothing will happen and the
      channel will remain in the current application, and an event will be
      triggered to let the application know that the move failed. The event
      name is "ApplicationMoveFailed", and provides the "destination" that the
      channel was attempting to move to, as well as the usual channel
      information. Optionally, a list of arguments can be passed to the
      function call for the receiving application. A full example of a 'move'
      call would look like this:
      
      client.channels.move(channelId, app, appArgs)
      
      The control object used to control the channel in Stasis can now switch
      which application it belongs to, rather than belonging to one Stasis
      application for its lifetime. This allows us to use the same control
      object instead of having to tear down the current one and create
      another.
      
      ASTERISK-28267 #close
      
      Change-Id: I43d12b10045a98a8d42541889b85695be26f288a
      6626df58
  13. Mar 03, 2019
    • sungtae kim's avatar
      bridging: Add creation timestamps · 3638c433
      sungtae kim authored
      This small feature will help to checking the bridge's status to
      figure out which bridge is in old/zombie or not. Also added
      detail items for the 'bridge show *' cli to provide more detail
      info. And added creation item to the ARI as well.
      
      ASTERISK-28279
      
      Change-Id: I460238c488eca4d216b9176576211cb03286e040
      3638c433
  14. Feb 20, 2019
    • Kevin Harwell's avatar
      ARI event type filtering · 8681fc9d
      Kevin Harwell authored
      Event type filtering is now enabled, and configurable per application. An app is
      now able to specify which events are sent to the application by configuring an
      allowed and/or disallowed list(s). This can be done by issuing the following:
      
      PUT /applications/{applicationName}/eventFilter
      
      And then enumerating the allowed/disallowed event types as a body parameter.
      
      ASTERISK-28106
      
      Change-Id: I9671ba1fcdb3b6c830b553d4c5365aed5d588d5b
      8681fc9d
  15. Jan 30, 2019
    • sungtae kim's avatar
      Added ARI resource /ari/asterisk/ping · ac90968a
      sungtae kim authored
      Added ARI resource.
      GET /ari/asterisk/ping : It returns "pong" message with timestamp
      and asterisk id. It would be useful for simple heath check.
      
      Change-Id: I8d24e1dcc96f60f73437c68d9463ed746f688b29
      ac90968a
  16. Dec 11, 2018
    • Sebastian Damm's avatar
      res/res_ari: Add additional hangup reasons · a24bb1c4
      Sebastian Damm authored
      The ARI DELETE /channels command takes a "reason" parameter
      Previously, there were only five reasons implemented
      This patch adds more reasons to choose from for more
      complex setups
      
      ASTERISK-28198 #close
      
      Change-Id: I85996f1076c9946d65c778413f040a845a90fecc
      a24bb1c4
  17. Jul 18, 2018
  18. Jan 22, 2018
    • Corey Farrell's avatar
      Add missing OPTIONAL_API and ARI dependences. · 679fa5fb
      Corey Farrell authored
      I've audited all modules that include any header which includes
      asterisk/optional_api.h.  All modules which use OPTIONAL_API now declare
      those dependencies in AST_MODULE_INFO using requires or optional_modules
      as appropriate.
      
      In addition ARI dependency declarations have been reworked.  Instead of
      declaring additional required modules in res/ari/resource_*.c we now add
      them to an optional array "requiresModules" in api-docs for each module.
      This allows the AST_MODULE_INFO dependencies to include those missing
      modules.
      
      Change-Id: Ia0c70571f5566784f63605e78e1ceccb4f79c606
      679fa5fb
  19. Dec 11, 2017
    • Kevin Harwell's avatar
      pjsip_options: wrongly applied "UNKNOWN" status · b088cddc
      Kevin Harwell authored
      A couple of places were setting the status to "UNKNOWN" when qualifies were
      being disabled. Instead this should be set to the "CREATED" status that
      represents when a contact is given (uri available), but the qualify frequency
      is set to zero so we don't know the status.
      
      This patch updates the relevant places with "CREATED". It also updates the
      "CREATED" status description (value shown in CLI/AMI/ARI output) to a value
      of "NonQualified"/"NonQual" as this description is hopefully less confusing.
      
      ASTERISK-27467
      
      Change-Id: Id67509d25df92a72eb3683720ad2a95a27b50c89
      b088cddc
  20. Oct 11, 2017
    • Seán C McCord's avatar
      ari/bridge: Add mute, dtmf suppression controls · e8bde691
      Seán C McCord authored
      Add bridge_features structure to bridge creation.  Specifically, this
      implements mute and DTMF suppression, but others should be able to be
      easily added to the same structure.
      
      ASTERISK-27322 #close
      Reported by: Darren Sessions
      Sponsored by: AVOXI
      
      Change-Id: Id4002adfb65c9a8027ee9e1a5f477e0f01cf9d61
      e8bde691
  21. Sep 28, 2017
    • Joshua Colp's avatar
      res_stasis: Add 'video_sfu' as a requested bridge type. · f21408c8
      Joshua Colp authored
      This change adds 'video_sfu' as a requested bridge type when
      creating a bridge. By specifying this a mixing type bridge is
      created that exchanges video in an SFU fashion.
      
      Change-Id: I2ada47cf5f3fc176518b647c0b4aa39d55339606
      f21408c8
  22. Jul 20, 2017
  23. Nov 18, 2016
  24. Nov 14, 2016
    • Matt Jordan's avatar
      res/ari/resource_bridges: Add the ability to manipulate the video source · a72ef381
      Matt Jordan authored
      In multi-party bridges, Asterisk currently supports two video modes:
       * Follow the talker, in which the speaker with the most energy is shown
         to all participants but the speaker, and the speaker sees the
         previous video source
       * Explicitly set video sources, in which all participants see a locked
         video source
      
      Prior to this patch, ARI had no ability to manipulate the video source.
      This isn't important for two-party bridges, in which Asterisk merely
      relays the video between the participants. However, in a multi-party
      bridge, it can be advantageous to allow an external application to
      manipulate the video source.
      
      This patch provides two new routes to accomplish this:
      (1) setVideoSource: POST /bridges/{bridgeId}/videoSource/{channelId}
          Sets a video source to an explicit channel
      (2) clearVideoSource: DELETE /bridges/{bridgeId}/videoSource
          Removes any explicit video source, and sets the video mode to talk
          detection
      
      ASTERISK-26595 #close
      
      Change-Id: I98e455d5bffc08ea5e8d6b84ccaf063c714e6621
      a72ef381
    • 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. 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
  35. 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
  36. 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
Loading