Skip to content
Snippets Groups Projects
  1. Jan 23, 2018
  2. Jan 18, 2018
  3. Jan 16, 2018
    • Richard Mudgett's avatar
      res_pjsip: Split type=identify to IP address and SIP header matching priorities · 8494e780
      Richard Mudgett authored
      The type=identify endpoint identification method can match by IP address
      and by SIP header.  However, the SIP header matching has limited
      usefulness because you cannot specify the SIP header matching priority
      relative to the IP address matching.  All the matching happens at the same
      priority and the order of evaluating the identify sections is
      indeterminate.  e.g., If you had two type=identify sections where one
      matches by IP address for endpoint alice and the other matches by SIP
      header for endpoint bob then you couldn't predict which endpoint is
      matched when a request comes in that matches both.
      
      * Extract the SIP header matching criteria into its own "header" endpoint
      identification method so the user can specify the relative priority of the
      SIP header and the IP address matching criteria in the global
      endpoint_identifier_order option.  The "ip" endpoint identification method
      now only matches by IP address.
      
      ASTERISK-27491
      
      Change-Id: I9df142a575b7e1e3471b7cda5d3ea156cef08095
      8494e780
  4. Jan 15, 2018
    • Corey Farrell's avatar
      loader: Add dependency fields to module structures. · 9cfdb81e
      Corey Farrell authored
      * Declare 'requires' and 'enhances' text fields on module info structure.
      * Rename 'nonoptreq' to 'optional_modules'.
      * Update doxygen comments.
      
      Still need to investigate dependencies among modules I cannot compile.
      
      Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
      9cfdb81e
  5. Jan 13, 2018
    • George Joseph's avatar
      config_transport: Enable TCP_NODELAY on TLS transports · cabe8063
      George Joseph authored
      We did this for TCP transports already but I'm not sure why we
      didn't do it for TLS transports.
      
      ASTERISK_27474 #not_final_fix
      
      Change-Id: I5b1ef4b882f7b859e718236686b7898751dbb262
      cabe8063
    • Corey Farrell's avatar
      res_stasis_recording: Allow symbolic links in configured recordings dir. · de7f2a6c
      Corey Farrell authored
      If any component of ast_config_AST_RECORDING_DIR is a symbolic link we
      would incorrectly assume the ARI user was trying to escape the recording
      path.  Create additional check to check the recording directory's
      realpath, only deny access if both do not match.
      
      This is needed by the testsuite when run by 'run-local'.
      
      Change-Id: I9145e841865edadcb5f75cead3471ad06bbb56c0
      de7f2a6c
  6. Jan 12, 2018
  7. Jan 09, 2018
    • Richard Mudgett's avatar
      res_pjsip.c: Update the endpoint identification documentation. · 8f3167c5
      Richard Mudgett authored
      * Endpoint identify_by documentation.
      * IP/Header endpoint identifier documentation.
      
      Change-Id: Id92f00b495acca7be945daf749d2abd7f76a0b5a
      8f3167c5
    • Richard Mudgett's avatar
      res_pjsip_endpoint_identifier_ip.c: Remove unnecessary requirement. · 42a61d9d
      Richard Mudgett authored
      The requirement that "ip" must be in the endpoint identify_by list to
      allow the type=identify method to identify the endpoint is not necessary.
      The "ip" identifier method can match one and only one endpoint.  To even
      work, the "ip" identifier method configuration must explicitly specify the
      identified endpoint.  Therefore, why bother configuring the type=identify
      identifier in the first place?  The requirement only adds the potential
      for configuration errors for no benefit.  Even worse, those configuration
      errors cannot be detected when the configuration loads.  The requirement
      was introduced with the ASTERISK_27206 patch.
      
      * Remove the code change that enforces the requiremnt.  Listing the "ip"
      method in the identify_by value is simply documentation.
      
      Change-Id: Ia057f92a33fb5d9f51dc5d5692e3d5ee1a6f2c11
      42a61d9d
    • Richard Mudgett's avatar
      res_pjsip.c: Fix ident_to_str() and refactor ident_handler(). · a7bbb18e
      Richard Mudgett authored
      * Extracted sip_endpoint_identifier_type2str() and
      sip_endpoint_identifier_str2type() to simplify the calling functions.
      
      * Fixed pjsip_configuration.c:ident_to_str() building the endpoint's
      identify_by value string.
      
      Change-Id: Ide876768a8d5d828b12052e2a75008b0563fc509
      a7bbb18e
    • Richard Mudgett's avatar
      res_pjsip_endpoint_identifier_ip.c: Allow multiple IdentifyDetail AMI events. · be488eb1
      Richard Mudgett authored
      The AMI PJSIPShowEndpoint action could only list one IdentifyDetail AMI
      event per endpoint.  However, there is no reason that multiple
      type=identify sections cannot identify the same endpoint.
      
      * Reworked format_ami_endpoint_identify() to generate as many
      IdentifyDetail AMI events as there are matching identifiers.
      
      Change-Id: Ie146792aef72d78e05416ab5b27bc552a30399db
      be488eb1
    • Joshua Colp's avatar
      res_pjsip_session: Always bundle streams if WebRTC is enabled. · a21841bf
      Joshua Colp authored
      Some WebRTC clients can't handle renegotiation with the addition of
      streams that include an offer to bundle. They instead expect the
      newly added streams to already be bundled. This change does such a thing
      if WebRTC support is enabled on an endpoint.
      
      ASTERISK-27566
      
      Change-Id: I7fe9b7ac35a2798627d9c2c8369129f407af6461
      a21841bf
  8. Jan 08, 2018
    • Corey Farrell's avatar
      res_stasis: Reduce RAII_VAR usage. · 55a54027
      Corey Farrell authored
      In addition to being a micro-optimization (RAII_VAR has overhead), this
      change improves output of REF_DEBUG.  Unfortunately when RAII_VAR calls
      ao2_cleanup it does so from a generated _dtor_varname function.  For
      example this caused _dtor_app to release a reference instead of
      __stasis_app_unregister.
      
      Change-Id: I4ce67120583a446babf9adeec678b71d37fcd9e5
      55a54027
    • Sungtae Kim's avatar
      res_pjsip: Add AMI action 'PJSIPShowAuths' · faeb9e1b
      Sungtae Kim authored
      Add an AMI action which provides information on all
      configured Auths.
      
      ASTERISK-27547
      
      Change-Id: I1a88a75b38a2b1dd9d1de6c0307b20a3f584c817
      faeb9e1b
    • Corey Farrell's avatar
      res_stasis: Fix dial bridge unload. · 8b3083ca
      Corey Farrell authored
      If the dial bridge has been created it must be released by calling
      ast_bridge_destroy, simply releasing the ao2 reference is not enough.
      
      Also move stasis_app_control_shutdown earlier in unload to ensure the
      bridge cannot be created or grabbed after the app_bridges container is
      released.
      
      Change-Id: I372302de94ca63876069e2585a049c5060e5e767
      8b3083ca
    • Corey Farrell's avatar
      res_stasis: Fix app_is_subscribed_bridge_id. · 6870ba5f
      Corey Farrell authored
      Instead of searching for bridge_id provided in an argument this function
      always searched for BRIDGE_ALL first.  Rewrite this function to work
      like the similar functions for channel and endpoint functions.
      
      Change-Id: Ib5caca69e11727c5c8a7284a1d00621f40f1e60a
      6870ba5f
  9. Jan 07, 2018
    • Alexander Traud's avatar
      General: Silence modules on (un)load. · 7e9781c2
      Alexander Traud authored
      Some (normally optional) modules created notices, warnings, and even errors
      in normal situations like (un)load. This cluttered the command-line interface
      (CLI) on start and while stopping gracefully. However, when an user went for
      the script './contrib/scripts/install_prereq', those modules get compiled-in
      because their prerequisites were met at compile time. Furthermore, because of
      ASTERISK_27475, the former talkative module 'res_curl' is built as side-effect.
      
      ASTERISK-27553
      
      Change-Id: I9f105f46d72553994e820679bfde3478a551b281
      7e9781c2
  10. Jan 06, 2018
    • Alexander Traud's avatar
      General: Avoid implicit conversion to char when changes value to negative. · f84fcc1f
      Alexander Traud authored
      clang 5.0 warned about this.
      
      ASTERISK-27557
      
      Change-Id: I7cceaa88e147cbdf81a3a7beec5c1c20210fa41e
      f84fcc1f
    • Richard Mudgett's avatar
      res_pjsip_endpoint_identifier_ip.c: Fix apply identify validation. · b20b5758
      Richard Mudgett authored
      The ip_identify_apply() did not validate the configuration for simple
      static configuration errors or deal well with address resolution errors.
      
      * Added missing configuration validation checks.
      * Fixed address resolution error handling.
      * Demoted an error message to a warning since it does not fail applying
      the identify object configuration.
      
      Change-Id: I8b519607263fe88e8ce964f526a45359fd362b6e
      b20b5758
    • Richard Mudgett's avatar
      res_pjsip.c: Fix endpoint identifier registration name search. · 705e6c04
      Richard Mudgett authored
      If an endpoint identifier name in the endpoint_identifier_order list is a
      prefix to the identifier we are registering, we could install it in the
      wrong position of the list.
      
      Assuming
      endpoint_identifier_order=username,ip,anonymous
      
      then registering the "ip_only" identifier would put the identifier in the
      wrong position of the priority list.
      
      * Fix incorrect strncmp() string prefix matching.
      
      Change-Id: Ib8819ec4b811da8a27419fd93528c54d34f01484
      705e6c04
  11. Jan 04, 2018
  12. Jan 03, 2018
    • Corey Farrell's avatar
      loader: Create ast_module_running_ref. · 55f1d69c
      Corey Farrell authored
      This function returns NULL if the module in question is not running.  I
      did not change ast_module_ref as most callers do not check the result
      and they always call ast_module_unref.
      
      Make use of this function when running registered items from:
      * app_stack API's
      * bridge technologies
      * CLI commands
      * File formats
      * Manager Actions
      * RTP engines
      * Sorcery Wizards
      * Timing Interfaces
      * Translators
      * AGI Commands
      * Fax Technologies
      
      ASTERISK-20346 #close
      
      Change-Id: Ia16fd28e188b2fc0b9d18b8a5d9cacc31df73fcc
      55f1d69c
    • Kevin Harwell's avatar
      res_pjsip_session: Check if sequence header is missing · 62f862e2
      Kevin Harwell authored
      The pjsip_msg_find_hdr function can return NULL. This patch adds a check
      when searching for the sequence header to make sure a NULL pointer is never
      de-referenced.
      
      Change-Id: I19af23aeeded65be016be92360e8cb7ffe51fad2
      62f862e2
  13. Jan 02, 2018
  14. Dec 31, 2017
    • Sean Bright's avatar
      ice: Increase foundation buffer size · 15f8b9b8
      Sean Bright authored
      Per RFC 5245, the foundation specified with an ICE candidate can be up
      to 32 characters but we are only allowing for 31.
      
      ASTERISK-27498 #close
      Reported by: Michele Prà
      
      Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf
      15f8b9b8
  15. Dec 22, 2017
    • Kevin Harwell's avatar
      AST-2017-014: res_pjsip - Missing contact header can cause crash · 55330654
      Kevin Harwell authored
      Those SIP messages that create dialogs require a contact header to be present.
      If the contact header was missing from the message it could cause Asterisk to
      crash.
      
      This patch checks to make sure SIP messages that create a dialog contain the
      contact header. If the message does not and it is required Asterisk now returns
      a "400 Missing Contact header" response. Also added NULL checks when retrieving
      the contact header that were missing as a "just in case".
      
      ASTERISK-27480 #close
      
      Change-Id: I1810db87683fc637a9e3e1384a746037fec20afe
      55330654
    • Sean Bright's avatar
      Remove as much trailing whitespace as possible. · fd0ca1c3
      Sean Bright authored
      Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
      fd0ca1c3
  16. Dec 20, 2017
    • Corey Farrell's avatar
      Fix Common Typo's. · 1b80ffa4
      Corey Farrell authored
      Fix instances of:
      * Retreive
      * Recieve
      * other then
      * different then
      * Repeated words ("the the", "an an", "and and", etc).
      * othterwise, teh
      
      ASTERISK-24198 #close
      
      Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
      1b80ffa4
  17. Dec 19, 2017
    • Corey Farrell's avatar
      Remove constant conditionals (dead-code). · b3e839de
      Corey Farrell authored
      Some variables are set and never changed, making them constant.  This
      means that code in the 'false' block of the conditional is unreachable.
      
      In chan_skinny and res_config_ldap I used preprocessor directive `#if 0`
      as I'm unsure if the unreachable code could be enabled in the future.
      
      Change-Id: I62e2aac353d739fb3c983cf768933120f5fba059
      b3e839de
    • Aaron An's avatar
      res_rtp_asterisk: Avoid close the rtp/rtcp fd twice. · 81474dfb
      Aaron An authored
      When RTCP-MUX enabled. rtp->s is the same as rtcp->s, check this before
      close the file descriptor. Close the FD twice will hangs the asterisk
      under heavy load.
      
      ASTERISK-27299 #close
      Reported-by: Aaron An
      Tested-by: AaronAn
      
      Change-Id: I870a072d73fd207463ac116ef97100addbc0820a
      81474dfb
  18. Dec 15, 2017
    • Corey Farrell's avatar
      aco: Minimize use of regex. · bf2d3593
      Corey Farrell authored
      Remove nearly all use of regex from ACO users.  Still remaining:
      * app_confbridge has a legitamate use of option name regex.
      * ast_sorcery_object_fields_register is implemented with regex, all
        callers use simple prefix based regex.  I haven't decided the best
        way to fix this in both 13/15 and master.
      
      Change-Id: Ib5ed478218d8a661ace4d2eaaea98b59a897974b
      bf2d3593
    • Corey Farrell's avatar
      res_smdi: Fix shutdown ref. · 03c25a86
      Corey Farrell authored
      When adding shutdown refs for OPTIONAL_API components I accidentally
      added it to the unload_module function in res_smdi.  Move it to
      load_module.
      
      Change-Id: I2b9da38fbc11ef78ea23dbb2df92b684be7f647c
      03c25a86
    • Sean Bright's avatar
      res_hep: hepv3_is_loaded() should check if we are enabled · 9755eff4
      Sean Bright authored
      res_hep_pjsip.so and res_hep_rtcp.so will still load and do a lot of
      unnecessary work even if 'enabled' is set to 'no' in hep.conf.
      
      Change-Id: I3eddfeea09c6b5bc7c641952ee0ae487fd09b64b
      9755eff4
  19. Dec 14, 2017
    • Corey Farrell's avatar
      res_clialiases: Fix completion pass-through. · a8aa2099
      Corey Farrell authored
      Never ignore contents of line when generating completion options.
      
      Change-Id: I74389efdfea154019d3b56a9f381610614c044c8
      a8aa2099
    • Richard Mudgett's avatar
      res_rtp_asterisk.c: Disable packet flood detection for video streams. · 98f7e925
      Richard Mudgett authored
      We should not do flood detection on video RTP streams.  Video RTP streams
      are very bursty by nature.  They send out a burst of packets to update the
      video frame then wait for the next video frame update.  Really only audio
      streams can be checked for flooding.  The others are either bursty or
      don't have a set rate.
      
      * Added code to selectively disable packet flood detection for video RTP
      streams.
      
      ASTERISK-27440
      
      Change-Id: I78031491a6e75c2d4b1e9c2462dc498fe9880a70
      98f7e925
    • George Joseph's avatar
      res_pjsip_sdp_rtp: Add NULL check in add_crypto_to_stream · 283d2df6
      George Joseph authored
      add_crypto_to_stream wasn't checking for a NULL
      session->inv_session->neg before calling pjmedia_sdp_neg_get_state.
      This was causing a crash if the negotiation hadn't already been
      completed and asterisk was compiled with --enable-dev-mode.
      
      Change-Id: I57c6229954a38145da9810fc18657bfcc4d9d0c9
      283d2df6
    • Sean Bright's avatar
      res_musiconhold: Start playlist after initial announcement · c387beb4
      Sean Bright authored
      Reset the samples counter to zero when we are done playing an
      announcement so that we don't skip into the middle of the first file in
      the playlist.
      
      Also add the selected annoucement to the output of 'moh show classes.'
      
      ASTERISK-24329 #close
      Reported by: Thomas Frederiksen
      
      Change-Id: I2a5f986a31279c981592f49391409ebf38d6f6d0
      c387beb4
    • Sean Bright's avatar
      coverity: Fix warnings in res_smdi · 7a8a187a
      Sean Bright authored
      ASTERISK-19657 #close
      Reported by: Matt Jordan III, Esq.
      
      Change-Id: I59a5e6ef3e7d9e848bec1f4b40cb73321bc7956a
      7a8a187a
  20. Dec 13, 2017
    • Joshua Colp's avatar
      AST-2017-012: Place single RTCP report block at beginning of report. · 62f2860c
      Joshua Colp authored
      When the RTCP code was transitioned over to Stasis a code change
      was made to keep track of how many reports are present. This count
      controlled where report blocks were placed in the RTCP report.
      
      If a compound RTCP packet was received this logic would incorrectly
      place a report block in the wrong location resulting in a write
      to an invalid location.
      
      This change removes this counting logic and always places the report
      block at the first position. If in the future multiple reports are
      supported the logic can be extended but for now keeping a count
      serves no purpose.
      
      ASTERISK-27382
      ASTERISK-27429
      
      Change-Id: Iad6c8a9985c4b608ef493e19c421211615485116
      62f2860c
    • Joshua Colp's avatar
      res_pjsip_session: Reinvite using active stream topology if none requested. · 3370cd21
      Joshua Colp authored
      When a connected line update is sent to an endpoint we do not request
      a specific stream topology to be used. Previously this resulted in the
      configured stream topology being used which may actually differ from the
      currently negotiated topology. PJSIP is helpful in this regard in that
      it will fill in any missing streams with removed ones. This results in
      our own state not matching the SDP, though, and we do not apply the
      negotiated SDP.
      
      This change tweaks the code to use the actively negotiated stream
      topology if it is present with a fallback to the configured one. This
      results in the SDP and the state having matching information and the
      world is happy.
      
      ASTERISK*27397
      
      Change-Id: I7a57117f0183479e6884b7bf3a53bb8c7464f604
      3370cd21
Loading