Skip to content
Snippets Groups Projects
  1. Nov 08, 2021
    • Naveen Albert's avatar
      sig_analog: Fix truncated buffer copy · f9ba1ee7
      Naveen Albert authored
      Fixes compiler warning caused by a truncated copy of the ANI2 into a
      buffer of size 10. This could prevent the null terminator from being
      copied if the copy value exceeds the size of the buffer. This increases
      the buffer size to 101 to ensure there is no way for truncation to occur.
      
      ASTERISK-29702 #close
      
      Change-Id: Ief9052212952840fa44de6463b8699fdb3e163d0
      f9ba1ee7
    • Naveen Albert's avatar
      app_voicemail: Fix phantom voicemail bug on rerecord · 4e514419
      Naveen Albert authored
      If users are able to press # for options while leaving
      a message and then press 3 to rerecord the message, if
      the caller hangs up during the rerecord prompt but before
      Asterisk starts recording a message, then an "empty"
      voicemail gets processed whereby an email gets sent out
      notifying the user of a 0:00 duration message. The file
      doesn't actually exist, so playback will fail since there
      was no message to begin with.
      
      This adds a check after the streaming of the rerecord
      announcement to see if the caller has hung up. If so,
      we bail out early so that we can clean up properly.
      
      ASTERISK-29391 #close
      
      Change-Id: Id965d72759a2fd3b39afb76fec08aaebebe75c31
      4e514419
    • Naveen Albert's avatar
      chan_iax2: Allow both secret and outkey at dial time · df9aeea4
      Naveen Albert authored
      Historically, the dial syntax for IAX2 has held that
      an outkey (used only for RSA authenticated calls)
      and a secret (used only for plain text and MD5 authenticated
      calls, historically) were mutually exclusive, and thus
      the same position in the dial string was used for both
      values.
      
      Now that encryption is possible with RSA authentication,
      this poses a limitation, since encryption requires a
      secret and RSA authentication requires an outkey. Thus,
      the dial syntax is extended so that both a secret and
      an outkey can be specified.
      
      The new extended syntax is backwards compatible with the
      old syntax. However, a secret can now be specified after
      the outkey, or the outkey can be specified after the secret.
      This makes it possible to spawn an encrypted RSA authenticated
      call without a corresponding peer being predefined in iax.conf.
      
      ASTERISK-29707 #close
      
      Change-Id: I1f8149313ed760169d604afbb07720a8b07dd00e
      df9aeea4
  2. Nov 04, 2021
  3. Nov 01, 2021
  4. Oct 29, 2021
    • Sean Bright's avatar
      various: Fix GCC 11.2 compilation issues. · ce2d743d
      Sean Bright authored
      * Initialize some variables that are never used anyway.
      
      * Use valid pointers instead of integers cast to void pointers when
        calling pthread_setspecific().
      
      ASTERISK-29711 #close
      ASTERISK-29713 #close
      
      Change-Id: I8728cd6f2f4b28e0e48113c5da450b768c2a6683
      ce2d743d
  5. Oct 28, 2021
    • George Joseph's avatar
      ast_coredumper: Refactor to better find things · 8aea2e59
      George Joseph authored
      The search for a running asterisk when --running is used
      has been greatly simplified and in the event it doesn't
      work, you can now specify a pid to use on the command
      line with --pid.
      
      The search for asterisk modules when --tarball-coredumps
      is used has been enhanced to have a better chance of finding
      them and in the event it doesn't work, you can now specify
      --libdir on the command line to indicate the library directory
      where they were installed.
      
      The DATEFORMAT variable was renamed to DATEOPTS and is now
      passed to the 'date' utility rather than running DATEFORMAT
      as a command.
      
      The coredump and output files are now renamed with DATEOPTS.
      This can be disabled by specifying --no-rename.
      
      Several confusing and conflicting options were removed:
      --append-coredumps
      --conffile
      --no-default-search
      --tarball-uniqueid
      
      The script was re-structured to make it easier for follow.
      
      Change-Id: I674be64bdde3ef310b6a551d4911c3b600ffee59
      8aea2e59
    • Kevin Harwell's avatar
      strings/json: Add string delimter match, and object create with vars methods · 67d1f881
      Kevin Harwell authored
      Add a function to check if there is an exact match a one string between
      delimiters in another string.
      
      Add a function that will create an ast_json object out of a list of
      Asterisk variables. An excludes string can also optionally be passed
      in.
      
      Also, add a macro to make it easier to get object integers.
      
      Change-Id: I5f34f18e102126aef3997f19a553a266d70d6226
      67d1f881
  6. Oct 27, 2021
    • Ben Ford's avatar
      STIR/SHAKEN: Option split and response codes. · 1031a180
      Ben Ford authored
      The stir_shaken configuration option now has 4 different choices to pick
      from: off, attest, verify, and on. Off and on behave the same way they
      do now. Attest will only perform attestation on the endpoint, and verify
      will only perform verification on the endpoint.
      
      Certain responses are required to be sent based on certain conditions
      for STIR/SHAKEN. For example, if we get a Date header that is outside of
      the time range that is considered valid, a 403 Stale Date response
      should be sent. This and several other responses have been added.
      
      Change-Id: I4ac1ecf652cd0e336006b0ca638dc826b5b1ebf7
      1031a180
  7. Oct 25, 2021
  8. Oct 21, 2021
    • Kevin Harwell's avatar
      res_speech: Add a type conversion, and new engine unregister methods · 8beac820
      Kevin Harwell authored
      Add a new function that converts a speech results type to a string.
      Also add another function to unregister an engine, but returns a
      pointer to the unregistered engine object instead of a success/fail
      integer.
      
      Change-Id: I0f7de17cb411021c09fb03988bc2b904e1380192
      8beac820
    • Mike Bradeen's avatar
      various: Fix GCC 11 compilation issues. · 99a1a427
      Mike Bradeen authored
      test_voicemail_api: Use empty char* for empty_msg_ids.
      chan_skinny: Fix size of calledParty to be maximum extension.
      menuselect: Change Makefile to stop deprecated warnings. Added comments
      test_linkedlist: 'bogus' variable was manually allocated from a macro
      and the test fails if this happens but the compiler couldn't 'see' this
      and returns a warning. memset to all 0's after allocation.
      chan_ooh323: Fixed various indentation issues that triggered misleading
       indentation warnings.
      
      ASTERISK-29682
      Reported by: George Joseph
      
      Change-Id: If4fe42222c8444dc16828a42731ee53b4ce5cbbe
      99a1a427
    • Shloime Rosenblum's avatar
      apps/app_playback.c: Add 'mix' option to app_playback · cfae5224
      Shloime Rosenblum authored
      I am adding a mix option that will play by filename and say.conf unlike
      say option that will only play with say.conf. It
      will look on the format of the name, if it is like say it play with
      say.conf if not it will play the file name.
      
      ASTERISK-29662
      
      Change-Id: I815816916a308f0fa8f165140dc15772dcbd547a
      cfae5224
  9. Oct 20, 2021
    • George Joseph's avatar
      BuildSystem: Check for alternate openssl packages · 0adcdbd1
      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
      0adcdbd1
  10. Oct 19, 2021
    • Sean Bright's avatar
      func_talkdetect.c: Fix logical errors in silence detection. · 886983b1
      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
      886983b1
  11. Oct 15, 2021
  12. Oct 14, 2021
  13. Oct 11, 2021
    • Sean Bright's avatar
      Makefile: Use basename in a POSIX-compliant way. · 9fcd50a8
      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
      9fcd50a8
  14. Oct 08, 2021
  15. Oct 07, 2021
    • Naveen Albert's avatar
      chan_iax2: Add encryption for RSA authentication · 7ff6c437
      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
      7ff6c437
  16. Oct 01, 2021
    • Matthew Kern's avatar
      res_pjsip_t38: bind UDPTL sessions like RTP · 5e9799a4
      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
      5e9799a4
  17. Sep 30, 2021
    • Naveen Albert's avatar
      app_read: Fix null pointer crash · b40ca38c
      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
      b40ca38c
  18. Sep 29, 2021
  19. Sep 28, 2021
  20. Sep 24, 2021
    • Joseph Nadiv's avatar
      res_pjsip_registrar: Remove unavailable contacts if exceeds max_contacts · 47cb177b
      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
      47cb177b
  21. Sep 23, 2021
    • Joshua C. Colp's avatar
      ari: Ignore invisible bridges when listing bridges. · 0aac38c0
      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
      0aac38c0
  22. Sep 22, 2021
  23. Sep 21, 2021
    • Naveen Albert's avatar
      app_queue: Fix hint updates for included contexts · 5abf499d
      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
      5abf499d
    • Sean Bright's avatar
      res_http_media_cache.c: Compare unaltered MIME types. · 02f54e27
      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
      02f54e27
    • Naveen Albert's avatar
      logger: Add custom logging capabilities · 148f8355
      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
      148f8355
    • Sean Bright's avatar
      app_externalivr.c: Fix mixed leading whitespace in source code. · 6698753b
      Sean Bright authored
      No functional changes.
      
      Change-Id: I46514152c0af67f395526374aaa847ccd6a85378
      6698753b
  24. Sep 20, 2021
  25. Sep 15, 2021
    • George Joseph's avatar
      pjproject: Add patch to fix trailing whitespace issue in rtpmap · 54a9dbb2
      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
      54a9dbb2
    • Carlos Oliva's avatar
      app_mp3: Force output to 16 bits in mpg123 · 07c297d0
      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
      07c297d0
    • Naveen Albert's avatar
      res_pjsip_caller_id: Add ANI2/OLI parsing · 5b5c358e
      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
      5b5c358e
    • Naveen Albert's avatar
      app_mf: Add channel agnostic MF sender · b760bad2
      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
      b760bad2
Loading