Skip to content
Snippets Groups Projects
  1. Dec 18, 2017
    • Corey Farrell's avatar
      netsock: Remove from Asterisk core. · 064c74e4
      Corey Farrell authored
      This moves netsock.c / netsock.h to the chan_iax2 module.  netsock.h has
      been marked deprecated since 13.0.0, chan_iax2 is the only remaining
      user.
      
      Change-Id: I28c6578043bac18de5ea608e136acec4f83d5dd3
      064c74e4
  2. Nov 02, 2017
  3. Sep 21, 2017
    • Joshua Colp's avatar
      bridge: Change participant SFU streams when source streams change. · f2985e31
      Joshua Colp authored
      Some endpoints do not like a stream being reused for a new
      media stream. The frame/jitterbuffer can rely on underlying
      attributes of the media stream in order to order the packets.
      When a new stream takes its place without any notice the
      buffer can get confused and the media ends up getting dropped.
      
      This change uses the SSRC change to determine that a new source
      is reusing an existing stream and then bridge_softmix renegotiates
      each participant such that they see a new media stream. This
      causes the frame/jitterbuffer to start fresh and work as expected.
      
      ASTERISK-27277
      
      Change-Id: I30ccbdba16ca073d7f31e0e59ab778c153afae07
      f2985e31
  4. Aug 01, 2017
    • Corey Farrell's avatar
      Fix compiler warnings on Fedora 26 / GCC 7. · 58d03211
      Corey Farrell authored
      GCC 7 has added capability to produce warnings, this fixes most of those
      warnings.  The specific warnings are disabled in a few places:
      
      * app_voicemail.c: truncation of paths more than 4096 chars in many places.
      * chan_mgcp.c: callid truncated to 80 chars.
      * cdr.c: two userfields are combined to cdr copy, fix would break ABI.
      * tcptls.c: ignore use of deprecated method SSLv3_client_method().
      
      ASTERISK-27156 #close
      
      Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
      58d03211
  5. Jul 14, 2017
    • Sergej Kasumovic's avatar
      chan_iax2: On reload make sure to check for existing MWI subscription · d3f5b265
      Sergej Kasumovic authored
      On every reload of chan_iax2 module, MWI subscription was added, which
      results in additional taskprocessors being accumulated over time.
      
      This commit fixes it by making sure we check for existing subscription
      first.
      
      This was verified with 'core show taskprocessors' CLI command.
      
      ASTERISK-27122 #close
      
      Change-Id: Ie2ef528fd5ca01b933eeb88188cc10967899cfb9
      d3f5b265
  6. Jul 05, 2017
    • Sean Bright's avatar
      core: Remove 'Data Retrieval API' · 325eeced
      Sean Bright authored
      This API was not actively maintained, was not added to new modules
      (such as res_pjsip), and there exist better alternatives to acquire the
      same information, such as the ARI.
      
      Change-Id: I4b2185a83aeb74798b4ad43ff8f89f971096aa83
      325eeced
  7. Apr 12, 2017
    • George Joseph's avatar
      modules: change module LOAD_FAILUREs to LOAD_DECLINES · 747beb1e
      George Joseph authored
      In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed
      to AST_MODULE_LOAD_DECLINE.  This prevents asterisk from exiting
      if a module can't be loaded.  If the user wishes to retain the
      FAILURE behavior for a specific module, they can use the "require"
      or "preload-require" keyword in modules.conf.
      
      A new API was added to logger: ast_is_logger_initialized().  This
      allows asterisk.c/check_init() to print to the error log once the
      logger subsystem is ready instead of just to stdout.  If something
      does fail before the logger is initialized, we now print to stderr
      instead of stdout.
      
      Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
      747beb1e
  8. Mar 14, 2017
    • Richard Begg's avatar
      chan_iax2: Reload of iax peer results in loss of host address/port · 0dc007e9
      Richard Begg authored
      When using a non-dynamic peer address, build_peer() invalidates the
      peer address structure by setting the address family to unspecified.
      However, if dnsmgr is enabled, the subsequent call to ast_dnsmgr_lookup()
      will not amend the peer address if the cache is still valid, resulting
      in peer connectivity failures.
      To fix this, we call ast_dnsmgr_refresh() instead.
      
      ASTERISK-26865
      
      Change-Id: Id8a89a2f771ebbaf32255a35fe596a6dcb97a082
      0dc007e9
  9. Mar 07, 2017
    • Joshua Colp's avatar
      core: Add stream topology changing primitives with tests. · 3ed05bad
      Joshua Colp authored
      This change adds a few things to facilitate stream topology changing:
      
      1. Control frame types have been added for use by the channel driver
      to notify the application that the channel wants to change the stream
      topology or that a stream topology change has been accepted. They are
      also used by the indicate interface to the channel that the application
      uses to indicate it wants to do the same.
      
      2. Legacy behavior has been adopted in ast_read() such that if a
      channel requests a stream topology change it is denied automatically
      and the current stream topology is preserved if the application is
      not capable of handling streams.
      
      Tests have also been written which confirm the multistream and
      non-multistream behavior.
      
      ASTERISK-26839
      
      Change-Id: Ia68ef22bca8e8457265ca4f0f9de600cbcc10bc9
      3ed05bad
  10. Oct 27, 2016
    • Corey Farrell's avatar
      Remove ASTERISK_REGISTER_FILE. · a6e5bae3
      Corey Farrell authored
      ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
      all traces of it.
      
      Previously exported symbols removed:
      * __ast_register_file
      * __ast_unregister_file
      * ast_complete_source_filename
      
      This also removes the mtx_prof static variable that was declared when
      MTX_PROFILE was enabled.  This variable was only used in lock.c so it
      is now initialized in that file only.
      
      ASTERISK-26480 #close
      
      Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
      a6e5bae3
  11. Aug 25, 2016
    • varnav's avatar
      chan_iax2: Set plaintext auth to deprecated as per ASTERISK-22820 · d2e03c25
      varnav authored
      Starting from draft 2 of RFC 5456 (October 23, 2006) plaintext auth
      is not supported in IAX2 protocol. Please refer to section 8.6.13 of
      RFC 5456.
      
      But plaintext auth is still supported by Asterisk implementation of IAX2.
      This support should be dropped.
      
      Patch, based on asterisk-dev discussion, adds deprecation warning on
      startup if 'auth' is set to 'plaintext', changes default values of
      'auth' from 'md5, plaintext' to 'md5'.
      
      Patch is safe in terms of backwards compatibility, will work even if
      remote peers have auth=plaintext and we have defaults.
      
      auth=plaintext setting will remain deprecated in Asterisk 14 and 15,
      and IAX2 plaintext support will be removed in Asterisk 16.
      
      ASTERISK-22820 #close
      
      Change-Id: I5d2f3830cb57645604818f87518916e8a5c317bf
      d2e03c25
  12. Aug 16, 2016
    • Corey Farrell's avatar
      Refactor usage pattern of xmldoc info tag. · 824a4e84
      Corey Farrell authored
      This updates func_channel.c and main/message.c to use a generic xpointer
      include instead of including info from each channel driver.  Now the
      name attribute of info is CHANNEL or CHANNEL_EXAMPLES to be included in
      documentation for func_channel.  Setting the name attribute of info to
      MessageToInfo or MessageFromInfo causes it to be included in the
      MessageSend application and AMI action.
      
      Change-Id: I89fd8276a3250824241a618009714267d3a8d1ea
      824a4e84
  13. Aug 15, 2016
    • Matt Jordan's avatar
      func_channel: Reorganize documentation · ddab42e2
      Matt Jordan authored
      * Following the example of the PJSIP channel driver, the channel
        technology specific documentation has been moved to the respective
        channel drivers that provide that functionality. This has the benefit
        of locating the documentation of items with those modules that provide
        it.
      
      * Examples of using the CHANNEL function for both standard items as well
        as for PJSIP have been added.
      
      * The 'max_forwards' standard item has been documented.
      
      Change-Id: Ifaa79a232c8ac99cf8da6ef6cc7815d398b1b79b
      ddab42e2
  14. Jun 08, 2016
    • Timo Teräs's avatar
      Fixes to include signal.h · 39b69ab5
      Timo Teräs authored
      POSIX defines signal.h. sys/signal.h should not be used as it is
      c-library internal header which may or may not exist. Notably with
      musl it generates warning of being incorrect.
      
      Change-Id: Ia56b0aa1d84b5c590114867b1b384a624f39a6fc
      39b69ab5
  15. Dec 01, 2015
    • Richard Mudgett's avatar
      Audit improper usage of scheduler exposed by 5c713fdf. · fa207290
      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
      fa207290
  16. Nov 12, 2015
    • Steve Davies's avatar
      Further fixes to improper usage of scheduler · d982b99e
      Steve Davies authored
      When ASTERISK-25449 was closed, a number of scheduler issues mentioned in
      the comments were missed. These have since beed raised in ASTERISK-25476
      and elsewhere.
      
      This patch attempts to collect all of the scheduler issues discovered so
      far and address them sensibly.
      
      ASTERISK-25476 #close
      
      Change-Id: I87a77d581e2e0d91d33b4b2fbff80f64a566d05b
      d982b99e
  17. Nov 09, 2015
  18. Jun 08, 2015
    • Corey Farrell's avatar
      Fix unsafe uses of ast_context pointers. · 80621ce3
      Corey Farrell authored
      Although ast_context_find, ast_context_find_or_create and
      ast_context_destroy perform locking of the contexts table,
      any context pointer can become invalid at any time that the
      contexts table is unlocked. This change adds locking around
      all complete operations involving these functions.
      
      Places where ast_context_find was followed by ast_context_destroy
      have been replaced with calls ast_context_destroy_by_name.
      
      ASTERISK-25094 #close
      Reported by: Corey Farrell
      
      Change-Id: I1866b6787730c9c4f3f836b6133ffe9c820734fa
      80621ce3
  19. May 23, 2015
    • Corey Farrell's avatar
      Stasis: Fix unsafe use of stasis_unsubscribe in modules. · 50044fdc
      Corey Farrell authored
      Many uses of stasis_unsubscribe in modules can be reached through unload.
      These have been switched to stasis_unsubscribe_and_join.
      
      Some subscription callbacks do nothing, for these I've created a noop
      callback function in stasis.c.  This is used by some modules that monitor
      MWI topics in order to enable cache, since the callback does not become
      invalid after dlclose it is safe to use stasis_unsubscribe on these, even
      during module unload.
      
      ASTERISK-25121 #close
      
      Change-Id: Ifc2549fbd8eef7d703c222978e8f452e2972189c
      50044fdc
  20. May 20, 2015
    • Yousf Ateya's avatar
      chan_iax2: Prevent deadlock between hangup and sending lagrq/ping · 83ff268b
      Yousf Ateya authored
      channels/chan_iax.c: Prevent the deadlock between iax2_hangup and send_lagrq/
      send_ping. This deadlock happens because the scheduled task send_lagrq(or
      send_ping) starts execution after the call hangup procedure starts but before
      it deletes the tasks in the scheduler.
      
      The solution is to delete scheduled lagrq (and ping) task asynchronously
      (i.e. schedule AST_SCHED_DEL for these tasks); By this, AST_SCHED_DEL will
      be called in a new context (doesn't have callno locked).
      
      This commit also cleans up the procedure of sending LAGRQ and PING.
      
      main/sched.c: Do not assert when deleting non existant entry from scheduler.
      This assert seems to be the reason for a lot of awkward code to avoid it.
      
      ASTERISK-24983 #close
      Reported by: Y Ateya
      
      Change-Id: I03bec1fc8faacb89630269e935fa667c6d6c080c
      83ff268b
  21. May 13, 2015
  22. Apr 30, 2015
    • Mark Michelson's avatar
      Restrict functionality when ACLs are misconfigured. · 11ffcf66
      Mark Michelson authored
      This patch has two main purposes:
      
      1) Improve warning messages when ACLs are configured improperly.
      2) Prevent misconfigured ACLs from allowing potentially unwanted
      traffic.
      
      To acomplish point (2) in most cases, whatever configuration object that
      the ACL belonged to was not allowed to load.
      
      The one exception is res_pjsip_acl. In that case, ACLs are their own
      configuration object. Furthermore, the module loading code has no
      indication that a ACL configuration had a failure. So the tactic taken
      here is to create an ACL that just blocks everything.
      
      ASTERISK-24969
      Reported by Corey Farrell
      
      Change-Id: I2ebcb6959cefad03cea4d81401be946203fcacae
      11ffcf66
  23. Apr 28, 2015
    • Yousf Ateya's avatar
      chan_iax2: Ensure that IAX flags are 64 bits. · 5ebfed8e
      Yousf Ateya authored
      Flags are 64 bits.  Without LLU suffix the value of 1<<31 is negative.
      Although it doesn't have an effect on the current implementation, it will
      be problem if more flags are added.
      
      Change-Id: Ic290c81cfbbbf062872392d99d3322932cc49487
      5ebfed8e
  24. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      Git does not support the ability to replace a token with a version
      string during check-in. While it does have support for replacing a
      token on clone, this is somewhat sub-optimal: the token is replaced
      with the object hash, which is not particularly easy for human
      consumption. What's more, in practice, the source file version was often
      not terribly useful. Generally, when triaging bugs, the overall version
      of Asterisk is far more useful than an individual SVN version of a file. As a
      result, this patch removes Asterisk's support for showing source file
      versions.
      
      Specifically, it does the following:
      
      * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
        remove passing the version in with the macro. Other facilities
        than 'core show file version' make use of the file names, such as
        setting a debug level only on a specific file. As such, the act of
        registering source files with the Asterisk core still has use. The
        macro rename now reflects the new macro purpose.
      
      * main/asterisk:
        - Refactor the file_version structure to reflect that it no longer
          tracks a version field.
        - Remove the "core show file version" CLI command. Without the file
          version, it is no longer useful.
        - Remove the ast_file_version_find function. The file version is no
          longer tracked.
        - Rename ast_register_file_version/ast_unregister_file_version to
          ast_register_file/ast_unregister_file, respectively.
      
      * main/manager: Remove value from the Version key of the ModuleCheck
        Action. The actual key itself has not been removed, as doing so would
        absolutely constitute a backwards incompatible change. However, since
        the file version is no longer tracked, there is no need to attempt to
        include it in the Version key.
      
      * UPGRADE: Add notes for:
        - Modification to the ModuleCheck AMI Action
        - Removal of the "core show file version" CLI command
      
      Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
      4a582616
  25. Apr 10, 2015
  26. Apr 09, 2015
  27. Apr 08, 2015
  28. Mar 30, 2015
  29. Mar 28, 2015
  30. Mar 13, 2015
  31. Feb 19, 2015
  32. Jan 23, 2015
  33. Jan 20, 2015
  34. Jan 12, 2015
  35. Jan 09, 2015
    • Richard Mudgett's avatar
      AMI: Remove no longer used parameter from astman_send_listack(). · ef34a05f
      Richard Mudgett authored
      Follow-up issue to -r430435 from reviewboard review.
      
      ASTERISK-24049
      Review: https://reviewboard.asterisk.org/r/4315/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ef34a05f
    • Richard Mudgett's avatar
      AMI: Make AMI actions that generate event lists consistent. · 52a7cdb1
      Richard Mudgett authored
      * Made the following AMI actions use list API calls for consistency:
      Agents
      BridgeInfo
      BridgeList
      BridgeTechnologyList
      ConfbridgeLIst
      ConfbridgeLIstRooms
      CoreShowChannels
      DAHDIShowChannels
      DBGet
      DeviceStateList
      ExtensionStateList
      FAXSessions
      Hangup
      IAXpeerlist
      IAXpeers
      IAXregistry
      MeetmeList
      MeetmeListRooms
      MWIGet
      ParkedCalls
      Parkinglots
      PJSIPShowEndpoint
      PJSIPShowEndpoints
      PJSIPShowRegistrationsInbound
      PJSIPShowRegistrationsOutbound
      PJSIPShowResourceLists
      PJSIPShowSubscriptionsInbound
      PJSIPShowSubscriptionsOutbound
      PresenceStateList
      PRIShowSpans
      QueueStatus
      QueueSummary
      ShowDialPlan
      SIPpeers
      SIPpeerstatus
      SIPshowregistry
      SKINNYdevices
      SKINNYlines
      Status
      VoicemailUsersList
      
      * Incremented the AMI version to 2.7.0.
      
      * Changed astman_send_listack() to not use the listflag parameter and
      always set the value to "Start" so the start capitalization is consistent.
      i.e., The FAXSessions used "Start" while the rest of the system used
      "start".  The corresponding complete event always used "Complete".
      
      * Fixed ami_show_resource_lists() "PJSIPShowResourceLists" to output the
      AMI ActionID for all of its list events.
      
      * Fixed off-nominal AMI protocol error in manager_bridge_info(),
      manager_parking_status_single_lot(), and
      manager_parking_status_all_lots().  Use of astman_send_error() after
      responding to the original AMI action request violates the action response
      pattern by sending two responses.
      
      * Fixed minor protocol error in action_getconfig() when no requested
      categories are found.  Each line needs to be formatted as "Header: text".
      
      * Fixed off-nominal memory leak in manager_build_parked_call_string().
      
      * Eliminated unnecessary use of RAII_VAR() in ami_subscription_detail().
      
      ASTERISK-24049 #close
      Reported by: Jonathan Rose
      
      Review: https://reviewboard.asterisk.org/r/4315/
      ........
      
      Merged revisions 430434 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      52a7cdb1
  36. Dec 17, 2014
Loading