Skip to content
Snippets Groups Projects
  1. Jan 12, 2024
    • Asterisk Development Team's avatar
      Update for 20.6.0-rc1 · 3ba04709
      Asterisk Development Team authored
      20.6.0-rc1
      3ba04709
    • George Joseph's avatar
      Revert "core & res_pjsip: Improve topology change handling." · a42c5438
      George Joseph authored
      This reverts commit 315eb551.
      
      Over the past year, we've had several reports of "topology storms"
      occurring where 2 external facing channels connected by one or more
      local channels and bridges will get themselves in a state where
      they continually send each other topology change requests.  This
      usually manifests itself in no-audio calls and a flood of
      "Exceptionally long queue length" messages.  It appears that this
      commit is the cause so we're reverting it for now until we can
      determine a more appropriate solution.
      
      Resolves: #530
      (cherry picked from commit 4715c1b11ca64092e28c3f8f08d9a4a07eda75e5)
      a42c5438
    • Naveen Albert's avatar
      menuselect: Use more specific error message. · fd57ddb3
      Naveen Albert authored
      Instead of using the same error message for
      missing dependencies and conflicts, be specific
      about what actually went wrong.
      
      Resolves: #520
      (cherry picked from commit f22f49e77a9b6bc51118f700a1e2fef2931ea68b)
      fd57ddb3
    • Maximilian Fridrich's avatar
      res_pjsip_nat: Fix potential use of uninitialized transport details · b2eb25a8
      Maximilian Fridrich authored
      The ast_sip_request_transport_details must be zero initialized,
      otherwise this could lead to a SEGV.
      
      Resolves: #509
      (cherry picked from commit 3e069f3274670ed0bdbe94429c6568a7c8377304)
      b2eb25a8
    • Naveen Albert's avatar
      app_if: Fix faulty EndIf branching. · d7948f54
      Naveen Albert authored
      This fixes faulty branching logic for the
      EndIf application. Instead of computing
      the next priority, which should be done
      for false conditionals or ExitIf, we should
      simply advance to the next priority.
      
      Resolves: #341
      (cherry picked from commit 83a0cb51e5453a80ed30f7d022b95c729a91e7e1)
      d7948f54
    • Naveen Albert's avatar
      manager.c: Fix regression due to using wrong free function. · c6b82b19
      Naveen Albert authored
      Commit 424be345 introduced
      a regression by calling ast_free on memory allocated by
      realpath. This causes Asterisk to abort when executing this
      function. Since the memory is allocated by glibc, it should
      be freed using ast_std_free.
      
      Resolves: #513
      (cherry picked from commit b9ed57092fa76726b12254f35c2cc517eb97008d)
      c6b82b19
    • Naveen Albert's avatar
      config_options.c: Fix truncation of option descriptions. · 8a73bac2
      Naveen Albert authored
      This increases the format width of option descriptions
      to avoid needless truncation for longer descriptions.
      
      Resolves: #428
      (cherry picked from commit fcf36a876645a356594d510192eacdcdabda274c)
      8a73bac2
    • Naveen Albert's avatar
      manager.c: Improve clarity of "manager show connected". · 776c2ca6
      Naveen Albert authored
      Improve the "manager show connected" CLI command
      to clarify that the last two columns are permissions
      related, not counts, and use sufficient widths
      to consistently display these values.
      
      ASTERISK-30143 #close
      Resolves: #482
      
      (cherry picked from commit bc53a2a08722fdd47220601533781d68b0d41ade)
      776c2ca6
    • Sean Bright's avatar
      make_xml_documentation: Really collect LOCAL_MOD_SUBDIRS documentation. · cfe82679
      Sean Bright authored
      Although `make_xml_documentation`'s `print_dependencies` command was
      corrected by the previous fix (#461) for #142, the `create_xml` was
      not properly handling `LOCAL_MOD_SUBDIRS` XML documentation.
      
      (cherry picked from commit 91c733bc6906345f159894291bdc55bf499db353)
      cfe82679
    • Naveen Albert's avatar
      general: Fix broken links. · 91127a61
      Naveen Albert authored
      This fixes a number of broken links throughout the
      tree, mostly caused by wiki.asterisk.org being replaced
      with docs.asterisk.org, which should eliminate the
      need for sporadic fixes as in f28047db.
      
      Resolves: #430
      (cherry picked from commit 8f5581b0d05999b3959275aec606d393ba90b0b6)
      91127a61
    • George Joseph's avatar
      MergeApproved.yml: Remove unneeded concurrency · 98a44b95
      George Joseph authored
      The concurrency parameter on the MergeAndCherryPick job has
      been rmeoved.  It was a hold-over from earlier days.
      
      (cherry picked from commit 0005aa29954bc9480d169cad5f6605eb490d1f82)
      98a44b95
    • Maximilian Fridrich's avatar
      app_dial: Add option "j" to preserve initial stream topology of caller · 8f9200d1
      Maximilian Fridrich authored
      Resolves: #462
      
      UserNote: The option "j" is now available for the Dial application which
      uses the initial stream topology of the caller to create the outgoing
      channels.
      
      (cherry picked from commit dcf58ee88f133d4c9ed9a2f2c3ab4f69fc977c42)
      8f9200d1
    • George Joseph's avatar
      ast_coredumper: Increase reliability · 9ae72b0a
      George Joseph authored
      Instead of searching for the asterisk binary and the modules in the
      filesystem, we now get their locations, along with libdir, from
      the coredump itself...
      
      For the binary, we can use `gdb -c <coredump> ... "info proc exe"`.
      gdb can print this even without having the executable and symbols.
      
      Once we have the binary, we can get the location of the modules with
      `gdb ... "print ast_config_AST_MODULE_DIR`
      
      If there was no result then either it's not an asterisk coredump
      or there were no symbols loaded.  Either way, it's not usable.
      
      For libdir, we now run "strings" on the note0 section of the
      coredump (which has the shared library -> memory address xref) and
      search for "libasteriskssl|libasteriskpj", then take the dirname.
      
      Since we're now getting everything from the coredump, it has to be
      correct as long as we're not crossing namespace boundaries like
      running asterisk in a docker container but trying to run
      ast_coredumper from the host using a shared file system (which you
      shouldn't be doing).
      
      There is still a case for using --asterisk-bin and/or --libdir: If
      you've updated asterisk since the coredump was taken, the binary,
      libraries and modules won't match the coredump which will render it
      useless.  If you can restore or rebuild the original files that
      match the coredump and place them in a temporary directory, you can
      use --asterisk-bin, --libdir, and a new --moddir option to point to
      them and they'll be correctly captured in a tarball created
      with --tarball-coredumps.  If you also use --tarball-config, you can
      use a new --etcdir option to point to what normally would be the
      /etc/asterisk directory.
      
      Also addressed many "shellcheck" findings.
      
      Resolves: #445
      (cherry picked from commit 44f152290797fdc22597e6251b3c973adb9973ef)
      9ae72b0a
    • Sean Bright's avatar
      logger.c: Move LOG_GROUP documentation to dedicated XML file. · 2c6385a1
      Sean Bright authored
      The `get_documentation` awk script will only extract the first
      DOCUMENTATION block that it finds in a given file. This is by design
      (9bc2127d) to prevent AMI event documentation from being pulled in to
      the core.xml documentation file.
      
      Because of this, the `LOG_GROUP` documentation added in 89709e25 was
      not being properly extracted and was missing fom the resulting XML
      documentation file. This commit moves the `LOG_GROUP` documentation to
      a separate `logger.xml` file.
      
      (cherry picked from commit 0b6e3bc59b5a6c2356b7d9afdfeb7377297895d9)
      2c6385a1
    • Matthew Fredrickson's avatar
      res_odbc.c: Allow concurrent access to request odbc connections · 37a89d3c
      Matthew Fredrickson authored
      There are valid scenarios where res_odbc's connection pool might have some dead
      or stuck connections while others are healthy (imagine network
      elements/firewalls/routers silently timing out connections to a single DB and a
      single IP address, or a heterogeneous connection pool connected to potentially
      multiple IPs/instances of a replicated DB using a DNS front end for load
      balancing and one replica fails).
      
      In order to time out those unhealthy connections without blocking access to
      other parts of Asterisk that may attempt access to the connection pool, it would
      be beneficial to not lock/block access around the entire pool in
      _ast_odbc_request_obj2 while doing potentially blocking operations on connection
      pool objects such as the connection_dead() test, odbc_obj_connect(), or by
      dereferencing a struct odbc_obj for the last time and triggering a
      odbc_obj_disconnect().
      
      This would facilitate much quicker and concurrent timeout of dead connections
      via the connection_dead() test, which could block potentially for a long period
      of time depending on odbc.ini or other odbc connector specific timeout settings.
      
      This also would make rapid failover (in the clustered DB scenario) much quicker.
      
      This patch changes the locking in _ast_odbc_request_obj2() to not lock around
      odbc_obj_connect(), _disconnect(), and connection_dead(), while continuing to
      lock around truly shared, non-immutable state like the connection_cnt member and
      the connections list on struct odbc_class.
      
      Fixes: #465
      (cherry picked from commit bfac3945f6402fa7f9c539651e5c107183aaa06a)
      37a89d3c
    • Sean Bright's avatar
      res_pjsip_header_funcs.c: Check URI parameter length before copying. · 5988da4e
      Sean Bright authored
      Fixes #477
      
      (cherry picked from commit a2f0d99d9d6458a5bee73aeefb44bc0ae99d81df)
      5988da4e
    • Sean Bright's avatar
      config.c: Log #exec include failures. · 2f741671
      Sean Bright authored
      If the script referenced by `#exec` does not exist, writes anything to
      stderr, or exits abnormally or with a non-zero exit status, we log
      that to Asterisk's error logging channel.
      
      Additionally, write out a warning if the script produces no output.
      
      Fixes #259
      
      (cherry picked from commit 4327ec2907f77fb723f883c896f56f92d0a42495)
      2f741671
    • Sean Bright's avatar
      make_xml_documentation: Properly handle absolute LOCAL_MOD_SUBDIRS. · 3ed329ed
      Sean Bright authored
      If LOCAL_MOD_SUBDIRS contains absolute paths, do not prefix them with
      the path to Asterisk's source tree.
      
      Fixes #142
      
      (cherry picked from commit 2293edffd07e9bf1fd689e2753a41927e3ce2904)
      3ed329ed
    • Sean Bright's avatar
      app_voicemail.c: Completely resequence mailbox folders. · 06d86c41
      Sean Bright authored
      Resequencing is a process that occurs when we open a voicemail folder
      and discover that there are gaps between messages (e.g. `msg0000.txt`
      is missing but `msg0001.txt` exists). Resequencing involves shifting
      the existing messages down so we end up with a sequential list of
      messages.
      
      Currently, this process stops after reaching a threshold based on the
      message limit (`maxmsg`) configured on the current folder. However, if
      `maxmsg` is lowered when a voicemail folder contains more than
      `maxmsg + 10` messages, resequencing will not run completely leaving
      the mailbox in an inconsistent state.
      
      We now resequence up to the maximum number of messages permitted by
      `app_voicemail` (currently hard-coded at 9999 messages).
      
      Fixes #86
      
      (cherry picked from commit 6556a92393b15bcaeddad98daa68ce2735fdeae1)
      06d86c41
    • Naveen Albert's avatar
      sig_analog: Fix channel leak when mwimonitor is enabled. · 7279d754
      Naveen Albert authored
      When mwimonitor=yes is enabled for an FXO port,
      the do_monitor thread will launch mwi_thread if it thinks
      there could be MWI on an FXO channel, due to the noise
      threshold being satisfied. This, in turns, calls
      analog_ss_thread_start in sig_analog. However, unlike
      all other instances where __analog_ss_thread is called
      in sig_analog, this call path does not properly set
      pvt->ss_astchan to the Asterisk channel, which means
      that the Asterisk channel is NULL when __analog_ss_thread
      starts executing. As a result, the thread exits and the
      channel is never properly cleaned up by calling ast_hangup.
      
      This caused issues with do_monitor on incoming calls,
      as it would think the channel was still owned even while
      receiving events, leading to an infinite barrage of
      warning messages; additionally, the channel would persist
      improperly.
      
      To fix this, the assignment is added to the call path
      where it is missing (which is only used for mwi_thread).
      A warning message is also added since previously there
      was no indication that __analog_ss_thread was exiting
      abnormally. This resolves both the channel leak and the
      condition that led to the warning messages.
      
      Resolves: #458
      (cherry picked from commit 22e34193ee530144351d381ac00f1abc3f14f44f)
      7279d754
    • Sean Bright's avatar
      res_rtp_asterisk.c: Update for OpenSSL 3+. · d52c4275
      Sean Bright authored
      In 5ac5c2b0 we defined `OPENSSL_SUPPRESS_DEPRECATED` to silence
      deprecation warnings. This commit switches over to using
      non-deprecated API.
      
      (cherry picked from commit 3859b630a75140def15e46729eaac2d3b00ce1a6)
      d52c4275
    • Sean Bright's avatar
      alembic: Update list of TLS methods available on ps_transports. · b7e66d49
      Sean Bright authored
      Related to #221 and #222.
      
      Also adds `*.ini` to the `.gitignore` file in ast-db-manage for
      convenience.
      
      (cherry picked from commit 0dcf03e844a414e418217f45dbdc2ae0378f3bcf)
      b7e66d49
    • Naveen Albert's avatar
      func_channel: Expose previously unsettable options. · a6d856ab
      Naveen Albert authored
      Certain channel options are not set anywhere or
      exposed in any way to users, making them unusable.
      This exposes some of these options which make sense
      for users to manipulate at runtime.
      
      Resolves: #442
      (cherry picked from commit c222343ec60e4442350787d7b291fc74a139c489)
      a6d856ab
    • Sean Bright's avatar
      app.c: Allow ampersands in playback lists to be escaped. · f19b74ad
      Sean Bright authored
      Any function or application that accepts a `&`-separated list of
      filenames can now include a literal `&` in a filename by wrapping the
      entire filename in single quotes, e.g.:
      
      ```
      exten = _X.,n,Playback('https://example.com/sound.cgi?a=b&c=d'&hello-world)
      ```
      
      Fixes #172
      
      UpgradeNote: Ampersands in URLs passed to the `Playback()`,
      `Background()`, `SpeechBackground()`, `Read()`, `Authenticate()`, or
      `Queue()` applications as filename arguments can now be escaped by
      single quoting the filename. Additionally, this is also possible when
      using the `CONFBRIDGE` dialplan function, or configuring various
      features in `confbridge.conf` and `queues.conf`.
      
      (cherry picked from commit f8212d4594b8af24db896d8988f734e2c51694f6)
      f19b74ad
    • Sean Bright's avatar
      uri.c: Simplify ast_uri_make_host_with_port() · 989e6189
      Sean Bright authored
      (cherry picked from commit ff012323e870a073765ab7f5910e4a876d1a0f4b)
      989e6189
    • Sean Bright's avatar
      func_curl.c: Remove CURLOPT() plaintext documentation. · 69a19aab
      Sean Bright authored
      I assume this was missed when initially converting to XML
      documentation and we've been kicking the can down the road since.
      
      (cherry picked from commit 9e1a60727ef9e9353330e05ad10d6a5dd059b6e2)
      69a19aab
    • Sean Bright's avatar
      res_http_websocket.c: Set hostname on client for certificate validation. · fe92d093
      Sean Bright authored
      Additionally add a `assert()` to in the TLS client setup code to
      ensure that hostname is set when it is supposed to be.
      
      Fixes #433
      
      (cherry picked from commit f2961f048d898e1cd54cfe144181daa4ccbfef7f)
      fe92d093
    • Sean Bright's avatar
      live_ast: Add astcachedir to generated asterisk.conf. · eb48273b
      Sean Bright authored
      `astcachedir` (added in b0842713) was not added to `live_ast` so
      continued to point to the system `/var/cache` directory instead of the
      one in the live environment.
      
      (cherry picked from commit 978d09fc350006669309aace7fe3d48e1067e143)
      eb48273b
    • George Joseph's avatar
      SECURITY.md: Update with correct documentation URL · 3127baec
      George Joseph authored
      (cherry picked from commit d10d4d9ddd08513af7a47b1db50d7a3106fdac04)
      3127baec
    • Naveen Albert's avatar
      func_lock: Add missing see-also refs to documentation. · 4d928ee9
      Naveen Albert authored
      Resolves: #423
      (cherry picked from commit 12b353eae0f4af7fa77767315218d182b7fb8c9a)
      4d928ee9
    • Matthew Fredrickson's avatar
      app_followme.c: Grab reference on nativeformats before using it · eac9ad69
      Matthew Fredrickson authored
      Fixes a crash due to a lack of proper reference on the nativeformats
      object before passing it into ast_request().  Also found potentially
      similar use case bugs in app_chanisavail.c, bridge.c, and bridge_basic.c
      
      Fixes: #388
      (cherry picked from commit 275f7911b53fc9661524413126382ab9a5306fd0)
      eac9ad69
    • Naveen Albert's avatar
      configs: Improve documentation for bandwidth in iax.conf. · 52388f11
      Naveen Albert authored
      This improves the documentation for the bandwidth setting
      in iax.conf by making it clearer what the ramifications
      of this setting are. It also changes the sample default
      from low to high, since only high is compatible with good
      codecs that people will want to use in the vast majority
      of cases, and this is a common gotcha that trips up new users.
      
      Resolves: #425
      (cherry picked from commit 1f19227eabd2e11cc25eae1017e3dc8a6985baa6)
      52388f11
    • Naveen Albert's avatar
      logger: Add channel-based filtering. · 0007625a
      Naveen Albert authored
      This adds the ability to filter console
      logging by channel or groups of channels.
      This can be useful on busy systems where
      an administrator would like to analyze certain
      calls in detail. A dialplan function is also
      included for the purpose of assigning a channel
      to a group (e.g. by tenant, or some other metric).
      
      ASTERISK-30483 #close
      
      Resolves: #242
      
      UserNote: The console log can now be filtered by
      channels or groups of channels, using the
      logger filter CLI commands.
      
      (cherry picked from commit a0fc8d1b5fda261ebd124cb49de61a4192d1b6f2)
      0007625a
    • Sean Bright's avatar
      chan_iax2.c: Don't send unsanitized data to the logger. · c2680f63
      Sean Bright authored
      This resolves an issue where non-printable characters could be sent to
      the console/log files.
      
      (cherry picked from commit d2afb10eed220f8e7d353e0c093dcf971201904c)
      c2680f63
    • George Joseph's avatar
      codec_ilbc: Disable system ilbc if version >= 3.0.0 · 1d87c27c
      George Joseph authored
      Fedora 37 started shipping ilbc 3.0.4 which we don't yet support.
      configure.ac now checks the system for "libilbc < 3" instead of
      just "libilbc".  If true, the system version of ilbc will be used.
      If not, the version included at codecs/ilbc will be used.
      
      Resolves: #84
      (cherry picked from commit d819a6bccb18f5098e509fb729eadbf7146871cb)
      1d87c27c
    • Sean Bright's avatar
      resource_channels.c: Explicit codec request when creating UnicastRTP. · da35b6a2
      Sean Bright authored
      Fixes #394
      
      (cherry picked from commit a83c761c95f6db82425d47a3cd6b265d5656dcde)
      da35b6a2
    • Sean Bright's avatar
      doc: Update IP Quality of Service links. · fb7d39db
      Sean Bright authored
      Fixes #328
      
      (cherry picked from commit 26918d05f483af124eefbb0b8735384e4ec1d5e4)
      fb7d39db
    • George Joseph's avatar
      chan_pjsip: Add PJSIPHangup dialplan app and manager action · 94f931a6
      George Joseph authored
      See UserNote below.
      
      Exposed the existing Hangup AMI action in manager.c so we can use
      all of it's channel search and AMI protocol handling without
      duplicating that code in dialplan_functions.c.
      
      Added a lookup function to res_pjsip.c that takes in the
      string represenation of the pjsip_status_code enum and returns
      the actual status code.  I.E.  ast_sip_str2rc("DECLINE") returns
      603.  This allows the caller to specify PJSIPHangup(decline) in
      the dialplan, just like Hangup(call_rejected).
      
      Also extracted the XML documentation to its own file since it was
      almost as large as the code itself.
      
      UserNote: A new dialplan app PJSIPHangup and AMI action allows you
      to hang up an unanswered incoming PJSIP call with a specific SIP
      response code in the 400 -> 699 range.
      
      (cherry picked from commit cd77953172a2769577f7821e397408ab8f2d7d9f)
      94f931a6
    • Sean Bright's avatar
      chan_iax2.c: Ensure all IEs are displayed when dumping frame contents. · f96d7ef7
      Sean Bright authored
      When IAX2 debugging was enabled (`iax2 set debug on`), if the last IE
      in a frame was one that may not have any data - such as the CALLTOKEN
      IE in an NEW request - it was not getting displayed.
      
      (cherry picked from commit 0e126b384137f6db1aca04452c6f1bc05694d548)
      f96d7ef7
    • Naveen Albert's avatar
      chan_dahdi: Warn if nonexistent cadence is requested. · e75aebc9
      Naveen Albert authored
      If attempting to ring a channel using a nonexistent cadence,
      emit a warning, before falling back to the default cadence.
      
      Resolves: #409
      (cherry picked from commit 4b9a4483fc7b2d5518504435562e8acc63e085b9)
      e75aebc9
Loading