Skip to content
Snippets Groups Projects
  1. Mar 03, 2022
    • George Joseph's avatar
      xml.c, config,c: Add stylesheets and variable list string parsing · b6e482be
      George Joseph authored
      Added functions to open, close, and apply XML Stylesheets
      to XML documents.  Although the presence of libxslt was already
      being checked by configure, it was only happening if xmldoc was
      enabled.  Now it's checked regardless.
      
      Added ability to parse a string consisting of comma separated
      name/value pairs into an ast_variable list.  The reverse of
      ast_variable_list_join().
      
      Change-Id: I1e1d149be22165a1fb8e88e2903a36bba1a6cf2e
      b6e482be
  2. Feb 28, 2022
    • George Joseph's avatar
      core: Config and XML tweaks needed for geolocation · 777326fa
      George Joseph authored
      Added:
      
      Replace a variable in a list:
      int ast_variable_list_replace_variable(struct ast_variable **head,
          struct ast_variable *old, struct ast_variable *new);
      Added test as well.
      
      Create a "name=value" string from a variable list:
      'name1="val1",name2="val2"', etc.
      struct ast_str *ast_variable_list_join(
          const struct ast_variable *head, const char *item_separator,
          const char *name_value_separator, const char *quote_char,
          struct ast_str **str);
      Added test as well.
      
      Allow the name of an XML element to be changed.
      void ast_xml_set_name(struct ast_xml_node *node, const char *name);
      
      Change-Id: I330a5f63dc0c218e0d8dfc0745948d2812141ccb
      777326fa
  3. Feb 25, 2022
    • Naveen Albert's avatar
      ami: Allow events to be globally disabled. · 59b25e9d
      Naveen Albert authored
      The disabledevents setting has been added to the general section
      in manager.conf, which allows users to specify events that
      should be globally disabled and not sent to any AMI listeners.
      
      This allows for processing of these AMI events to end sooner and,
      for frequent AMI events such as Newexten which users may not have
      any need for, allows them to not be processed. Additionally, it also
      cleans up core debug as previously when debug was 3 or higher,
      the debug was constantly spammed by "Analyzing AMI event" messages
      along with a complete dump of the event contents (often for Newexten).
      
      ASTERISK-29853 #close
      
      Change-Id: Id42b9a3722a1f460d745cad1ebc47c537fd4f205
      59b25e9d
    • Naveen Albert's avatar
      func_channel: Add lastcontext and lastexten. · 42525b0f
      Naveen Albert authored
      Adds the lastcontext and lastexten channel fields to allow users
      to access previous dialplan execution locations.
      
      ASTERISK-29840 #close
      
      Change-Id: Ib455fe300cc8e9a127686896ee2d0bd11e900307
      42525b0f
    • Naveen Albert's avatar
      channel.c: Clean up debug level 1. · 7f123b31
      Naveen Albert authored
      Although there are 10 debugs levels, over time,
      many current debug calls have come to use
      inappropriately low debug levels. In particular,
      a select few debug calls (currently all debug 1)
      can result in thousands of debug messages per minute
      for a single call.
      
      This can adds a lot of noise to core debug
      which dilutes the value in having different
      debug levels in the first place, as these
      log messages are from the core internals are
      are better suited for higher debug levels.
      
      Some debugs levels are thus adjusted so that
      debug level 1 is not inappropriately overloaded
      with these extremely high-volume and general
      debug messages.
      
      ASTERISK-29897 #close
      
      Change-Id: I55a71598993552d3d64a401a35ee99474770d4b4
      7f123b31
  4. Feb 23, 2022
    • Naveen Albert's avatar
      res_stir_shaken: refactor utility function · 74742cdb
      Naveen Albert authored
      Refactors temp file utility function into file.c.
      
      ASTERISK-29809 #close
      
      Change-Id: Ife478708c8f2b127239cb73c1755ef18c0bf431b
      74742cdb
    • Naveen Albert's avatar
      cli: Add core dump info to core show settings. · 4358c776
      Naveen Albert authored
      Adds two pieces of information to the core show settings command
      which are useful in the context of getting backtraces.
      
      The first is to display whether or not Asterisk would generate
      a core dump if it were to crash.
      
      The second is to show the current running directory of Asterisk.
      
      ASTERISK-29866 #close
      
      Change-Id: Ic42c0a9ecc233381aad274d86c62808d1ebb4d83
      4358c776
    • Naveen Albert's avatar
      documentation: Adds missing default attributes. · 74e9b60b
      Naveen Albert authored
      The configObject tag contains a default attribute which
      allows the default value to be specified, if applicable.
      This allows for the default value to show up specially on
      the wiki in a way that is clear to users.
      
      There are a couple places in the tree where default values
      are included in the description as opposed to as attributes,
      which means these can't be parsed specially for the wiki.
      These are changed to use the attribute instead of being
      included in the text description.
      
      ASTERISK-29898 #close
      
      Change-Id: I9d7ea08f50075f41459ea7b76654906b674ec755
      74e9b60b
  5. Feb 14, 2022
    • Mike Bradeen's avatar
      taskprocessor.c: Prevent crash on graceful shutdown · 9e71f7fe
      Mike Bradeen authored
      When tps_shutdown is called as part of the cleanup process there is a
      chance that one of the taskprocessors that references the
      tps_singletons object is still running.  The change is to allow for
      tps_shutdown to check tps_singleton's container count and give the
      running taskprocessors a chance to finish.  If after
      AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT (10) seconds there are still
      container references we shutdown anyway as this is most likely a bug
      due to a taskprocessor not being unreferenced.
      
      ASTERISK-29365
      
      Change-Id: Ia932fc003d316389b9c4fd15ad6594458c9727f1
      9e71f7fe
  6. Feb 07, 2022
  7. Feb 03, 2022
    • Sean Bright's avatar
      manager.c: Generate valid XML if attribute names have leading digits. · 118e0342
      Sean Bright authored
      The XML Manager Event Interface (amxml) now generates attribute names
      that are compliant with the XML 1.1 specification. Previously, an
      attribute name that started with a digit would be rendered as-is, even
      though attribute names must not begin with a digit. We now prefix
      attribute names that start with a digit with an underscore ('_') to
      prevent XML validation failures.
      
      This is not backwards compatible but my assumption is that compliant
      XML parsers would already have been complaining about this.
      
      ASTERISK-29886 #close
      
      Change-Id: Icfaa56a131a082d803e9b7db5093806d455a0523
      118e0342
  8. Jan 31, 2022
    • Naveen Albert's avatar
      cdr: allow disabling CDR by default on new channels · 6fc8453e
      Naveen Albert authored
      Adds a new option, defaultenabled, to the CDR core to
      control whether or not CDR is enabled on a newly created
      channel. This allows CDR to be disabled by default on
      new channels and require the user to explicitly enable
      CDR if desired. Existing behavior remains unchanged.
      
      ASTERISK-29808 #close
      
      Change-Id: Ibb78c11974bda229bbb7004b64761980e0b2c6d1
      6fc8453e
  9. Jan 21, 2022
    • Mike Bradeen's avatar
      sched: fix and test a double deref on delete of an executing call back · ac8988c9
      Mike Bradeen authored
      sched: Avoid a double deref when AST_SCHED_DEL_UNREF is called on an
      executing call-back. This is done by adding a new variable 'rescheduled'
      to the struct sched which is set in ast_sched_runq and checked in
      ast_sched_del_nonrunning. ast_sched_del_nonrunning is a replacement for
      now deprecated ast_sched_del which returns a new possible value -2
      if called on an executing call-back with rescheduled set. ast_sched_del
      is modified to call ast_sched_del_nonrunning to maintain existing code.
      AST_SCHED_DEL_UNREF is also updated to look for the -2 in which case it
      will not throw a warning or invoke refcall.
      test_sched: Add a new unit test sched_test_freebird that will check the
      reference count in the resolved scenario.
      
      ASTERISK-29698
      
      Change-Id: Icfb16b3acbc29cf5b4cef74183f7531caaefe21d
      ac8988c9
  10. Jan 19, 2022
  11. 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
  12. 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
  13. Jan 05, 2022
    • 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
      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
    • 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
    • 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
  14. Dec 15, 2021
    • 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
    • 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
  15. Dec 13, 2021
    • Naveen Albert's avatar
      pbx_variables: Increase parsing capabilities of MSet · c6309af5
      Naveen Albert authored
      Currently MSet can only parse a maximum of 24 variables.
      If more variables are provided to MSet, the 24th variable
      will simply contain the remainder of the string and the
      remaining variables thereafter will never get set.
      
      This increases the number of variables that can be parsed
      in one go from 24 to 99. Additionally, documentation is added
      since this limitation is currently undocumented and is
      confusing to users who encounter this limitation.
      
      ASTERISK-29766 #close
      
      Change-Id: I3fe35b462dedec0a452fd9ea7f92c920a3939f16
      c6309af5
    • Naveen Albert's avatar
      pbx: Add variable substitution API for extensions · cc1418ef
      Naveen Albert authored
      Currently, variable substitution involving dialplan
      extensions is quite clunky since it entails obtaining
      the current dialplan location, backing it up, storing
      the desired variables for substitution on the channel,
      performing substitution, then restoring the original
      location.
      
      In addition to being clunky, things could also go wrong
      if an async goto were to occur and change the dialplan
      location during a substitution.
      
      Fundamentally, there's no reason it needs to be done this
      way, so new API is added to allow for directly passing in
      the dialplan location for the purposes of variable
      substitution so we don't need to mess with the channel
      information anymore. Existing API is not changed.
      
      ASTERISK-29745 #close
      
      Change-Id: I23273bf27fa0efb64a606eebf9aa8e2f41a065e4
      cc1418ef
    • Naveen Albert's avatar
      app_mf: Add full tech-agnostic MF support · 2b2b708d
      Naveen Albert authored
      Adds tech-agnostic support for MF signaling by adding
      MF sender and receiver applications as well as Dial
      integration.
      
      ASTERISK-29496-mf #do-not-close
      
      Change-Id: I61962b359b8ec4cfd05df877ddf9f5b8f71927a4
      2b2b708d
    • Alexander Traud's avatar
      progdocs: Fix Doxygen left-overs. · 4b6c7257
      Alexander Traud authored
      Change-Id: I5b5cf9c9cbbe00ba8b379a8d162ac67445d39016
      4b6c7257
  16. Dec 06, 2021
    • Sean Bright's avatar
      channel: Short-circuit ast_channel_get_by_name() on empty arg. · c37cc5d3
      Sean Bright authored
      We know that passing a NULL or empty argument to
      ast_channel_get_by_name() will never result in a matching channel and
      will always result in an error being emitted, so just short-circuit
      out in that case.
      
      ASTERISK-28219 #close
      
      Change-Id: I88eadc748e9c6996fc17467b0a05881bbfd00bce
      c37cc5d3
  17. Dec 02, 2021
  18. Nov 30, 2021
    • Sean Bright's avatar
      config.c: Prevent UB in ast_realtime_require_field. · 04ac4fe5
      Sean Bright authored
      A backend's implementation of the realtime 'require' function may call
      va_arg() and then fail, leaving the va_list in an undefined
      state. Pass a copy of the va_list instead.
      
      ASTERISK-29771 #close
      
      Change-Id: I555565a72af84e96d49f62fe8cb66ba5a78461f4
      04ac4fe5
    • Naveen Albert's avatar
      app_voicemail: Refactor email generation functions · 70cdb0f9
      Naveen Albert authored
      Refactors generic functions used for email generation
      into utils.c so that they can be used by multiple
      modules, including app_voicemail and app_minivm,
      to avoid code duplication.
      
      ASTERISK-29715 #close
      
      Change-Id: I1de0ed3483623e9599711129edc817c45ad237ee
      70cdb0f9
  19. Nov 29, 2021
Loading