Skip to content
Snippets Groups Projects
  1. May 16, 2017
    • Joshua Colp's avatar
      asterisk: Audit locking of channel when manipulating flags. · 5a7af00e
      Joshua Colp authored
      When manipulating flags on a channel the channel has to be
      locked to guarantee that nothing else is also manipulating
      the flags. This change introduces locking where necessary to
      guarantee this. It also adds helper functions that manipulate
      channel flags and lock to reduce repeated code.
      
      ASTERISK-26789
      
      Change-Id: I489280662dba0f4c50981bfc5b5a7073fef2db10
      5a7af00e
  2. May 12, 2017
  3. May 11, 2017
  4. May 09, 2017
    • Richard Mudgett's avatar
      SDP: Make process possible multiple fmtp attributes per rtpmap. · b8659be9
      Richard Mudgett authored
      Change-Id: Ie7511008d82b59590e0eb520a21b5e1da4bd7349
      b8659be9
    • Richard Mudgett's avatar
      SDP: Remove sdp_state.remote_capabilities · c2906dfa
      Richard Mudgett authored
      The sdp_state.remote_capabilities was only used inside merge_sdps() and
      subsequent calls to merge_sdps() by re-INVITE's would leak them.
      
      Change-Id: I0ceb7838ea044cc913e8ad4a255c39c9740ae0ce
      c2906dfa
    • Richard Mudgett's avatar
      SDP: Add interface_address to specify our address to use. · 16785c09
      Richard Mudgett authored
      When we optionally set the interface_address we are forcing the media to
      go out a specific interface address.  This allows us to optionally have
      the media go out the interface that SIP signalling came in on or if we are
      configured to have the media always go out a specific address.
      
      Change-Id: I160d9fac322a075bd2557b430632544178196189
      16785c09
    • Richard Mudgett's avatar
      SDP: Explicitly stop a RTP instance before destoying it. · 367042bd
      Richard Mudgett authored
      * Made sdp_add_m_from_rtp_stream() and sdp_add_m_from_udptl_stream()
      handle generating disabled/declined streams.
      
      * Added /main/sdp/sdp_merge_asymmetric unit test.  It currently does not
      check the offerer side negotiated SDP because that isn't the purpose of
      this patch and there is much to be done to handle declined/dummy streams.
      
      * Added T.38 image streams to the /main/sdp/sdp_merge_symmetric and
      /main/sdp/sdp_merge_crisscross unit tests.
      
      Change-Id: Ib4dcb3ca4f9a9133b376f4e3302f9a1f963f2b31
      367042bd
    • Richard Mudgett's avatar
      SDP: Rework merge_capabilities(). · be5809fa
      Richard Mudgett authored
      * Tried to give better variable names.
      * Made our SDP answer use the offer's RTP payload types as the SDP RFC
      says we SHOULD.
      * Updating the local topology now takes the stream format caps.  We are
      likely preparing to send an offer.
      
      Change-Id: I34d3be8e3036402a8575ffcae3eebc5ce348d7c0
      be5809fa
    • Richard Mudgett's avatar
      SDP: Update ast_get_topology_from_sdp() to keep RTP map. · ae7689f0
      Richard Mudgett authored
      * Add failure exits to ast_get_topology_from_sdp().
      
      Change-Id: I4cc85c1ede8d712766ed20f544dbcef04c8c1049
      ae7689f0
    • Joshua Colp's avatar
      tcptls: Improve error messages for TLS connections. · cbbd119c
      Joshua Colp authored
      This change uses the functions provided by OpenSSL to query
      and better construct error messages for situations where
      the connection encounters a problem.
      
      ASTERISK-26606
      
      Change-Id: I7ae40ce88c0dc4e185c4df1ceb3a6ccc198f075b
      cbbd119c
    • Joshua Elson's avatar
      Prevent Undefined Capath Crash · 10a4439a
      Joshua Elson authored
      It is possible to initialize a valid config without a capath
      or cafile definition. This will cause a crash on a reload.
      
      This fix ensures capath is always allocated.
      
      ASTERISK-26983 #close
      
      Change-Id: I63ff715d9d9023427543a5b8a4ba7b0d82533c12
      10a4439a
    • George Joseph's avatar
      cel_odbc: Fix timestamp processing for microseconds · 1a1c8623
      George Joseph authored
      When a column is of type timestamp, the fraction part of the event
      field's seconds was frequently parsed incorrectly especially if
      there were leading zeros.  For instance "2017-05-23 23:55:03.023"
      would be parsed into an int as "23" then when the timestamp was
      formatted again to be inserted into the database column it'd be
      "2017-05-23 23:55:03.23" which is now 230 milliseconds instead of
      23 milliseconds.  "03.000001" would be transformed to "03.1", etc.
      
      * If the event field is 'eventtime' and the db column is timestamp,
        then existing processing has already correctly formatted the
        timestamp so now we simply use it rather than parsing it and
        re-printing it. This is the most common use case anyway.
      
      * If the event field is other than 'eventtime' and the db column
        is timestamp, we now parse the seconds, including the fractional
        part into a double rather than 2 ints.  This preserves the
        magnitude and precision of the fractional part.  When we print
        it, we now print it as a "%09.6lf" which correctly represents the
        input.
      
      To be honest, why we parse the string timestamp into components,
      test the components, then print the components back into a string
      timestamp is beyond me.  We should use parse it, test it, then if
      it passes, use the original string representation in the database
      call.  Maybe someone thought that some implementations wouldn't
      take a partial timestamp string like "2017-05-06" and decided to
      always produce a full timestamp string even if an abbreviated one
      was supplied.  Anyway, I'm leaving it as it is.
      
      ASTERISK-25032 #close
      Reported-by: Etienne Lessard
      
      Change-Id: Id407e6221f79a5c1120e1a70bc7e893bbcaf1938
      1a1c8623
    • Joshua Colp's avatar
      res_hep_rtcp: Provide chan_sip Call-ID for RTCP messages. · 3c36c29c
      Joshua Colp authored
      This change adds the required logic to allow the SIP
      Call-ID to be placed into the HEP RTCP traffic if the
      chan_sip module is used. In cases where the option is
      enabled but the channel is not either SIP or PJSIP then
      the code will fallback to the channel name as done
      previously.
      
      Based on the change on Nir's branch at:
      team/nirs/hep-chan-sip-support
      
      ASTERISK-26427
      
      Change-Id: I09ffa5f6e2fdfd99ee999650ba4e0a7aad6dc40d
      3c36c29c
  5. May 08, 2017
  6. May 05, 2017
    • Richard Mudgett's avatar
      stream: ast_stream_clone() cannot copy the opaque user data. · 56c5c510
      Richard Mudgett authored
      ast_stream_clone() cannot copy the opaque user data stored on a stream.
      We don't know how to clone the data so it isn't copied into the clone.
      
      Change-Id: Ia51321bf38ecbfdcc53787ca77ea5fd2cabdf367
      56c5c510
    • Richard Mudgett's avatar
      netsock2.c: Made get/set addr port avoid potential uninitialized memory. · 92462881
      Richard Mudgett authored
      Change-Id: I532052bd7cd95a4b3565485fc01e2a1ea07ee647
      92462881
    • Joshua Colp's avatar
      func_cdr: Allow empty value for CDR dialplan function. · 4146facf
      Joshua Colp authored
      A regression was introduced in 12 where passing an empty value
      to the CDR dialplan function was not longer allowed. This
      change returns to the behavior of 11 where it is permitted.
      
      ASTERISK-26173
      
      Change-Id: I3f148203b54ec088007e29e30005a5de122e51c5
      4146facf
    • George Joseph's avatar
      app_confbridge: Fix reference to cfg in menu_template_handler · 00018341
      George Joseph authored
      menu_template_handler wasn't properly accounting for the fact that
      it might be called both during a load/reload (which isn't really
      valid but not prevented) and by a dialplan function.  In both cases
      it was attempting to use the "pending" config which wasn't valid in
      the latter case.  aco_process_config is also partly to blame because
      it wasn't properly cleaning "pending" up when a reload was done and
      no changes were made.  Both of these contributed to a crash if
      CONFBRIDGE(menu,template) was called in a dialplan after a reload.
      
      * aco_process_config now sets info->internal->pending to NULL
        after it unrefs it although this isn't strictly necessary in the
        context of this fix.
      * menu_template_handler now uses the "current" config and silently
        ignores any attempt to be called as a result of someone uses the
        "template" parameter in the conf file.
      
      Luckily there's no other place in the codebase where
      aco_pending_config is used outside of aco_process_config.
      
      ASTERISK-25506 #close
      Reported-by: Frederic LE FOLL
      
      Change-Id: Ib349a17d3d088f092480b19addd7122fcaac21a7
      00018341
    • Jenkins2's avatar
  7. May 04, 2017
    • Jenkins2's avatar
    • Joshua Colp's avatar
      bridge: Fix returning to dialplan when executing Bridge() from AMI. · c90d81ef
      Joshua Colp authored
      When using the Bridge AMI action on the same channel multiple times
      it was possible for the channel to return to the wrong location in
      the dialplan if the other party hung up. This happened because the
      priority of the channel was not preserved across each action
      invocation and it would fail to move on to the next priority in
      other cases.
      
      This change makes it so that the priority of a channel is preserved
      when taking control of it from another thread and it is incremented
      as appropriate such that the priority reflects where the channel
      should next be executed in the dialplan, not where it may or may not
      currently be.
      
      The Bridge AMI action was also changed to ensure that it too
      starts the channels at the next location in the dialplan.
      
      ASTERISK-24529
      
      Change-Id: I52406669cf64208aef7252a65b63ade31fbf7a5a
      c90d81ef
  8. May 03, 2017
    • Kevin Harwell's avatar
      bridge_simple: Added support for streams · 7b0e3b92
      Kevin Harwell authored
      This patch is the first cut at adding stream support to the bridging framework.
      Changes were made to the framework that allows mapping of stream topologies to
      a bridge's supported media types.
      
      The first channel to enter a bridge initially defines the media types for a
      bridge (i.e. a one to one mapping is created between the bridge and the first
      channel). Subsequently added channels merge their media types into the bridge's
      adding to it when necessary. This allows channels with different sized
      topologies to map correctly to each other according to media type. The bridge
      drops any frame that does not have a matching index into a given write stream.
      
      For now though, bridge_simple will align its two channels according to size or
      first to join. Once both channels join the bridge the one with the most streams
      will indicate to the other channel to update its streams to be the same as that
      of the other. If both channels have the same number of streams then the first
      channel to join is chosen as the stream base.
      
      A topology change source was also added to a channel when a stream toplogy
      change request is made. This allows subsystems to know whether or not they
      initiated a change request. Thus avoiding potential recursive situations.
      
      ASTERISK-26966 #close
      
      Change-Id: I1eb5987921dd80c3cdcf52accc136393ca2d4163
      7b0e3b92
    • Kevin Harwell's avatar
      res_rtp_asterisk: Clearing the remote RTCP address causes RTCP failures · 008e25de
      Kevin Harwell authored
      When a call gets put on hold RTP is temporarily stopped and Asterisk was
      setting the remote RTCP address to NULL. Then when RTCP data was received
      from the remote endpoint, Asterisk would be missing this information when
      publishing the rtcp_message stasis event. Consequently, message subscribers
      (in this case res_hep_rtcp) trying to parse the "from" field output the
      following error:
      
      "ast_sockaddr_split_hostport: Port missing in (null)"
      
      This patch makes it so the remote RTCP address is no longer set to NULL when
      stopping RTP. There was only one place that appeared to check if the remote
      RTCP address was NULL as a way to tell if RTCP was running. This patch added
      an additional check on the RTCP schedid for that case to make sure RTCP was
      truly not running.
      
      ASTERISK-26860 #close
      
      Change-Id: I6be200fb20db647e48b5138ea4b81dfa7962974b
      008e25de
    • Joshua Colp's avatar
  9. May 02, 2017
  10. May 01, 2017
Loading