Skip to content
Snippets Groups Projects
  1. Feb 27, 2023
  2. Jan 09, 2023
    • George Joseph's avatar
      res_rtp_asterisk: Asterisk Media Experience Score (MES) · 4710f37e
      George Joseph authored
      -----------------
      
      This commit reinstates MES with some casting fixes to the
      functions in time.h that convert between doubles and timeval
      structures.  The casting issues were causing incorrect
      timestamps to be calculated which caused transcoding from/to
      G722 to produce bad or no audio.
      
      ASTERISK-30391
      
      -----------------
      
      This module has been updated to provide additional
      quality statistics in the form of an Asterisk
      Media Experience Score.  The score is avilable using
      the same mechanisms you'd use to retrieve jitter, loss,
      and rtt statistics.  For more information about the
      score and how to retrieve it, see
      https://wiki.asterisk.org/wiki/display/AST/Media+Experience+Score
      
      * Updated chan_pjsip to set quality channel variables when a
        call ends.
      * Updated channels/pjsip/dialplan_functions.c to add the ability
        to retrieve the MES along with the existing rtcp stats when
        using the CHANNEL dialplan function.
      * Added the ast_debug_rtp_is_allowed and ast_debug_rtcp_is_allowed
        checks for debugging purposes.
      * Added several function to time.h for manipulating time-in-samples
        and times represented as double seconds.
      * Updated rtp_engine.c to pass through the MES when stats are
        requested.  Also debug output that dumps the stats when an
        rtp instance is destroyed.
      * Updated res_rtp_asterisk.c to implement the calculation of the
        MES.  In the process, also had to update the calculation of
        jitter.  Many debugging statements were also changed to be
        more informative.
      * Added a unit test for internal testing.  The test should not be
        run during normal operation and is disabled by default.
      
      Change-Id: I4fce265965e68c3fdfeca55e614371ee69c65038
      4710f37e
    • George Joseph's avatar
      Revert "res_rtp_asterisk: Asterisk Media Experience Score (MES)" · 62ca063f
      George Joseph authored
      This reverts commit d454801c.
      
      Reason for revert: Issue when transcoding to/from g722
      
      Change-Id: I09f49e171b1661548657a9ba7a978c29d0b5be86
      62ca063f
  3. Jan 03, 2023
    • George Joseph's avatar
      res_rtp_asterisk: Asterisk Media Experience Score (MES) · d454801c
      George Joseph authored
      This module has been updated to provide additional
      quality statistics in the form of an Asterisk
      Media Experience Score.  The score is avilable using
      the same mechanisms you'd use to retrieve jitter, loss,
      and rtt statistics.  For more information about the
      score and how to retrieve it, see
      https://wiki.asterisk.org/wiki/display/AST/Media+Experience+Score
      
      * Updated chan_pjsip to set quality channel variables when a
        call ends.
      * Updated channels/pjsip/dialplan_functions.c to add the ability
        to retrieve the MES along with the existing rtcp stats when
        using the CHANNEL dialplan function.
      * Added the ast_debug_rtp_is_allowed and ast_debug_rtcp_is_allowed
        checks for debugging purposes.
      * Added several function to time.h for manipulating time-in-samples
        and times represented as double seconds.
      * Updated rtp_engine.c to pass through the MES when stats are
        requested.  Also debug output that dumps the stats when an
        rtp instance is destroyed.
      * Updated res_rtp_asterisk.c to implement the calculation of the
        MES.  In the process, also had to update the calculation of
        jitter.  Many debugging statements were also changed to be
        more informative.
      * Added a unit test for internal testing.  The test should not be
        run during normal operation and is disabled by default.
      
      ASTERISK-30280
      
      Change-Id: I458cb9a311e8e5dc1db769b8babbcf2e093f107a
      d454801c
  4. Nov 21, 2022
  5. Nov 02, 2022
  6. Oct 27, 2022
    • Naveen Albert's avatar
      tests: Fix compilation errors on 32-bit. · ca8900b0
      Naveen Albert authored
      Fix compilation errors caused by using size_t
      instead of uintmax_t and non-portable format
      specifiers.
      
      ASTERISK-30273 #close
      
      Change-Id: I363e6057ef84d54b88af80d23ad6147eef9216ee
      ca8900b0
  7. Oct 14, 2022
  8. Sep 26, 2022
  9. Sep 19, 2022
  10. Sep 13, 2022
    • George Joseph's avatar
      res_geolocation: Fix segfault when there's an empty element · 8cbea1c7
      George Joseph authored
      Fixed a segfault caused by var_list_from_loc_info() encountering
      an empty location info element.
      
      Fixed an issue in ast_strsep() where a value with only whitespace
      wasn't being preserved.
      
      Fixed an issue in ast_variable_list_from_quoted_string() where
      an empty value was considered a failure.
      
      ASTERISK-30215
      Reported by: Dan Cropp
      
      Change-Id: Ieca64e061a6d9298f0196c694b60d986ef82613a
      8cbea1c7
  11. Sep 12, 2022
  12. Aug 31, 2022
  13. Aug 30, 2022
  14. Jul 11, 2022
    • Joshua C. Colp's avatar
      websocket / aeap: Handle poll() interruptions better. · 68bcf4c4
      Joshua C. Colp authored
      A sporadic test failure was happening when executing the AEAP
      Websocket transport tests. It was originally thought this was
      due to things not getting cleaned up fast enough, but upon further
      investigation I determined the underlying cause was poll()
      getting interrupted and this not being handled in all places.
      
      This change adds EINTR and EAGAIN handling to the Websocket
      client connect code as well as the AEAP Websocket transport code.
      If either occur then the code will just go back to waiting
      for data.
      
      The originally disabled failure test case has also been
      re-enabled.
      
      ASTERISK-30099
      
      Change-Id: I1711a331ecf5d35cd542911dc6aaa9acf1e172ad
      68bcf4c4
  15. Jul 07, 2022
    • George Joseph's avatar
      Geolocation: Base Asterisk Prereqs · 5fe98877
      George Joseph authored
      * Added ast_variable_list_from_quoted_string()
        Parse a quoted string into an ast_variable list.
      
      * Added ast_str_substitute_variables_full2()
        Perform variable/function/expression substitution on an ast_str.
      
      * Added ast_strsep_quoted()
        Like ast_strsep except you can specify a specific quote character.
        Also added unit test.
      
      * Added ast_xml_find_child_element()
        Find a direct child element by name.
      
      * Added ast_xml_doc_dump_memory()
        Dump the specified document to a buffer
      
      * ast_datastore_free() now checks for a NULL datastore
        before attempting to destroy it.
      
      Change-Id: I5dcefed2f5f93a109e8b489e18d80d42e45244ec
      5fe98877
  16. Jun 16, 2022
    • Kevin Harwell's avatar
      test_aeap_transport: disable part of failing unit test · d9ce2a65
      Kevin Harwell authored
      The 'transport_binary' test sporadically fails, but on a theory that the
      problem is caused by a previously executed test, transport_connect_fail,
      part of that test has been disabled until a solution is found.
      
      ASTERISK_30099
      
      Change-Id: I48ed74d696aa9b6159f59661f3d535cac4c909e1
      d9ce2a65
  17. May 22, 2022
    • Moritz Fain's avatar
      ari: expose channel driver's unique id to ARI channel resource · 4bf2473a
      Moritz Fain authored
      This change exposes the channel driver's unique id (i.e. the Call-ID
      for chan_sip/chan_pjsip based channels) to ARI channel resources
      as `protocol_id`.
      
      ASTERISK-30027
      Reported by: Moritz Fain
      Tested by: Moritz Fain
      
      Change-Id: I7cc6e7a9d29efe74bc27811d788dac20fe559b87
      4bf2473a
  18. May 09, 2022
    • George Joseph's avatar
      GCC12: Fixes for 16+ · 4aa54168
      George Joseph authored
      Most issues were in stringfields and had to do with comparing
      a pointer to an constant/interned string with NULL.  Since the
      string was a constant, a pointer to it could never be NULL so
      the comparison was always "true".  gcc now complains about that.
      
      There were also a few issues where determining if there was
      enough space for a memcpy or s(n)printf which were fixed
      by defining some of the involved variables as "volatile".
      
      There were also a few other miscellaneous fixes.
      
      ASTERISK-30044
      
      Change-Id: Ia081ca1bcfb329df6487c4660aaf1944309eb570
      4aa54168
  19. Apr 26, 2022
    • Kevin Harwell's avatar
      res_aeap & res_speech_aeap: Add Asterisk External Application Protocol · 272bac70
      Kevin Harwell authored
      Add framework to connect to, and read and write protocol based
      messages from and to an external application using an Asterisk
      External Application Protocol (AEAP). This has been divided into
      several abstractions:
      
       1. transport - base communication layer (currently websocket only)
       2. message - AEAP description and data (currently JSON only)
       3. transaction - links/binds requests and responses
       4. aeap - transport, message, and transaction handler/manager
      
      This patch also adds an AEAP implementation for speech to text.
      Existing speech API callbacks for speech to text have been completed
      making it possible for Asterisk to connect to a configured external
      translator service and provide audio for STT. Results can also be
      received from the external translator, and made available as speech
      results in Asterisk.
      
      Unit tests have also been created that test the AEAP framework, and
      also the speech to text implementation.
      
      ASTERISK-29726 #close
      
      Change-Id: Iaa4b259f84aa63501e5fd2a6fb107f900b4d4ed2
      272bac70
  20. Mar 30, 2022
  21. Mar 23, 2022
  22. Mar 03, 2022
    • George Joseph's avatar
      xml.c, config,c: Add stylesheets and variable list string parsing · b40c4d59
      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
      b40c4d59
  23. Feb 28, 2022
    • George Joseph's avatar
      core: Config and XML tweaks needed for geolocation · b5391ff6
      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
      b5391ff6
    • George Joseph's avatar
      build: Refactor the earlier "basebranch" commit · 1950cec3
      George Joseph authored
      Recap from earlier commit:  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" or a work branch
      based on that "development" branch.  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.  It also constructs the URLs for downloading
      external modules with that version, which will fail.
      
      Fast-forward:
      
      The earlier attempt at adding a "basebranch" variable to
      .gitreview didn't work out too well in practice because changes
      were made to .gitreview, which is a checked-in file.  So, if
      you wanted to rebase your work branch on the base branch, rebase
      would attempt to overwrite your .gitreview with the one from
      the base branch and complain about a conflict.
      
      This is a slighltly different approach that adds three methods to
      determine the mainline branch:
      
      1.  --- MAINLINE_BRANCH from the environment
      
      If MAINLINE_BRANCH is already set in the environment, that will
      be used.  This is primarily for the Jenkins jobs.
      
      2.  --- .develvars
      
      Instead of storing the basebranch in .gitreview, it can now be
      stored in a non-checked-in ".develvars" file and keyed by the
      current branch.  So, if you were working on a branch named
      "new-feature-work" based on "development/16/new-feature" and wanted
       to push to that branch in Gerrit but wanted to pull the external
       modules for 16, you'd create the following .develvars file:
      
      [branch "new-feature-work"]
          mainline-branch = 16
      
      The .gitreview file would still look like:
      
      [gerrit]
      defaultbranch=development/16/new-feature
      
      ...which would cause any reviews pushed from "new-feature-work" to
      go to the "development/16/new-feature" branch in Gerrit.
      
      The key is that the .develvars file is NEVER checked in (it's been
      added to .gitignore).
      
      3.  --- Well Known Development Branch
      
      If you're actually working in a branch named like
      "development/<mainline_branch>/some-feature", the mainline branch
      will be parsed from it.
      
      4.  --- .gitreview
      
      If none of the earlier conditions exist, the .gitreview
      "defaultbranch" variable will be used just as before.
      
      Change-Id: I1cdeeaa0944bba3f2e01d7a2039559d0c266f8c9
      1950cec3
  24. Feb 25, 2022
    • 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
  25. 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
  26. 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
  27. Jan 04, 2022
    • Josh Soref's avatar
      test_time.c: Tolerate DST transitions · 2b614400
      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
      2b614400
  28. Dec 13, 2021
  29. Dec 02, 2021
  30. Nov 18, 2021
  31. Nov 16, 2021
    • Josh Soref's avatar
      tests: Spelling fixes · e54a9d31
      Josh Soref authored
      Correct typos of the following word families:
      
      mounting
      jitterbuffer
      thrashing
      original
      manipulating
      entries
      actual
      possibility
      tasks
      options
      positives
      taskprocessor
      other
      dynamic
      declarative
      
      ASTERISK-29714
      
      Change-Id: I6b94659d045eec5d8d020fce2e9b6e2f593dfeb6
      e54a9d31
  32. Nov 09, 2021
  33. Oct 28, 2021
    • Kevin Harwell's avatar
      strings/json: Add string delimter match, and object create with vars methods · 67d1f881
      Kevin Harwell authored
      Add a function to check if there is an exact match a one string between
      delimiters in another string.
      
      Add a function that will create an ast_json object out of a list of
      Asterisk variables. An excludes string can also optionally be passed
      in.
      
      Also, add a macro to make it easier to get object integers.
      
      Change-Id: I5f34f18e102126aef3997f19a553a266d70d6226
      67d1f881
  34. Oct 21, 2021
    • Mike Bradeen's avatar
      various: Fix GCC 11 compilation issues. · 99a1a427
      Mike Bradeen authored
      test_voicemail_api: Use empty char* for empty_msg_ids.
      chan_skinny: Fix size of calledParty to be maximum extension.
      menuselect: Change Makefile to stop deprecated warnings. Added comments
      test_linkedlist: 'bogus' variable was manually allocated from a macro
      and the test fails if this happens but the compiler couldn't 'see' this
      and returns a warning. memset to all 0's after allocation.
      chan_ooh323: Fixed various indentation issues that triggered misleading
       indentation warnings.
      
      ASTERISK-29682
      Reported by: George Joseph
      
      Change-Id: If4fe42222c8444dc16828a42731ee53b4ce5cbbe
      99a1a427
  35. Sep 13, 2021
  36. Sep 10, 2021
Loading