Skip to content
Snippets Groups Projects
  1. Jan 20, 2022
  2. Jan 19, 2022
    • Michał Górny's avatar
      main: Enable rdtsc support on NetBSD · d68d90c5
      Michał Górny authored
      Enable the Linux rdtsc implementation on NetBSD as well.  The assembly
      works correctly there.
      
      ASTERISK-29851
      
      Change-Id: I460ad9b4d971913420ecb84186f5ba5ab03f6f37
      d68d90c5
    • Michał Górny's avatar
      build_tools/make_version: Fix sed(1) syntax compatibility with NetBSD · 90d02cf0
      Michał Górny authored
      Fix the sed(1) invocation used to process git-svn-id not to use "\s"
      that is a GNU-ism and is not supported by NetBSD sed.  As a result,
      this call did not work properly and make_version did output the full
      git-svn-id line rather than the revision.
      
      ASTERISK-29852
      
      Change-Id: Ie4b406e2748920643446851a0a252a4ca7245772
      90d02cf0
    • Michał Górny's avatar
      main/utils: Implement ast_get_tid() for NetBSD · c8ef232d
      Michał Górny authored
      Implement the ast_get_tid() function for NetBSD system.  NetBSD supports
      getting the TID via _lwp_self().
      
      ASTERISK-29850
      
      Change-Id: If57fd3f9ea15ef5d010bfbdcbbbae9b379f72f8c
      c8ef232d
    • Michał Górny's avatar
      BuildSystem: Fix misdetection of gethostbyname_r() on NetBSD · 7b1e5fa3
      Michał Górny authored
      Fix the configure script not to detect the presence of gethostbyname_r()
      on NetBSD incorrectly.  NetBSD includes it as an internal libc symbol
      that is not exposed in system headers and that is incompatible with
      other implementations.  In order to avoid misdetecting it, perform
      the symbol check only if the declaration is found in the public header
      first.
      
      ASTERISK-29817
      
      Change-Id: Iafa359b09908251bcd299ff54be003ea129b9eda
      7b1e5fa3
    • Michał Górny's avatar
      include: Remove unimplemented HMAC declarations · eef29d24
      Michał Górny authored
      Remove the HMAC declarations from the includes.  They are
      not implemented nor used anywhere, and their presence breaks the build
      on NetBSD that delivers an incompatible hmac() function in <stdlib.h>.
      
      ASTERISK-29818
      
      Change-Id: I0c4b88645e30174b1b63846a6b328625b69c2ea7
      eef29d24
    • Naveen Albert's avatar
      frame.h: Fix spelling typo · 18c257b4
      Naveen Albert authored
      Fixes CNG description from "noice" to "noise".
      
      ASTERISK-29855 #close
      
      Change-Id: Ie7cbbd7d72b426693df7447384ff8700318cd36d
      18c257b4
    • Naveen Albert's avatar
      res_rtp_asterisk: Fix typo in flag test/set · a9e9e15c
      Naveen Albert authored
      The code currently checks to see if an RFC3389
      warning flag is set, except if it is, it merely
      sets the flag again, the logic of which doesn't
      make any sense.
      
      This adjusts the if comparison to check if the
      flag has NOT been set, and if so, emit a notice
      log event and set the flag so that future frames
      do not cause an event to be logged.
      
      ASTERISK-29856 #close
      
      Change-Id: Ib7098c947c63537d087a03b4646199fbb963f8e1
      a9e9e15c
    • George Joseph's avatar
      bundled_pjproject: Fix srtp detection · cc38ed9c
      George Joseph authored
      Reverted recent change that set '--with-external-srtp' instead
      of '--without-external-srtp'.  Since Asterisk handles all SRTP,
      we don't need it enabled in pjproject at all.
      
      ASTERISK-29867
      
      Change-Id: I2ce1bdd30abd21c062eac8f8fefe9b898787b801
      cc38ed9c
  3. Jan 17, 2022
    • George Joseph's avatar
      res_pjsip: Make message_filter and session multipart aware · f55886a7
      George Joseph authored
      Neither pjsip_message_filter's filter_on_tx_message() nor
      res_pjsip_session's session_outgoing_nat_hook() were multipart
      aware and just assumed that an SDP would be the only thing in
      a message body.  Both were changed to use the new
      pjsip_get_sdp_info() function which searches for an sdp in
      both single- and multi- part message bodies.
      
      ASTERISK-29813
      
      Change-Id: I8f5b8cfdc27f1d4bd3e7491ea9090951a4525c56
      f55886a7
    • George Joseph's avatar
      res_pjsip: Add utils for checking media types · 59cf9f00
      George Joseph authored
      Added two new functions to assist checking media types...
      
      * ast_sip_are_media_types_equal compares two pjsip_media_types.
      * ast_sip_is_media_type_in tests if one media type is in a list
        of others.
      
      Added static definitions for commonly used media types to
      res_pjsip.h.
      
      Changed several modules to use the new functions and static
      definitions.
      
      ASTERISK_29813
      (not ready to close)
      
      Change-Id: Ief77675235bd3bf00a6b095d4673fd878d0801b9
      59cf9f00
    • George Joseph's avatar
      build: Fix issues building pjproject · b59bd3d3
      George Joseph authored
      The change to allow easier hacking on bundled pjproject created
      a few issues:
      
      * The new Makefile was trying to run the bundled make even if
        PJPROJECT_BUNDLED=no.  third-party/Makefile now checks for
        PJPROJECT_BUNDLED and JANSSON_BUNDLED and skips them if they
        are "no".
      
      * When building with bundled, config_site.h was being copied
        only if a full make or a "make main" was done.  A "make res"
        would fail all the pjsip modules because they couldn't find
        config_site.h.  The Makefile now copies config_site.h and
        asterisk_malloc_debug.h into the pjproject source tree
        when it's "configure" is performed.  This is how it used
        to be before the big change.
      
      ASTERISK-29858
      
      Change-Id: I9427264fa3cb8b3f59a95e5f9693eac236a6f76d
      b59bd3d3
    • George Joseph's avatar
      bundled_pjproject: Create generic pjsip_hdr_find functions · f10947ec
      George Joseph authored
      pjsip_msg_find_hdr(), pjsip_msg_find_hdr_by_name(), and
      pjsip_msg_find_hdr_by_names() require a pjsip_msg to be passed in
      so if you need to search a header list that's not in a pjsip_msg,
      you have to do it yourself.  This commit adds generic versions of
      those 3 functions that take in the actual header list head instead
      of a pjsip_msg so if you need to search a list of headers in
      something like a pjsip_multipart_part, you can do so easily.
      
      Change-Id: I6f2c127170eafda48e5e0d5d4d187bcd52b4df07
      f10947ec
  4. Jan 12, 2022
    • Sean Bright's avatar
      say.c: Prevent erroneous failures with 'say' family of functions. · 3fd47840
      Sean Bright authored
      A regression was introduced in ASTERISK~29531 that caused 'say'
      functions to fail with file lists that would previously have
      succeeded. This caused affected channels to hang up where previously
      they would have continued.
      
      We now explicitly check for the empty string to restore the previous
      behavior.
      
      ASTERISK-29859 #close
      
      Change-Id: Ia2e5769868e2792313c2d7c07996efe009c6f8d5
      3fd47840
    • Naveen Albert's avatar
      pbx_variables: add missing ASTSBINDIR variable · e006d2d2
      Naveen Albert authored
      Every config variable in the directories
      section of asterisk.conf currently has a
      counterpart built-in variable containing
      the value of the config option, except
      for the last one, astsbindir, which should
      have an ASTSBINDIR variable.
      
      However, the actual corresponding ASTSBINDIR
      variable is missing in pbx_variables.c.
      
      This adds the missing variable so that all
      the config options have their corresponding
      variable.
      
      ASTERISK-29847 #close
      
      Change-Id: I36006faf471825b36ebc8aa5e87a3bcb38d446fc
      e006d2d2
  5. Jan 11, 2022
    • Naveen Albert's avatar
      documentation: Document built-in system and channel vars · 707f3217
      Naveen Albert authored
      Documentation for built-in special system and channel
      vars is currently outdated, and updating is a manual
      process since there is no XML documentation for these
      anywhere.
      
      This adds documentation for system vars to func_env
      and for channel vars to func_channel so that they
      appear along with the corresponding fields that would
      be accessed using a function.
      
      ASTERISK-29848 #close
      
      Change-Id: I6997f925c4a45fffe71321861f5898a8b7182fa9
      707f3217
  6. Jan 07, 2022
    • George Joseph's avatar
      bundled_pjproject: Make it easier to hack · 3f093b8d
      George Joseph authored
      There are times when you need to troubleshoot issues with bundled
      pjproject or add new features that need to be pushed upstream
      but...
      
      * The source directory created by extracting the pjproject tarball
        is not scanned for code changes so you have to keep forcing
        rebuilds.
      * The source directory isn't a git repo so you can't easily create
        patches, do git bisects, etc.
      * Accidentally doing a make distclean will ruin your day by wiping
        out the source directory, and your changes.
      * etc.
      
      This commit makes that easier.
      See third-party/pjproject/README-hacking.md for the details.
      
      ASTERISK-29824
      
      Change-Id: Idb1251040affdab31d27cd272dda68676da9b268
      3f093b8d
  7. Jan 06, 2022
    • Sean Bright's avatar
      utils.c: Remove all usages of ast_gethostbyname() · 0bbef4d8
      Sean Bright authored
      gethostbyname() and gethostbyname_r() are deprecated in favor of
      getaddrinfo() which we use in the ast_sockaddr family of functions.
      
      ASTERISK-29819 #close
      
      Change-Id: Ie277c0ef768d753b169c121ef570a71665692ab7
      0bbef4d8
    • Naveen Albert's avatar
      say.conf: fix 12pm noon logic · 54f2f1e0
      Naveen Albert authored
      Fixes 12pm noon incorrectly returning 0/a.m.
      Also fixes a misspelling typo in the config.
      
      ASTERISK-29695 #close
      
      Change-Id: Ie40f9618636eb4c483b449bd707a5dcffca5c406
      54f2f1e0
  8. Jan 05, 2022
    • Sean Bright's avatar
      pjproject: Fix incorrect unescaping of tokens during parsing · ee69441f
      Sean Bright authored
      ASTERISK-29664 #close
      
      Change-Id: I29dcde52e9faeaf2609c604eada61c6a9e49d8f5
      ee69441f
    • Mark Petersen's avatar
      app_queue.c: Support for Nordic syntax in announcements · dea71ddb
      Mark Petersen authored
      adding support for playing the correct en/et for nordic languages
      by adding 'n' for neuter gender in the relevant ast_say_number
      
      ASTERISK-29827
      
      Change-Id: I03ebc827d2f0dc95132ab2f42799893c70edc5b1
      dea71ddb
    • Naveen Albert's avatar
      dsp: Add define macro for DTMF_MATRIX_SIZE · 6d716182
      Naveen Albert authored
      Adds the macro DTMF_MATRIX_SIZE to replace
      the magic number 4 sprinkled throughout
      dsp.c.
      
      ASTERISK-29815 #close
      
      Change-Id: Ie3bddb92c6b16204ece0f758009e9490eb33b9ba
      6d716182
    • Naveen Albert's avatar
      ami: Add AMI event for Wink · f133ae6c
      Naveen Albert authored
      Adds an AMI event for a wink frame.
      
      ASTERISK-29830 #close
      
      Change-Id: I83e426de5e37baed79a4dbcc91e9e8d030ef1b56
      f133ae6c
    • Naveen Albert's avatar
      cli: Add module refresh command · 1c2f311b
      Naveen Albert authored
      Adds a command to the CLI to unload and then
      load a module. This makes it easier to perform
      these operations which are often done
      subsequently to load a new version of a module.
      
      "module reload" already refers to reloading of
      configuration, so the name "refresh" is chosen
      instead.
      
      ASTERISK-29807 #close
      
      Change-Id: I595f6f11774a0de2565a1fba38da22309ce93a2c
      1c2f311b
    • Naveen Albert's avatar
      app_mp3: Throw warning on nonexistent stream · 775c371d
      Naveen Albert authored
      Currently, the MP3Player application doesn't
      emit a warning if attempting to play a stream
      which no longer exists. This can be a common
      scenario as many mp3 streams are valid at some
      point but can disappear at any time.
      
      Now a warning is thrown if attempting to play
      a nonexistent MP3 stream, instead of silently
      exiting.
      
      ASTERISK-29829 #close
      
      Change-Id: I53a0bf1ed1740166655eb66fe7675f6f808bf535
      775c371d
    • Naveen Albert's avatar
      documentation: Add missing AMI documentation · b37feb42
      Naveen Albert authored
      Adds missing documentation for some channel,
      bridge, and queue events.
      
      ASTERISK-24427
      ASTERISK-29515
      
      Change-Id: I92b06b88c8cadc0155f95ebe3e870b3e795a8c64
      b37feb42
    • Kevin Harwell's avatar
      tcptls.c: refactor client connection to be more robust · 06f9227a
      Kevin Harwell authored
      The current TCP client connect code, blocks and does not handle EINTR
      error case.
      
      This patch makes the client socket non-blocking while connecting,
      ensures a connect does not immediately fail due to EINTR "errors",
      and adds a connect timeout option.
      
      The original client start call sets the new timeout option to
      "infinite", thus making sure old, orginal behavior is retained.
      
      ASTERISK-29746 #close
      
      Change-Id: I907571843a83e43c0742b95a64785f4411f02671
      06f9227a
    • Naveen Albert's avatar
      app_sf: Add full tech-agnostic SF support · dd6df425
      Naveen Albert authored
      Adds tech-agnostic support for SF signaling
      by adding SF sender and receiver applications
      as well as Dial integration.
      
      ASTERISK-29802 #close
      
      Change-Id: I7ec50752e9a661af639425e5d1e339f17411bcad
      dd6df425
    • Steve Davies's avatar
      app_queue: Fix hint updates, allow dup. hints · 16a63027
      Steve Davies authored
      A previous patch for ASTERISK_29578 caused a 'leak' of
      extension state information across queues, causing the
      state of the first member of unrelated queues to be
      updated in addition to the correct member. Which queues
      and members depended on the order of queues in the
      iterator.
      
      Additionally, it is possible to use the same 'hint:' on
      multiple queue members, so the update cannot break out
      of the update loop early when a match is found.
      
      ASTERISK-29806 #close
      
      Change-Id: If2c1d1cc2a752afd9286d79710fc818596e7a7ad
      16a63027
    • Sean Bright's avatar
      say.c: Honor requests for DTMF interruption. · 4fe94bab
      Sean Bright authored
      SayAlpha, SayAlphaCase, SayDigits, SayMoney, SayNumber, SayOrdinal,
      and SayPhonetic all claim to allow DTMF interruption if the
      SAY_DTMF_INTERRUPT channel variable is set to a truthy value, but we
      are failing to break out of a given 'say' application if DTMF actually
      occurs.
      
      ASTERISK-29816 #close
      
      Change-Id: I6a96e0130560831d2cb45164919862b9bcb6287e
      4fe94bab
    • Florentin Mayer's avatar
      res_pjsip_sdp_rtp: Preserve order of RTP codecs · 4e204db2
      Florentin Mayer authored
      The ast_rtp_codecs_payloads functions do not preserve the order in which
      the payloads were specified on an incoming SDP media line. This leads to
      a problem with the codec negotiation functionality, as the format
      capabilities of the stream are extracted from the ast_rtp_codecs. This
      commit moves the ast_rtp_codec to ast_format conversion to the place
      where the order is still known.
      
      ASTERISK-28863
      ASTERISK-29320
      
      Change-Id: I3aabcfed3f379c36654f59c1872c313d0cb57e25
      4e204db2
    • Joshua C. Colp's avatar
      bridge: Unlock channel during Local peer check. · d83a4686
      Joshua C. Colp authored
      It's not safe to keep the channel locked while locking
      the peer Local channel, as it can result in a deadlock.
      
      This change unlocks it during this time but keeps the
      bridge locked to ensure nothing changes about the bridge.
      
      ASTERISK-29821
      
      Change-Id: Ib68eb7037e5a479bcc2aceee77337cdde1fbdde6
      d83a4686
  9. Jan 04, 2022
    • Josh Soref's avatar
      test_time.c: Tolerate DST transitions · a5cdee36
      Josh Soref authored
      When test_timezone_watch runs very near a DST transition,
      two time zones that would otherwise be expected to report the same
      time can differ because of the DST transition.
      
      Instead of having the test fail when this happens, report the
      times, time zones, and dst flags.
      
      ASTERISK-29722
      
      Change-Id: Id59bdac8b277e14343ccdf0c99b89e92f79f316a
      a5cdee36
  10. Dec 22, 2021
    • George Joseph's avatar
      bundled_pjproject: Add more support for multipart bodies · 0cf4e325
      George Joseph authored
      Adding upstream patch for pull request...
      https://github.com/pjsip/pjproject/pull/2920
      ---------------------------------------------------------------
      
      sip_inv:  Additional multipart support (#2919)
      
      sip_inv.c:inv_check_sdp_in_incoming_msg() deals with multipart
      message bodies in rdata correctly. In the case where early media is
      involved though, the existing sdp has to be retrieved from the last
      tdata sent in this transaction. This, however, always assumes that
      the sdp sent is in a non-multipart body. While there's a function
      to retrieve the sdp from multipart and non-multpart rdata bodies,
      no similar function for tdata exists.  So...
      
      * The existing pjsip_rdata_get_sdp_info2 was refactored to
        find the sdp in any body, multipart or non-multipart, and
        from either an rdata or tdata.  The new function is
        pjsip_get_sdp_info.  This new function detects whether the
        pjsip_msg->body->data is the text representation of the sdp
        from an rdata or an existing pjmedia_sdp_session object
        from a tdata, or whether pjsip_msg->body is a multipart
        body containing either of the two sdp formats.
      
      * The exsting pjsip_rdata_get_sdp_info and pjsip_rdata_get_sdp_info2
        functions are now wrappers that get the body and Content-Type
        header from the rdata and call pjsip_get_sdp_info.
      
      * Two new wrappers named pjsip_tdata_get_sdp_info and
        pjsip_tdata_get_sdp_info2 have been created that get the body
        from the tdata and call pjsip_get_sdp_info.
      
      * inv_offer_answer_test.c was updated to test multipart scenarios.
      
      ASTERISK-29804
      
      Change-Id: I483c7c3d413280c9e247a96ad581278347f9c71b
      0cf4e325
  11. Dec 15, 2021
    • Frederic Van Espen's avatar
      ast_coredumper: Fix deleting results when output dir is set · 965f4abd
      Frederic Van Espen authored
      When OUTPUTDIR is set to another directory and the
      --delete-results-after is set, the resulting txt files are
      not deleted.
      
      ASTERISK-29794 #close
      
      Change-Id: I1c0071f6809a1e3f5cfc455d6eb08378bc0d7286
      965f4abd
    • Naveen Albert's avatar
      pbx_variables: initialize uninitialized variable · bb27d5e1
      Naveen Albert authored
      The variable cp4 in a variable substitution function
      can potentially be used without being initialized
      currently. This causes Asterisk to no longer compile.
      
      This initializes cp4 to NULL to make the compiler
      happy.
      
      ASTERISK-29803 #close
      
      Change-Id: I392579cbb76db2795d5820c9427cf55fbcee9e72
      bb27d5e1
    • Mark Petersen's avatar
      app_queue.c: added DIALEDPEERNUMBER on outgoing channel · 3d71bcd2
      Mark Petersen authored
      added that we set DIALEDPEERNUMBER on the outgoing channels
      so it is avalible in b(content^extension^line)
      this add the same behaviour as Dial
      
      ASTERISK-29795
      
      Change-Id: Icbc589ea2066f0c401a892bf478f6b2fd44e62f6
      3d71bcd2
    • Kevin Harwell's avatar
      http.c: Add ability to create multiple HTTP servers · 05afa061
      Kevin Harwell authored
      Previously, it was only possible to have one HTTP server in Asterisk.
      With this patch it is now possible to have multiple HTTP servers
      listening on different addresses.
      
      Note, this behavior has only been made available through an API call
      from within the TEST_FRAMEWORK. Specifically, this feature has been
      added in order to allow unit test to create/start and stop servers,
      if one has not been enabled through configuration.
      
      Change-Id: Ic5fb5f11e62c019a1c51310f4667b32a4dae52f5
      05afa061
    • Naveen Albert's avatar
      app.c: Throw warnings for nonexistent options · 030f7d41
      Naveen Albert authored
      Currently, Asterisk doesn't throw warnings if options
      are passed into applications that don't accept them.
      This can confuse users if they're unaware that they
      are doing something wrong.
      
      This adds an additional check to parse_options so that
      a warning is thrown anytime an option is parsed that
      doesn't exist in the parsing application, so that users
      are notified of the invalid usage.
      
      ASTERISK-29801 #close
      
      Change-Id: Id029274a57135caca193c913307a63fd75e24679
      030f7d41
  12. Dec 14, 2021
    • Mark Petersen's avatar
      app_voicemail.c: Support for Danish syntax in VM · a4c42e70
      Mark Petersen authored
      added support for playing the correct plural sound file
      dependen on where you have 1 or multipe messages
      based on the existing SE/NO code
      
      ASTERISK-29797
      
      Change-Id: I88aa814d02f3772bb80b474204b1ffb26fe438c2
      a4c42e70
Loading