Skip to content
Snippets Groups Projects
  1. May 17, 2019
    • George Joseph's avatar
      res_rtp_asterisk: Add ability to propose local address in ICE · be83591f
      George Joseph authored
      You can now add the "include_local_address" flag to an entry in
      rtp.conf "[ice_host_candidates]" to include both the advertized
      address and the local address in ICE negotiation:
      
      [ice_host_candidates]
      192.168.1.1 = 1.2.3.4,include_local_address
      
      This causes both 192.168.1.1 and 1.2.3.4 to be advertized.
      
      Change-Id: Ide492cd45ce84546175ca7d557de80d9770513db
      be83591f
  2. May 08, 2019
    • Joshua Colp's avatar
      res_rtp_asterisk: Fix sequence number cycling and packet loss count. · 7a6fd83a
      Joshua Colp authored
      This change fixes two bugs which both resulted in the packet loss
      count exceeding 65,000.
      
      The first issue is that the sequence number check to determine if
      cycling had occurred was using the wrong variable resulting in the
      check never seeing that cycling has occurred, throwing off the
      packet loss calculation. It now uses the correct variable.
      
      The second issue is that the packet loss calculation assumed that
      the received number of packets in an interval could never exceed
      the expected number. In practice this isn't true due to delayed
      or retransmitted packets. The expected will now be updated to
      the received number if the received exceeds it.
      
      ASTERISK-28379
      
      Change-Id: If888ebc194ab69ac3194113a808c414b014ce0f6
      7a6fd83a
  3. May 07, 2019
    • Ben Ford's avatar
      pjsip_options.c: Allow immediate qualifies for new contacts. · 86836e04
      Ben Ford authored
      When multiple endpoints try to register close together using the same
      AOR with qualify_frequency set, one contact would qualify immediately
      while the other contacts would have to wait out the duration of the
      timer before being able to qualify. Changing the conditional to check
      the contact container count for a non-zero value allows all contacts to
      qualify immediately.
      
      Change-Id: I79478118ee7e0d6e76af7c354d66684220db9415
      86836e04
  4. May 06, 2019
    • agupta's avatar
      stasis: Hangup channel for Local channel No such extension error · 85242a9b
      agupta authored
      When we use early bridge with create and dial from stasis using Local channel
      and the dialplan does not any entry the it is returned from core_local.c with
      No such extension .
      
      In such case asterisk locks up till the channel is not hangup with the error
      Exceptionally long voice queue length
      
      * Found that in such case app_control_dial fails on ast_call method and
        return -1
      * Since it is called from stasis_app_send_command_async and return -1 does
        not cause resources to be freed and since no PBX exist it is not able to
        read from channel causing exceptionally long queue
      * After putting this code found that the channel was releasing immediately
        and resources were freed.
      
      ASTERISK-28399
      Reported by: Abhay Gupta
      Tested by: Abhay Gupta
      
      Change-Id: I0a55c923fc6995559f808d63b9488762b4489318
      85242a9b
  5. May 02, 2019
    • George Joseph's avatar
      res_pjsip: Check return from pjsip_parse_uri calls · ef92c69f
      George Joseph authored
      Updated ast_sip_create_rdata_with_contact and registrar_find_contact
      to check the return from pjsip_parse_uri before attempting to
      use the uri returned.
      
      ASTERISK-28402
      Reported-by: Ross Beer
      
      Change-Id: I9810b3b163c45ed5a56ec743586e5ce107f13ba7
      ef92c69f
    • agupta's avatar
      stasis: Only place stasis created and dialed channels into dial bridge. · 71040078
      agupta authored
      The dial bridge is meant to hold channels which have been created
      and dialed in stasis. It handles the frames coming from them and raises
      the appropriate events.
      
      It was possible for the code to mistakenly place calls which came
      from the dialplan into the dial bridge if they were not in an
      answered state. These channels are not outgoing channels and
      should not be placed into the dial bridge.
      
      The code now checks to ensure that only stasis created channels are
      placed into the dial bridge by checking that a PBX does not exist
      on the channel.
      
      ASTERISK-27756
      
      Change-Id: Ideee69ff06c9a0b31f7ed61165f5c055f51d21b6
      71040078
  6. May 01, 2019
    • Joshua Colp's avatar
      rtp: Add support for transport-cc in receiver direction. · 6bb70c93
      Joshua Colp authored
      The transport-cc draft is a mechanism by which additional information
      about packet reception can be provided to the sender of packets so
      they can do sender side bandwidth estimation. This is accomplished
      by having a transport specific sequence number and an RTCP feedback
      message. This change implements this in the receiver direction.
      
      For each received RTP packet where transport-cc is negotiated we store
      the time at which the RTP packet was received and its sequence number.
      At a 1 second interval we go through all packets in that period of time
      and use the stored time of each in comparison to its preceding packet to
      calculate its delta. This delta information is placed in the RTCP
      feedback message, along with indicators for any packets which were not
      received.
      
      The browser then uses this information to better estimate available
      bandwidth and adjust accordingly. This may result in it lowering the
      available send bandwidth or adjusting how "bursty" it can be.
      
      ASTERISK-28400
      
      Change-Id: I654a2cff5bd5554ab94457a14f70adb71f574afc
      6bb70c93
  7. Apr 23, 2019
    • Kevin Harwell's avatar
      mwi core: Move core MWI functionality into its own files · ff0d0ac2
      Kevin Harwell authored
      There is enough MWI functionality to warrant it having its own 'c' and header
      files. This patch moves all current core MWI data structures, and functions
      into the following files:
      
      main/mwi.h
      main/mwi.c
      
      Note, code was simply moved, and not modified. However, this patch is also in
      preparation for core MWI changes, and additions to come.
      
      Change-Id: I9dde8bfae1e7ec254fa63166e090f77e4d3097e0
      ff0d0ac2
  8. Apr 18, 2019
  9. Apr 17, 2019
    • Dan Cropp's avatar
      res_pjsip: Added a norefersub configuration setting · cffa2a74
      Dan Cropp authored
      Added a new PJSIP global setting called norefersub.
      Default is true to keep support working as before.
      
      res_pjsip_refer:  Configures PJSIP norefersub capability accordingly.
      
      Checks the PJSIP global setting value.
      If it is true (default) it adds the norefersub capability to PJSIP.
      If it is false (disabled) it does not add the norefersub capability
      to PJSIP.
      
      This is useful for Cisco switches that do not follow RFC4488.
      
      ASTERISK-28375 #close
      Reported-by: Dan Cropp
      
      Change-Id: I0b1c28ebc905d881f4a16e752715487a688b30e9
      cffa2a74
  10. Apr 16, 2019
  11. Apr 12, 2019
    • George Joseph's avatar
      ARI: Run 'make ari-stubs' · 26cdf042
      George Joseph authored
      An earlier contributor apparently forgot to run 'make ari-stubs'
      before committing after making ARI model changes.
      
      Change-Id: I7813e5638e2821d11f4b968dc2aeab4f725190a6
      26cdf042
  12. Apr 11, 2019
    • Sean Bright's avatar
      res_ael: Create consistent label names across reloads · f8271934
      Sean Bright authored
      Reset the internal counter that the AEL2 compiler uses for unique label
      names before compiling. This keeps dialplan labels consistent across
      reloads assuming the AEL2 has not changed.
      
      ASTERISK-17799 #close
      Reported by: Kirill Katsnelson
      
      Change-Id: I30b3cc887d1ee0644d3f341e2fef16f525d7fae5
      f8271934
    • Sean Bright's avatar
      res_ael: Use Gosub in for loop expressions · f7f1a2cb
      Sean Bright authored
      In AEL2, if a 'for' statement contains macro* calls, like:
      
          for (&iterator(${TRY},A); "${A}" != ""; &iterate(A)) {
      
      The AEL2 parser will translate these into calls to the deprecated Macro
      dialplan application and use the antiquated pipe delimiter.
      
      Instead, convert these into calls to the Gosub dialplan application and
      use commas as argument separators.
      
      ASTERISK-18593 #close
      Reported by: Luke-Jr
      
      * 'macro' in this context means AEL2 macros, not the 'Macro' application
      
      Change-Id: I3d73716033b8e3e42e0209d355bf5f10c97045fc
      f7f1a2cb
    • Sean Bright's avatar
      res_ael: Fix pattern matching against literal '+' · 395c7ed5
      Sean Bright authored
      When generating the regular expression that matches against existing
      extensions, we need to escape literal characters that can also be
      regular expression metacharacters. This was already being done for '*'
      but we need to do the same for '+'.
      
      In passing, remove some unreachable code - strcmp() is already run
      immediately when entering extension_matches().
      
      ASTERISK-14939 #close
      Reported by: klaus3000
      
      Change-Id: I8d2cccb3479168fba1b0a6704c52198b396468f1
      395c7ed5
  13. Apr 10, 2019
  14. Apr 02, 2019
    • Kevin Harwell's avatar
      bridge_softmix: use a float type to store the internal REMB bitrate · d1d06928
      Kevin Harwell authored
      REMB's exponent is 6-bits (0..63) and has a mantissa of 18-bits. We were using
      an unsigned integer to represent the bitrate. However, that type is not large
      enough to hold all potential bitrate values. If the bitrate is large enough
      bits were being shifted off the "front" of the mantissa, which caused the
      wrong value to be sent to the browser.
      
      This patch makes it so it now uses a float type to hold the bitrate. Using a
      float allows for all bitrate values to be correctly represented.
      
      ASTERISK-28255
      
      Change-Id: Ice00fdd16693b16b41230664be5d9f0e465b239e
      d1d06928
  15. Mar 27, 2019
  16. Mar 26, 2019
    • sungtae kim's avatar
      main/json.c: Added app_name, app_data to channel type · 76768ad6
      sungtae kim authored
      It was difficult to check the channel's current application and
      parameters using ARI for current channels. Added app_name, app_data
      items to show the current application information.
      
      ASTERISK-28343
      
      Change-Id: Ia48972b3850e5099deab0faeaaf51223a1f2f38c
      76768ad6
  17. Mar 25, 2019
    • Alexei Gradinari's avatar
      res_config_odbc: set empty extended field as a single whitespace · e5d990d0
      Alexei Gradinari authored
      If Realtime @ variable value is NULL or empty or contains only whitespaces
      then when we try to retrieve it using PJSIP_ENDPOINT we get WARNING
      pjsip_endpoint_function_read: Unknown property @my_var for PJSIP endpoint.
      And the variable is missing in the result of CLI pjsip show endpoint.
      
      This patch keeps empty sorcery extended field.
      
      ASTERISK-28341 #close
      
      Change-Id: I221fccc04cbfa2be17ce971f64ae0e74e465eea0
      e5d990d0
  18. Mar 15, 2019
    • sungtae kim's avatar
      res/res_stasis: Fixed wrong StasisEnd timestamp · 629962d1
      sungtae kim authored
      Because StasisEnd's timestamp created it's own timestamp, it makes
      wrong timestamp, compare to other channel event(ChannelDestroyed).
      Fixed to getting a timestamp from the Channel's timestamp.
      
      ASTERISK-28333
      
      Change-Id: I5eb8380fc472f1100535a6bc4983c64767026116
      629962d1
  19. Mar 14, 2019
    • George Joseph's avatar
      app.c: Remove deletion of pool topic on mwi state delete · 63d90c38
      George Joseph authored
      As part of an earlier voicemail refactor, ast_delete_mwi_state_full
      was modified to remove the pool topic for a mailbox when the state
      was deleted.  This was an attempt to prevent stale topics from
      accumulating when app_voicemail was reloaded and a mailbox went
      away.  Unfortunately because of the fact that when app_voicemail
      reloads, ALL mailboxes are deleted then only current ones recreated,
      topics were being removed from the pool that still had subscribers
      on them, then recreated as new topics of the same name.  So now
      modules like res_pjsip_mwi are listening on a topic that will
      never receive any messages because app_voicemail is publishing on
      a different topic that happens to have the same name.  The solutiuon
      to this is not easy and given that accumulating topics for
      deleted mailboxes is less evil that not sending NOTIFYs...
      
      * Removed the call to stasis_topic_pool_delete_topic in
        ast_delete_mwi_state_full.
      
      Also:
      
      * Fixed a topic reference leak in res_pjsip_mwi
        mwi_stasis_subscription_alloc.
      
      * Added some debugging to mwi_stasis_subscription_alloc,
        stasis_topic_create, and topic_dtor.
      
      * Fixed a topic reference leak in an error path in
        internal_stasis_subscribe.
      
      ASTERISK-28306
      Reported-by: Jared Hull
      
      Change-Id: Id7da0990b3ac4be4b58491536b35f41291247b27
      63d90c38
  20. Mar 13, 2019
  21. Mar 11, 2019
    • sungtae kim's avatar
      res/res_ari: Added timestamp as a requirement for all ARI events · e2eb19b3
      sungtae kim authored
      Changed to requirement to having timestamp for all of ARI events.
      The below ARI events were changed to having timestamp.
      PlaybackStarted, PlaybackContinuing, PlaybackFinished,
      RecordingStarted, RecordingFinished, RecordingFailed,
      ApplicationReplaced, ApplicationMoveFailed
      
      ASTERISK-28326
      
      Change-Id: I382c2fef58f5fe107e1074869a6d05310accb41f
      e2eb19b3
    • Joshua Colp's avatar
      stasis: Improve topic/subscription names and statistics. · 0231dd6a
      Joshua Colp authored
      Topic names now follow: <subsystem>:<functionality>[/<object>]
      
      This ensures that they are all unique, and also provides better
      insight in to what each topic is for.
      
      Subscriber ids now also use the main topic name they are
      subscribed to and an incrementing integer as their identifier to
      make it easier to understand what the subscription is primarily
      responsible for.
      
      Both the CLI commands for listing topic and subscription statistics
      now sort to make it a bit easier to see what is going on.
      
      Subscriptions will now show all topics that they are receiving messages
      from, not just the main topic they were subscribed to.
      
      ASTERISK-28335
      
      Change-Id: I484e971a38c3640f2bd156282e532eed84bf220d
      0231dd6a
    • sungtae kim's avatar
      res/res_rtp_asterisk.c: Fixing possible divide by zero · 8641fd97
      sungtae kim authored
      Currently, when the Asterisk calculates rtp statistics, it uses
      sample_count as a unsigned integer parameter. This would be fine
      for most of cases, but in case of large enough number of sample_count,
      this might be causing the divide by zero error.
      
      ASTERISK-28321
      
      Change-Id: If7e0629abaceddd2166eb012456c53033ea26249
      8641fd97
  22. Mar 08, 2019
  23. Mar 07, 2019
    • Sean Bright's avatar
      Replace calls to strtok() with strtok_r() · 2473b791
      Sean Bright authored
      strtok() uses a static buffer, making it not thread safe.
      
      Also add a #define to cause a compile failure if strtok is used.
      
      Change-Id: Icce265153e1e65adafa8849334438ab6d190e541
      2473b791
    • Ben Ford's avatar
      res_stasis: Add ability to switch applications. · 6626df58
      Ben Ford authored
      Added the ability to move between Stasis applications within Stasis.
      This can be done by calling 'move' in an application, providing (at
      minimum) the channel's id and the application to switch to. If the
      application is not registered or active, nothing will happen and the
      channel will remain in the current application, and an event will be
      triggered to let the application know that the move failed. The event
      name is "ApplicationMoveFailed", and provides the "destination" that the
      channel was attempting to move to, as well as the usual channel
      information. Optionally, a list of arguments can be passed to the
      function call for the receiving application. A full example of a 'move'
      call would look like this:
      
      client.channels.move(channelId, app, appArgs)
      
      The control object used to control the channel in Stasis can now switch
      which application it belongs to, rather than belonging to one Stasis
      application for its lifetime. This allows us to use the same control
      object instead of having to tear down the current one and create
      another.
      
      ASTERISK-28267 #close
      
      Change-Id: I43d12b10045a98a8d42541889b85695be26f288a
      6626df58
  24. Mar 03, 2019
    • sungtae kim's avatar
      bridging: Add creation timestamps · 3638c433
      sungtae kim authored
      This small feature will help to checking the bridge's status to
      figure out which bridge is in old/zombie or not. Also added
      detail items for the 'bridge show *' cli to provide more detail
      info. And added creation item to the ARI as well.
      
      ASTERISK-28279
      
      Change-Id: I460238c488eca4d216b9176576211cb03286e040
      3638c433
  25. Mar 01, 2019
    • Sean Bright's avatar
      res_pjsip_diversion: Use static pj_str_t for Diversion header names · 106a8ff0
      Sean Bright authored
      PJSIP assumes that these header names are not allocated, and does not
      clone the name strings when reusing headers.
      
      Block unload of res_pjsip_diversion until shutdown to ensure static
      memory stays valid.
      
      ASTERISK-28312 #close
      
      Change-Id: Ibd6ea55ec4a604bbd43ac07f8d0b54da2c39b8b9
      106a8ff0
  26. Feb 28, 2019
    • Sean Bright's avatar
      res_config_odbc: Avoid deadlock when max_connections = 1 · 719a4643
      Sean Bright authored
      Rather than calling ast_odbc_find_table() in the prepare callback, call
      it beforehand and pass it in to the callback to avoid the need for a
      second connection.
      
      ASTERISK-28166 #close
      
      Change-Id: I6f8a0b9990d636fd6bc1a92ed70f7050d2436202
      719a4643
    • George Joseph's avatar
      res_pjsip_sdp_rtp: Fix return code from apply_negotiated_sdp_stream · 8f9ffe59
      George Joseph authored
      apply_negotiated_sdp_stream was returning a "1" when no joint
      capabilities were found on an outgoing call instead of a "-1".
      This indicated to res_pjsip_session that the handler DID handle
      the sdp when in fact it didn't.  Without the appropriate setup,
      a subsequent media frame coming in would have an invalid stream_num
      and cause a seg fault when the stream was attempted to be retrieved.
      
      apply_negotiated_sdp_stream now returns the correct "-1" and any
      media is now discarded before it reaches the core stream processing.
      
      ASTERISK-28260
      Reported by: Sotiris Ganouris
      
      Change-Id: Ia095cb16b4862f2f6ad6d2d2a77453fa2542371f
      8f9ffe59
    • Sean Bright's avatar
      Revert "pjsip_message_filter: Only do interface lookup for wildcard addresses." · 101272d0
      Sean Bright authored
      This reverts commit d524ad52.
      
      Reason for revert: This causes Contact and Via headers to have the wrong
      transport address.
      
      ASTERISK-28309 #close
      
      Change-Id: Ibba4d6176f68e39279fcd9a545f81d56e747bed8
      101272d0
    • Sean Bright's avatar
      res_pjsip_config_wizard: Don't crash if misconfigured · 82a43394
      Sean Bright authored
      If both send_registrations and send_auth are both set to yes,
      outbound_auth/username must be set or we crash.
      
      ASTERISK-27992 #close
      
      Change-Id: I6418d56de1ae53f80393b314c2584048fbf7f11d
      82a43394
  27. Feb 27, 2019
    • Kevin Harwell's avatar
      res_pjsip_registrar: blocked threads on reliable transport shutdown take 3 · 930a7fe9
      Kevin Harwell authored
      When a contact was removed by the registrar it did not always check to see if
      the circumstances involved a monitored reliable transport. For instance, if the
      'remove_existing' option was set to 'true' then when existing contacts were
      removed due to 'max_contacts' being reached, those existing contacts being
      removed did not unregister the transport monitor.
      
      Also, it was possible to add more than one monitor on a reliable transport for
      a given aor and contact.
      
      This patch makes it so all contact removals done by the registrar also remove
      any associated transport monitors if necessary. It also makes it so duplicate
      monitors cannot be added for a given transport.
      
      ASTERISK-28213
      
      Change-Id: I94b06f9026ed177d6adfd538317c784a42c1b17a
      930a7fe9
  28. Feb 26, 2019
Loading