Skip to content
Snippets Groups Projects
  1. Feb 25, 2022
    • Naveen Albert's avatar
      documentation: Add since tag to xmldocs DTD · c35e205b
      Naveen Albert authored
      Adds the since tag to the documentation DTD so
      that individual applications, functions, etc.
      can now specify when they were added to Asterisk.
      
      This tag is added at the individual application,
      function, etc. level as opposed to at the module
      level because modules can expand over time as new
      functionality is added, and granularity only
      to the module level would generally not be useful.
      
      This enables the ability to more easily determine
      when new functionality was added to Asterisk, down
      to minor version as opposed to just by major version.
      This makes it easier for users to write more portable
      dialplan if desired to not use functionality that may
      not be widely available yet.
      
      ASTERISK-29896 #close
      
      Change-Id: Ibbb35c702d8038bdc3fd0a944fbfa69384cc15d5
      c35e205b
    • Naveen Albert's avatar
      asterisk: Add macro for curl user agent. · e26b5798
      Naveen Albert authored
      Currently, each module that uses libcurl duplicates the standard
      Asterisk curl user agent.
      
      This adds a global macro for the Asterisk user agent used for
      curl requests to eliminate this duplication.
      
      ASTERISK-29861 #close
      
      Change-Id: I9fc37935980384b4daf96ae54fa3c9adb962ed2d
      e26b5798
  2. Feb 23, 2022
    • Naveen Albert's avatar
      res_stir_shaken: refactor utility function · 16334101
      Naveen Albert authored
      Refactors temp file utility function into file.c.
      
      ASTERISK-29809 #close
      
      Change-Id: Ife478708c8f2b127239cb73c1755ef18c0bf431b
      16334101
    • Naveen Albert's avatar
      app_voicemail: Emit warning if asking for nonexistent mailbox. · 39820e35
      Naveen Albert authored
      Currently, if VoiceMailMain is called with a mailbox, if that
      mailbox doesn't exist, then the application silently falls back
      to prompting the user for the mailbox, as if no arguments were
      provided.
      
      However, if a specific mailbox is requested and it doesn't exist,
      then no warning at all is emitted.
      
      This fixes this behavior to now warn if a specifically
      requested mailbox could not be accessed, before falling back to
      prompting the user for the correct mailbox.
      
      ASTERISK-29920 #close
      
      Change-Id: Ib4093b88cd661a2cabc5d685777d4e2f0ebd20a4
      39820e35
    • Alexei Gradinari's avatar
      res_pjsip_pubsub: fix Batched Notifications stop working · a2aa881d
      Alexei Gradinari authored
      If Subscription refresh occurred between when the batched notification
      was scheduled and the serialized notification was to be sent,
      then new schedule notification task would never be added.
      
      There are 2 threads:
      
      thread #1. ast_sip_subscription_notify is called,
      if notification_batch_interval then call schedule_notification.
      1.1. The schedule_notification checks notify_sched_id > -1
      not true, then
      send_scheduled_notify = 1
      notify_sched_id =
        ast_sched_add(sched, sub_tree->notification_batch_interval, sched_cb....
      1.2. The sched_cb pushes task serialized_send_notify to serializer
      and returns 0 which means no reschedule.
      1.3. The serialized_send_notify checks send_scheduled_notify if it's false
      the just returns. BUT notify_sched_id is still set, so no more ast_sched_add.
      
      thread #2. pubsub_on_rx_refresh is called
      2.1 it pushes serialized_pubsub_on_refresh_timeout to serializer
      2.2. The serialized_pubsub_on_refresh_timeout calls pubsub_on_refresh_timeout
      which calls send_notify
      2.3. The send_notify set send_scheduled_notify = 0;
      
      The serialized_send_notify should always unset notify_sched_id.
      
      ASTERISK-29904 #close
      
      Change-Id: Ifc50c00b213c396509e10326a1ed89d8cf8c7875
      a2aa881d
    • Alexei Gradinari's avatar
      res_pjsip_pubsub: provide a display name for RLS subscriptions · c12cb899
      Alexei Gradinari authored
      Whereas BLFs allow to show a display name for each RLS entry,
      the asterisk provides only the extension now.
      This is not end user friendly.
      
      This commit adds a new resource_list option, resource_display_name,
      to indicate whether display name of resource or the resource name being
      provided for RLS entries.
      If this option is enabled, the Display Name will be provided.
      This option is disabled by default to remain the previous behavior.
      If the 'event' set to 'presence' or 'dialog' the non-empty HINT name
      will be set as the Display Name.
      The 'message-summary' is not supported yet.
      
      ASTERISK-29891 #close
      
      Change-Id: Ic5306bd5a7c73d03f5477fe235e9b0f41c69c681
      c12cb899
    • Naveen Albert's avatar
      func_db: Add validity check for key names when writing. · b1765c93
      Naveen Albert authored
      Adds a simple sanity check for key names when users are
      writing data to AstDB. This captures four cases indicating
      malformed keynames that generally result in bad data going
      into the DB that the user didn't intend: an empty key name,
      a key name beginning or ending with a slash, and a key name
      containing two slashes in a row. Generally, this is the
      result of a variable being used in the key name being empty.
      
      If a malformed key name is detected, a warning is emitted
      to indicate the bug in the dialplan.
      
      ASTERISK-29925 #close
      
      Change-Id: Ifc08a9fe532a519b1b80caca1aafed7611d573bf
      b1765c93
    • Naveen Albert's avatar
      cli: Add core dump info to core show settings. · 4722c8b7
      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
      4722c8b7
    • Naveen Albert's avatar
      documentation: Adds missing default attributes. · 335c69ea
      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
      335c69ea
    • Naveen Albert's avatar
      app_mp3: Document and warn about HTTPS incompatibility. · c9ef2b3b
      Naveen Albert authored
      mpg123 doesn't support HTTPS, but the MP3Player application
      doesn't document this or warn the user about this. HTTPS
      streams have become more common nowadays and users could
      reasonably try to play them without being aware they should
      use the HTTP stream instead.
      
      This adds documentation to note this limitation. It also
      throws a warning if users try to use the HTTPS stream to
      tell them to use the HTTP stream instead.
      
      ASTERISK-29900 #close
      
      Change-Id: Ie3b029be5258c5a701f71ed3b1a7a80d1e03b827
      c9ef2b3b
    • Naveen Albert's avatar
      app_mf: Add max digits option to ReceiveMF. · 0da71316
      Naveen Albert authored
      Adds an option to the ReceiveMF application to allow specifying a
      maximum number of digits.
      
      Originally, this capability was not added to ReceiveMF as it was
      with ReceiveSF because typically a ST digit is used to denote that
      sending of digits is complete. However, there are certain signaling
      protocols which simply transmit a digit (such as Expanded In-Band
      Signaling) and for these, it's necessary to be able to read a
      certain number of digits, as opposed to until receiving a ST digit.
      
      This capability is added as an option, as opposed to as a parameter,
      to remain compatible with existing usage (and not shift the
      parameters).
      
      ASTERISK-29877 #close
      
      Change-Id: I4229167c9aa69b87402c3c2a9065bd8dfa973a0b
      0da71316
  3. Feb 17, 2022
    • Naveen Albert's avatar
      ami: Allow events to be globally disabled. · 585c2d17
      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
      585c2d17
  4. Feb 14, 2022
    • Mike Bradeen's avatar
      taskprocessor.c: Prevent crash on graceful shutdown · 3b1debb2
      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
      3b1debb2
  5. Feb 11, 2022
    • Alexei Gradinari's avatar
      app_queue: load queues and members from Realtime when needed · b41440a1
      Alexei Gradinari authored
      There are a lot of Queue AMI actions and Queue applications
      which do not load queue and queue members from Realtime.
      
      AMI actions
      QueuePause - if queue not in memory - response "Interface not found".
      QueueStatus/QueueSummary - if queue not in memory - empty response.
      
      Applications:
      PauseQueueMember - if queue not in memory
      	Attempt to pause interface %s, not found
      UnpauseQueueMember - if queue not in memory
      	Attempt to unpause interface xxxxx, not found
      
      This patch adds a new function load_realtime_queues
      which loads queue and queue members for desired queue
      or all queues and all members if param 'queuename' is NULL or empty.
      Calls the function load_realtime_queues when needed.
      
      Also this patch fixes leak of ast_config in function set_member_value.
      
      Also this patch fixes incorrect LOG_WARNING when pausing/unpausing
      already paused/unpaused member.
      The function ast_update_realtime returns 0 when no record modified.
      So 0 is not an error to warn about.
      
      ASTERISK-29873 #close
      ASTERISK-18416 #close
      ASTERISK-27597 #close
      
      Change-Id: I554ee0eebde93bd8f49df7f84b74acb21edcb99c
      b41440a1
    • Sean Bright's avatar
      manager.c: Simplify AMI ModuleCheck handling · 16fccf14
      Sean Bright authored
      This code was needlessly complex and would fail to properly delimit
      the response message if LOW_MEMORY was defined.
      
      Change-Id: Iae50bf09ef4bc34f9dc4b49435daa76f8b2c5b6e
      16fccf14
  6. Feb 10, 2022
    • Mark Petersen's avatar
      res_prometheus.c: missing module dependency · 427bee9b
      Mark Petersen authored
      added res_pjsip_outbound_registration to .requires in AST_MODULE_INFO
      which fixes issue with module crashes on load "FRACK!, Failed assertion"
      
      ASTERISK-29871
      
      Change-Id: Ia0f49d048427a40e1b763296b834a52a03610096
      427bee9b
  7. Feb 03, 2022
    • Sean Bright's avatar
      res_pjsip.c: Correct minor typos in 'realm' documentation. · e1b050d8
      Sean Bright authored
      Change-Id: I886936b808def5540d40071321e72f6bfa19063a
      e1b050d8
    • Sean Bright's avatar
      manager.c: Generate valid XML if attribute names have leading digits. · 134cbebc
      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
      134cbebc
  8. Feb 01, 2022
    • Sean Bright's avatar
      build_tools/make_version: Fix bashism in comparison. · 4126d703
      Sean Bright authored
      In POSIX sh (which we indicate in the shebang), there is no ==
      operator.
      
      Change-Id: Ic03d38214d14cdf329b0ba272279a815bb532965
      4126d703
    • George Joseph's avatar
      bundled_pjproject: Add additional multipart search utils · 38c3c7f4
      George Joseph authored
      Added the following APIs:
      pjsip_multipart_find_part_by_header()
      pjsip_multipart_find_part_by_header_str()
      pjsip_multipart_find_part_by_cid_str()
      pjsip_multipart_find_part_by_cid_uri()
      
      Change-Id: I6aee3dcf59eb171f93aae0f0564ff907262ef40d
      38c3c7f4
    • Mark Petersen's avatar
      chan_sip.c Fix pickup on channel that are in AST_STATE_DOWN · e5053370
      Mark Petersen authored
      resolve issue with pickup on device that uses "183" and not "180"
      
      ASTERISK-29832
      
      Change-Id: I4c7d223870f8ce9a7354e0f73d4e4cb2e8b58841
      e5053370
    • George Joseph's avatar
      build: Add "basebranch" to .gitreview · bfc4d63d
      George Joseph authored
      If you have a development branch for a major project that
      will receive gerrit reviews it'll probably be named something
      like "development/16/newproject".  That will necessitate setting
      "defaultbranch=development/16/newproject" in .gitreview.  The
      make_version script uses that variable to construct the asterisk
      version however, which results in versions like
      "GIT-development/16/newproject-ee582a8c7b" which is probably not
      what you want.  Worse, since the download_externals script uses
      make_version to construct the URL to download the binary codecs
      or DPMA.  Since it's expecting a simple numeric version, the
      downloads will fail.
      
      To get this to work, a new variable "basebranch" has been added
      to .gitreview and make_version has been updated to use that instead
      of defaultversion:
      
      .gitreview:
      defaultbranch=development/16/myproject
      basebranch=16
      
      Now git-review will send the reviews to the proper branch
      (development/16/myproject) but the version will still be
      constructed using the simple branch number (16).
      
      If "basebranch" is missing from .gitreview, make_version will
      fall back to using "defaultbranch".
      
      Change-Id: I2941a3b21e668febeb6cfbc1a7bb51a67726fcc4
      bfc4d63d
    • George Joseph's avatar
      res_pjsip_outbound_authenticator_digest: Prevent ABRT on cleanup · 8d571ea6
      George Joseph authored
      In dev mode, if you call pjsip_auth_clt_deinit() with an auth_sess
      that hasn't been initialized, it'll assert and abort.  If
      digest_create_request_with_auth() fails to find the proper
      auth object however, it jumps to its cleanup which does exactly
      that.  So now we no longer attempt to call pjsip_auth_clt_deinit()
      if we never actually initialized it.
      
      ASTERISK-29888
      
      Change-Id: Ib6171c25c9fe8e61cc8d11129e324c021bc30b62
      8d571ea6
  9. Jan 31, 2022
    • Naveen Albert's avatar
      cdr: allow disabling CDR by default on new channels · 386c5e49
      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
      386c5e49
    • Naveen Albert's avatar
      res_tonedetect: Fixes some logic issues and typos · 70f8ea0d
      Naveen Albert authored
      Fixes some minor logic issues with the module:
      
      Previously, the OPT_END_FILTER flag was getting
      tested before options were parsed, so it could
      never evaluate to true (wrong ordering).
      
      Additionally, the initially parsed timeout (float)
      needs to be compared with 0, not the result int
      which is set afterwards (wrong variable).
      
      ASTERISK-29857 #close
      
      Change-Id: I0062bce3b391c15e5df7a714780eeaa96dd93d4c
      70f8ea0d
    • Naveen Albert's avatar
      func_frame_drop: Fix typo referencing wrong buffer · 7ae83219
      Naveen Albert authored
      In order to get around the issue of certain frames
      having names that could overlap, func_frame_drop
      surrounds names with commas for the purposes of
      comparison.
      
      The buffer is allocated and printed to properly,
      but the original buffer is used for comparison.
      In most cases, this wouldn't have had any effect,
      but that was not the intention behind the buffer.
      This updates the code to reference the modified
      buffer instead.
      
      ASTERISK-29854 #close
      
      Change-Id: I430b52e14e712d0e62a23aa3b5644fe958b684a7
      7ae83219
    • Torrey Searle's avatar
      res/res_rtp_asterisk: fix skip in rtp sequence numbers after dtmf · 7b15ced9
      Torrey Searle authored
      When generating dtmfs, asterisk can incorrectly think packet loss
      occured during the dtmf generation, resulting in a jump in sequence
      numbers when forwarding voice frames resumes.  This patch forces
      asterisk to re-learn the expected sequence number after each DTMF
      to avoid this
      
      ASTERISK-29869 #close
      
      Change-Id: Icc7de3d947b207b82c99d3c327af8095884df853
      7b15ced9
    • Kevin Harwell's avatar
      res_http_websocket: Add a client connection timeout · 851a7596
      Kevin Harwell authored
      Previously there was no way to specify a connection timeout when
      attempting to connect a websocket client to a server. This patch
      makes it possible to now do such.
      
      Change-Id: I5812f6f28d3d13adbc246517f87af177fa20ee9d
      851a7596
    • Sean Bright's avatar
      build: Rebuild configure and autoconfig.h.in · ce91a0fd
      Sean Bright authored
      autoconfigh.h.in was missed in the original review for this
      issue. Additionally it looks like I have newer pkg-config autoconf
      macros on my development machine.
      
      ASTERISK-29817
      
      Change-Id: I3c85a4de82c5d7d6e0e23dad4c33bb650a86a57b
      ce91a0fd
  10. Jan 21, 2022
    • Mike Bradeen's avatar
      sched: fix and test a double deref on delete of an executing call back · b79a5712
      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
      b79a5712
  11. Jan 20, 2022
  12. Jan 19, 2022
    • Michał Górny's avatar
      build_tools/make_version: Fix sed(1) syntax compatibility with NetBSD · 23be22ab
      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
      23be22ab
    • Michał Górny's avatar
      main/utils: Implement ast_get_tid() for NetBSD · 2b490787
      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
      2b490787
    • Michał Górny's avatar
      main: Enable rdtsc support on NetBSD · dda02b89
      Michał Górny authored
      Enable the Linux rdtsc implementation on NetBSD as well.  The assembly
      works correctly there.
      
      ASTERISK-29851
      
      Change-Id: I460ad9b4d971913420ecb84186f5ba5ab03f6f37
      dda02b89
    • Michał Górny's avatar
      BuildSystem: Fix misdetection of gethostbyname_r() on NetBSD · 6a879eea
      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
      6a879eea
    • Michał Górny's avatar
      include: Remove unimplemented HMAC declarations · 710c8f8b
      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
      710c8f8b
    • Naveen Albert's avatar
      frame.h: Fix spelling typo · 27502b6d
      Naveen Albert authored
      Fixes CNG description from "noice" to "noise".
      
      ASTERISK-29855 #close
      
      Change-Id: Ie7cbbd7d72b426693df7447384ff8700318cd36d
      27502b6d
    • Naveen Albert's avatar
      res_rtp_asterisk: Fix typo in flag test/set · d35e292a
      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
      d35e292a
    • George Joseph's avatar
      bundled_pjproject: Fix srtp detection · 97ace6b8
      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
      97ace6b8
Loading