Skip to content
Snippets Groups Projects
  1. Feb 09, 2021
    • George Joseph's avatar
      chan_iax2.c: Require secret and auth method if encryption is enabled · 91b07787
      George Joseph authored
      If there's no secret specified for an iax2 peer and there's no secret
      specified in the dial string, Asterisk will crash if the auth method
      requested by the peer is MD5 or plaintext.  You also couldn't specify
      a default auth method in the [general] section of iax.conf so if you
      don't have static peers defined and just use the dial string, Asterisk
      will still crash even if you have a secret specified in the dial string.
      
      * Added logic to iax2_call() and authenticate_reply() to print
        a warning and hanhup the call if encryption is requested and
        there's no secret or auth method.  This prevents the crash.
      
      * Added the ability to specify a default "auth" in the [general]
        section of iax.conf.
      
      ASTERISK-29624
      Reported by: N A
      
      Change-Id: I5928e16137581f7d383fcc7fa04ad96c919e6254
      91b07787
  2. Jan 27, 2021
    • Dan Cropp's avatar
      chan_pjsip, app_transfer: Add TRANSFERSTATUSPROTOCOL variable · 55891227
      Dan Cropp authored
      When a Transfer/REFER is executed, TRANSFERSTATUSPROTOCOL variable is
      0 when no protocl specific error
      SIP example of failure, 3xx-6xx for the SIP error code received
      
      This allows applications to perform actions based on the failure
      reason.
      
      ASTERISK-29252 #close
      Reported-by: Dan Cropp
      
      Change-Id: Ia6a94784b4925628af122409cdd733c9f29abfc4
      55891227
  3. Dec 09, 2020
    • lvl's avatar
      Introduce astcachedir, to be used for temporary bucket files · b0842713
      lvl authored
      As described in the issue, /tmp is not a suitable location for a
      large amount of cached media files, since most distributions make
      /tmp a RAM-based tmpfs mount with limited capacity.
      
      I opted for a location that can be configured separately, as opposed
      to using a subdirectory of spooldir, given the different storage
      profile (transient files vs files that might stay there indefinitely).
      
      This commit just makes the cache directory configurable, and changes
      the default location from /tmp to /var/cache/asterisk.
      
      ASTERISK-29143
      
      Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
      b0842713
  4. Dec 01, 2020
  5. Nov 20, 2020
  6. Oct 02, 2020
    • Kevin Harwell's avatar
      Logging: Add debug logging categories · 56028426
      Kevin Harwell authored
      Added debug logging categories that allow a user to output debug
      information based on a specified category. This lets the user limit,
      and filter debug output to data relevant to a particular context,
      or topic. For instance the following categories are now available for
      debug logging purposes:
      
        dtls, dtls_packet, ice, rtcp, rtcp_packet, rtp, rtp_packet,
        stun, stun_packet
      
      These debug categories can be enable/disable via an Asterisk CLI command.
      
      While this overrides, and outputs debug data, core system debugging is
      not affected by this patch. Statements still output at their appropriate
      debug level. As well backwards compatibility has been maintained with
      past debug groups that could be enabled using the CLI (e.g. rtpdebug,
      stundebug, etc.).
      
      ASTERISK-29054 #close
      
      Change-Id: I6e6cb247bb1f01dbf34750b2cd98e5b5b41a1849
      56028426
    • George Joseph's avatar
      app_confbridge/bridge_softmix: Add ability to force estimated bitrate · 773f424c
      George Joseph authored
      app_confbridge now has the ability to set the estimated bitrate on an
      SFU bridge.  To use it, set a bridge profile's remb_behavior to "force"
      and set remb_estimated_bitrate to a rate in bits per second.  The
      remb_estimated_bitrate parameter is ignored if remb_behavior is something
      other than "force".
      
      Change-Id: Idce6464ff014a37ea3b82944452e56cc4d75ab0a
      773f424c
  7. Sep 22, 2020
  8. Aug 28, 2020
    • Kevin Harwell's avatar
      chan_pjsip: disallow PJSIP_SEND_SESSION_REFRESH pre-answer execution · 3c4a1722
      Kevin Harwell authored
      This patch makes it so if the PJSIP_SEND_SESSION_REFRESH dialplan function
      is called on a channel prior to answering a warning is issued and the
      function returns unsuccessful.
      
      ASTERISK-28878 #close
      
      Change-Id: I053f767d10cf3b2b898fa9e3e7c35ff07e23c9bb
      3c4a1722
    • George Joseph's avatar
      logger.c: Added a new log formatter called "plain" · 54ddf191
      George Joseph authored
      Added a new log formatter called "plain" that always prints
      file, function and line number if available (even for verbose
      messages) and never prints color control characters.  It also
      doesn't apply any special formatting for verbose messages.
      Most suitable for file output but can be used for other channels
      as well.
      
      You use it in logger.conf like so:
      debug => [plain]debug
      console => [plain]error,warning,debug,notice,pjsip_history
      messages => [plain]warning,error,verbose
      
      Change-Id: I4fdfe4089f66ce2f9cb29f3005522090dbb5243d
      54ddf191
  9. Jul 15, 2020
  10. 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
  11. Jul 09, 2020
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. Apr 14, 2020
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. Feb 07, 2020
  31. 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
  32. 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
  33. Jan 16, 2020
  34. Jan 14, 2020
  35. 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
  36. 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
Loading