Skip to content
Snippets Groups Projects
  1. Jul 15, 2020
  2. Jul 10, 2020
    • Ben Ford's avatar
      res_stir_shaken: Add stir_shaken option and general improvements. · 5fbed5af
      Ben Ford authored
      Added a new configuration option for PJSIP endpoints - stir_shaken. If
      set to yes, then STIR/SHAKEN support will be added to inbound and
      outbound INVITEs. The default is no. Alembic has been updated to include
      this option.
      
      Previously the dialplan function was not trimming the whitespace from
      the parameters it recieved. Now it does.
      
      Also added a conditional that, when TEST_FRAMEWORK is enabled, the
      timestamp in the identity header will be overlooked. This is just for
      testing, since the testsuite will rely on a SIPp scenario with a preset
      identity header to trigger the MISMATCH result.
      
      Change-Id: I43d67f1489b8c1c5729ed3ca8d71e35ddf438df1
      5fbed5af
  3. Jul 09, 2020
  4. Jul 07, 2020
    • sungtae kim's avatar
      res_pjsip.c: Added disable_rport option for pjsip.conf · 81b5e4a7
      sungtae kim authored
      Currently when the pjsip making an outgoing request, it keep adding the
      rport parameter in a request message as a default.
      
      This causes unexpected rport handle at the other end.
      
      Added option for disable this behaviour in the pjsip.conf.
      
      This is a system option, but working as a gloabl option.
      
      ASTERISK-28959
      
      Change-Id: I9596675e52a742774738b5aad5d1fec32f477abc
      81b5e4a7
  5. Jul 06, 2020
    • Kevin Harwell's avatar
      manager - Add Content-Type parameter to the SendText action · cfed0ea0
      Kevin Harwell authored
      This patch allows a user of AMI to now specify the type of message
      content contained within by setting the 'Content-Type' parameter.
      
      Note, the AMI version has been bumped for this change.
      
      ASTERISK-28945 #close
      
      Change-Id: Ibb5315702532c6b954e1498beddc8855fabdf4bb
      cfed0ea0
  6. Jul 01, 2020
    • George Joseph's avatar
      Streams: Add features for Advanced Codec Negotiation · 8d1064ea
      George Joseph authored
      The Streams API becomes the home for the core ACN capabilities.
      These include...
      
       * Parsing and formatting of codec negotation preferences.
       * Resolving pending streams and topologies with those configured
         using configured preferences.
       * Utility functions for creating string representations of
         streams, topologies, and negotiation preferences.
      
      For codec negotiation preferences:
       * Added ast_stream_codec_prefs_parse() which takes a string
         representation of codec negotiation preferences, which
         may come from a pjsip endpoint for example, and populates
         a ast_stream_codec_negotiation_prefs structure.
       * Added ast_stream_codec_prefs_to_str() which does the reverse.
       * Added many functions to parse individual parameter name
         and value strings to their respectrive enum values, and the
         reverse.
      
      For streams:
       * Added ast_stream_create_resolved() which takes a "live" stream
         and resolves it with a configured stream and the negotiation
         preferences to create a new stream.
       * Added ast_stream_to_str() which create a string representation
         of a stream suitable for debug or display purposes.
      
      For topology:
       * Added ast_stream_topology_create_resolved() which takes a "live"
         topology and resolves it, stream by stream, with a configured
         topology stream and the negotiation preferences to create a new
         topology.
       * Added ast_stream_topology_to_str() which create a string
         representation of a topology suitable for debug or display
         purposes.
       * Renamed ast_format_caps_from_topology() to
         ast_stream_topology_get_formats() to be more consistent with
         the existing ast_stream_get_formats().
      
      Additional changes:
       * A new function ast_format_cap_append_names() appends the results
         to the ast_str buffer instead of replacing buffer contents.
      
      Change-Id: I2df77dedd0c72c52deb6e329effe057a8e06cd56
      8d1064ea
  7. Jun 18, 2020
    • Joshua C. Colp's avatar
      res_sorcery_memory_cache: Disallow per-object expire with full backend. · a143c3a7
      Joshua C. Colp authored
      The AMI action and CLI command did not take into account the properties
      of full backend caching. This resulted in an expired object remaining
      removed until a full backend update occurred, instead of having the
      object updated when needed.
      
      This change makes it so that the AMI action and CLI command for object
      expire will now fail instead of putting the cache into an undesired
      state. If full backend caching is enabled then only operations
      which act on the entire cache are available.
      
      ASTERISK-28942
      
      Change-Id: Id662d888f177ab566c8e802ad583083b742d21f4
      a143c3a7
  8. May 20, 2020
    • Joshua C. Colp's avatar
      res_pjsip_logger: Expand functionality to improve logging. · a7aaee70
      Joshua C. Colp authored
      The PJSIP packet logger now has the following CLI commands:
      
      pjsip set logger pcap <filename>
      
      When used this will create a pcap file containing the incoming
      and outgoing SIP packets, in unencrypted form.
      
      pjsip set logger verbose <on / off>
      
      This allows you to toggle logging to verbose on and off.
      
      pjsip set logger host <IP/subnet mask> add
      
      This allows you to add an additional IP address or subnet
      mask to logging, allowing you to log multiple instead of
      just a single IP address or all traffic.
      
      The normal "pjsip set logger host" CLI command has also been
      expanded to allow subnet masks as well.
      
      ASTERISK-28895
      
      Change-Id: If5859161a72b0d7dd2d1f92d45bed88e0cd07d0e
      a7aaee70
  9. 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
  10. May 01, 2020
    • Ben Ford's avatar
      res_stir_shaken: Implemented signature verification. · 9acf840f
      Ben Ford authored
      There are a lot of moving parts in this patch, but the focus of it is on
      the verification of the signature using a public key located at the
      public key URL provided in the JSON payload. First, we check the
      database to see if we have already downloaded the key. If so, check to
      see if it has expired. If it has, redownload from the URL. If we don't
      have an entry in the database, just go ahead and download the public
      key. The expiration is tested each time we download the file. After
      that, read the public key from the file and use it to verify the
      signature. All sanity checking is done when the payload is first
      received, so the verification is complete once this point is reached.
      
      The XML has also been added since a new config option was added to
      general (curl_timeout). The maximum amount of time to wait for a
      download can be configured through this option, with a low value by
      default.
      
      Change-Id: I3ba4c63880493bf8c7d17a9cfca1af0e934d1a1c
      9acf840f
  11. Apr 23, 2020
    • Joshua C. Colp's avatar
      stream: Enforce formats immutability and ensure formats exist. · 1c5e6858
      Joshua C. Colp authored
      Some places in Asterisk did not treat the formats on a stream
      as immutable when they are.
      
      The ast_stream_get_formats function is now const to enforce this
      and parts of Asterisk have been updated to take this into account.
      Some violations of this were also fixed along the way.
      
      An additional minor tweak is that streams are now allocated with
      an empty format capabilities structure removing the need in various
      places to check that one is present on the stream.
      
      ASTERISK-28846
      
      Change-Id: I32f29715330db4ff48edd6f1f359090458a9bfbe
      1c5e6858
  12. Apr 20, 2020
    • Joshua C. Colp's avatar
      confbridge: Add support for disabling text messaging. · 6cfc6ff5
      Joshua C. Colp authored
      When in a conference bridge it may be necessary to have
      text messages disabled for specific participants or for
      all. This change adds a configuration option, "text_messaging",
      which can be used to enable or disable this on the
      user profile. By default existing behavior is preserved
      as it defaults to "yes".
      
      ASTERISK-28841
      
      Change-Id: I30b5d9ae6f4803881d1ed9300590d405e392bc13
      6cfc6ff5
  13. Apr 14, 2020
  14. Apr 06, 2020
    • George Joseph's avatar
      codec_negotiation: Implement outgoing_call_offer_pref · 2ee45595
      George Joseph authored
      Based on this new endpoint setting, a joint list of preferred codecs
      between those received from the Asterisk core (remote), and those
      specified in the endpoint's "allow" parameter (local) is created and
      is used to create the outgoing SDP offer.
      
      * Add outgoing_call_offer_pref to pjsip_configuration (endpoint)
      
      * Add "call_direction" to res_pjsip_session.
      
      * Update pjsip_session_caps.c to make the functions more generic
        so they could be used for both incoming and outgoing.
      
      * Update ast_sip_session_create_outgoing to create the
        pending_media_state->topology with the results of
        ast_sip_session_create_joint_call_stream().
      
      * The endpoint "preferred_codec_only" option now automatically sets
        AST_SIP_CALL_CODEC_PREF_FIRST in incoming_call_offer_pref.
      
      * A helper function ast_stream_get_format_count() was added to
        streams to return the current count of formats.
      
      ASTERISK-28777
      
      Change-Id: Id4ec0b4a906c2ae5885bf947f101c59059935437
      2ee45595
  15. Mar 26, 2020
    • Joshua C. Colp's avatar
      CHANGES: Change md file extension to txt. · 3ed80fc5
      Joshua C. Colp authored
      Change-Id: I168e2d3a65d444fb0961bd228257441fe718f6a7
      (cherry picked from commit c9cd6812)
      3ed80fc5
    • Joshua C. Colp's avatar
      res_pjsip_session: Apply intention behind requested formats. · 21e90514
      Joshua C. Colp authored
      When an outgoing channel is created a list of formats may
      optionally be provided which is used as a request that the
      formats be used if possible. If an endpoint is not configured
      for any of the formats we ignore this request and use what is
      configured. This has the side effect of also including other
      stream types (such as video) that were not present in the
      requested formats.
      
      This change makes it so that the intention of the request is
      preserved - that is if only an audio format is requested then
      even if there is no joint audio format between the request and
      the configuration we will still only place an audio stream in
      the outgoing call.
      
      ASTERISK-28787
      
      Change-Id: Ia54c0c63e94aca176169b9bae4bb8a8380ea245f
      21e90514
  16. Mar 20, 2020
    • Jaco Kroon's avatar
      res_rtp_asterisk: implement ACL mechanism for ICE and STUN addresses. · 82c3939c
      Jaco Kroon authored
      
      A pure blacklist is not good enough, we need a whitelist mechanism as
      well, and the simplest way to do that is to re-use existing ACL
      infrastructure.
      
      This makes it simpler to blacklist say an entire block (/24) except a
      smaller block (eg, a /29 or even a /32).  Normally you'd need to
      recursively split the block, so if you want to blacklist a /24 except
      for a /29 you'd end up with a blacklit for a /25, /26, /27 and /28.  I
      feel that having an ACL instead of a blacklist only is clearer.
      
      Change-Id: Id57a8df51fcfd3bd85ea67c489c85c6c3ecd7b30
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      82c3939c
  17. Mar 05, 2020
    • Rodrigo Ramírez Norambuena's avatar
      res_rtp_asterisk: Add 'rtp show settings' cli command · e0897799
      Rodrigo Ramírez Norambuena authored
      This change introduce a CLI command for the RTP to display the general
      configuration.
      
      In the first step add the follow fields of the configurations:
        - rtpstart
        - rtpend
        - dtmftimeout
        - rtpchecksum
        - strictrtp
        - learning_min_sequential
        - icesupport
      
      Change-Id: Ibe5450898e2c3e1ed68c10993aa1ac6bf09b821f
      e0897799
  18. Mar 03, 2020
    • Kevin Harwell's avatar
      codec negotiation: add incoming_call_offer_prefs option · 06dada3f
      Kevin Harwell authored
      Add a new option, incoming_call_offer_pref, to res_pjsip endpoints that
      specifies the preferred order of codecs after receiving an offer.
      
      This patch does the following:
      
        Adds a new enumeration, ast_sip_call_codec_pref, used by the the new
      configuration option that's added to the endpoint media structure.
      
        Adds a new ast_sip_session_caps structure that's set for each session media
      object.
      
        Creates a new file, res_pjsip_session_caps that "implements" the new
      structure and option, and is compiled into the res_pjsip_session library.
      
      ASTERISK-28756 #close
      
      Change-Id: I35e7a2a0c236cfb6bd9cdf89539f57a1ffefc76f
      06dada3f
  19. 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
  20. Feb 18, 2020
    • Sean Bright's avatar
      app_mixmonitor: Turn on synchronization by default · 8dcdce42
      Sean Bright authored
      The optional synchronization behavior created in
      64906c4c is now the default for
      MixMonitor.
      
      * Add a new flag 'n' that allows for this behavior to be turned off
      
      * Add a notice when the 'S' option is used indicating that it is no
        longer necessary
      
      Change-Id: I158987c475cda4e1ff1256dd0daccdd99df568b4
      8dcdce42
  21. Feb 17, 2020
    • Sean Bright's avatar
      app_mixmonitor: Set MIXMONITOR_FILENAME to correct value when wav49 is used · ddfb60ac
      Sean Bright authored
      When opening a file for writing, Asterisk silently converts filenames
      ending with 'wav49' to 'WAV.' We aren't taking that in to account when
      setting the MIXMONITOR_FILENAME variable in MixMonitor.
      
      * If the user wants to write to a wav49 file, make sure that it is
        reflected properly in MIXMONITOR_FILENAME.
      
      * Add a note to the documentation describing this behavior.
      
      * Add a note in main/file.c indicating that app_mixmonitor needs to be
        changed if the logic in build_filename was changed.
      
      ASTERISK-24798 #close
      Reported by: xrobau
      
      Change-Id: I384691ce624eb55c80a125b9ca206d2d691c574c
      ddfb60ac
  22. Feb 07, 2020
  23. Feb 03, 2020
    • George Joseph's avatar
      message.c: Add option to suppress the Message channel AMI and ARI events · b76ab5e5
      George Joseph authored
      In order to reduce the amount of AMI and ARI events generated,
      the global "Message/ast_msg_queue" channel can be set to suppress
      it's normal channel housekeeping events such as "Newexten",
      "VarSet", etc. This can greatly reduce load on the manager
      and ARI applications when the Digium Phone Module for Asterisk
      is in use.  To enable, set "hide_messaging_ami_events" in
      asterisk.conf to "yes"  In Asterisk versions <18, the default
      is "no" preserving existing behavior.  Beginning with
      Asterisk 18, the option will default to "yes".
      
      NOTE:  This change does not affect UserEvents or the ARI
      TextMessageReceived events.
      
      * Added the "hide_messaging_ami_events" option to asterisk.conf.
      
      * Changed message.c to set the AST_CHAN_TP_INTERNAL property on
        the "Message/ast_msg_queue" channel if the option is set in
        asterisk.conf.  This suppresses the reporting of the events.
      
      Change-Id: Ia2e3516d43f4e0df994fc6598565d6bba2d7018b
      b76ab5e5
  24. Jan 22, 2020
    • Sean Bright's avatar
      http: Add ability to disable /httpstatus URI · 0dce6f74
      Sean Bright authored
      Add a new configuration option 'enable_status' which allows the
      /httpstatus URI handler to be administratively disabled.
      
      We also no longer unconditionally register the /static and /httpstatus
      URI handlers, but instead do it based upon configuration.
      
      Behavior change: If enable_static was turned off, the URI handler was
      still installed but returned a 403 when it was accessed. Because we
      now register/unregister the URI handlers as appropriate, if the
      /static URI is disabled we will return a 404 instead.
      
      Additionally:
      
      * Change 'enablestatic' to 'enable_static' but keep the former for
        backwards compatibility.
      * Improve some internal variable names
      
      ASTERISK-28710 #close
      
      Change-Id: I647510f796473793b1d3ce1beb32659813be69e1
      0dce6f74
  25. Jan 16, 2020
  26. Jan 14, 2020
  27. Jan 13, 2020
    • Sean Bright's avatar
      func_curl: Add 'followlocation' option to CURLOPT() · 0c2bf166
      Sean Bright authored
      We allow for 'maxredirs' to be set, but this value is ignored when
      followlocation is not enabled which, by default, it is not.
      
      ASTERISK-17491 #close
      Reported by: candrews
      
      Change-Id: I96a4ab0142f2fb7d2e96ff976f6cf7b2982c761a
      0c2bf166
  28. Jan 12, 2020
    • Sean Bright's avatar
      app_queue: Deprecate the QueueMemberPause.Reason field · 9522390a
      Sean Bright authored
      The QueueMemberPause AMI event includes two fields that return the
      reason a member was paused.
      
      * In release branches, deprecate Reason in favor of PausedReason.
      * In master, remove the Reason field entirely.
      
      ASTERISK-28349 #close
      Reported by: Niksa Baldun
      
      Change-Id: I01da58f2b0ab927baeee754870f62b51b7b3d296
      9522390a
  29. Jan 08, 2020
    • Sean Bright's avatar
      res_pjsip_endpoint_identifier_ip.c: Add port matching support · 312abaa1
      Sean Bright authored
      Adds source port matching support when IP matching is used:
      
        [example]
        type = identify
        match = 1.2.3.4:5060/32, 1.2.3.4:6000/32, asterisk.org:4444
      
      If the IP matches but the source port does not, we reject and search for
      alternatives. SRV lookups are still performed if enabled (srv_lookups = yes),
      unless the configured FQDN includes a port number in which case just a host
      lookup is performed.
      
      ASTERISK-28639 #close
      Reported by: Mitch Claborn
      
      Change-Id: I256d5bd5d478b95f526e2f80ace31b690eebba92
      312abaa1
  30. Jan 07, 2020
    • Richard Mudgett's avatar
      app_chanisavail.c: Simplify dialplan using ChanIsAvail. · fe3cce81
      Richard Mudgett authored
      Dialplan has to be careful about passing an empty device list or empty
      positions in the list.  As a result, dialplan has to check for these
      conditions before using ChanIsAvail.  Simplify dialplan by making
      ChanIsAvail handle these conditions gracefully.
      
      * Made tolerate empty positions in the device list.
      
      * Simplified the code and eliminated some unnecessary indention.
      
      ASTERISK-28638
      
      Change-Id: I9e4b67e2cbf26b2417c2d03485b8568e898931d3
      fe3cce81
  31. Jan 06, 2020
    • Richard Mudgett's avatar
      app_bridgeaddchan.c: Make BridgeAdd be more like Bridge · 19069f7d
      Richard Mudgett authored
      * Made BridgeAdd not hangup the call if there is a problem.
      * Reduced message level from warning to verbose for normal exception
      cases.
      * Added a loop safety check to BridgeAdd.
      * Made BridgeAdd set BRIDGERESULT with the status when dialplan is
      resumed.
      
      Change-Id: I374d39b8a3edcc794eeb5c6b9f31a01424cdc426
      19069f7d
    • Richard Mudgett's avatar
      app_dial.c: Simplify dialplan using Dial. · abcb4ab3
      Richard Mudgett authored
      Dialplan has to be careful about passing an empty destination list or
      empty positions in the list.  As a result, dialplan has to check for
      these conditions before using Dial.  Simplify dialplan by making Dial
      handle these conditions gracefully.
      
      * Made tolerate empty positions in the dialed device list.
      
      * Reduced some message log levels from notice to verbose.
      
      ASTERISK-28638
      
      Change-Id: I6edc731aff451f8bdfaee5498078dd18c3a11ab9
      abcb4ab3
    • Richard Mudgett's avatar
      app_page.c: Simplify dialplan using Page. · d86a6ac5
      Richard Mudgett authored
      Dialplan has to be careful about passing an empty destination list or
      empty positions in the list.  As a result, dialplan has to check for
      these conditions before using Page.  Simplify dialplan by making Page
      handle these conditions gracefully.
      
      * Made tolerate empty positions in the paged device list.
      
      * Reduced some warnings associated with the 's' option to verbose
      messages.  The warning level for those messages really serves no purpose
      as that is why the 's' option exists.
      
      ASTERISK-28638
      
      Change-Id: I95b64a6d6800cd1a25279c88889314ae60fc21e3
      d86a6ac5
  32. 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
  33. Dec 16, 2019
    • Joshua C. Colp's avatar
      confbridge: Add support for specifying maximum sample rate. · 89b7144f
      Joshua C. Colp authored
      ConfBridge has the ability to move between different sample
      rates for mixing the conference bridge. Up until now there has
      only been the ability to set the conference bridge to mix at
      a specific sample rate, or to let it move between sample rates
      as necessary. This change adds the ability to configure a
      conference bridge with a maximum sample rate so it can move
      between sample rates but only up to the configured maximum.
      
      ASTERISK-28658
      
      Change-Id: Idff80896ccfb8a58a816e4ce9ac4ebde785963ee
      89b7144f
  34. Dec 13, 2019
    • Kevin Harwell's avatar
      res_fax: wrap v21 detected Asterisk initiated negotiation with config option · b6f56073
      Kevin Harwell authored
      A previous patch:
      
      Gerrit Change-Id: I73bb24799bfe1a48adae9c034a2edbae54cc2a39
      
      made it so a T.38 Gateway tries to negotiate with both sides by sending T.38
      negotiation request to both endpoints supported T.38 versus the previous
      behavior of forwarding negotiation to the "other" channel once a preamble
      was detected.
      
      This had the unfortunate side effect of breaking some setups. Specifically
      ones that set the max datagram option on an endpoint configuration (configured
      max datagram was not propagated since Asterisk now initiates negotiations).
      
      This patch adds a configuration option, "negotiate_both", that when enabled
      makes it so Asterisk initiates the negotiation requests to both endpoints vs.
      the previous behavior of waiting, and forwarding the request.
      
      The default is disabled keeping with the old behavior.
      
      ASTERISK-28660
      
      Change-Id: I5deb875f3485e20bc75119ec743090655d864a1a
      b6f56073
  35. Dec 11, 2019
    • Pascal Cadotte Michaud's avatar
      PJSIP_CONTACT: add missing argument documentation · bf4dd3d8
      Pascal Cadotte Michaud authored
      add missing argument "rtt" and "status" to the documentation
      
      The change to the dtd file allow an enumlist to contain one or many
      configOptionToEnum or enum.
      
      This is different from the previous patch I submitted when you could have a
      configOptionToEnum or (a configOptionToEnum followed by one or manu enums) or
      (one or many enums)
      
      ASTERISK-28626
      
      Change-Id: Ia71743ee7ec813f40297b0ddefeee7909db63b6d
      Unverified
      bf4dd3d8
    • Joshua Colp's avatar
      Revert "PJSIP_CONTACT: add missing argument documentation" · d0b198b3
      Joshua Colp authored
      This reverts commit 7e3015d7.
      
      Reason for revert: Regression in XML validation.
      
      validity error : Content model of enumlist is not determinist:
      (configOptionToEnum | (configOptionToEnum , enum+) | enum+)
      
      As we are preparing to do releases and this is not critical
      I am reverting this for now until resolved.
      
      Change-Id: I30c2295f9d7f0a0475674ee77071a7ebabf5b83f
      d0b198b3
Loading