Skip to content
Snippets Groups Projects
  1. Mar 17, 2017
    • Sean Bright's avatar
      app_queue: Fix locking behavior in stasis message handlers · c13ea608
      Sean Bright authored
      The queue_stasis_data structure contains various mutable fields that require
      appropriate locking. Specifically, the 'dying,' 'member_uniqueid,' and
      'caller_uniqueid' fields need to be locked when read from or written to.
      
      Change-Id: I246b7dbff8447acc957a1299f6ad0ebd0fd39088
      c13ea608
  2. Mar 16, 2017
    • Joshua Colp's avatar
      Merge "res_pjsip: Symmetric transports" · 732367e8
      Joshua Colp authored
      732367e8
    • Joshua Colp's avatar
      Merge "RFC sdp: Initial SDP creation" · 76e64f55
      Joshua Colp authored
      76e64f55
    • George Joseph's avatar
      res_pjsip: Symmetric transports · 5013d8f5
      George Joseph authored
      A new transport parameter 'symmetric_transport' has been added.
      
      When a request from a dynamic contact comes in on a transport with
      this option set to 'yes', the transport name will be saved and used
      for subsequent outgoing requests like OPTIONS, NOTIFY and INVITE.
      It's saved as a contact uri parameter named 'x-ast-txp' and will
      display with the contact uri in CLI, AMI, and ARI output.  On the
      outgoing request, if a transport wasn't explicitly set on the
      endpoint AND the request URI is not a hostname, the saved transport
      will be used and the 'x-ast-txp' parameter stripped from the
      outgoing packet.
      
      * config_transport was modified to accept and store the new parameter.
      
      * config_transport/transport_apply was updated to store the transport
        name in the pjsip_transport->info field using the pjsip_transport->pool
        on UDP transports.
      
      * A 'multihomed_on_rx_message' function was added to
        pjsip_message_ip_updater that, for incoming requests, retrieves the
        transport name from pjsip_transport->info and retrieves the transport.
        If transport->symmetric_transport is set, an 'x-ast-txp' uri parameter
        containing the transport name is added to the incoming Contact header.
      
      * An 'ast_sip_get_transport_name' function was added to res_pjsip.
        It takes an ast_sip_endpoint and a pjsip_sip_uri and returns a
        transport name if endpoint->transport is set or if there's an
        'x-ast-txp' parameter on the uri and the uri host is an ipv4 or
        ipv6 address.  Otherwise it returns NULL.
      
      * An 'ast_sip_dlg_set_transport' function was added to res_pjsip
        which takes an ast_sip_endpoint, a pjsip_dialog, and an optional
        pjsip_tpselector.  It calls ast_sip_get_transport_name() and if
        a non-NULL is returned, sets the selector and sets the transport
        on the dialog.  If a selector was passed in, it's updated.
      
      * res_pjsip/ast_sip_create_dialog_uac and ast_sip_create_dialog_uas
        were modified to call ast_sip_dlg_set_transport() instead of their
        original logic.
      
      * res_pjsip/create_out_of_dialog_request was modified to call
        ast_sip_get_transport_name() and pjsip_tx_data_set_transport()
        instead of its original logic.
      
      * Existing transport logic was removed from endpt_send_request
        since that can only be called after a create_out_of_dialog_request.
      
      * res_pjsip/ast_sip_create_rdata was converted to a wrapper around
        a new 'ast_sip_create_rdata_with_contact' function which allows
        a contact_uri to be specified in addition to the existing
        parameters.  (See below)
      
      * res_pjsip_pubsub/internal_pjsip_evsub_send_request was eliminated
        since all it did was transport selection and that is now done in
        ast_sip_create_dialog_uac and ast_sip_create_dialog_uas.
      
      * 'contact_uri' was added to subscription_persistence.  This was
        necessary because although the parsed rdata contact header has the
        x-ast-txp parameter added (if appropriate),
        subscription_persistence_update stores the raw packet which
        doesn't have it.  subscription_persistence_recreate was then
        updated to call ast_sip_create_rdata_with_contact with the
        persisted contact_uri so the recreated subscription has the
        correct transport info to send the NOTIFYs.
      
      * res_pjsip_session/internal_pjsip_inv_send_msg was eliminated since
        all it did was transport selection and that is now done in
        ast_sip_create_dialog_uac.
      
      * pjsip_message_ip_updater/multihomed_on_tx_message was updated
        to remove all traces of the x-ast-txp parameter from the
        outgoing headers.
      
      NOTE:  This change does NOT modify the behavior of permanent
      contacts specified on an aor.  To do so would require that the
      permanent contact's contact uri be updated with the x-ast-txp
      parameter and the aor sorcery object updated.  If we need to
      persue this, we need to think about cloning permanent contacts into
      the same store as the dynamic ones on an aor load so they can be
      updated without disturbing the originally configured value.
      
      You CAN add the x-ast-txp parameter to a permanent contact's uri
      but it would be much simpler to just set endpoint->transport.
      
      Change-Id: I4ee1f51473da32ca54b877cd158523efcef9655f
      5013d8f5
    • Joshua Colp's avatar
      Merge "Add rtcp-mux support" · 84f0871c
      Joshua Colp authored
      84f0871c
    • Joshua Colp's avatar
    • zuul's avatar
      5fdd61b5
    • zuul's avatar
    • zuul's avatar
    • zuul's avatar
      3f30ce12
    • zuul's avatar
  3. Mar 15, 2017
  4. Mar 14, 2017
    • Richard Mudgett's avatar
      pbx.c: Fix crash from malformed exten pattern. · f9970908
      Richard Mudgett authored
      Forgetting to indicate an exten is a pattern can cause a crash if the
      "pattern" has a character set range.  e.g., "9999[3-5]" The crash is due
      to a buffer overwrite because the '-' exten eye-candy wasn't removed as
      expected and overran the allocated space.
      
      The buffer overwrite is fixed two ways in this patch.
      
      1) Fix ext_strncpy() to distinguish between pattern and non-pattern
      extens.  Now '-' characters are removed when they are eye-candy and not
      when they are part of a pattern character set.  Since the function is
      private to pbx.c, the return value now returns the number of bytes written
      to the destination buffer instead of the strlen() of the final buffer so
      the callers that care don't need to add one.
      
      2) Fix callers to ext_strncpy() to supply the correct available buffer
      size of the destination buffer.
      
      ASTERISK-26668
      
      Change-Id: I555d97411140e47e0522684062d174fbe32aa84a
      f9970908
    • Richard Begg's avatar
      chan_iax2: Reload of iax peer results in loss of host address/port · 0dc007e9
      Richard Begg authored
      When using a non-dynamic peer address, build_peer() invalidates the
      peer address structure by setting the address family to unspecified.
      However, if dnsmgr is enabled, the subsequent call to ast_dnsmgr_lookup()
      will not amend the peer address if the cache is still valid, resulting
      in peer connectivity failures.
      To fix this, we call ast_dnsmgr_refresh() instead.
      
      ASTERISK-26865
      
      Change-Id: Id8a89a2f771ebbaf32255a35fe596a6dcb97a082
      0dc007e9
    • Matt Jordan's avatar
      configure: Don't use the progress bar with curl when downloading to stdout · 59130260
      Matt Jordan authored
      In some scenarios, such as when there may not be a terminal (such as
      inside a Docker container), curl will apparently direct the progress bar
      to stdout. This can cause extra data to be appended to a file curl'd
      down to stdout, resulting in md5 verification failures.
      
      This patch removes the progress bar, and tells curl to download the file
      silently.
      
      ASTERISK-26872 #close
      
      Change-Id: Ie860b020f627d4372b3e7ce9453de5faafeebe6c
      59130260
    • zuul's avatar
    • George Joseph's avatar
      RFC sdp: Initial SDP creation · 8470c2bd
      George Joseph authored
      * Added additional fields to ast_sdp_options.
      * Re-organized ast_sdp.
      * Updated field names to correspond to RFC4566 terminology.
      * Created allocs/frees for SDP children.
      * Created getters/setters for SDP children where appropriate.
      * Added ast_sdp_create_from_state.
      * Refactored res_sdp_translator_pjmedia for changes.
      
      Change-Id: Iefbd877af7f5a4d3c74deead1bff8802661b0d48
      8470c2bd
    • Joshua Colp's avatar
    • Matt Jordan's avatar
      configs/samples/hep.conf.sample: Clarify how the HEP stack works · 05713c36
      Matt Jordan authored
      This patch updates the documenation in hep.conf.sample to better specify
      how the various HEP modules interact.
      
      ASTERISK-26717 #close
      
      Change-Id: I337fb742a89e3ec5edc7fc7a7a0295218d841124
      05713c36
    • Matt Jordan's avatar
      funcs/func_devstate: Remove new line in Device field of during module load · 0ded269b
      Matt Jordan authored
      During module loading of func_devstate, Asterisk emits the current
      device state of all Custom device states currently stored in the AstDB.
      This was erroneously including a new line character ('\n') to the end of
      the device state, causing two new lines to be emitted in
      DeviceStateChange AMI events.
      
      Note that this only happened for those device state changes that
      occurred during startup. Regular device state changes for Custom device
      states are handled elsewhere, and did not have the newline.
      
      ASTERISK-26643 #close
      Reported by: Roman Bedros
      Tested by: Matt Jordan
      patches:
        ami_devstate.diff uploaded by Roman Bedros (License 6842)
      
      Change-Id: I1f4c02fc79c448d43bf725f5039c83d9611d7d93
      0ded269b
    • Matt Jordan's avatar
      main/stasis_cache: Demote the ERROR message when removing a nonexistent item · b03b7271
      Matt Jordan authored
      This patch demotes the ERROR message that is displayed when a
      nonexistent item is removed from the Stasis cache. The genesis of this
      demotion is due to chan_sip's realtime peers and their interaction with
      Asterisk's core ast_endpoint code, but ostensibly it could happen from
      other channel drivers as well.
      
      Since Mark Michelson already did an excellent job of explaining on this
      issue, it is quoted here for posterity:
      
      "Internally, when a realtime peer is retrieved, Asterisk creates an
      ast_endpoint structure. When that peer is destroyed, the ast_endpoint is
      destroyed as well. Part of the destruction of the ast_endpoint involves
      clearing the Stasis cache of all information about that endpoint. The
      problem here is that the act of creating the ast_endpoint is not enough
      to actually put any information in the Stasis cache. Instead, something
      has to happen, such as a state change, in order for the Stasis cache to
      have any information about that endpoint. When a device registers,
      chan_sip creates an ast_endpoint structure, processes the REGISTER, and
      then destroys the ast_endpoint. When the ast_endpoint is destroyed,
      there is nothing to destroy in the Stasis cache, so an error message is
      emitted. When you use rtcachefriends, ast_endpoint structures persist
      for the lifetime of the module and so you do not see this error
      message."
      
      ASTERISK-25237 #close
      
      Change-Id: I53cebc6b4a897a1ab9564182b75c177780feff70
      b03b7271
    • Matt Jordan's avatar
      res_pjsip_endpoint_identifier_ip: Clean up a spaces/tabs issue · 2d7e68c0
      Matt Jordan authored
      Tabs > spaces. Always.
      
      Change-Id: I899ff662361c7ab0327173bd7851a67b53dd65f1
      2d7e68c0
  5. Mar 13, 2017
    • Joshua Colp's avatar
      chan_pjsip: Don't assume a session will have a channel. · 12460b05
      Joshua Colp authored
      When querying for PJSIP specific information using the dialplan
      function CHANNEL() it is possible that the underlying session
      will no longer have a channel associated with it. This is
      most likely to occur when the RTCP HEP module attempts to get
      the channel name. If this happens then a crash will occur.
      
      This change just adds a check that the channel exists on the
      session before querying it.
      
      ASTERISK-26857
      
      Change-Id: I113479cffff6ae64cf8ed089e9e1565223426f01
      12460b05
  6. Mar 11, 2017
  7. Mar 10, 2017
  8. Mar 09, 2017
Loading