Skip to content
Snippets Groups Projects
  1. May 03, 2016
    • Andrew Nagy's avatar
      app_voicemail: always copy dynamic struct to avoid race condition · 080c6216
      Andrew Nagy authored
      Voicemail email addresses can be corrupt or voicemail
      emails can end up being sent to the wrong email address if asterisk is
      reading voicemail.conf during a reload and processing an email at the
      same time. This patch always copies the struct that would otherwise only
      be copied once.
      
      ASTERISK-24463 #close
      Reported by: John Campbell
      Tested by: Etienne Lessard
      Tested by: Andrew Nagy
      Change-Id: I3a0643813116da84e2617291903d0d489b7425fb
      080c6216
  2. Apr 29, 2016
  3. Apr 28, 2016
  4. Apr 27, 2016
    • George Joseph's avatar
      res_pjsip: Add ability to identify by Authorization username · 4ebf9a93
      George Joseph authored
      A feature of chan_sip that service providers relied upon was the ability to
      identify by the Authorization username.  This is most often used when customers
      have a PBX that needs to register rather than identify by IP address.  From my
      own experiance, this is pretty common with small businesses who otherwise
      don't need a static IP.
      
      In this scenario, a register from the customer's PBX may succeed because From
      will usually contain the PBXs account id but an INVITE will contain the caller
      id.  With nothing recognizable in From, the service provider's Asterisk can
      never match to an endpoint and the INVITE just stays unauthorized.
      
      The fixes:
      
      A new value "auth_username" has been added to endpoint/identify_by that
      will use the username and digest fields in the Authorization header
      instead of username and domain in the the From header to match an endpoint,
      or the To header to match an aor.  This code as added to
      res_pjsip_endpoint_identifier_user rather than creating a new module.
      
      Although identify_by was always a comma-separated list, there was only
      1 choice so order wasn't preserved.  So to keep the order, a vector was added
      to the end of ast_sip_endpoint.  This is only used by res_pjsip_registrar
      to find the aor.  The res_pjsip_endpoint_identifier_* modules are called in
      globals/endpoint_identifier_order.
      
      Along the way, the logic in res_pjsip_registrar was corrected to match
      most-specific to least-specific as res_pjsip_endpoint_identifier_user does.
      
      The order is:
      
      username@domain
      username@domain_alias
      username
      
      Auth by username does present 1 problem however, the first INVITE won't have
      an Authorization header so the distributor, not finding a match on anything,
      sends a securty_alert.  It still sends a 401 with a challenge so the next
      INVITE will have the Authorization header and presumably succeed.  As a result
      though, that first security alert is actually a false alarm.
      
      To address this, a new feature has been added to pjsip_distributor that keeps
      track of unidentified requests and only sends the security alert if a
      configurable number of unidentified requests come from the same IP in a
      configurable amout of time.  Those configuration options have been added to
      the global config object.  This feature is only used when auth_username
      is enabled.
      
      Finally, default_realm was added to the globals object to replace the hard
      coded "asterisk" used when an endpoint is not yet identified.
      
      The testsuite tests all pass but new tests are forthcoming for this new
      feature.
      
      ASTERISK-25835 #close
      Reported-by: Ross Beer
      
      Change-Id: I30ba62d208e6f63439600916fcd1c08a365ed69d
      4ebf9a93
    • Joshua Colp's avatar
    • Mark Michelson's avatar
      func_odbc: Check connection status before executing queries. · 2b150f0b
      Mark Michelson authored
      A recent change to func_odbc made it so that a single connection was
      maintained per DSN. The problem was that the code was optimistic about
      the health of the connection after initially opening it and did nothing
      to re-connect in case the connection had died.
      
      This change adds a check before executing a query to ensure that the
      connection to the database is still up and running.
      
      ASTERISK-25963 #close
      Reported by Ross Beer
      
      Change-Id: Id33c86eb04ff48ca088bb2e3086c27b3b683491d
      2b150f0b
    • Joshua Colp's avatar
    • zuul's avatar
    • Alexei Gradinari's avatar
      res_pjsip: disable multi domain to improve realtime performace · 860b135c
      Alexei Gradinari authored
      This patch added new global pjsip option 'disable_multi_domain'.
      Disabling Multi Domain can improve Realtime performance by reducing
      number of database requests.
      
      ASTERISK-25930 #close
      
      Change-Id: I2e7160f3aae68475d52742107949a799aa2c7dc7
      860b135c
    • Jean Aunis's avatar
      app_chanspy: reduce audio loss on the spying channel. · 72817707
      Jean Aunis authored
      ChanSpy was creating its audiohook with the flags AST_AUDIOHOOK_TRIGGER_SYNC
      and AST_AUDIOHOOK_SMALL_QUEUE, which caused audio frames to be lost when
      queues grow too large or when read and write queues go out of sync.
      Now these flags are set conditionally:
      - AST_AUDIOHOOK_TRIGGER_SYNC is not set if the option "o" is set
      - a new option "l" is created: if set, AST_AUDIOHOOK_SMALL_QUEUE will not
      be set on the audiohook
      
      ASTERISK-25866
      
      Change-Id: I9c7652f41d9fa72c8691e4e70ec4fd16b047a4dd
      72817707
  5. Apr 26, 2016
  6. Apr 25, 2016
    • George Joseph's avatar
      config: Fix ast_config_text_file_save2 writability check for missing files · 284bb814
      George Joseph authored
      A patch I did back in 2014 modified ast_config_text_file_save2 to check the
      writability of the main file and include files before truncating and re-writing
      them.  An unintended side-effect of this was that if a file doesn't exist,
      the check fails and the write is aborted.
      
      This patch causes ast_config_text_file_save2 to check the writability of the
      parent directory of missing files instead of checking the file itself.  This
      allows missing files to be created again.  A unit test was also added to
      test_config to test saving of config files.
      
      The regression was discovered when app_voicemail's passwordlocation=spooldir
      feature stopped working.
      
      ASTERISK-25917 #close
      Reported-by: Jonathan Rose
      
      Change-Id: Ic4dbe58c277a47b674679e49daed5fc6de349f80
      284bb814
    • DarkS's avatar
      Fix case sensitive actions in AMI QueueSummary and QueueStatus · f99ec857
      DarkS authored
      ASTERISK-25954 #close
      Reported by: Javier Acosta
      
      Change-Id: I00be83d45cc7e8385de2523012bd196aafeeb256
      (cherry picked from commit c0688a63)
      f99ec857
    • Kevin Harwell's avatar
      app_queue: queue members can receive multiple calls · 30ab21d5
      Kevin Harwell authored
      It was possible for a queue member that is a member of at least 2 or more
      queues to receive mulitiple calls at the same time. This happened because
      of a race between when a member was being rung and when the device state
      notified the other queue(s) member object of the state change.
      
      This patch makes it so when a queue member is being rung it gets added to
      a global pool of queue members. If that same member is tried again, e.g.
      from another queue, and it is found to already exist in the pending member
      container then it will not ring that member.
      
      ASTERISK-16115 #close
      
      Change-Id: I546dd474776d158c2b6be44205353dee5bac7e48
      30ab21d5
    • George Joseph's avatar
      res_agi: Prevent run_agi from eating frames it shouldn't · 99fcf2a7
      George Joseph authored
      The run_agi function is eating control frames when it shouldn't be. This is
      causing issues when an AGI is run from CONNECTED_LINE_SEND_SUB in a blond
      transfer.
      
      Alice calls Bob. Bob attended transfers to Charlie but hangs up before Charlie
      answers.
      
      Alice gets the COLP UPDATE indicating Charlie but Charlie never gets an UPDATE
      and is left thinking he's connected to Bob.
      
      In this case, when CONNECTED_LINE_SEND_SUB runs on Alice's channel and it calls
      an AGI, the extra eaten frames prevent CONNECTED_LINE_SEND_SUB from running on
      Charlie's channel.
      
      The fix was to accumulate deferrable frames in the "forever" loop instead of
      dropping them, and re-queue them just before running the actual agi command
      or exiting.
      
      ASTERISK-25951 #close
      
      Change-Id: I0f4bbfd72fc1126c2aaba41da3233a33d0433645
      99fcf2a7
    • Joshua Colp's avatar
      7f8d83fe
Loading