Skip to content
Snippets Groups Projects
  1. Jun 09, 2016
    • Joshua Colp's avatar
      cel: Ensure only one dial status per channel exists. · d338343d
      Joshua Colp authored
      CEL wrongly assumed that a channel would only have a single dial
      event on it. This is incorrect. Particularly in a queue each
      call attempt to a member will result in a dial event, adding
      a new dial status in CEL without removing the old one. This
      would cause the container to grow with only one dial status
      being removed when the channel went away. The other dial status
      entries would remain leaking memory.
      
      This change fixes the memory leak by ensuring that only one dial
      status will only ever exist for each channel.
      
      The behavior during the scenario where multiple events are received
      has also been improved. For failure cases the first failure will
      be the dial status. If an answer dial status is received, though,
      it will take priority and the dial status for the channel will be
      answer.
      
      Memory usage has also been decreased by storing the minimal
      amount of information and the code has been cleaned up slightly.
      
      ASTERISK-25262 #close
      
      Change-Id: I5944eb923db17b6a0faa7317ff6abc9307c009fe
      d338343d
    • zuul's avatar
    • George Joseph's avatar
      cdr.c: Remove assert in base_process_dial_end · f0855358
      George Joseph authored
      Scenario: Caller blonde transfer
      Bob calls Charlie who answers.
      Bob puts Charlie on hold and calls Alice.
      Before Alice answers, Bob transfers Charlie to Alice.
      
      Charlie's channel triggers an assert because he gets an "ANSWERED"
      event even though he never dialed anything. With recent changes to dial
      events, this is now a valid scenario so the assert needed to be removed.
      
      ASTERISK-26103 #close
      
      Change-Id: I2679b517b696e7952ab7fb29403df9140e7d1de2
      f0855358
    • Mark Michelson's avatar
      chan_pjsip: Lock channel when checking for RTP changes. · cdb7edbe
      Mark Michelson authored
      bridge_native_rtp can call into an RTP-capable channel driver in order
      for the driver to update information about who the channel is
      communicating with. For SIP channel drivers, this means deactivating
      RTCP and sending a reinvite so that the endpoints can communicate
      directly.
      
      bridge_native_rtp does the right thing and has the channel locked when
      calling into the channel driver. chan_pjsip can't alter session
      properties in this thread, though. chan_pjsip queues a task on the
      session serializer in order to update properties there.
      
      The problem is that this queued task was not locking the channel. This
      meant that the queued task could attempt to deactivate RTCP at the same
      time that the channel thread was attempting to process an incoming RTCP
      packet. This could lead to a crash.
      
      This patch fixes the issue by locking the channel in the queued task
      when altering RTP properties.
      
      ASTERISK-26092 #close
      Reported by Niklas Larsson
      
      Change-Id: I3464e226a3c41f6b915f97891e07fa1599e2a159
      cdb7edbe
    • George Joseph's avatar
      build: Fix ast_sockaddr initialization to be more portable · d21a77b3
      George Joseph authored
      A change to glibc 2.22 changed the order of the sockadddr_storage
      members which caused the places where we do an initialization of
      ast_sockaddr with '{ { 0, 0, } }' to fail compilation.  Those
      initializers (which we shouldn't have been using anyway) have been
      replaced with memsets.
      
      Change-Id: Idd1b3b320903d8771bfe221f0b015685de628fa4
      d21a77b3
    • Joshua Colp's avatar
    • Joshua Colp's avatar
    • Joshua Colp's avatar
    • Joshua Colp's avatar
    • Joshua Colp's avatar
      Merge "Fixes to include signal.h" · 5c949d00
      Joshua Colp authored
      5c949d00
    • Joshua Colp's avatar
  2. Jun 08, 2016
  3. Jun 07, 2016
    • Joshua Colp's avatar
      33787459
    • Joshua Colp's avatar
      res_odbc: Implement a connection pool. · 31a5c283
      Joshua Colp authored
      Testing has shown that our usage of UnixODBC is problematic
      due to bugs within UnixODBC itself as well as the heavy weight
      cost of connecting and disconnecting database connections, even
      when pooling is enabled.
      
      For users of UnixODBC 2.3.1 and earlier crashes would occur due
      to insufficient protection of the disconnect operation. This was
      fixed in UnixODBC 2.3.2 and above.
      
      For users of UnixODBC 2.3.3 and higher a slow-down would occur
      under heavy database use due to repeated connection establishment.
      A regression is present where on each connection the database
      configuration is cached again, with the cache growing out of
      control.
      
      The connection pool implementation present in this change helps
      to mitigate these issues by reducing how much we connect and
      disconnect database connections. We also solve the issue of
      crashes under UnixODBC 2.3.1 by defaulting the maximum number of
      connections to 1, returning us to the previous working behavior.
      For users who may have a fixed version the maximum concurrent
      connection limit can be increased helping with performance.
      
      The connection pool works by keeping a list of active connections.
      If the connection limit has not been reached a new connection is
      established. If the connection limit has been reached then the
      request waits until a connection becomes available before
      continuing.
      
      ASTERISK-26074 #close
      ASTERISK-26054 #close
      
      Change-Id: I6774bf4bac49a0b30242c76a09c403d2e856ecff
      31a5c283
    • Örn Arnarson's avatar
      apps/app_voicemail.c and main/say.c: Add support for Icelandic language · 60caebc7
      Örn Arnarson authored
      Icelandic has some weird grammar rules when dealing with dates and
      numbers. There are different genders used depending on which number
      you're dealing with, and only a handful of numbers do change depending
      on the gender. There is also an implied gender in several cases.
      
      This patch was originally written for asterisk 1.6, and has been in use
      for several years without crashes. I cleaned it up a bit and rewrote
      what was necessary for Asterisk 13.
      
      The functions were copied from other similar languages and modified
      where appropriate. If i recall correctly, the German and Danish
      functions were used as a base.
      
      ASTERISK-26087
      Reported by: Örn Arnarson
      Tested by: Örn Arnarson
      
      Change-Id: Ib7d8bd7b0fede5767921ed821315b5b508c0e665
      60caebc7
    • Alexander Traud's avatar
      res_srtp: Instead of libSRTP use OpenSSL as random source. · 52120204
      Alexander Traud authored
      Since libSRTP 1.5, its Random Number Generator (RNG) is not maintained anymore.
      Therefore, the symbol RAND_bytes is used instead of crypto_get_random.
      
      ASTERISK-24436 #close
      
      Change-Id: Iea0bae4d4e3c9aa0926ea442b6484b5159789d96
      52120204
    • Alexander Traud's avatar
      BuildSystem: Avoid 'ar cru' and use 'ar cr' instead. · da943ec5
      Alexander Traud authored
      In several internal library projects, the files are archived with the help of
      'ar cr'. Only the projects editline and the Objective Open H.323 stack
      implementation in C (ooh323c) use 'ar cru' instead. Recently, some platforms
      changed the default parameters of AR which creates "/usr/bin/ar: `u' modifier
      ignored since `D' is the default (see `U')". For consistency and to avoid this
      message all projects use 'ar cr' now.
      
      ASTERISK-26091 #close
      
      Change-Id: I710a9b1c01c1b5a1931a646098c044c8161ead40
      da943ec5
  4. Jun 06, 2016
    • Richard Mudgett's avatar
      chan_rtp.c: Simplify options to UnicastRTP channel creation. · dca052e5
      Richard Mudgett authored
      Change the awkward and not as flexible UnicastRTP options format
      From:
      Dial(UnicastRTP/127.0.0.1[/[<engine>][/[<codec>]]])
      To:
      Dial(UnicastRTP/127.0.0.1[/[<options>]])
      
      Where <options> can be standard Asterisk flag options:
      c(<codec>) - Specify which codec/format to use such as 'ulaw'.
      e(<engine>) - Specify which RTP engine to use such as 'asterisk'.
      
      More option flags can be easily added later such as the codec's RTP
      payload type to use when the codec does not have a static payload type
      defined.
      
      Change-Id: I0c297aaf09e2ee515536cb7437bb8042ff8ff3c9
      dca052e5
  5. Jun 05, 2016
  6. Jun 04, 2016
    • Alexei Gradinari's avatar
      core/dial: New channel variable FORWARDERNAME · 3e8d523d
      Alexei Gradinari authored
      Added a new channel variable FORWARDERNAME which indicates which
      channel was responsible for a forwarding requests received on dial attempt.
      
      Fixed a bug in the app_queue: FORWARD_CONTEXT is not used.
      
      ASTERISK-26059 #close
      
      Change-Id: I34e93e8c1b5e17776a77b319703c48c8ca48e7b2
      3e8d523d
  7. Jun 03, 2016
    • George Joseph's avatar
      ari/resource_channels: Add 'formats' to channel create/originate · a2f820e8
      George Joseph authored
      If you create a local channel and don't specify an originator channel
      to take capabilities from, we automatically add all audio formats to
      the new channel's capabilities. When we try to make the channel
      compatible with another, the "best format" functions pick the best
      format available, which in this case will be slin192.  While this is
      great for preserving quality, it's the worst for performance and
      overkill for the vast majority of applications.
      
      In the absense of any other information, adding all formats is the
      correct thing to do and it's not always possible to supply an
      originator so a new parameter 'formats' has been added to the channel
      create/originate functions. It's just a comma separated list of formats
      to make availalble for the channel. Example: "ulaw,slin,slin16".
      'formats' and 'originator' are mutually exclusive.
      
      To facilitate determination of format names, the format name has been
      added to "core show codecs".
      
      ASTERISK-26070 #close
      
      Change-Id: I091b23ecd41c1b4128d85028209772ee139f604b
      a2f820e8
    • Joshua Colp's avatar
      f7ce0f18
    • Timo Teräs's avatar
      Make use of GLOB_BRACE and GLOB_NOMAGIC optional · 797695c5
      Timo Teräs authored
      These flags are non-portable GNU extensions. Make their use
      optional. This fixes complication error on e.g. musl c-library
      based systems.
      
      Change-Id: I0aa06efc62aa8995f091445c8b762a75a91042f3
      797695c5
  8. Jun 02, 2016
    • Timo Teräs's avatar
      Fix res_search usage · 3c1fec80
      Timo Teräs authored
      Resolver state is not part of res_search API. This fixes
      compilation error:
      
      dns.c:261:8: error: too many arguments to function 'res_search'
        ret = res_search(&dns_state,
      
      Change-Id: Ia600a58557040df83f744da3dde23225293845a5
      3c1fec80
    • Timo Teräs's avatar
      Fix #include poll.h and sys/cdefs.h · 9c1d95e8
      Timo Teräs authored
      POSIX defines poll.h, sys/poll.h should not be used at is c-library
      internal header which may or may not exist. Notable in musl it
      generates warning of being incorrect. And add explict include of
      sys/cdefs.h where needed.
      
      Change-Id: I142930df53fe7585a06b854b6faddc5301e024be
      9c1d95e8
    • Niklas Larsson's avatar
      core/manager: Add uptime field to FullyBooted · 8a5c2e73
      Niklas Larsson authored
      Add Uptime and LastReload to event FullyBooted.
      
      ASTERISK-26058 #close
      Reported by: Niklas Larsson
      
      Change-Id: I909b330801c0990d78df9b272ab0adc95aecb15e
      8a5c2e73
    • Joshua Colp's avatar
      alembic: Fix migration. · 4505a59d
      Joshua Colp authored
      The 81b01a191a46_pjsip_add_contact_reg_server.py script was attempting
      to use UniqueConstraint and failing. It was not imported and after
      importing it also continued to fail.
      
      I've changed the script to use the explicit name of the constraint
      instead.
      
      Change-Id: I2438b0be90b7ce583b47dd27983c0c1a02cea5b9
      4505a59d
  9. Jun 01, 2016
Loading