Skip to content
Snippets Groups Projects
  1. Oct 20, 2021
    • George Joseph's avatar
      BuildSystem: Check for alternate openssl packages · c07e3c2f
      George Joseph authored
      OpenSSL is one of those packages that often have alternatives
      with later versions.  For instance, CentOS/EL 7 has an
      openssl package at version 1.0.2 but there's an openssl11
      package from the epel repository that has 1.1.1.  This gets
      installed to /usr/include/openssl11 and /usr/lib64/openssl11.
      Unfortunately, the existing --with-ssl and --with-crypto
      ./configure options expect to point to a source tree and
      don't work in this situation.  Also unfortunately, the
      checks in ./configure don't use pkg-config.
      
      In order to make this work with the existing situation, you'd
      have to run...
      ./configure --with-ssl=/usr/lib64/openssl11 \
          --with-crypto=/usr/lib64/openssl11 \
          CFLAGS=-I/usr/include/openssl11
      
      BUT...  those options don't get passed down to bundled pjproject
      so when you run make, you have to include the CFLAGS again
      which is a big pain.
      
      Oh...  To make matters worse, although you can specify
      PJPROJECT_CONFIGURE_OPTS on the ./configure command line,
      they don't get saved so if you do a make clean, which will
      force a re-configure of bundled pjproject, those options
      don't get used.
      
      So...
      
      * In configure.ac... Since pkg-config is installed by install_prereq
        anyway, we now use it to check for the system openssl >= 1.1.0.
        If that works, great.  If not, we check for the openssl11
        package. If that works, great.  If not, we fall back to just
        checking for any openssl.  If pkg-config isn't installed for some
        reason, or --with-ssl=<dir> or --with-crypto=<dir> were specified
        on the ./configure command line, we fall back to the existing
        logic that uses AST_EXT_LIB_CHECK().
      
      * The whole OpenSSL check process has been moved up before
        THIRD_PARTY_CONFIGURE(), which does the initial pjproject
        bundled configure, is run.  This way the results of the above
        checks, which may result in new include or library directories,
        is included.
      
      * Although not strictly needed for openssl, We now save the value of
        PJPROJECT_CONFIGURE_OPTS in the makeopts file so it can be used
        again if a re-configure is triggered.
      
      ASTERISK-29693
      
      Change-Id: I341ab7603e6b156aa15a66f43675ac5029d5fbde
      c07e3c2f
  2. Oct 19, 2021
    • Sean Bright's avatar
      func_talkdetect.c: Fix logical errors in silence detection. · 8c2720e5
      Sean Bright authored
      There are 3 separate changes here:
      
      1. The documentation erroneously stated that the dsp_talking_threshold
         argument was a number of milliseconds when it is actually an energy
         level used by the DSP code to classify talking vs. silence.
      
      2. Fixes a copy paste error in the argument handling code.
      
      3. Don't erroneously switch to the talking state if we aren't actively
         handling a frame we've classified as talking.
      
      Patch inspired by one provided by Moritz Fain (License #6961).
      
      ASTERISK-27816 #close
      
      Change-Id: I5953fd570b98b49c41cee55bfe3b941753fb2511
      8c2720e5
  3. Oct 15, 2021
  4. Oct 13, 2021
  5. Oct 11, 2021
    • Sean Bright's avatar
      Makefile: Use basename in a POSIX-compliant way. · 804b1987
      Sean Bright authored
      If you aren't using GNU coreutils, chances are that your basename
      doesn't know about the -s argument. Luckily for us, basename does what
      we need it do even without the -s argument.
      
      Change-Id: I8b81a429bb037b997ee6640ff8a2b5e860962bb7
      804b1987
  6. Oct 08, 2021
  7. Oct 07, 2021
    • Naveen Albert's avatar
      chan_iax2: Add encryption for RSA authentication · 437b2bfb
      Naveen Albert authored
      Adds support for encryption to RSA-authenticated
      calls. Also prevents crashes if an RSA IAX2 call
      is initiated to a switch requiring encryption
      but no secret is provided.
      
      ASTERISK-20219
      
      Change-Id: I18f1f9d7c59b4f9cffa00f3b94a4c875846efd40
      437b2bfb
  8. Oct 06, 2021
    • Matthew Kern's avatar
      res_pjsip_t38: bind UDPTL sessions like RTP · 15e43222
      Matthew Kern authored
      In res_pjsip_sdp_rtp, the bind_rtp_to_media_address option and the
      fallback use of the transport's bind address solve problems sending
      media on systems that cannot send ipv4 packets on ipv6 sockets, and
      certain other situations. This change extends both of these behaviors
      to UDPTL sessions as well in res_pjsip_t38, to fix fax-specific
      problems on these systems, introducing a new option
      endpoint/t38_bind_udptl_to_media_address.
      
      ASTERISK-29402
      
      Change-Id: I87220c0e9cdd2fe9d156846cb906debe08c63557
      15e43222
  9. Sep 30, 2021
    • Naveen Albert's avatar
      app_read: Fix null pointer crash · 5a6f1407
      Naveen Albert authored
      If the terminator character is not explicitly specified
      and an indications tone is used for reading a digit,
      there is no null pointer check so Asterisk crashes.
      This prevents null usage from occuring.
      
      ASTERISK-29673 #close
      
      Change-Id: Ie941833e123c3dbfb88371b5de5edbbe065514ac
      5a6f1407
    • Jean Aunis's avatar
      res_rtp_asterisk: fix memory leak · 0ab4e749
      Jean Aunis authored
      Add missing reference decrement in rtp_deallocate_transport()
      
      ASTERISK-29671
      
      Change-Id: I8d22dbedb90e8dade0829b7a28372f404b07caa9
      0ab4e749
  10. Sep 28, 2021
  11. Sep 24, 2021
    • Joseph Nadiv's avatar
      res_pjsip_registrar: Remove unavailable contacts if exceeds max_contacts · 43687640
      Joseph Nadiv authored
      The behavior of max_contacts and remove_existing are connected.  If
      remove_existing is enabled, the soonest expiring contacts are removed.
      This may occur when there is an unavailable contact.  Similarly,
      when remove_existing is not enabled, registrations from good
      endpoints are rejected in favor of retaining unavailable contacts.
      
      This commit adds a new AOR option remove_unavailable, and the effect
      of this setting will depend on remove_existing.  If remove_existing
      is set to no, we will still remove unavailable contacts when they
      exceed max_contacts, if there are any. If remove_existing is set to
      yes, we will prioritize the removal of unavailable contacts before
      those that are expiring soonest.
      
      ASTERISK-29525
      
      Change-Id: Ia2711b08f2b4d1177411b1be23e970d7fdff5784
      43687640
  12. Sep 23, 2021
    • Joshua C. Colp's avatar
      ari: Ignore invisible bridges when listing bridges. · ea36473c
      Joshua C. Colp authored
      When listing bridges we go through the ones present in
      ARI, get their snapshot, turn it into JSON, and add it
      to the payload we ultimately return.
      
      An invisible "dial bridge" exists within ARI that would
      also try to be added to this payload if the channel
      "create" and "dial" routes were used. This would ultimately
      fail due to invisible bridges having no snapshot
      resulting in the listing of bridges failing.
      
      This change makes it so that the listing of bridges
      ignores invisible ones.
      
      ASTERISK-29668
      
      Change-Id: I14fa4b589b4657d1c2a5226b0f527f45a0cd370a
      ea36473c
  13. Sep 22, 2021
  14. Sep 21, 2021
    • Naveen Albert's avatar
      func_channel: Add CHANNEL_EXISTS function. · cf0d656a
      Naveen Albert authored
      Adds a function to check for the existence of a channel by
      name or by UNIQUEID.
      
      ASTERISK-29656 #close
      
      Change-Id: Ib464e9eb6e13dc683a846286798fecff4fd943cb
      cf0d656a
    • Naveen Albert's avatar
      app_queue: Fix hint updates for included contexts · cfd0246d
      Naveen Albert authored
      Previously, if custom hints were used with the hint:
      format in app_queue, when device state changes occured,
      app_queue would only do a literal string comparison of
      the context used for the hint in app_queue and the context
      of the hint which just changed state. This caused hints
      to not update and become stale if the context associated
      with the agent included the context which actually changes
      state, essentially completely breaking device state for
      any such agents defined in this manner.
      
      This fix adds an additional check to ensure that included
      contexts are also compared against the context which changed
      state, so that the behavior is correct no matter whether the
      context is specified to app_queue directly or indirectly.
      
      ASTERISK-29578 #close
      
      Change-Id: I8caf2f8da8157ef3d9ea71a8568c1eec95592b78
      cfd0246d
    • Sean Bright's avatar
      res_http_media_cache.c: Compare unaltered MIME types. · b2c834e3
      Sean Bright authored
      Rather than stripping parameters from Content-Type headers before
      comparison, first try to compare the whole string. If no match is
      found, strip the parameters and try that way.
      
      ASTERISK-29275 #close
      
      Change-Id: I2963c8ecbb3a9605b78b6421c415108d77a66a0f
      b2c834e3
    • Naveen Albert's avatar
      logger: Add custom logging capabilities · a65bb134
      Naveen Albert authored
      Adds the ability for users to log to custom log levels
      by providing custom log level names in logger.conf. Also
      adds a logger show levels CLI command.
      
      ASTERISK-29529
      
      Change-Id: If082703cf81a436ae5a565c75225fa8c0554b702
      a65bb134
    • Sean Bright's avatar
      app_externalivr.c: Fix mixed leading whitespace in source code. · dce142ba
      Sean Bright authored
      No functional changes.
      
      Change-Id: I46514152c0af67f395526374aaa847ccd6a85378
      dce142ba
  15. Sep 20, 2021
  16. Sep 16, 2021
  17. Sep 15, 2021
    • Carlos Oliva's avatar
      app_mp3: Force output to 16 bits in mpg123 · e8f7b530
      Carlos Oliva authored
      In new mpg123 versions (since 1.26) the default output is 32 bits
      Asterisk expects the output in 16 bits, so we force the output to be on 16 bits.
      It will work wit new and old versions of mpg123.
      Thanks Thomas Orgis <thomas-forum@orgis.org> for giving the key!
      
      ASTERISK-29635 #close
      
      Change-Id: I88c7740118b5af4e895bd8b765b68ed5c11fc816
      e8f7b530
    • George Joseph's avatar
      pjproject: Add patch to fix trailing whitespace issue in rtpmap · 0947c302
      George Joseph authored
      An issue was found where a particular manufacturer's phones add a
      trailing space to the end of the rtpmap attribute when specifying
      a payload type that has a "param" after the format name and clock
      rate. For example:
      
      a=rtpmap:120 opus/48000/2 \r\n
      
      Because pjmedia_sdp_attr_get_rtpmap currently takes everything after
      the second '/' up to the line end as the param, the space is
      included in future comparisons, which then fail if the param being
      compared to doesn't also have the space.
      
      We now use pj_scan_get() to parse the param part of rtpmap so
      trailing whitespace is automatically stripped.
      
      ASTERISK-29654
      
      Change-Id: Ibd0a4e243a69cde7ba9312275b13ab62ab86bc1b
      0947c302
    • Naveen Albert's avatar
      res_pjsip_caller_id: Add ANI2/OLI parsing · 1a23c9c0
      Naveen Albert authored
      Adds parsing of ANI II digits (Originating
      Line Information) to PJSIP, on par with
      what currently exists in chan_sip.
      
      ASTERISK-29472
      
      Change-Id: Ifc938a7a7d45ce33999ebf3656a542226f6d3847
      1a23c9c0
  18. Sep 14, 2021
    • Naveen Albert's avatar
      app_mf: Add channel agnostic MF sender · 60daa8f7
      Naveen Albert authored
      Adds a SendMF application and PlayMF manager
      event to send arbitrary R1 MF tones on the
      current or specified channel.
      
      ASTERISK-29496
      
      Change-Id: I5d89afdbccee3f86cc702ed96d882f3d351327a4
      60daa8f7
  19. Sep 13, 2021
  20. Sep 10, 2021
    • Sungtae Kim's avatar
      resource_channels.c: Fix external media data option · d9747104
      Sungtae Kim authored
      Fixed the external media creation handle to handle the 'data' option correctly.
      
      ASTERISK-29629
      
      Change-Id: I22e57fe8ebf3d3e08fb2121aa4a8a52cc62e8129
      d9747104
    • Naveen Albert's avatar
      func_strings: Add STRBETWEEN function · 6198c1d2
      Naveen Albert authored
      Adds the STRBETWEEN function, which can be used to insert a
      substring between each character in a string. For instance,
      this can be used to insert pauses between DTMF tones in a
      string of digits.
      
      ASTERISK-29627
      
      Change-Id: Ice23009d4a8e9bb9718d2b2301d405567087d258
      6198c1d2
    • Sean Bright's avatar
      test_abstract_jb.c: Fix put and put_out_of_order memory leaks. · ee62a079
      Sean Bright authored
      We can't rely on RAII_VAR(...) to properly clean up data that is
      allocated within a loop.
      
      ASTERISK-27176 #close
      
      Change-Id: Ib575616101230c4f603519114ec62ebf3936882c
      ee62a079
    • Naveen Albert's avatar
      func_env: Add DIRNAME and BASENAME functions · 19de228e
      Naveen Albert authored
      Adds the DIRNAME and BASENAME functions, which are
      wrappers around the corresponding C library functions.
      These can be used to safely and conveniently work with
      file paths and names in the dialplan.
      
      ASTERISK-29628 #close
      
      Change-Id: Id3aeb907f65c0ff96b6e57751ff0cb49d61db7f3
      19de228e
    • Naveen Albert's avatar
      func_sayfiles: Retrieve say file names · b6b7b149
      Naveen Albert authored
      Up until now, all of the logic used to translate
      arguments to the Say applications has been
      directly coupled to playback, preventing other
      modules from using this logic.
      
      This refactors code in say.c and adds a SAYFILES
      function that can be used to retrieve the file
      names that would be played. These can then be
      used in other applications or for other purposes.
      
      Additionally, a SayMoney application and a SayOrdinal
      application are added. Both SayOrdinal and SayNumber
      are also expanded to support integers greater than
      one billion.
      
      ASTERISK-29531
      
      Change-Id: If9718c89353b8e153d84add3cc4637b79585db19
      b6b7b149
    • Naveen Albert's avatar
      res_tonedetect: Tone detection module · a6eb1b6f
      Naveen Albert authored
      dsp.c contains arbitrary tone detection functionality
      which is currently only used for fax tone recognition.
      This change makes this functionality publicly
      accessible so that other modules can take advantage
      of this.
      
      Additionally, a WaitForTone and TONE_DETECT app and
      function are included to allow users to do their
      own tone detection operations in the dialplan.
      
      ASTERISK-29546
      
      Change-Id: Ie38c395000f4fd4d04e942e8658e177f8f499b26
      a6eb1b6f
    • George Joseph's avatar
      res_snmp: Add -fPIC to _ASTCFLAGS · 2806a450
      George Joseph authored
      With gcc 11, res/res_snmp.c and res/snmp/agent.c need the
      -fPIC option added to its _ASTCFLAGS.
      
      ASTERISK-29634
      
      Change-Id: I34649c85e075fd954e578378fabf798c3f038f50
      2806a450
  21. Sep 09, 2021
    • Sean Bright's avatar
      term.c: Add support for extended number format terminfo files. · 858cb386
      Sean Bright authored
      ncurses 6.1 introduced an extended number format for terminfo files
      which the terminfo parsing in Asterisk is not able to parse. This
      results in some TERM values that do support color (screen-256color on
      Ubuntu 20.04 for example) to not get a color console.
      
      ASTERISK-29630 #close
      
      Change-Id: I27a4fcfab502219924af2d6b1c46feba92903cb3
      858cb386
    • Sean Bright's avatar
      app_voicemail.c: Ability to silence instructions if greeting is present. · 347e9a7e
      Sean Bright authored
      There is an option to silence voicemail instructions but it does not
      take into consideration if a recorded greeting exists or not. Add a
      new 'S' option that does that.
      
      ASTERISK-29632 #close
      
      Change-Id: I03f2f043a9beb9d99deab302247e2a8686066fb4
      347e9a7e
  22. Sep 08, 2021
    • Jasper Hafkenscheid's avatar
      res_srtp: Disable parsing of not enabled cryptos · c1a57590
      Jasper Hafkenscheid authored
      When compiled without extended srtp crypto suites also disable parsing
      these from received SDP. This prevents using these, as some client
      implementations are not stable.
      
      ASTERISK-29625
      
      Change-Id: I7dafb29be1cdaabdc984002573f4bea87520533a
      c1a57590
Loading