Skip to content
Snippets Groups Projects
  1. Apr 14, 2022
    • Ben Ford's avatar
      AST-2022-002 - res_stir_shaken/curl: Add ACL checks for Identity header. · 353142a2
      Ben Ford authored
      Adds a new configuration option, stir_shaken_profile, in pjsip.conf that
      can be specified on a per endpoint basis. This option will reference a
      stir_shaken_profile that can be configured in stir_shaken.conf. The type
      of this option must be 'profile'. The stir_shaken option can be
      specified on this object with the same values as before (attest, verify,
      on), but it cannot be off since having the profile itself implies wanting
      STIR/SHAKEN support. You can also specify an ACL from acl.conf (along
      with permit and deny lines in the object itself) that will be used to
      limit what interfaces Asterisk will attempt to retrieve information from
      when reading the Identity header.
      
      ASTERISK-29476
      
      Change-Id: I87fa61f78a9ea0cd42530691a30da3c781842406
      353142a2
    • Ben Ford's avatar
      AST-2022-001 - res_stir_shaken/curl: Limit file size and check start. · 1fdb1a6e
      Ben Ford authored
      Put checks in place to limit how much we will actually download, as well
      as a check for the data we receive at the start to ensure it begins with
      what we would expect a certificate to begin with.
      
      ASTERISK-29872
      
      Change-Id: Ifd3c6b8bd52b8b6192a04166ccce4fc8a8000b46
      1fdb1a6e
  2. Mar 14, 2022
  3. Mar 10, 2022
    • Alexei Gradinari's avatar
      res_pjsip_pubsub: update RLS to reflect the changes to the lists · 8666455b
      Alexei Gradinari authored
      This patch makes the Resource List Subscriptions (RLS) dynamic.
      The asterisk updates the current subscriptions to reflect the changes
      to the list on the subscriptions refresh. If list items are added,
      removed, updated or do not exist anymore, the asterisk regenerates
      the resource list.
      
      ASTERISK-29906 #close
      
      Change-Id: Icee8c00459a7aaa43c643d77ce6f16fb7ab037d3
      8666455b
  4. Mar 01, 2022
    • George Joseph's avatar
      xmldoc: Fix issue with xmlstarlet validation · 46844112
      George Joseph authored
      Added the missing xml-stylesheet and Xinclude namespace
      declarations in pjsip_config.xml and pjsip_manager.xml.
      
      Updated make_xml_documentation to show detailed errors when
      xmlstarlet is the validator.  It's now run once with the '-q'
      option to suppress harmless/expected messages and if it actually
      fails, it's run again without '-q' but with '-e' to show
      the actual errors.
      
      Change-Id: I4bdc9d2ea6741e8d2e5eb82df60c68ccc59e1f5e
      46844112
  5. Feb 28, 2022
    • George Joseph's avatar
      Makefile: Allow XML documentation to exist outside source files · a81e14d2
      George Joseph authored
      Moved the xmldoc build logic from the top-level Makefile into
      its own script "make_xml_documentation" in the build_tools
      directory.
      
      Created a new utility script "get_sourceable_makeopts", also in
      the build_tools directory, that dumps the top-level "makeopts"
      file in a format that can be "sourced" from shell sscripts.
      This allows scripts to easily get the values of common make
      build variables such as the location of the GREP, SED, AWK, etc.
      utilities as well as the AST* and library *_LIB and *_INCLUDE
      variables.
      
      Besides moving logic out of the Makefile, some optimizations
      were done like removing "third-party" from the list of
      subdirectories to be searched for documentation and changing some
      assignments from "=" to ":=" so they're only evaluated once.
      The speed increase is noticeable.
      
      The makeopts.in file was updated to include the paths to
      REALPATH and DIRNAME.  The ./conifgure script was setting them
      but makeopts.in wasn't including them.
      
      So...
      
      With this change, you can now place documentation in any"c"
      source file AND you can now place it in a separate XML file
      altogether.  The following are examples of valid locations:
      
      res/res_pjsip.c
          Using the existing /*** DOCUMENTATION ***/ fragment.
      
      res/res_pjsip/pjsip_configuration.c
          Using the existing /*** DOCUMENTATION ***/ fragment.
      
      res/res_pjsip/pjsip_doc.xml
          A fully-formed XML file.  The "configInfo", "manager",
          "managerEvent", etc. elements that would be in the "c"
          file DOCUMENTATION fragment should be wrapped in proper
          XML.  Example for "somemodule.xml":
      
          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE docs SYSTEM "appdocsxml.dtd">
          <docs>
              <configInfo>
              ...
              </configInfo>
          </docs>
      
      It's the "appdocsxml.dtd" that tells make_xml_documentation
      that this is a documentation XML file and not some other XML file.
      It also allows many XML-capable editors to do formatting and
      validation.
      
      Other than the ".xml" suffix, the name of the file is not
      significant.
      
      As a start... This change also moves the documentation that was
      in res_pjsip.c to 2 new XML files in res/res_pjsip:
      pjsip_config.xml and pjsip_manager.xml.  This cut the number of
      lines in res_pjsip.c in half. :)
      
      Change-Id: I486c16c0b5a44d7a8870008e10c941fb19b71ade
      a81e14d2
  6. Feb 24, 2022
    • Naveen Albert's avatar
      asterisk: Add macro for curl user agent. · 63db7505
      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
      63db7505
  7. 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
    • Alexei Gradinari's avatar
      res_pjsip_pubsub: fix Batched Notifications stop working · 1cc1fb54
      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
      1cc1fb54
    • Alexei Gradinari's avatar
      res_pjsip_pubsub: provide a display name for RLS subscriptions · e2423c6f
      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
      e2423c6f
    • 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
  8. Feb 11, 2022
    • Mark Petersen's avatar
      res_prometheus.c: missing module dependency · 6659e502
      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
      6659e502
  9. Feb 03, 2022
  10. Feb 01, 2022
    • George Joseph's avatar
      res_pjsip_outbound_authenticator_digest: Prevent ABRT on cleanup · 2a34bb1e
      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
      2a34bb1e
  11. Jan 31, 2022
    • Naveen Albert's avatar
      res_tonedetect: Fixes some logic issues and typos · a4b01ece
      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
      a4b01ece
    • Torrey Searle's avatar
      res/res_rtp_asterisk: fix skip in rtp sequence numbers after dtmf · 9c9083b4
      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
      9c9083b4
    • Kevin Harwell's avatar
      res_http_websocket: Add a client connection timeout · 98f86697
      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
      98f86697
  12. Jan 20, 2022
  13. Jan 19, 2022
    • Naveen Albert's avatar
      res_rtp_asterisk: Fix typo in flag test/set · a9e9e15c
      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
      a9e9e15c
  14. Jan 17, 2022
    • George Joseph's avatar
      res_pjsip: Make message_filter and session multipart aware · f55886a7
      George Joseph authored
      Neither pjsip_message_filter's filter_on_tx_message() nor
      res_pjsip_session's session_outgoing_nat_hook() were multipart
      aware and just assumed that an SDP would be the only thing in
      a message body.  Both were changed to use the new
      pjsip_get_sdp_info() function which searches for an sdp in
      both single- and multi- part message bodies.
      
      ASTERISK-29813
      
      Change-Id: I8f5b8cfdc27f1d4bd3e7491ea9090951a4525c56
      f55886a7
    • George Joseph's avatar
      res_pjsip: Add utils for checking media types · 59cf9f00
      George Joseph authored
      Added two new functions to assist checking media types...
      
      * ast_sip_are_media_types_equal compares two pjsip_media_types.
      * ast_sip_is_media_type_in tests if one media type is in a list
        of others.
      
      Added static definitions for commonly used media types to
      res_pjsip.h.
      
      Changed several modules to use the new functions and static
      definitions.
      
      ASTERISK_29813
      (not ready to close)
      
      Change-Id: Ief77675235bd3bf00a6b095d4673fd878d0801b9
      59cf9f00
  15. Jan 07, 2022
    • George Joseph's avatar
      bundled_pjproject: Make it easier to hack · 3f093b8d
      George Joseph authored
      There are times when you need to troubleshoot issues with bundled
      pjproject or add new features that need to be pushed upstream
      but...
      
      * The source directory created by extracting the pjproject tarball
        is not scanned for code changes so you have to keep forcing
        rebuilds.
      * The source directory isn't a git repo so you can't easily create
        patches, do git bisects, etc.
      * Accidentally doing a make distclean will ruin your day by wiping
        out the source directory, and your changes.
      * etc.
      
      This commit makes that easier.
      See third-party/pjproject/README-hacking.md for the details.
      
      ASTERISK-29824
      
      Change-Id: Idb1251040affdab31d27cd272dda68676da9b268
      3f093b8d
  16. Jan 05, 2022
    • Florentin Mayer's avatar
      res_pjsip_sdp_rtp: Preserve order of RTP codecs · 4e204db2
      Florentin Mayer authored
      The ast_rtp_codecs_payloads functions do not preserve the order in which
      the payloads were specified on an incoming SDP media line. This leads to
      a problem with the codec negotiation functionality, as the format
      capabilities of the stream are extracted from the ast_rtp_codecs. This
      commit moves the ast_rtp_codec to ast_format conversion to the place
      where the order is still known.
      
      ASTERISK-28863
      ASTERISK-29320
      
      Change-Id: I3aabcfed3f379c36654f59c1872c313d0cb57e25
      4e204db2
  17. Dec 13, 2021
  18. Dec 07, 2021
  19. Dec 06, 2021
    • Mike Bradeen's avatar
      res_rtp_asterisk: Addressing possible rtp range issues · 04d00c20
      Mike Bradeen authored
      res/res_rtp_asterisk.c: Adding 1 to rtpstart if it is deteremined
      that rtpstart was configured to be an odd value. Also adding a loop
      counter to prevent a possible infinite loop when looking for a free
      port.
      
      ASTERISK-27406
      
      Change-Id: I90f07deef0716da4a30206e9f849458b2dbe346b
      04d00c20
  20. Dec 03, 2021
    • Alexander Traud's avatar
      res: Fix for Doxygen. · 178cb0ff
      Alexander Traud authored
      These are the remaining issues found in /res.
      
      ASTERISK-29761
      
      Change-Id: I572e6019c422780dde5ce8448b6c85c77af6046d
      178cb0ff
    • Dustin Marquess's avatar
      res_fax_spandsp: Add spandsp 3.0.0+ compatibility · b2e71b82
      Dustin Marquess authored
      Newer versions of spandsp did refactoring of code to add new features
      like color FAXing. This refactoring broke backwards compatibility.
      Add support for the new version while retaining support for 0.0.6.
      
      ASTERISK-29729 #close
      
      Change-Id: I3bd74550604ebcf0304528d647fa39abc62fbaa1
      b2e71b82
  21. Dec 02, 2021
  22. Nov 30, 2021
    • Naveen Albert's avatar
      documentation: Standardize examples · bcb7aee7
      Naveen Albert authored
      Most examples in the XML documentation use the
      example tag to demonstrate examples, which gets
      parsed specially in the Wiki to make it easier
      to follow for users.
      
      This fixes a few modules to use the example
      tag instead of vanilla para tags to bring them
      in line with the standard syntax.
      
      ASTERISK-29777 #close
      
      Change-Id: I9acb6cc5faf1d220e73c6dd28592371d768d279b
      bcb7aee7
  23. Nov 29, 2021
  24. Nov 19, 2021
    • Naveen Albert's avatar
      res_tonedetect: Add call progress tone detection · ca2e13e1
      Naveen Albert authored
      Makes basic call progress tone detection available
      in a tech-agnostic manner with the addition of the
      ToneScan application. This can determine if the channel
      has encountered a busy signal, SIT tones, dial tone,
      modem, fax machine, etc. A few basic async progress
      tone detect options are also added to the TONE_DETECT
      function.
      
      ASTERISK-29720 #close
      
      Change-Id: Ia02437e0450473031e294798b8cb421fb8f24e90
      ca2e13e1
  25. Nov 18, 2021
Loading