Skip to content
Snippets Groups Projects
  1. Jun 08, 2021
    • Naveen Albert's avatar
      res_pjsip_dtmf_info: Hook flash · 1b38e897
      Naveen Albert authored
      Adds hook flash recognition support
      for application/hook-flash.
      
      ASTERISK-29460
      
      Change-Id: I1d060fa89a7cf41244c98f892fff44eb1c9738ea
      1b38e897
    • Naveen Albert's avatar
      app_confbridge: New option to prevent answer supervision · 5f8cabc2
      Naveen Albert authored
      A new user option, answer_channel, adds the capability to
      prevent answering the channel if it hasn't already been
      answered yet.
      
      ASTERISK-29440
      
      Change-Id: I26642729d0345f178c7b8045506605c8402de54b
      5f8cabc2
    • Naveen Albert's avatar
      sip_to_pjsip: Fix missing cases · c8bf8a54
      Naveen Albert authored
      Adds the "auto" case which is valid with
      both chan_sip dtmfmode and chan_pjsip's
      dtmf_mode, adds subscribecontext to
      subscribe_context conversion, and accounts
      for cipher = ALL being invalid.
      
      ASTERISK-29459
      
      Change-Id: Ie27d6606efad3591038000e5f3c34fa94730f6f2
      c8bf8a54
  2. May 27, 2021
    • George Joseph's avatar
      res_pjsip_messaging: Refactor outgoing URI processing · c3654a99
      George Joseph authored
       * Implemented the new "to" parameter of the MessageSend()
         dialplan application.  This allows a user to specify
         a complete SIP "To" header separate from the Request URI.
      
       * Completely refactored the get_outbound_endpoint() function
         to actually handle all the destination combinations that
         we advertized as supporting.
      
       * We now also accept a destination in the same format
         as Dial()...  PJSIP/number@endpoint
      
       * Added lots of debugging.
      
      ASTERISK-29404
      Reported by Brian J. Murrell
      
      Change-Id: I67a485196d9199916468f7f98bfb9a0b993a4cce
      c3654a99
  3. May 26, 2021
    • Naveen Albert's avatar
      func_math: Three new dialplan functions · eeffad1b
      Naveen Albert authored
      Introduces three new dialplan functions, MIN and MAX,
      which can be used to calculate the minimum or
      maximum of up to two numbers, and ABS, an absolute
      value function.
      
      ASTERISK-29431
      
      Change-Id: I2bda9269d18f9d54833c85e48e41fce0e0ce4d8d
      eeffad1b
    • Ben Ford's avatar
      STIR/SHAKEN: Add Date header, dest->tn, and URL checking. · 12e86008
      Ben Ford authored
      STIR/SHAKEN requires a Date header alongside the Identity header, so
      that has been added. Still on the outgoing side, we were missing the
      dest->tn section of the JSON payload, so that has been added as well.
      Moving to the incoming side, URL checking has been added to the public
      cert URL to ensure that it starts with http.
      
      https://wiki.asterisk.org/wiki/display/AST/OpenSIPit+2021
      
      Change-Id: Idee5b1b5e45bc3b483b3070e46ce322dca5b3f1c
      12e86008
    • Joshua C. Colp's avatar
      res_pjsip: On partial transport reload also move factories. · 44fde9f4
      Joshua C. Colp authored
      For connection oriented transports PJSIP uses factories to
      produce transports. When doing a partial transport reload
      we need to also move the factory of the transport over so
      that anything referencing the transport (such as an endpoint)
      has the factory available.
      
      ASTERISK-29441
      
      Change-Id: Ieae0fb98eab2d9257cad996a1136e5a62d307161
      44fde9f4
    • Naveen Albert's avatar
      func_volume: Add read capability to function. · 19b5097d
      Naveen Albert authored
      Up until now, the VOLUME function has been write
      only, so that TX/RX values can be set but not
      read afterwards. Now, previously set TX/RX values
      can be read later.
      
      ASTERISK-29439
      
      Change-Id: Ia23e92fa2e755c36e9c8e69f2940d2703ccccb5f
      19b5097d
    • Evgenios_Greek's avatar
      stasis: Fix "FRACK!, Failed assertion bad magic number" when unsubscribing · 2193cf1b
      Evgenios_Greek authored
      When unsubscribing from an endpoint technology a FRACK
      would occur due to incorrect reference counting. This fixes
      that issue, along with some other issues.
      
      Fixed a typo in get_subscription when calling ao2_find as it
      needed to pass the endpoint ID and not the entire object.
      
      Fixed scenario where a subscription would get returned when
      it shouldn't have been when searching based on endpoint
      technology.
      
      A doulbe unreference has also been resolved by only explicitly
      releasing the reference held by tech_subscriptions.
      
      ASTERISK-28237 #close
      Reported by: Lucas Tardioli Silveira
      
      Change-Id: Ia91b15f8e5ea68f850c66889a6325d9575901729
      2193cf1b
    • Joseph Nadiv's avatar
      res_pjsip.c: Support endpoints with domain info in username · 98e41196
      Joseph Nadiv authored
      In multidomain environments, it is desirable to create
      PJSIP endpoints with the domain info in the endpoint name
      in pjsip_endpoint.conf.  This resulted in an error with
      registrations, NOTIFY, and OPTIONS packet generation.
      
      This commit will detect if there is an @ in the endpoint
      identifier and generate the URI accordingly so NOTIFY and
      OPTIONS From headers will generate correctly.
      
      ASTERISK-28393
      
      Change-Id: I96f8d01dfdd5573ba7a28299e46271dd4210b619
      98e41196
    • Joshua C. Colp's avatar
      res_rtp_asterisk: Set correct raddr port on RTCP srflx candidates. · a985e506
      Joshua C. Colp authored
      RTCP ICE candidates use a base address derived from the RTP
      candidate. The port on the base address was not being updated to
      the RTCP port.
      
      This change sets the base port to the RTCP port and all is well.
      
      ASTERISK-29433
      
      Change-Id: Ide2d2115b307bfd3c2dfbc4d187515d724519040
      a985e506
  4. May 25, 2021
  5. May 21, 2021
  6. May 20, 2021
    • George Joseph's avatar
      res_pjsip_outbound_authenticator_digest: Be tolerant of RFC8760 UASs · 9cc1d6fc
      George Joseph authored
      RFC7616 and RFC8760 allow more than one WWW-Authenticate or
      Proxy-Authenticate header per realm, each with different digest
      algorithms (including new ones like SHA-256 and SHA-512-256).
      Thankfully however a UAS can NOT send back multiple Authenticate
      headers for the same realm with the same digest algorithm.  The
      UAS is also supposed to send the headers in order of preference
      with the first one being the most preferred.  We're supposed to
      send an Authorization header for the first one we encounter for a
      realm that we can support.
      
      The UAS can also send multiple realms, especially when it's a
      proxy that has forked the request in which case the proxy will
      aggregate all of the Authenticate headers and then send them all
      back to the UAC.
      
      It doesn't stop there though... Each realm can require a
      different username from the others.  There's also nothing
      preventing each digest algorithm from having a unique password
      although I'm not sure if that adds any benefit.
      
      So now... For each Authenticate header we encounter, we have to
      determine if we support the digest algorithm and, if not, just
      skip the header.  We then have to find an auth object that
      matches the realm AND the digest algorithm or find a wildcard
      object that matches the digest algorithm. If we find one, we add
      it to the results vector and read the next Authenticate header.
      If the next header is for the same realm AND we already added an
      auth object for that realm, we skip the header. Otherwise we
      repeat the process for the next header.
      
      In the end, we'll have accumulated a list of credentials we can
      pass to pjproject that it can use to add Authentication headers
      to a request.
      
      NOTE: Neither we nor pjproject can currently handle digest
      algorithms other than MD5.  We don't even have a place for it in
      the ast_sip_auth object. For this reason, we just skip processing
      any Authenticate header that's not MD5.  When we support the
      others, we'll move the check into the loop that searches the
      objects.
      
      Changes:
      
       * Added a new API ast_sip_retrieve_auths_vector() that takes in
         a vector of auth ids (usually supplied on a call to
         ast_sip_create_request_with_auth()) and populates another
         vector with the actual objects.
      
       * Refactored res_pjsip_outbound_authenticator_digest to handle
         multiple Authenticate headers and set the stage for handling
         additional digest algorithms.
      
       * Added a pjproject patch that allows them to ignore digest
         algorithms they don't support.  This patch has already been
         merged upstream.
      
       * Updated documentation for auth objects in the XML and
         in pjsip.conf.sample.
      
       * Although res_pjsip_authenticator_digest isn't affected
         by this change, some debugging and a testsuite AMI event
         was added to facilitate testing.
      
      Discovered during OpenSIPit 2021.
      
      ASTERISK-29397
      
      Change-Id: I3aef5ce4fe1d27e48d61268520f284d15d650281
      9cc1d6fc
  7. May 19, 2021
    • Joseph Nadiv's avatar
      res_pjsip_dialog_info_body_generator: Add LOCAL/REMOTE tags in dialog-info+xml · 3cccdf6d
      Joseph Nadiv authored
      RFC 4235 Section 4.1.6 describes XML elements that should be
      sent to subscribed endpoints to identify the local and remote
      participants in the dialog.
      
      This patch adds this functionality to PJSIP by iterating through the
      ringing channels causing the NOTIFY, and inserts the channel info
      into the dialog so that information is properly passed to the endpoint
      in dialog-info+xml.
      
      ASTERISK-24601
      Patch submitted: Joshua Elson
      Modified by: Joseph Nadiv and Sean Bright
      Tested by: Joseph Nadiv
      
      Change-Id: I20c5cf5b45f34d7179df6573c5abf863eb72964b
      3cccdf6d
    • Naveen Albert's avatar
      AMI: Add AMI event to expose hook flash events · 04454fc2
      Naveen Albert authored
      Although Asterisk can receive and propogate flash events, it currently
      provides no mechanism for doing anything with them itself.
      
      This AMI event allows flash events to be processed by Asterisk.
      Additionally, AST_CONTROL_FLASH is included in a switch statement
      in channel.c to avoid throwing a warning when we shouldn't.
      
      ASTERISK-29380
      
      Change-Id: Ie17ffe65086e0282c88542e38eed6a461ec79e81
      04454fc2
    • Naveen Albert's avatar
      app_voicemail: Configurable voicemail beep · 567ea5ab
      Naveen Albert authored
      Hitherto, VoiceMail() played a non-customizable beep tone to indicate
      the caller could leave a message. In some cases, the beep may not
      be desired, or a different tone may be desired.
      
      To increase flexibility, a new option allows customization of the tone.
      If the t option is specified, the default beep will be overridden.
      Supplying an argument will cause it to use the specified file for the tone,
      and omitting it will cause it to skip the beep altogether. If the option
      is not used, the default behavior persists.
      
      ASTERISK-29349
      
      Change-Id: I1c439c0011497e28a28067fc1cf1e654c8843280
      567ea5ab
  8. May 17, 2021
  9. May 13, 2021
  10. May 12, 2021
  11. May 11, 2021
    • Ben Ford's avatar
      STIR/SHAKEN: OPENSSL_free serial hex from openssl. · 05f7bc9c
      Ben Ford authored
      We're getting the serial number of the certificate from openssl and
      freeing it with ast_free(), but it needs to be freed with OPENSSL_free()
      instead. Now we duplicate the string and free the one from openssl with
      OPENSSL_free(), which means we can still use ast_free() on the returned
      string.
      
      https://wiki.asterisk.org/wiki/display/AST/OpenSIPit+2021
      
      Change-Id: Ia6e1a4028c1933a0e1d204b769ebb9f5a11f00ab
      05f7bc9c
    • Ben Ford's avatar
      STIR/SHAKEN: Fix certificate type and storage. · 259ecfa2
      Ben Ford authored
      During OpenSIPit, we found out that the public certificates must be of
      type X.509. When reading in public keys, we use the corresponding X.509
      functions now.
      
      We also discovered that we needed a better naming scheme for the
      certificates since certificates with the same name would cause issues
      (overwriting certs, etc.). Now when we download a public certificate, we
      get the serial number from it and use that as the name of the cached
      certificate.
      
      The configuration option public_key_url in stir_shaken.conf has also
      been renamed to public_cert_url, which better describes what the option
      is for.
      
      https://wiki.asterisk.org/wiki/display/AST/OpenSIPit+2021
      
      Change-Id: Ia00b20835f5f976e3603797f2f2fb19672d8114d
      259ecfa2
  12. May 06, 2021
    • George Joseph's avatar
      Updates for the MessageSend Dialplan App · 09303e8e
      George Joseph authored
      Enhancements:
      
       * The MessageSend dialplan application now takes an optional
         third argument that can set the message's "To" field on
         outgoing messages.  It's an alternative to using the
         MESSAGE(to) dialplan function.
      
         NOTE: No channel driver currently implements this field.  A
         follow-on commit for res_pjsip_messaging will implement it for
         the chan_pjsip channel driver.
      
       * To prevent confusion with the first argument, currently named
         "to", it's been renamed to "destination". Its function,
         creating the request URI, hasn't changed.
      
       * The documentation for MessageSend was updated to be
         more clear about the parameters and how they interact
         the MESSAGE() dialplan function.
      
       * With the rename of MessageSend's first parameter, and the fact
         that message.c references <info> elements in chan_sip.c,
         res_pjsip_messaging.c and res_xmpp, they each needed
         documentation updates to use MessageDestinationInfo instead of
         MessageToInfo.
      
       * appdocsxml.dtd was updated to include a missing element
         declaration for "dataType".  This was showing up as an error
         in Eclipse's dtd editor.
      
       * Despite the changes in this commit, there should be
         no impact to current users of MessageSend.
      
      Change-Id: I6fb5b569657a02866a66ea352fd53d30d8ac965a
      09303e8e
  13. Apr 30, 2021
  14. Apr 29, 2021
    • Joshua C. Colp's avatar
      chan_local: Skip filtering audio formats on removed streams. · f142ca25
      Joshua C. Colp authored
      When a stream topology is provided to chan_local when dialing
      it filters the audio formats down. This operation did not skip
      streams which were removed (that have no formats) resulting in
      calling being aborted.
      
      This change causes such streams to be skipped.
      
      ASTERISK-29407
      
      Change-Id: I1de8b98727cb2d10f4bc287da0b5fdcb381addd6
      f142ca25
  15. Apr 28, 2021
  16. Apr 25, 2021
  17. Apr 21, 2021
  18. Apr 19, 2021
    • Ben Ford's avatar
      res_aeap: Add basic config skeleton and CLI commands. · 45a1977d
      Ben Ford authored
      Added support for a basic AEAP configuration read from aeap.conf.
      Also added 2 CLI commands for showing individual configurations as
      well as all of them: aeap show server <id> and aeap show servers.
      
      Only one configuration option is required at the moment, and that one is
      server_url. It must be a websocket URL. The other option, codecs, is
      optional and will be used over the codecs specified on the endpoint if
      provided.
      
      https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=45482453
      
      Change-Id: I567ac5148c92b98d29d2ad83421b416b75ffdaa3
      45a1977d
  19. Apr 05, 2021
    • George Joseph's avatar
      bridge_channel_write_frame: Check for NULL channel · 44aef044
      George Joseph authored
      There is a possibility, when bridge_channel_write_frame() is
      called, that the bridge_channel->chan will be NULL.  The first
      thing bridge_channel_write_frame() does though is call
      ast_channel_is_multistream() which had no check for a NULL
      channel and therefore caused a segfault. Since it's still
      possible for bridge_channel_write_frame() to write the frame to
      the other channels in the bridge, we don't want to bail before we
      call ast_channel_is_multistream() but we can just skip the
      multi-channel stuff.  So...
      
      bridge_channel_write_frame() only calls ast_channel_is_multistream()
      if bridge_channel->chan is not NULL.
      
      As a safety measure, ast_channel_is_multistream() now returns
      false if the supplied channel is NULL.
      
      ASTERISK-29379
      Reported-by: Vyrva Igor
      Reported-by: Ross Beer
      
      Change-Id: Idfe62dbea8c69813ecfd58e113a6620dc42352ce
      44aef044
  20. Apr 02, 2021
    • Sean Bright's avatar
      loader.c: Speed up deprecation metadata lookup · 5a13e95c
      Sean Bright authored
      Only use an XPath query once per module, then just navigate the DOM for
      everything else.
      
      Change-Id: Ia0336a7185f9180ccba4b6f631a00f9a22a36e92
      5a13e95c
    • George Joseph's avatar
      res_prometheus: Clone containers before iterating · 53c702e1
      George Joseph authored
      The channels, bridges and endpoints scrape functions were
      grabbing their respective global containers, getting the
      count of entries, allocating metric arrays based on
      that count, then iterating over the container.  If the
      global container had new objects added after the count
      was taken and the metric arrays were allocated, we'd run
      out of metric entries and attempt to write past the end
      of the arrays.
      
      Now each of the scape functions clone their respective
      global containers and all operations are done on the
      clone.  Since the clone is stable between getting the
      count and iterating over it, we can't run past the end
      of the metrics array.
      
      ASTERISK-29130
      Reported-By: Francisco Correia
      Reported-By: BJ Weschke
      Reported-By: Sébastien Duthil
      
      Change-Id: If0c8e40853bc0e9429f2ba9c7f5f358d90c311af
      53c702e1
  21. Apr 01, 2021
    • Joshua C. Colp's avatar
      loader: Output warnings for deprecated modules. · 46ed6af9
      Joshua C. Colp authored
      Using the information from the MODULEINFO XML we can
      now output useful information at the end of module
      loading for deprecated modules. This includes the
      version it was deprecated in, the version it will be
      removed in, and the replacement if available.
      
      ASTERISK-29339
      
      Change-Id: I2080dab97d2186be94c421b41dabf6d79a11611a
      46ed6af9
    • Kevin Harwell's avatar
      res_rtp_asterisk: Fix standard deviation calculation · 0fc906a5
      Kevin Harwell authored
      For some input to the standard deviation algorithm extremely large,
      and wrong numbers were being calculated.
      
      This patch uses a new formula for correctly calculating both the
      running mean and standard deviation for the given inputs.
      
      ASTERISK-29364 #close
      
      Change-Id: Ibc6e18be41c28bed3fde06d612607acc3fbd621f
      0fc906a5
  22. Mar 31, 2021
    • Kevin Harwell's avatar
      res_rtp_asterisk: Don't count 0 as a minimum lost packets · c4a376aa
      Kevin Harwell authored
      The calculated minimum lost packets represents the lowest number of
      lost packets missed during an RTCP report interval. Zero of course
      is the lowest, but the idea is that this value contain the lowest
      number of lost packets once some have been missed.
      
      This patch checks to make sure the number of lost packets over an
      interval is not zero before checking and setting the minimum value.
      
      Also, this patch updates the rtp lost packet test to check for
      packet loss over several reports vs one.
      
      Change-Id: I07d6e21cec61e289c2326138d6bcbcb3c3d5e008
      c4a376aa
    • Kevin Harwell's avatar
      res_rtp_asterisk: Statically declare rtp_drop_packets_data object · 65b68fd0
      Kevin Harwell authored
      This patch makes the drop_packets_data object static.
      
      Change-Id: If4f9b21fa0c47d41a35b6b05941d978efb4da87b
      65b68fd0
Loading