Skip to content
Snippets Groups Projects
  1. Nov 05, 2020
  2. Nov 03, 2020
    • Alexander Traud's avatar
      Compiler fixes for GCC with -Og · 57ee79a5
      Alexander Traud authored
      ASTERISK-29144
      
      Change-Id: I2a72c072083b4492a223c6f9d73d21f4f424db62
      57ee79a5
    • Alexander Traud's avatar
      Compiler fixes for GCC when printf %s is NULL · 28faafd1
      Alexander Traud authored
      ASTERISK-29146
      
      Change-Id: Ib04bdad87d729f805f5fc620ef9952f58ea96d41
      28faafd1
    • Alexander Traud's avatar
      Compiler fixes for GCC with -Os · 914aecb8
      Alexander Traud authored
      ASTERISK-29145
      
      Change-Id: I9af705f2b9725c53141aef5d0ff512a1800f073c
      914aecb8
    • Alexander Traud's avatar
      chan_sip: On authentication, pick MD5 for sure. · cd323176
      Alexander Traud authored
      RFC 8760 added new digest-access-authentication schemes. Testing
      revealed that chan_sip does not pick MD5 if several schemes are offered
      by the User Agent Server (UAS). This change does not implement any of
      the new schemes like SHA-256. This change makes sure, MD5 is picked so
      UAS with SHA-2 enabled, like the service www.linphone.org/freesip, can
      still be used. This should have worked since day one because SIP/2.0
      already envisioned several schemes (see RFC 3261 and its augmented BNF
      for 'algorithm' which includes 'token' as third alternative; note: if
      'algorithm' was not present, MD5 is still assumed even in RFC 7616).
      
      Change-Id: I61ca0b1f74b5ec2b5f3062c2d661cafeaf597fcd
      cd323176
  3. Oct 29, 2020
    • Walter Doekes's avatar
      main/say: Work around gcc 9 format-truncation false positive · 1650d50e
      Walter Doekes authored
      Version: gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
      Warning:
        say.c:2371:24: error: ‘%d’ directive output may be truncated writing
          between 1 and 11 bytes into a region of size 10
          [-Werror=format-truncation=]
        2371 |     snprintf(buf, 10, "%d", num);
        say.c:2371:23: note: directive argument in the range [-2147483648, 9]
      
      That's not possible though, as the if() starts out checking for (num < 0),
      making this Warning a false positive.
      
      (Also replaced some else<TAB>if with else<SP>if while in the vicinity.)
      
      Change-Id: Ic7a70120188c9aa525a6d70289385bfce878438a
      1650d50e
  4. 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
    • Alexander Traud's avatar
      install_prereq: Add GMime 3.0. · f3452c85
      Alexander Traud authored
      Ubuntu 20.10 does not come with GMime 2.6. Ubuntu 16.04 LTS does not
      come with GMime 3.0. aptitude ignores any missing package. Therefore,
      it installs the correct package(s). However, in Ubuntu 18.04 LTS and
      Ubuntu 20.04 LTS, both versions are installed alongside although only
      one is really needed.
      
      Change-Id: Ic58aa9f2e131d94671f286f17dbd61e1ccbabcb7
      f3452c85
    • Alexander Traud's avatar
      BuildSystem: Enable Lua 5.4. · db4320a6
      Alexander Traud authored
      Note to maintainers: Lua 5.4, Lua 5.3, and Lua 5.2 have not been tested
      at runtime with pbx_lua. Until then, use the lowest available version
      of Lua, if you enabled the module pbx_lua at all.
      
      Change-Id: Ie5270448b11fcb4e2a53d899e4fe7fea793ce7e0
      db4320a6
    • 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
  5. Oct 22, 2020
  6. Oct 14, 2020
  7. 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
  8. Oct 08, 2020
  9. Oct 05, 2020
  10. 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
    • George Joseph's avatar
      app_confbridge/bridge_softmix: Add ability to force estimated bitrate · 773f424c
      George Joseph authored
      app_confbridge now has the ability to set the estimated bitrate on an
      SFU bridge.  To use it, set a bridge profile's remb_behavior to "force"
      and set remb_estimated_bitrate to a rate in bits per second.  The
      remb_estimated_bitrate parameter is ignored if remb_behavior is something
      other than "force".
      
      Change-Id: Idce6464ff014a37ea3b82944452e56cc4d75ab0a
      773f424c
    • Sean Bright's avatar
      app_voicemail.c: Document VMSayName interruption behavior · 4b5ed817
      Sean Bright authored
      ASTERISK-26424 #close
      
      Change-Id: I797ad0ed302d0b3d2c90543eff5b7207ed08ecf0
      4b5ed817
  11. 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
  12. Sep 30, 2020
  13. 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
  14. Sep 28, 2020
  15. Sep 23, 2020
  16. Sep 22, 2020
  17. Sep 17, 2020
    • George Joseph's avatar
      bridge_softmix/sfu_topologies_on_join: Ignore topology change failures · 39bb45cd
      George Joseph authored
      When a channel joins a bridge, we do topology change requests on all
      existing channels to add the new participant to them.  However the
      announcer channel will return an error because it doesn't support
      topology in the first place.  Unfortunately, there doesn't seem to be a
      reliable way to tell if the error is expected or not so the error is
      ignored for all channels.  If the request fails on a "real" channel,
      that channel just won't get the new participant's video.
      
      Change-Id: Ic95db4683f27d224c1869fe887795d6b9fdea4f0
      39bb45cd
  18. Sep 16, 2020
  19. Sep 15, 2020
  20. 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
    • George Joseph's avatar
      res_pjsip_session: Handle multi-stream re-invites better · 86f1bce1
      George Joseph authored
      When both Asterisk and a UA send re-invites at the same time, both
      send 491 "Transaction in progress" responses to each other and back
      off a specified amount of time before retrying. When Asterisk
      prepares to send its re-invite, it sets up the session's pending
      media state with the new topology it wants, then sends the
      re-invite.  Unfortunately, when it received the re-invite from the
      UA, it partially processed the media in the re-invite and reset
      the pending media state before sending the 491 losing the state it
      set in its own re-invite.
      
      Asterisk also was not tracking re-invites received while an existing
      re-invite was queued resulting in sending stale SDP with missing
      or duplicated streams, or no re-invite at all because we erroneously
      determined that a re-invite wasn't needed.
      
      There was also an issue in bridge_softmix where we were using a stream
      from the wrong topology to determine if a stream was added.  This also
      caused us to erroneously determine that a re-invite wasn't needed.
      
      Regardless of how the delayed re-invite was triggered, we need to
      reconcile the topology that was active at the time the delayed
      request was queued, the pending topology of the queued request,
      and the topology currently active on the session.  To do this we
      need a topology resolver AND we need to make stream named unique
      so we can accurately tell what a stream has been added or removed
      and if we can re-use a slot in the topology.
      
      Summary of changes:
      
       * bridge_softmix:
         * We no longer reset the stream name to "removed" in
           remove_all_original_streams().  That was causing  multiple streams
           to have the same name and wrecked the checks for duplicate streams.
      
         * softmix_bridge_stream_sources_update() was checking the old_stream
           to see if it had the softmix prefix and not considering the stream
           as "new" if it did.  If the stream in that slot has something in it
           because another re-invite happened, then that slot in old might
           have a softmix stream but the same stream in new might actually
           be a new one.  Now we check the new_stream's name instead of
           the old_stream's.
      
       * stream:
         * Instead of using plain media type name ("audio", "video", etc) as
           the default stream name, we now append the stream position to it
           to make it unique.  We need to do this so we can distinguish multiple
           streams of the same type from each other.
      
         * When we set a stream's state to REMOVED, we no longer reset its
           name to "removed" or destroy its metadata.  Again, we need to
           do this so we can distinguish multiple streams of the same
           type from each other.
      
       * res_pjsip_session:
         * Added resolve_refresh_media_states() that takes in 3 media states
           and creates an up-to-date pending media state that includes the changes
           that might have happened while a delayed session refresh was in the
           delayed queue.
      
         * Added is_media_state_valid() that checks the consistency of
           a media state and returns a true/false value. A valid state has:
           * The same number of stream entries as media session entries.
               Some media session entries can be NULL however.
           * No duplicate streams.
           * A valid stream for each non-NULL media session.
           * A stream that matches each media session's stream_num
             and media type.
      
         * Updated handle_incoming_sdp() to set the stream name to include the
           stream position number in the name to make it unique.
      
         * Updated the ast_sip_session_delayed_request structure to include both
           the pending and active media states and updated the associated delay
           functions to process them.
      
         * Updated sip_session_refresh() to accept both the pending and active
           media states that were in effect when the request was originally queued
           and to pass them on should the request need to be delayed again.
      
         * Updated sip_session_refresh() to call resolve_refresh_media_states()
           and substitute its results for the pending state passed in.
      
         * Updated sip_session_refresh() with additional debugging.
      
         * Updated session_reinvite_on_rx_request() to simply return PJ_FALSE
           to pjproject if a transaction is in progress.  This stops us from
           creating a partial pending media state that would be invalid later on.
      
         * Updated reschedule_reinvite() to clone both the current pending and
           active media states and pass them to delay_request() so the resolver
           can tell what the original intention of the re-invite was.
      
         * Added a large unit test for the resolver.
      
      ASTERISK-29014
      
      Change-Id: Id3440972943c611a15f652c6c569fa0e4536bfcb
      86f1bce1
Loading