Skip to content
Snippets Groups Projects
  1. Jan 04, 2021
  2. Dec 28, 2020
  3. Dec 23, 2020
  4. Dec 17, 2020
    • Sean Bright's avatar
      app_chanspy: Spyee information missing in ChanSpyStop AMI Event · 357510ce
      Sean Bright authored
      The documentation in the wiki says there should be spyee-channel
      information elements in the ChanSpyStop AMI event.
      
          https://wiki.asterisk.org/wiki/x/Xc5uAg
      
      However, this is not the case in Asterisk <= 16.10.0 Version. We're
      using these Spyee* arguments since Asterisk 11.x, so these arguments
      vanished in Asterisk 12 or higher.
      
      For maximum compatibility, we still send the ChanSpyStop event even if
      we are not able to find any 'Spyee' information.
      
      ASTERISK-28883 #close
      
      Change-Id: I81ce397a3fd614c094d043ffe5b1b1d76188835f
      357510ce
    • Sungtae Kim's avatar
      res_ari: Fix wrong media uri handle for channel play · 91fc57f5
      Sungtae Kim authored
      Fixed wrong null object handle in
      /channels/<channel_id>/play request handler.
      
      ASTERISK-29188
      
      Change-Id: I6691c640247a51ad15f23e4a203ca8430809bafe
      91fc57f5
    • Pirmin Walthert's avatar
      res_pjsip_nat.c: Create deep copies of strings when appropriate · 0b109958
      Pirmin Walthert authored
      In rewrite_uri asterisk was not making deep copies of strings when
      changing the uri. This was in some cases causing garbage in the route
      header and in other cases even crashing asterisk when receiving a
      message with a record-route header set. Thanks to Ralf Kubis for
      pointing out why this happens. A similar problem was found in
      res_pjsip_transport_websocket.c. Pjproject needs as well to be patched
      to avoid garbage in CANCEL messages.
      
      ASTERISK-29024 #close
      
      Change-Id: Ic5acd7fa2fbda3080f5f36ef12e46804939b198b
      0b109958
  5. Dec 16, 2020
  6. Dec 09, 2020
    • Joshua C. Colp's avatar
      pjsip: Match lifetime of INVITE session to our session. · 6475fe3d
      Joshua C. Colp authored
      In some circumstances it was possible for an INVITE
      session to be destroyed while we were still using it.
      This occurred due to the reference on the INVITE session
      being released internally as a result of its state
      changing to DISCONNECTED.
      
      This change adds a reference to the INVITE session
      which is released when our own session is destroyed,
      ensuring that the INVITE session remains valid for
      the lifetime of our session.
      
      ASTERISK-29022
      
      Change-Id: I300c6d9005ff0e6efbe1132daefc7e47ca6228c9
      6475fe3d
    • Sean Bright's avatar
      res_http_media_cache.c: Set reasonable number of redirects · 90fd1fd9
      Sean Bright authored
      By default libcurl does not follow redirects, so we explicitly enable
      it by setting CURLOPT_FOLLOWLOCATION. Once that is enabled, libcurl
      will follow up to CURLOPT_MAXREDIRS redirects, which by default is
      configured to be unlimited.
      
      This patch sets CURLOPT_MAXREDIRS to a more reasonable default (8). If
      we determine at some point that this needs to be increased on
      configurable it is a trivial change.
      
      ASTERISK-29173 #close
      
      Change-Id: I4925ebbcf0c7d728bb9252b3795b3479ae225b30
      90fd1fd9
  7. Dec 01, 2020
    • Stanislav's avatar
      res_pjsip_stir_shaken: Fix module description · ab7a08b4
      Stanislav authored
      the 'J' is missing in module description.
      "PSIP STIR/SHAKEN Module for Asterisk" -> "PJSIP STIR/SHAKEN Module for Asterisk"
      
      ASTERISK-29175 #close
      
      Change-Id: I17da008540ee2e8496b644d05f995b320b54ad7a
      ab7a08b4
  8. Nov 20, 2020
  9. Nov 19, 2020
    • Alexander Greiner-Baer's avatar
      res_pjsip: set Accept-Encoding to identity in OPTIONS response · fba10fb5
      Alexander Greiner-Baer authored
      
      RFC 3261 says that the Accept-Encoding header should be present
      in an options response. Permitted values according to RFC 2616
      are only compression algorithms like gzip or the default identity
      encoding. Therefore "text/plain" is not a correct value here.
      As long as the header is hard coded, it should be set to "identity".
      
      Without this fix an Alcatel OmniPCX periodically logs warnings like
      "[sip_acceptIncorrectHeader] Header Accept-Encoding is malformed"
      on a SIP Trunk.
      
      ASTERISK-29165 #close
      
      Change-Id: I0aa2211ebf0b4c2ed554ac7cda794523803a3840
      fba10fb5
  10. Nov 10, 2020
    • George Joseph's avatar
      res_pjsip_outbound_registration.c: Use our own scheduler and other stuff · 2fe76dd8
      George Joseph authored
      * Instead of using the pjproject timer heap, we now use our own
        pjsip_scheduler.  This allows us to more easily debug and allows us to
        see times in "pjsip show/list registrations" as well as being able to
        see the registrations in "pjsip show scheduled_tasks".
      
      * Added the last registration time, registration interval, and the next
        registration time to the CLI output.
      
      * Removed calls to pjsip_regc_info() except where absolutely necessary.
        Most of the calls were just to get the server and client URIs for log
        messages so we now just save them on the client_state object when we
        create it.
      
      * Added log messages where needed and updated most of the existong ones
        to include the registration object name at the start of the message.
      
      Change-Id: I4534a0fc78c7cb69f23b7b449dda9748c90daca2
      2fe76dd8
  11. Nov 09, 2020
    • George Joseph's avatar
      pjsip_scheduler.c: Add type ONESHOT and enhance cli show command · 5a4640d2
      George Joseph authored
      * Added a ONESHOT type that never reschedules.
      
      * Added "like" capability to "pjsip show scheduled_tasks" so you can do
        the following:
      
        CLI> pjsip show scheduled_tasks like outreg
        PJSIP Scheduled Tasks:
      
        Task Name                                     Interval  Times Run ...
        ============================================= ========= ========= ...
        pjsip/outreg/testtrunk-reg-0-00000074            50.000   oneshot ...
        pjsip/outreg/voipms-reg-0-00000073              110.000   oneshot ...
      
      * Fixed incorrect display of "Next Start".
      
      * Compacted the displays of times in the CLI.
      
      * Added two new functions (ast_sip_sched_task_get_times2,
        ast_sip_sched_task_get_times_by_name2) that retrieve the interval,
        next start time, and next run time in addition to the times already
        returned by ast_sip_sched_task_get_times().
      
      Change-Id: Ie718ca9fd30490b8a167bedf6b0b06d619dc52f3
      5a4640d2
    • Alexander Traud's avatar
      res_pjsip/config_transport: Load and run without OpenSSL. · b52acb87
      Alexander Traud authored
      ASTERISK-28933
      Reported-by: Walter Doekes
      
      Change-Id: I65eac49e5b0a79261ea80e2b9b38a836886ed59f
      b52acb87
    • Alexander Traud's avatar
      res_stir_shaken: Include OpenSSL headers where used actually. · 64d2de19
      Alexander Traud authored
      This avoids the inclusion of the OpenSSL headers in the public header,
      which avoids one external library dependency in res_pjsip_stir_shaken.
      
      Change-Id: I6a07e2d81d2b5442e24e99b8cc733a99f881dcf4
      64d2de19
  12. Nov 05, 2020
    • Kevin Harwell's avatar
      AST-2020-001 - res_pjsip: Return dialog locked and referenced · b82f8806
      Kevin Harwell authored
      pjproject returns the dialog locked and with a reference. However,
      in Asterisk the method that handles this decrements the reference
      and removes the lock prior to returning. This makes it possible,
      under some circumstances, for another thread to free said dialog
      before the thread that created it attempts to use it again. Of
      course when the thread that created it tries to use a freed dialog
      a crash can occur.
      
      This patch makes it so Asterisk now returns the newly created
      dialog both locked, and with an added reference. This allows the
      caller to de-reference, and unlock the dialog when it is safe to
      do so.
      
      In the case of a new SIP Invite the lock, and reference are now
      held for the entirety of the new invite handling process.
      Otherwise it's possible for the dialog, or its dependent objects,
      like the transaction, to disappear. For example if there is a TCP
      transport error.
      
      ASTERISK-29057 #close
      
      Change-Id: I5ef645a47829596f402cf383dc02c629c618969e
      (cherry picked from commit 6baa4b53)
      b82f8806
    • Ben Ford's avatar
      AST-2020-002 - res_pjsip: Stop sending INVITEs after challenge limit. · cd8f8b94
      Ben Ford authored
      If Asterisk sends out and INVITE and receives a challenge with a
      different nonce value each time, it will continually send out INVITEs,
      even if the call is hung up. The endpoint must be configured for
      outbound authentication in order for this to occur. A limit has been set
      on outbound INVITEs so that, once reached, Asterisk will stop sending
      INVITEs and the transaction will terminate.
      
      ASTERISK-29013
      
      Change-Id: I2d001ca745b00ca8aa12030f2240cd72363b46f7
      cd8f8b94
  13. Nov 03, 2020
  14. Oct 28, 2020
    • Kevin Harwell's avatar
      res_pjsip, res_pjsip_session: initialize local variables · c62193c5
      Kevin Harwell authored
      This patch initializes a couple of local variables to some default values.
      Interestingly, in the 'pj_status_t dlg_status' case the value not being
      initialized caused memory to grow, and not be recovered, in the off nominal
      path (at least on my machine).
      
      Change-Id: I22ee65e1e1bff8efacea8a167c6c8428898523f7
      c62193c5
    • Nick French's avatar
      res_pjsip_session: Restore calls to ast_sip_message_apply_transport() · bd98e153
      Nick French authored
      Commit 44bb0858 ("debugging: Add enough
      to choke a mule") accidentally removed calls to
      ast_sip_message_apply_transport when it was attempting to just add
      debugging code.
      
      The kiss of death was saying that there were no functional changes in
      the commit comment.
      
      This makes outbound calls that use the 'flow' transport mechanism fail,
      since this call is used to relay headers into the outbound INVITE
      requests.
      
      ASTERISK-29124 #close
      
      Change-Id: I0f3e32c2e8ac415e30b1d29966d75a1546f0526a
      bd98e153
  15. Oct 13, 2020
    • Joshua C. Colp's avatar
      res_pjsip: Adjust outgoing offer call pref. · dcd2ed69
      Joshua C. Colp authored
      This changes the outgoing offer call preference
      default option to match the behavior of previous
      versions of Asterisk.
      
      The additional advanced codec negotiation options
      have also been removed from the sample configuration
      and marked as reserved for future functionality in
      XML documentation.
      
      The codec preference options have also been fixed to
      enforce local codec configuration.
      
      ASTERISK-29109
      
      Change-Id: Iad19347bd5f3d89900c15ecddfebf5e20950a1c2
      dcd2ed69
  16. Oct 05, 2020
  17. Oct 02, 2020
    • Kevin Harwell's avatar
      Logging: Add debug logging categories · 56028426
      Kevin Harwell authored
      Added debug logging categories that allow a user to output debug
      information based on a specified category. This lets the user limit,
      and filter debug output to data relevant to a particular context,
      or topic. For instance the following categories are now available for
      debug logging purposes:
      
        dtls, dtls_packet, ice, rtcp, rtcp_packet, rtp, rtp_packet,
        stun, stun_packet
      
      These debug categories can be enable/disable via an Asterisk CLI command.
      
      While this overrides, and outputs debug data, core system debugging is
      not affected by this patch. Statements still output at their appropriate
      debug level. As well backwards compatibility has been maintained with
      past debug groups that could be enabled using the CLI (e.g. rtpdebug,
      stundebug, etc.).
      
      ASTERISK-29054 #close
      
      Change-Id: I6e6cb247bb1f01dbf34750b2cd98e5b5b41a1849
      56028426
    • Sean Bright's avatar
      pbx.c: On error, ast_add_extension2_lockopt should always free 'data' · 51cba591
      Sean Bright authored
      In the event that the desired extension already exists,
      ast_add_extension2_lockopt() will free the 'data' it is passed before
      returning an error, so we should not be freeing it ourselves.
      
      Additionally, there were two places where ast_add_extension2_lockopt()
      could return an error without also freeing the 'data' pointer, so we
      add that.
      
      ASTERISK-29097 #close
      
      Change-Id: I904707aae55169feda050a5ed7c6793b53fe6eae
      51cba591
  18. Oct 01, 2020
    • Holger Hans Peter Freyther's avatar
      res_pjsip_sdp_rtp: Fix accidentally native bridging calls · 9c0ded6e
      Holger Hans Peter Freyther authored
      Stop advertising RFC2833 support on the rtp_engine when DTMF mode is
      auto but no tel_event was found inside SDP file.
      
      On an incoming call create_rtp will be called and when session->dtmf is
      set to AST_SIP_DTMF_AUTO, the AST_RTP_PROPERTY_DTMF will be set without
      looking at the SDP file.
      
      Once get_codecs gets called we move the DTMF mode from RFC2833 to INBAND
      but continued to advertise RFC2833 support.
      
      This meant the native_rtp bridge would falsely consider the two channels
      as compatible. In addition to changing the DTMF mode we now set or
      remove the AST_RTP_PROPERTY_DTMF.
      
      The property is checked in ast_rtp_dtmf_compatible and called by
      native_rtp_bridge_compatible.
      
      ASTERISK-29051 #close
      
      Change-Id: I1e0c1e324598a437932c0b7836bcb626aba8e287
      9c0ded6e
  19. Sep 30, 2020
  20. Sep 29, 2020
    • Torrey Searle's avatar
      res_pjsip_diversion: fix double 181 · e7bd97e2
      Torrey Searle authored
      Arming response to both AST_SIP_SESSION_BEFORE_REDIRECTING and
      AST_SIP_SESSION_BEFORE_MEDIA causes 302 to to be handled twice,
      resulting in to 181 being generated.
      
      Change-Id: I866e5461564644ffb8a5e12b6f1330b50a7b63ab
      e7bd97e2
  21. Sep 28, 2020
  22. Sep 23, 2020
  23. Sep 22, 2020
  24. Sep 16, 2020
  25. Sep 14, 2020
    • George Joseph's avatar
      res_pjsip_session: Fix issue with COLP and 491 · 53910b1f
      George Joseph authored
      The recent 491 changes introduced a check to determine if the active
      and pending topologies were equal and to suppress the re-invite if they
      were. When a re-invite is sent for a COLP-only change, the pending
      topology is NULL so that check doesn't happen and the re-invite is
      correctly sent. Of course, sending the re-invite sets the pending
      topology.  If a 491 is received, when we resend the re-invite, the
      pending topology is set and since we didn't request a change to the
      topology in the first place, pending and active topologies are equal so
      the topologies-equal check causes the re-invite to be erroneously
      suppressed.
      
      This change checks if the topologies are equal before we run the media
      state resolver (which recreates the pending topology) so that when we
      do the final topologies-equal check we know if this was a topology
      change request.  If it wasn't a change request, we don't suppress
      the re-invite even though the topologies are equal.
      
      ASTERISK-29014
      
      Change-Id: Iffd7dd0500301156a566119ebde528d1a9573314
      53910b1f
    • George Joseph's avatar
      debugging: Add enough to choke a mule · 44bb0858
      George Joseph authored
      Added to:
       * bridges/bridge_softmix.c
       * channels/chan_pjsip.c
       * include/asterisk/res_pjsip_session.h
       * main/channel.c
       * res/res_pjsip_session.c
      
      There NO functional changes in this commit.
      
      Change-Id: I06af034d1ff3ea1feb56596fd7bd6d7939dfdcc3
      44bb0858
Loading