Skip to content
Snippets Groups Projects
  1. Sep 10, 2022
    • George Joseph's avatar
      res_geolocation: Add built-in profiles · 2d5a6498
      George Joseph authored
      The trigger to perform outgoing geolocation processing is the
      presence of a geoloc_outgoing_call_profile on an endpoint. This
      is intentional so as to not leak location information to
      destinations that shouldn't receive it.   In a totally dynamic
      configuration scenario however, there may not be any profiles
      defined in geolocation.conf.  This makes it impossible to do
      outgoing processing without defining a "dummy" profile in the
      config file.
      
      This commit adds 4 built-in profiles:
        "<prefer_config>"
        "<discard_config>"
        "<prefer_incoming>"
        "<discard_incoming>"
      The profiles are empty except for having their precedence
      set and can be set on an endpoint to allow processing without
      entries in geolocation.conf.  "<discard_config>" is actually the
      best one to use in this situation.
      
      ASTERISK-30182
      
      Change-Id: I1819ccfa404ce59802a3a07ad1cabed60fb9480a
      2d5a6498
    • Joshua C. Colp's avatar
      res_pjsip_sdp_rtp: Skip formats without SDP details. · f3de933b
      Joshua C. Colp authored
      When producing an outgoing SDP we iterate through the configured
      formats and produce SDP information. It is possible for some
      configured formats to not have SDP information available. If this
      is the case we skip over them to allow the SDP to still be
      produced.
      
      ASTERISK-29185
      
      Change-Id: I3e37569aa4ca341260e6ca5904dc2f75e46a1749
      f3de933b
    • Naveen Albert's avatar
      cli: Prevent assertions on startup from bad ao2 refs. · c7612521
      Naveen Albert authored
      If "core show channels" is run before startup has completed, it
      is possible for bad ao2 refs to occur because the system is not
      yet fully initialized. This will lead to an assertion failing.
      
      To prevent this, initialization of CLI builtins is moved to be
      later along in the main load sequence. Core CLI commands are
      loaded at the same time, but channel-related commands are loaded
      later on.
      
      ASTERISK-29846 #close
      
      Change-Id: If6b3cde802876bd738c1b4cf2683bea6ddc615b6
      c7612521
  2. Sep 09, 2022
    • Joshua C. Colp's avatar
      pjsip: Add TLS transport reload support for certificate and key. · a0713a9f
      Joshua C. Colp authored
      This change adds support using the pjsip_tls_transport_restart
      function for reloading the TLS certificate and key, if the filenames
      remain unchanged. This is useful for Let's Encrypt and other
      situations. Note that no restart of the transport will occur if
      the certificate and key remain unchanged.
      
      ASTERISK-30186
      
      Change-Id: I9bc95a6bf791830a9491ad9fa43c17d4010028d0
      a0713a9f
    • Naveen Albert's avatar
      res_tonedetect: Fix typos referring to wrong variables. · 754346a4
      Naveen Albert authored
      Fixes two typos that cause fax detection to not work.
      One refers to the wrong frame variable, and the other
      refers to the subclass.integer instead of the frametype
      as it should.
      
      ASTERISK-30192 #close
      
      Change-Id: I7b35fdb7bcf25a29a212eee37c20812c64ab3ef1
      754346a4
    • Mike Bradeen's avatar
      alembic: add missing ps_endpoints columns · 46776c77
      Mike Bradeen authored
      The following required columns were missing,
      now added to the ps_endpoints table:
      
      incoming_call_offer_pref
      outgoing_call_offer_pref
      stir_shaken_profile
      
      ASTERISK-29453
      
      Change-Id: I5cf565edf30195844d6acbc1e1de8c5f0d837568
      46776c77
    • Sean Bright's avatar
      chan_dahdi.c: Resolve a format-truncation build warning. · 583e017f
      Sean Bright authored
      With gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0:
      
      > chan_dahdi.c:4129:18: error: ‘%s’ directive output may be truncated
      >   writing up to 255 bytes into a region of size between 242 and 252
      >   [-Werror=format-truncation=]
      
      This removes the error-prone sizeof(...) calculations in favor of just
      doubling the size of the base buffer.
      
      Change-Id: I2d276785286730d3d5d0a921bcea2e065dbf27c5
      583e017f
    • Alexei Gradinari's avatar
      res_pjsip_pubsub: Postpone destruction of old subscriptions on RLS update · 12c4c1bf
      Alexei Gradinari authored
      Set termination state to old subscriptions to prevent queueing and sending
      NOTIFY messages on exten/device state changes.
      
      Postpone destruction of old subscriptions until all already queued tasks
      that may be using old subscriptions have completed.
      
      ASTERISK-29906
      
      Change-Id: I96582aad3a26515ca73a8460ee6756f56f6ba23b
      12c4c1bf
    • Sean Bright's avatar
      channel.h: Remove redundant declaration. · 155c7962
      Sean Bright authored
      The DECLARE_STRINGFIELD_SETTERS_FOR() declares ast_channel_name_set()
      for us, so no need to declare it separately.
      
      Change-Id: I4813a884ada475ddc62bca480bceb4a53b3ec59a
      155c7962
  3. Sep 08, 2022
    • Naveen Albert's avatar
      features: Add transfer initiation options. · 3fa66c92
      Naveen Albert authored
      Adds additional control options over the transfer
      feature functionality to give users more control
      in how the transfer feature sounds and works.
      
      First, the "transfer" sound that plays when a transfer is
      initiated can now be customized by the user in
      features.conf, just as with the other transfer sounds.
      
      Secondly, the user can now specify the transfer extension
      in advance by using the TRANSFER_EXTEN variable. If
      a valid extension is contained in this variable, the call
      will automatically be transferred to this destination.
      Otherwise, it will fall back to collecting the extension
      from the user as is always done now.
      
      ASTERISK-29899 #close
      
      Change-Id: Ibff309caa459a2b958706f2ed0ca393b1ef502e3
      3fa66c92
  4. Aug 31, 2022
  5. Aug 30, 2022
  6. Aug 17, 2022
    • Naveen Albert's avatar
      general: Very minor coding guideline fixes. · e2e049e4
      Naveen Albert authored
      Fixes a few coding guideline violations:
      * Use of C99 comments
      * Opening brace on same line as function prototype
      
      ASTERISK-30163 #close
      
      Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7
      e2e049e4
  7. Aug 10, 2022
    • George Joseph's avatar
      res_geolocation: Address user issues, remove complexity, plug leaks · 8a8416e3
      George Joseph authored
      * Added processing for the 'confidence' element.
      * Added documentation to some APIs.
      * removed a lot of complex code related to the very-off-nominal
        case of needing to process multiple location info sources.
      * Create a new 'ast_geoloc_eprofile_to_pidf' API that just takes
        one eprofile instead of a datastore of multiples.
      * Plugged a huge leak in XML processing that arose from
        insufficient documentation by the libxml/libxslt authors.
      * Refactored stylesheets to be more efficient.
      * Renamed 'profile_action' to 'profile_precedence' to better
        reflect it's purpose.
      * Added the config option for 'allow_routing_use' which
        sets the value of the 'Geolocation-Routing' header.
      * Removed the GeolocProfileCreate and GeolocProfileDelete
        dialplan apps.
      * Changed the GEOLOC_PROFILE dialplan function as follows:
        * Removed the 'profile' argument.
        * Automatically create a profile if it doesn't exist.
        * Delete a profile if 'inheritable' is set to no.
      * Fixed various bugs and leaks
      * Updated Asterisk WiKi documentation.
      
      ASTERISK-30167
      
      Change-Id: If38c23f26228e96165be161c2f5e849cb8e16fa0
      8a8416e3
    • Naveen Albert's avatar
      chan_iax2: Add missing options documentation. · ff044c22
      Naveen Albert authored
      Adds missing dial resource option documentation.
      
      ASTERISK-30164 #close
      
      Change-Id: I674e1fc9b1e5d67a20599bd4b418ce294d48fc83
      ff044c22
  8. Aug 08, 2022
    • Naveen Albert's avatar
      app_confbridge: Fix memory leak on updated menu options. · dc7ec11c
      Naveen Albert authored
      If the CONFBRIDGE function is used to dynamically set
      menu options, a memory leak occurs when a menu option
      that has been set is overridden, since the menu entry
      is not destroyed before being freed. This ensures that
      it is.
      
      Additionally, logic that duplicates the destroy function
      is removed in lieu of the destroy function itself.
      
      ASTERISK-28422 #close
      
      Change-Id: I71cfb5c24e636984d41086d1333a416dc12ff995
      dc7ec11c
  9. Aug 05, 2022
  10. Aug 02, 2022
    • Naveen Albert's avatar
      manager: Remove documentation for nonexistent action. · f4a020a4
      Naveen Albert authored
      The manager XML documentation documents a "FilterList"
      action, but there is no such action. Therefore, this can
      lead to confusion when people try to use a documented
      action that does not, in fact, exist. This is removed
      as the action never did exist in the past, nor would it
      be trivial to add since we only store the regex_t
      objects, so the filter list can't actually be provided
      without storing that separately. Most likely, the
      documentation was originally added (around version 10)
      in anticipation of something that never happened.
      
      ASTERISK-29917 #close
      
      Change-Id: I846b16fd6f80a91d4ddc5d8a861b522d7c6f8f97
      f4a020a4
  11. Aug 01, 2022
    • Naveen Albert's avatar
      general: Improve logging levels of some log messages. · c6544865
      Naveen Albert authored
      Adjusts some logging levels to be more or less important,
      that is more prominent when actual problems occur and less
      prominent for less noteworthy things.
      
      ASTERISK-30153 #close
      
      Change-Id: Ifc8f7df427aa018627db462125ae744986d3261b
      c6544865
    • Naveen Albert's avatar
      cdr.conf: Remove obsolete app_mysql reference. · 5feebc08
      Naveen Albert authored
      The CDR sample config still mentions that app_mysql
      is available in the addons directory, but this is
      incorrect as it was removed as of 19. This removes
      that to avoid confusion.
      
      ASTERISK-30160 #close
      
      Change-Id: Ie5293ccb4f2b365896981811b480544e67bb9cd7
      5feebc08
    • Naveen Albert's avatar
      general: Remove obsolete SVN references. · 165368bf
      Naveen Albert authored
      There are a handful of files in the tree that
      reference an SVN link for the coding guidelines.
      
      This removes these because the links are dead
      and the vast majority of source files do not
      contain these links, so this is more consistent.
      
      app_skel still maintains an (up to date) link
      to the coding guidelines.
      
      ASTERISK-30159 #close
      
      Change-Id: I35bbb20f66982e98099cff3029ede20091ffdac7
      165368bf
    • Naveen Albert's avatar
      app_confbridge: Add missing AMI documentation. · 2d8f2696
      Naveen Albert authored
      Documents the ConfbridgeListRooms AMI response,
      which is currently not documented.
      
      ASTERISK-30020 #close
      
      Change-Id: Id6fff7a936244bae7b52686301eb740c1169cdea
      2d8f2696
    • Naveen Albert's avatar
      app_meetme: Add missing AMI documentation. · 4af88150
      Naveen Albert authored
      The MeetmeList and MeetmeListRooms AMI
      responses are currently completely undocumented.
      This adds documentation for these responses.
      
      ASTERISK-30018 #close
      
      Change-Id: Id93135b7edf01de6f8fba266e2122989dc8996b8
      4af88150
  12. Jul 27, 2022
    • Naveen Albert's avatar
      func_srv: Document field parameter. · 83912496
      Naveen Albert authored
      Adds missing documentation for the field parameter
      for the SRVRESULT function.
      
      ASTERISK-30151
      Reported by: Chris Young
      
      Change-Id: I4385a2e0892a07e30dea1a8a0588e2c1bea2b1f1
      83912496
  13. Jul 26, 2022
    • Naveen Albert's avatar
      pbx_functions.c: Manually update ast_str strlen. · c771e2dd
      Naveen Albert authored
      When ast_func_read2 is used to read a function using
      its read function (as opposed to a native ast_str read2
      function), the result is copied directly by the function
      into the ast_str buffer. As a result, the ast_str length
      remains initialized to 0, which is a bug because this is
      not the real string length.
      
      This can cascade and have issues elsewhere, such as when
      reading substrings of functions that only register read
      as opposed to read2 callbacks. In this case, since reading
      ast_str_strlen returns 0, the returned substring is empty
      as opposed to the actual substring. This has caused
      the ast_str family of functions to behave inconsistently
      and erroneously, in contrast to the pbx_variables substitution
      functions which work correctly.
      
      This fixes this issue by manually updating the ast_str length
      when the result is copied directly into the ast_str buffer.
      
      Additionally, an assertion and a unit test that previously
      exposed these issues are added, now that the issue is fixed.
      
      ASTERISK-29966 #close
      
      Change-Id: I4e2dba41410f9d4dff61c995d2ca27718248e07f
      c771e2dd
  14. Jul 24, 2022
    • Sergey V. Lobanov's avatar
      build: fix bininstall launchd issue on cross-platform build · f645157a
      Sergey V. Lobanov authored
      configure script detects /sbin/launchd, but the result of this
      check is not used in Makefile (bininstall). Makefile also detects
      /sbin/launchd file to decide if it is required to install
      safe_asterisk.
      
      configure script correctly detects cross compile build and sets
      PBX_LAUNCHD=0
      
      In case of building asterisk on MacOS host for Linux target using
      external toolchain (e.g. OpenWrt toolchain), bininstall does not
      install safe_asterisk (due to /sbin/launchd detection in Makefile),
      but it is required on target (Linux).
      
      This patch adds HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@ to makeopts.in to
      use the result of /sbin/launchd detection from configure script in
      Makefile.
      Also this patch uses HAVE_SBIN_LAUNCHD in Makefile (bininstall) to
      decide if it is required to install safe_asterisk.
      
      ASTERISK-29905 #close
      
      Change-Id: Iff61217276cd188f43f51ef4cdbffe39d9f07f65
      f645157a
  15. Jul 20, 2022
  16. Jul 14, 2022
    • Michael Neuhauser's avatar
      res_pjsip: delay contact pruning on Asterisk start · 37c16f9e
      Michael Neuhauser authored
      Move the call to ast_sip_location_prune_boot_contacts() *after* the call
      to ast_res_pjsip_init_options_handling() so that
      res/res_pjsip/pjsip_options.c is informed about the contact deletion and
      updates its sip_options_contact_statuses list. This allows for an AMI
      event to be sent by res/res_pjsip/pjsip_options.c if the endpoint
      registers again from the same remote address and port (i.e., same URI)
      as used before the Asterisk restart.
      
      ASTERISK-30109
      Reported-by: Michael Neuhauser
      
      Change-Id: I1ba4478019e4931a7085f62708d9b66837e901a8
      37c16f9e
    • Naveen Albert's avatar
      chan_dahdi: Fix buggy and missing Caller ID parameters · f2f397c1
      Naveen Albert authored
      There are several things wrong with analog Caller ID
      handling that are fixed by this commit:
      
      callerid.c's Caller ID generation function contains the
      logic to use the presentation to properly send the proper
      Caller ID. However, currently, DAHDI does not pass any
      presentation information to the Caller ID module, which
      means that presentation is completely ignored on all calls.
      This means that lines could be getting Caller ID information
      they aren't supposed to.
      
      Part of the reason this has been obscured is because the
      simple switch logic for handling the built in *67 and *82
      is completely wrong. Rather than modifying the presentation
      for the call accordingly (which is what it's supposed to do),
      it simply blanks out the Caller ID or fills it in. This is
      wrong, so wrong that it makes a mockery of the specification.
      Additionally, it would leave to the "UNAVAILABLE" disposition
      being used for Caller ID generation as opposed to the "PRIVATE"
      disposition that it should have been using. This is now fixed
      to only update the presentation and not modify the number and
      name, so that the simple switch *67/*82 work correctly.
      
      Next, sig_analog currently only copies over the name and number,
      nothing else, when it is filling in a duplicated caller id
      structure. Thus, we also now copy over the presentation
      information so that is available for the Caller ID spill.
      Additionally, this meant that "valid" was implicitly 0,
      and as such presentation would always fail to "Unavailable".
      The validity is therefore also copied over so it can be used
      by ast_party_id_presentation.
      
      As part of this fix, new API is added so that all the relevant
      Caller ID information can be passed in to the Caller ID generation
      functions. Parameters that are also completely missing from the
      Caller ID spill have also been added, to enhance the compatibility,
      correctness, and completeness of the Asterisk Caller ID implementation.
      
      ASTERISK-29991 #close
      
      Change-Id: Icc44a5e09979916f4c18a440f96e10dc1c76ae15
      f2f397c1
    • Sam Banks's avatar
      queues.conf.sample: Correction of typo · be6a03f6
      Sam Banks authored
      ASTERISK-30126 #close
      
      Change-Id: I009c4dcbf9338a13e3baf87b52a5bbe4f9f81a42
      be6a03f6
    • Naveen Albert's avatar
      chan_dahdi: Add POLARITY function. · 8a214170
      Naveen Albert authored
      Adds a POLARITY function which can be used to
      retrieve the current polarity of an FXS channel
      as well as set the polarity of an FXS channel
      to idle or reverse at any point during a call.
      
      ASTERISK-30000 #close
      
      Change-Id: If6f50998f723e4484bf68e2473f5cedfeaf9b8f1
      8a214170
  17. Jul 13, 2022
    • Mike Bradeen's avatar
      Makefile: Avoid git-make user conflict · 7cc026b3
      Mike Bradeen authored
      make_version now silently checks if the required git commands will
      fail.  If they do, then return UNKNOWN__git_check_fail to
      distinguish this failure from other UNKNOWN__ version failures
      
      Makefile checks for this value on install and exits out with
      instructions
      
      ASTERISK-30029
      
      Change-Id: If8f10cac8f509c08981120f17555762342020221
      7cc026b3
    • Naveen Albert's avatar
      app_confbridge: Always set minimum video update interval. · 2843e567
      Naveen Albert authored
      Currently, if multiple video-enabled ConfBridges are
      conferenced together, we immediately get into a scenario
      where an infinite sequence of video updates fills up
      the taskprocessor queue and causes memory consumption
      to climb unabated until Asterisk is killed. This is due
      to the core bridging mechanism that provides video updates
      (softmix_bridge_write_control in bridge_softmix.c)
      continously updating all the channels in the bridge with
      video updates.
      
      The logic to do so in the core is that the video updates
      should be provided if the video_update_discard property
      for the bridge is 0, or if enough time has elapsed since
      the last video update. Thus, we already have a safeguard
      built in to ensure the scenario described above does not
      happen. Currently, however, this safeguard is not being
      adequately ensured.
      
      In app_confbridge, the video_update_discard property
      defaults to 2000, which is a healthy value that should
      completely prevent this issue. However, this value is
      only set onto the bridge in the SFU video mode. This
      leaves video modes such as follow_talker completely
      vulnerable, since video_update_discard will actually
      be 0, since the default or set value was never applied.
      As a result, the core bridging mechanism will always
      try to provide video updates regardless of when the last
      one was sent.
      
      To prevent this issue from happening, we now always
      set the video_update_discard property on the bridge
      with the value from the bridge profile. The app_confbridge
      defaults will thus ensure that infinite video updates
      no longer happen in any video mode.
      
      ASTERISK-29907 #close
      
      Change-Id: I4accb2536ac62797950468e9930f12ef7dd486b2
      2843e567
    • Sean Bright's avatar
      pbx.c: Simplify ast_context memory management. · d25bf55d
      Sean Bright authored
      Allocate all of the ast_context's character data in the structure's
      flexible array member and eliminate the clunky fake_context. This will
      simplify future changes to ast_context.
      
      Change-Id: I98357de75d8ac2b3c4c9f201223632e6901021ea
      d25bf55d
    • George Joseph's avatar
      geoloc_eprofile.c: Fix setting of loc_src in set_loc_src() · 80d6f5eb
      George Joseph authored
      line 196:    loc_src = '\0';
      should have been
      line 196:    *loc_src = '\0';
      
      The issue was caught by the gcc optimizer complaining that
      loc_src had a zero length because the pointer itself was being
      set to NULL instead of the _contents_ of the pointer being set
      to the NULL terminator.
      
      ASTERISK-30138
      Reported-by: Sean Bright
      
      Change-Id: Id247be113cc8510f043ca053d5b4f5f3d32acd29
      80d6f5eb
  18. Jul 12, 2022
    • George Joseph's avatar
      Geolocation: chan_pjsip Capability Preview · 1fa568e7
      George Joseph authored
      This commit adds res_pjsip_geolocation which gives chan_pjsip
      the ability to use the core geolocation capabilities.
      
      This commit message is intentionally short because this isn't
      a simple capability.  See the documentation at
      https://wiki.asterisk.org/wiki/display/AST/Geolocation
      for more information.
      
      THE CAPABILITIES IMPLEMENTED HERE MAY CHANGE BASED ON
      USER FEEDBACK!
      
      ASTERISK-30128
      
      Change-Id: Ie2e2bcd87243c2cfabc43eb823d4427c7086f4d9
      1fa568e7
    • George Joseph's avatar
      Geolocation: Core Capability Preview · 639d72e9
      George Joseph authored
      This commit adds res_geolocation which creates the core capabilities
      to manipulate Geolocation information on SIP INVITEs.
      
      An upcoming commit will add res_pjsip_geolocation which will
      allow the capabilities to be used with the pjsip channel driver.
      
      This commit message is intentionally short because this isn't
      a simple capability.  See the documentation at
      https://wiki.asterisk.org/wiki/display/AST/Geolocation
      for more information.
      
      THE CAPABILITIES IMPLEMENTED HERE MAY CHANGE BASED ON
      USER FEEDBACK!
      
      ASTERISK-30127
      
      Change-Id: Ibfde963121b1ecf57fd98ee7060c4f0808416303
      639d72e9
Loading