Skip to content
Snippets Groups Projects
  1. Dec 04, 2015
    • George Joseph's avatar
      res_pjsip/contacts/statsd: Make contact lifecycle events more consistent · 450579e9
      George Joseph authored
      It will never be perfect or even pretty, mostly because of the differences
      between static and dynamic contacts.
      
      Created:
      
      Can't use the contact or contact_status alloc functions
      because the objects come and go regardless of the actual state.
      
      Can't use the contact_apply_handler, ast_sip_location_add_contact or
      a sorcery created handler because they only get called for dynamic
      contacts.  Similarly, permanent_uri_handler only gets called for
      static contacts.
      
      So, Matt had it right. :)  ast_res_pjsip_find_or_create_contact_status is
      the only place it can go and not have duplicated code.  Both
      permanent_uri_handler and contact_apply_handler call find_or_create.
      
      Removed:
      
      Can't use the destructors for the same reason as above.  The only
      place to put this is in persistent_endpoint_contact_deleted_observer
      which I believe is the "correct" place but even that will handle only
      dynamic contacts.  This doesn't called on shutdown however.  There is
      no hook to use for static contacts that may be removed because of a
      config change while asterisk is in operation.
      
      I moved the cleanup of contact_status from ast_sip_location_delete_contact
      to the handler as well.
      
      Status Change and RTT:
      
      Although they worked fine where they were (in update_contact_status) I
      moved them to persistent_endpoint_contact_status_observer to make it
      more consistent with removed.  There was logic there already to detect
      a state change.
      
      Finally, fixed a nit in permanent_uri_handler rmudgett reported
      eralier.
      
      ASTERISK-25608 #close
      
      Change-Id: I4b56e7dfc3be3baaaf6f1eac5b2068a0b79e357d
      Reported-by: George Joseph
      Tested-by: George Joseph
      450579e9
    • Matt Jordan's avatar
    • Matt Jordan's avatar
    • Matt Jordan's avatar
    • Alexander Traud's avatar
      res_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8. · 5a18193d
      Alexander Traud authored
      ASTERISK-25584 #close
      
      Change-Id: Iae00071b4ff1ae76f24995aeac4d00284fd14f91
      5a18193d
    • Alexander Traud's avatar
      res_format_attr_opus: Update to latest RFC 7587. · 3e2178c0
      Alexander Traud authored
      Beside that, the format-attribute module sends only non-default values in the
      line fmtp, now. This avoids unnecessary overhead in SDP messages. Furthermore,
      previously the parameter stereo was not parsed when being the first parameter.
      
      ASTERISK-25583 #close
      
      Change-Id: Iae85ba3e5960bfd5d51cf65bcffad00dd4875a73
      3e2178c0
  2. Dec 03, 2015
    • Jonathan Rose's avatar
      Fix crash in audiohook translate to slin · 072d9418
      Jonathan Rose authored
      This patch fixes a crash which would occur when an audiohook was
      applied to a channel using an audio codec that could not be translated
      to signed linear (such as when using pass-through codecs like OPUS or
      when the codec translator module for the format in use is not loaded).
      
      ASTERISK-25498 #close
      Reported by: Ben Langfeld
      
      Change-Id: Ib6ea7373fcc22e537cad373996136636201f4384
      072d9418
    • Joshua Colp's avatar
    • Joshua Colp's avatar
    • Joshua Colp's avatar
    • George Joseph's avatar
      res_pjsip: Use a MD5 hash for static Contact IDs · 9184fbeb
      George Joseph authored
      When 90d9a707 was merged, it mostly tested dynamic contacts created as
      a result of registering a PJSIP endpoint. Contacts generated in this
      fashion typically have a long alphanumeric string as their object identifier,
      which maps reasonably well for StatsD. Unfortunately, this doesn't work in the
      general case. StatsD treats both '.' and ':' characters as special characters.
      In particular, having a ':' appear in the middle of a StatsD metric will
      result in the metric being rejected.
      
      This causes some obvious issues with SIP URIs.
      
      The StatsD API should not be responsible for escaping the metric name passed
      to it. The metric is treated as a single long string, and it would be
      challenging to know what to escape in the string passed to the function.
      Likewise, we don't want to escape the metric in PJSIP, as that involves
      overhead that is wasted when either res_statsd isn't loaded or enabled.
      
      This patch takes an alternative approach. The Contact ID has been changed
      to be "aor@@uri_hash" instead of "aor@@uri". This (a) won't contain any of the
      aforementioned special characters, (b) can be done on Contact creation,
      which has minimal impact on run-time performance, and (c) also conforms to an
      earlier commit that changed the ID for dynamic contacts.
      
      The downside of this is that StatsD users will have to map SHA1 hashes back to
      the Contacts that are emitting the statistics. To that end, the CLI commands
      have been updated to include the first 10 characters of the MD5 hash, which
      should be enough to match what is shown in Graphite (or some other StatsD
      backend).
      
      ASTERISK-25595 #close
      
      Change-Id: Ic674a3307280365b4a45864a3571c295b48a01e2
      Reported-by: Matt Jordan
      Tested-by: George Joseph
      9184fbeb
    • Joshua Colp's avatar
    • Joshua Colp's avatar
    • Joshua Colp's avatar
      Merge topic 'ASTERISK-25476' into 13 · 53d4f770
      Joshua Colp authored
      * changes:
        Audit improper usage of scheduler exposed by 5c713fdf. (v13 additions)
        Audit improper usage of scheduler exposed by 5c713fdf.
      53d4f770
    • George Joseph's avatar
      res_pjsip: Update logging to show contact->uri in messages · ed913428
      George Joseph authored
      An earlier commit changed the id of dynamic contacts to contain
      a hash instead of the uri.  This patch updates status change
      logging to show the aor/uri instead of the id.  This required
      adding the aor id to contact and contact_status and adding
      uri to contact_status.  The aor id gets added to contact and
      contact_status in their allocators and the uri gets added to
      contact_status in pjsip_options when the contact_status is
      created or updated.
      
      ASTERISK-25598 #close
      
      Reported-by: George Joseph
      Tested-by: George Joseph
      
      Change-Id: I56cbec1d2ddbe8461367dd8b6da8a6f47f6fe511
      ed913428
  3. Dec 02, 2015
    • Jonathan Rose's avatar
      Unset BRIDGEPEER when leaving a bridge · eadad24b
      Jonathan Rose authored
      Currently if a channel is transferred out of a bridge, the BRIDGEPEER
      variable (also BRIDGEPVTCALLID) remain set even once the channel is
      out of the bridge. This patch removes these variables when leaving
      the bridge.
      
      ASTERISK-25600 #close
      Reported by: Mark Michelson
      
      Change-Id: I753ead2fffbfc65427ed4e9244c7066610e546da
      eadad24b
  4. Dec 01, 2015
    • Richard Mudgett's avatar
      res_sorcery_memory_cache.c: Fix off nominal ref leak. · bb0b6061
      Richard Mudgett authored
      Change-Id: If83d63cf11cbc6df9b15251848b01feb570ade49
      bb0b6061
    • Richard Mudgett's avatar
      sched.c: Make not return a sched id of 0. · e7c88e11
      Richard Mudgett authored
      According to the API doxygen a sched ID of 0 is valid.  Unfortunately, 0
      was never returned historically and several users incorrectly coded usage
      of the returned sched ID assuming that 0 was invalid.
      
      ASTERISK-25476
      
      Change-Id: Ib19c7ebb44ec9fd393ef6646dea806d4f34e3a20
      e7c88e11
    • Richard Mudgett's avatar
      Audit improper usage of scheduler exposed by 5c713fdf. (v13 additions) · 4aed349a
      Richard Mudgett authored
      chan_sip.c:
      * Initialize mwi subscription scheduler ids earlier because of ASTOBJ to
      ao2 conversion.
      
      * Initialize register scheduler ids earlier because of ASTOBJ to ao2
      conversion.
      
      chan_skinny.c:
      * Fix more scheduler usage for the valid 0 id value.
      
      ASTERISK-25476
      
      Change-Id: If9f0e5d99638b2f9d102d1ebc9c5a14b2d706e95
      4aed349a
    • Richard Mudgett's avatar
      Audit improper usage of scheduler exposed by 5c713fdf. · 6d9156d1
      Richard Mudgett authored
      channels/chan_iax2.c:
      * Initialize struct chan_iax2_pvt scheduler ids earlier because of
      iax2_destroy_helper().
      
      channels/chan_sip.c:
      channels/sip/config_parser.c:
      * Fix initialization of scheduler id struct members.  Some off nominal
      paths had 0 as a scheduler id to be destroyed when it was never started.
      
      chan_skinny.c:
      * Fix some scheduler id comparisons that excluded the valid 0 id.
      
      channel.c:
      * Fix channel initialization of the video stream scheduler id.
      
      pbx_dundi.c:
      * Fix channel initialization of the packet retransmission scheduler id.
      
      ASTERISK-25476
      
      Change-Id: I07a3449f728f671d326a22fcbd071f150ba2e8c8
      6d9156d1
    • Alexander Traud's avatar
      codec_resample: Increase buffer for Opus Codec. · b76c196e
      Alexander Traud authored
      ASTERISK-25599 #close
      
      Change-Id: I1f88a88c59fb4e1e62bbdbb100c7152d48e73f10
      b76c196e
    • Matt Jordan's avatar
      bridges/bridge_t38: Add a bridging module for managing T.38 state · 6614babe
      Matt Jordan authored
      When 4875e5ac was merged, it fixed several issues with a direct media bridge
      transitioning to handling a T.38 fax. However, it uncovered a race condition
      caused by the bridging core. When a channel involved in a T.38 fax leaves a
      bridge, the frame queued by the channel driver that should inform the far side
      that it is no longer in a T.38 fax may not make it across the bridge. The
      bridging framework is *extremely* aggressive in tearing down the bridge, and
      control frames that are currently in flight *may* get dropped.
      
      This patch adds a new module to the bridging framework, bridge_t38. This module
      maintains some notion of the T.38 state for the two channels in a bridge. When
      the bridge detects that it is being torn down or when one of the two channels
      leaves, it informs the respective channel(s) that they should stop faxing. This
      ensures that channels switch back to audio if they survive and are ejected out
      of a bridge while faxing.
      
      ASTERISK-25582
      
      Change-Id: If5b0bb478eb01c4607c9f4a7fc17c7957d260ea0
      6614babe
  5. Nov 27, 2015
  6. Nov 26, 2015
  7. Nov 25, 2015
    • Kevin Harwell's avatar
      fastagi: record file closed after sending result · 45efbf85
      Kevin Harwell authored
      The fastagi record-file testsuite test sometimes fails reporting an empty
      recorded file. This was happening because Asterisk was sending the agi result
      notification prior to actually closing the file and the data, being buffered,
      had not been written to the file yet when the test attempts to check the file
      size.
      
      This patch makes it so the record file stream is closed prior to sending the
      agi result notification.
      
      ASTERISK-25593 #close
      
      Change-Id: I6b2b3be3ae37f7c7b18e672c419a89b3b8513cde
      45efbf85
    • Walter Doekes's avatar
      main: Slight refactor of main. Improve color situation. · b2787876
      Walter Doekes authored
      Several issues are addressed here:
      - main() is large, and half of it is only used if we're not rasterisk;
        fixed by spliting up the daemon part into a separate function.
      - Call ast_term_init from rasterisk as well.
      - Remove duplicate code reading/writing asterisk history file.
      - Attempt to tackle background color issues and color changes that
        occur. Tested by starting asterisk -c until the colors stopped
        changing at odd locations.
      
      ASTERISK-25585 #close
      
      Change-Id: Ib641a0964c59ef9fe6f59efa8ccb481a9580c52f
      b2787876
    • Matt Jordan's avatar
      Merge "Fixed some typos" into 13 · e96604c9
      Matt Jordan authored
      e96604c9
  8. Nov 24, 2015
  9. Nov 23, 2015
Loading