pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/comms/asterisk18/patches Import Asterisk 18.x as comms...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5f2b685cf94e
branches:  trunk
changeset: 454537:5f2b685cf94e
user:      jnemeth <jnemeth%pkgsrc.org@localhost>
date:      Sun Jun 13 07:47:18 2021 +0000

description:
Import Asterisk 18.x as comms/asterisk18.

This is a long term support version.  It is scheduled to go to
security fixes only on October 20th, 2024, and EOL on October 20th,
2025.

------------------------------------------------------------------------------
--- Functionality changes from Asterisk 18.3.0 to Asterisk 18.4.0 ------------
------------------------------------------------------------------------------

logger
------------------
 * The dateformat option in logger.conf will now control the remote
   console (asterisk -r -T) timestamp format.  Previously, dateformat
   only controlled the formatting of the timestamp going to log
   files and the main console (asterisk -c) but only for non-verbose
   messages.

   Internally, Asterisk does not send the logging timestamp with
   verbose messages to console clients. It's up to the Asterisk
   remote consoles to format verbose messages.  Asterisk remote
   consoles previously did not load dateformat from logger.conf.

   Previously there was a non-configurable and hard-coded "%b %e
   %T" dateformat that would be used no matter what on all verbose
   console messages printed on remote consoles.

   Example:
   logger.conf
    dateformat=%F %T.%3q

   # asterisk -rvvv -T
   [2021-03-19 09:54:19.760-0400]  Loading res_stasis_answer.so.
   [Mar 19 09:55:43]     -- Goto (dialExten,s,1)

   Given the following example configuration in logger.conf, Asterisk
   log files and the console, will log verbose messages using the
   given timestamp.  Now ensuring that all remote console messages
   are logged with the same dateformat as other log streams.

   ---
   [general]
   dateformat=%F %T.%3q

   [logfiles]
   console  => notice,warning,error,verbose
   full     => notice,warning,error,debug,verbose
   ---

   Now we have a globally-defined dateformat that will be used
   consistently across the Asterisk main console, remote consoles,
   and log files.

   Now we have consistent logging:

   # asterisk -rvvv -T
   [2021-03-19 09:54:19.760-0400]  Loading res_stasis_answer.so.
   [2021-03-19 09:55:43.920-0400]     -- Goto (dialExten,s,1)

res_pjsip
------------------
 * PJSIP transports can now be partially reloaded safely. This
   allows the local_net and external_* options to be updated without
   restarting Asterisk.

 * PJSIP endpoints can now be configured to skip authentication
   when handling OPTIONS requests by setting the
   allow_unauthenticated_options configuration property to 'yes.'

------------------------------------------------------------------------------
--- Functionality changes from Asterisk 18.2.2 to Asterisk 18.3.0 ------------
------------------------------------------------------------------------------

app_mixmonitor
------------------
 * app_mixmonitor now sends manager events MixMonitorStart,
   MixMonitorStop and MixMonitorMute when the channel monitoring
   is started, stopped and muted (or unmuted) respectively.

chan_iax2
------------------
 * You can now specify a default "auth" method in the [general]
   section of iax.conf

chan_pjsip, app_transfer
------------------
 * Added TRANSFERSTATUSPROTOCOL variable.  When transfer is performed,
   transfers can pass a protocol specific error code.  Example, in
   SIP 3xx-6xx represent any SIP specific error received when
   performing a REFER.

func_odbc
------------------
 * Introduce an ARGC variable for func_odbc functions, along with
   a minargs per-function configuration option.

   minargs enables enforcing of minimum count of arguments to pass
   to func_odbc, so if you're unconditionally using ARG1 through
   ARG4 then this should be set to 4.  func_odbc will generate an
   error in this case, so for example

   [FOO]
   minargs = 4

   and ODBC_FOO(a,b,c) in dialplan will now error out instead of
   using a potentially leaked ARG4 from Gosub().

   ARGC is needed if you're using optional argument, to verify
   whether or not an argument has been passed, else it's possible
   to use a leaked ARGn from Gosub (app_stack).  So now you can
   safely do ${IF($[${ARGC}>3]?${ARGV}:default value)} kind of
   thing.

res_srtp
------------------
 * SRTP replay protection has been added to res_srtp and
   a new configuration option "srtpreplayprotection" has been added
   to the rtp.conf config file.  For security reasons, the default
   setting is "yes".  Buggy clients may not handle this correctly
   which could result in no, or one way, audio and Asterisk error
   messages like "replay check failed".

------------------------------------------------------------------------------
--- Functionality changes from Asterisk 18.1.0 to Asterisk 18.2.0 ------------
------------------------------------------------------------------------------

Core
------------------
 * The location where the media cache stores its temporary files
   is no longer hardcoded to /tmp but can now be configured separately
   via the astcachedir config variable in asterisk.conf. To retain
   backwards compatibility, the default location remains /tmp.

app_voicemail
------------------
 * The VoiceMail application can now be configured to send greetings
   and instructions via early media and only answering the channel
   when it is time for the caller to record their message. This
   behavior can be activated by passing the new 'e' option to
   VoiceMail.

------------------------------------------------------------------------------
--- Functionality changes from Asterisk 18.0.0 to Asterisk 18.1.0 ------------
------------------------------------------------------------------------------

Core
------------------
 * Added debug logging categories that allow a user to output debug
   information based on a specified category. This lets the user
   limit, and filter debug output to data relevant to a particular
   context, or topic. For instance the following categories are
   now available for debug logging purposes:

   dtls, dtls_packet, ice, rtcp, rtcp_packet, rtp, rtp_packet, stun, stun_packet

   These debug categories can be enable/disable via an Asterisk
   CLI command:

     core set debug category <category>[:<sublevel>] [category[:<sublevel] ...]
     core set debug category off [<category> [<category>] ...]

   If no sub-level is associated all debug statements for a given
   category are output. If a sub-level is given then only those
   statements assigned a value at or below the associated sub-level
   are output.

app_confbridge
------------------
 * app_confbridge now has the ability to force the estimated bitrate
   on an SFU bridge.  To use it, set a bridge profile's remb_behavior
   to "force" and set remb_estimated_bitrate to a rate in bits per
   second.  The remb_estimated_bitrate parameter is ignored if
   remb_behavior is something other than "force".

------------------------------------------------------------------------------
--- Functionality changes from Asterisk 17.0.0 to Asterisk 18.0.0 ------------
------------------------------------------------------------------------------

chan_pjsip
------------------
 * The PJSIP_SEND_SESSION_REFRESH dialplan function now issues a
   warning, and returns unsuccessful if it's used on a channel
   prior to answering.

logger
------------------
 * Added a new log formatter called "plain" that always prints
   file, function and line number if available (even for verbose
   messages) and never prints color control characters.  Most
   suitable for file output but can be used for other channels as
   well.

   You use it in logger.conf like so:
   debug => [plain]debug
   console => [plain]error,warning,debug,notice,pjsip_history
   messages => [plain]warning,error,verbose

------------------------------------------------------------------------------
--- New functionality introduced in Asterisk 18.0.0 --------------------------
------------------------------------------------------------------------------

Core
------------------
 * The Streams API becomes the home for the core ACN capabilities.
   These include...

    * Parsing and formatting of codec negotation preferences.
    * Resolving pending streams and topologies with those configured
      using configured preferences.
    * Utility functions for creating string representations of
      streams, topologies, and negotiation preferences.

   For codec negotiation preferences:
    * Added ast_stream_codec_prefs_parse() which takes a string
      representation of codec negotiation preferences, which may
      come from a pjsip endpoint for example, and populates a
      ast_stream_codec_negotiation_prefs structure.
    * Added ast_stream_codec_prefs_to_str() which does the reverse.
    * Added many functions to parse individual parameter name
      and value strings to their respectrive enum values, and the
      reverse.

   For streams:
    * Added ast_stream_create_resolved() which takes a "live" stream
      and resolves it with a configured stream and the negotiation
      preferences to create a new stream.
    * Added ast_stream_to_str() which create a string representation
      of a stream suitable for debug or display purposes.

   For topology:
    * Added ast_stream_topology_create_resolved() which takes a
      "live" topology and resolves it, stream by stream, with a
      configured topology stream and the negotiation preferences
      to create a new topology.
    * Added ast_stream_topology_to_str() which create a string
      representation of a topology suitable for debug or display
      purposes.
    * Renamed ast_format_caps_from_topology() to
      ast_stream_topology_get_formats() to be more consistent with
      the existing ast_stream_get_formats().

   Additional changes:
    * A new function ast_format_cap_append_names() appends the
      results to the ast_str buffer instead of replacing buffer
      contents.

app_bridgeaddchan
------------------
 * The BridgeAdd application now behaves more like the Bridge
   application.  The application now sets the BRIDGERESULT channel
   variable to indicate what happened when the channel resumes in
   dialplan.  This is instead of hanging up the channel on failure
   conditions.

res_pjsip
------------------
 * Two new options, incoming_call_offer_pref and outgoing_call_offer_pref
   have been added to res_pjsip endpoints that specify the preferred
   order of codecs to use between those received/sent in an SDP
   offer and those set in the endpoint configuration.

------------------------------------------------------------------------------
--- Functionality changes from Asterisk 17.0.0 to Asterisk 18.0.0 ------------
------------------------------------------------------------------------------

AMI
------------------
 * You can now specify an optional 'Content-Type' as an argument
   for the Asterisk SendText manager action.

ARI
------------------
 * A new parameter 'inhibitConnectedLineUpdates' is now available
   in the 'bridges.addChannel' call. This prevents the identity of
   the newly connected channel from being presented to other bridge
   members.

ARI Channels
------------------
 * The Channel resource has a new sub-resource "externalMedia".
   This allows an application to create a channel for the sole
   purpose of exchanging media with an external server.  Once
   created, this channel could be placed into a bridge with existing
   channels to allow the external server to inject audio into the
   bridge or receive audio from the bridge.  See
   https://wiki.asterisk.org/wiki/display/AST/External+Media+and+ARI
   for more information.

Core
------------------
 * H.265/HEVC is now a supported video codec and it can be used by
   specifying "h265" in the allow line.  Please note however, that
   handling of the additional SDP parameters described in RFC 7798
   section 7.2 is not yet supported.

Features
------------------
 * Adds support for AudioSocket, a very simple bidirectional audio
   streaming protocol. There are both channel and application
   interfaces.

   A description of the protocol can be found on the referenced
   wiki page. A short talk about the reasons and implementation
   can be found on YouTube at the link provided.

   ARI support has also been added via the existing "externalMedia"
   ARI functionality. The UUID is specified using the arbitrary
   "data" field.

   Wiki: https://wiki.asterisk.org/wiki/display/AST/AudioSocket
   YouTube: https://www.youtube.com/watch?v=tjduXbZZEgI

Messaging
------------------
 * In order to reduce the amount of AMI and ARI events generated,
   the global "Message/ast_msg_queue" channel can be set to suppress
   it's normal channel housekeeping events such as "Newexten",
   "VarSet", etc. This can greatly reduce load on the manager and
   ARI applications when the Digium Phone Module for Asterisk is
   in use.  To enable, set "hide_messaging_ami_events" in asterisk.conf
   to "yes"  In Asterisk versions <18, the default is "no" preserving
   existing behavior.  Beginning with Asterisk 18, the option will
   default to "yes".

STIR/SHAKEN
------------------
 * STIR/SHAKEN support has been added to Asterisk. Configuration
   is done in stir_shaken.conf. There is a sample configuration
   file to help you get started
   (asterisk/configs/samples/stir_shaken.conf.sample).  Once that's
   set up, you can enable STIR/SHAKEN on any endpoint by setting
   stir_shaken to yes on the endpoint configuration object. This
   will add an Identity header on outgoing INVITEs, and check for
   an Identity header on incoming INVITEs. This option has been
   added to Alembic as well.

   The information received on an incoming INVITE can be checked
   using the STIR_SHAKEN dialplan function. There are two variations:

   STIR_SHAKEN(count)
   STIR_SHAKEN(0, verify_result)

   The first variation will tell you how many STIR/SHAKEN results
   are on the channel. The second fetches information for a specific
   result. The first parameter is the index, followed by what
   information you want to retrieve.  The available options are
   'verify_result', 'identity', and 'attestation'.

app_chanisavail
------------------
 * The ChanIsAvail application now tolerates empty positions in
   the supplied device list.  Dialplan can now be simplified by
   not having to check for empty positions in the device list.

app_confbridge
------------------
 * A new bridge profile option, maximum_sample_rate, has been added
   which sets a maximum sample rate that the bridge will be mixed
   at. This allows the bridge to move below the maximum sample rate
   as needed but caps it at the maximum.

 * A new option, "text_messaging", has been added to the user
   profile which allows control over whether text messaging is
   enabled or disabled for a user. If enabled (the default) text
   messages will be sent to the user. If disabled no text messages
   will be sent to the user.

app_dial
------------------
 * The Dial application now tolerates empty positions in the supplied
   destination list.  Dialplan can now be simplified by not having
   to check for empty positions in the destination list.  If there
   are no endpoints to dial then DIALSTATUS is set to CHANUNAVAIL.

app_mixmonitor
------------------
 * An option 'S' has been added to MixMonitor. If used in combination
   with the r() and/or t() options, if a frame is available to
   write to one of those files but not the other, a frame of silence
   if written to the file that does not have an audio frame. This
   should prevent the two files from "drifting" when mixed after
   the fact.

 * If the 'filename' argument to MixMonitor() ended with '.wav49,'
   Asterisk would silently convert the extension to '.WAV' when
   opening the file for writing. This caused the MIXMONITOR_FILENAME
   variable to reference the wrong file. The MIXMONITOR_FILENAME
   variable will now reflect the name of the file that Asterisk
   actually used instead of the filename that was passed to the
   application.

app_page
------------------
 * The Page application now tolerates empty positions in the supplied
   destination list.  Dialplan can now be simplified by not having
   to check for empty positions in the destination list.

app_voicemail
------------------
 * A feature was added in Asterisk 13.27.0 and 16.4.0 that removed
   lock files from the Asterisk voicemail directory on startup.
   Some users that store their voicemails on network storage devices
   experienced slow startup times due to the relative expense of
   traversing the voicemail directory structure looking for orphaned
   lock files. This feature has now been removed.

   Users who require the lock files to be removed at startup should
   modify their startup scripts to do so before starting the asterisk
   process.

chan_pjsip
------------------
 * A new dialplan function, PJSIP_MOH_PASSTRHOUGH, has been added
   to chan_pjsip. This allows the behaviour of the moh_passthrough
   endpoint option to be read or changed in the dialplan. This
   allows control on a per-call basis.

chan_rtp
------------------
 * The UnicastRTP channel driver provided by chan_rtp now accepts
   "<hostname>:<port>" as an alternative to "<ip_address>:<port>"
   in the destination.  The first AAAA (preferred) or A record
   resolved will be used as the destination.  The lookup is
   synchronous so beware of possible dialplan delays if you specify
   a hostname.

func_curl
------------------
 * A new parameter, httpheader, has been added to CURLOPT function.
   This parameter allows to set custom http headers for subsequent
   calls of CURL function.  Any setting of headers will replace
   the default curl headers (e.g. "Content-type:
   application/x-www-form-urlencoded")

 * A new option, followlocation, can now be enabled with the
   CURLOPT() dialplan function. Setting this will instruct cURL to
   follow 3xx redirects, which it does not by default.

func_jitterbuffer
------------------
 * The JITTERBUFFER dialplan function now has an option to enable
   video synchronization support. When enabled and used with a
   compatible channel driver (chan_sip, chan_pjsip) the video is
   buffered according to the size of the audio jitterbuffer and is
   synchronized to the audio.

func_volume
------------------
 * Accept decimal number as argument.

http
------------------
 * You can now disable the /httpstatus page served by Asterisk's
   built-in HTTP server by setting 'enable_status' to 'no' in
   http.conf.

minmemfree
------------------
 * The 'minmemfree' configuration option now counts memory allocated
   to the filesystem cache as "free" because it is memory that is
   available to the process.

res_ari_channels
------------------
 * When creating a channel in ARI using the create call
   you can now specify dialplan variables to be set as part of the
   same operation.

res_musiconhold
------------------
 * This fix allows a realtime moh class to be unregistered from
   the command line. This is useful when the contents of a directory
   referenced by a realtime moh class have changed.  The realtime
   moh class is then reloaded on the next request and uses the new
   directory contents.

 * A new mode - playlist - has been added to res_musiconhold. This
   mode allows the user to specify the files (or URLs) to play
   explicitly by putting them directly in musiconhold.conf.

res_pjsip
------------------
 * Added a new PJSIP system setting called disable_rport.
   Default is no to keep support working as before.

   If it is false (default) it adds the 'rport' parameter in the
   outgoing request message.  If it is true it does not add the
   'rport' parameter in the outgoing request message.

   This is a system option, but working as a global option.

res_pjsip_endpoint_identifier_ip
------------------
 * In 'type = identify' sections, the addresses specified for the
   'match' clause can now include a port number. For IP addresses,
   the port is provided by including a colon after the address,
   followed by the desired port number. If supplied, the netmask
   should follow the port number. To specify a port for IPv6
   addresses, the address itself must be enclosed in brackets to
   be parsed correctly.

res_pjsip_logger
------------------
 * The PJSIP packet logger now has the following CLI commands:

   pjsip set logger pcap <filename>

   When used this will create a pcap file containing the incoming
   and outgoing SIP packets, in unencrypted form.

   pjsip set logger console <on / off>

   This allows you to toggle logging to console on and off.

   pjsip set logger host <IP/subnet mask> add

   This allows you to add an additional IP address or subnet mask
   to logging, allowing you to log multiple instead of just a single
   IP address or all traffic.

   The normal "pjsip set logger host" CLI command has also been
   expanded to allow subnet masks as well.

res_pjsip_session
------------------
 * When placing an outgoing call to a PJSIP endpoint the intent
   of any requested formats will now be respected. If only an audio
   format is requested (such as ulaw) but the underlying endpoint
   does not support the format the resulting SDP will still only
   contain an audio stream, and not any additional streams such as
   video.

 * Two new options, incoming_call_offer_pref and outgoing_call_offer_pref
   have been added to res_pjsip endpoints that specify the preferred
   order of codecs to use between those received/sent in an SDP
   offer and those set in the endpoint configuration.

res_rtp_asterisk
------------------
 * This change include a new cli command 'rtp show settings'

   The command display by general settings of rtp configuration.
   For this point is added the fields: rtpstart, rtpend, dtmftimeout,
   rtpchecksum, strictrtp, learning_min_sequential and icesupport.

 * The blacklist mechanism in res_rtp_asterisk for ICE and STUN
   was converted to an ACL mechanism.

   As such six new options are now available:

   ice_deny
   ice_permit
   ice_acl
   stun_deny
   stun_permit
   stun_acl

   These options have their obvious meanings as used elsewhere.

   Backwards compatibility was maintained by adding {stun,ice}_blacklist
   as aliases for {stun,ice}_deny.

res_sorcery_memory_cache
------------------
 * The SorceryMemoryCacheExpireObject AMI action and CLI
   command allow expiring of a specific object within the sorcery
   memory cache. This is done by removing the object from the cache
   with the expectation that the cache will then re-populate the
   object when it is next needed.

   For full backend caching this does not occur. The cache won't
   repopulate until an entire refresh is done resulting in the
   possibility that objects are missing until that time.

   The AMI action and CLI command will now not allow expiring of
   an object if the cache is configured as a full backend cache.
   Instead you must use either the SorceryMemoryCacheExpire or
   SorceryMemoryCachePopulate AMI actions or their associated CLI
   commands.

taskprocessor.c
------------------
 * Added two new CLI commands to reset stats for taskprocessors.
   You can reset stats for a single, specific taskprocessor ('core
   reset taskprocessor <taskprocessor>'), or you can reset all
   taskprocessors ('core reset taskprocessors'). These commands
   will reset the counter for the number of tasks processed as well
   as the max queue size.

 * Added "like" support for 'core show taskprocessors'. Now you
   can specify a specific set of taskprocessors (or just one) by
   adding the keyword "like" to the above command, followed by your
   search criteria.

diffstat:

 comms/asterisk18/files/smf/manifest.xml                             |   34 +
 comms/asterisk18/patches/patch-Makefile                             |  134 ++++++
 comms/asterisk18/patches/patch-addons_chan__ooh323.c                |   13 +
 comms/asterisk18/patches/patch-apps_app__adsiprog.c                 |   22 +
 comms/asterisk18/patches/patch-apps_app__chanspy.c                  |   13 +
 comms/asterisk18/patches/patch-apps_app__directory.c                |   13 +
 comms/asterisk18/patches/patch-apps_app__dumpchan.c                 |   22 +
 comms/asterisk18/patches/patch-apps_app__followme.c                 |   22 +
 comms/asterisk18/patches/patch-apps_app__minivm.c                   |   13 +
 comms/asterisk18/patches/patch-apps_app__queue.c                    |  132 +++++
 comms/asterisk18/patches/patch-apps_app__sms.c                      |  102 ++++
 comms/asterisk18/patches/patch-apps_app__voicemail.c                |   76 +++
 comms/asterisk18/patches/patch-build__tools_mkpkgconfig             |   19 +
 comms/asterisk18/patches/patch-cdr_cdr__pgsql.c                     |   31 +
 comms/asterisk18/patches/patch-cel_cel__pgsql.c                     |   13 +
 comms/asterisk18/patches/patch-channels_chan__pjsip.c               |   32 +
 comms/asterisk18/patches/patch-channels_chan__sip.c                 |   40 +
 comms/asterisk18/patches/patch-channels_pjsip_cli__commands.c       |   33 +
 comms/asterisk18/patches/patch-channels_pjsip_dialplan__functions.c |   32 +
 comms/asterisk18/patches/patch-configure                            |  222 ++++++++++
 comms/asterisk18/patches/patch-configure.ac                         |   34 +
 comms/asterisk18/patches/patch-contrib_scripts_vmail.cgi            |  181 ++++++++
 comms/asterisk18/patches/patch-funcs_func__cdr.c                    |   13 +
 comms/asterisk18/patches/patch-funcs_func__channel.c                |   13 +
 comms/asterisk18/patches/patch-funcs_func__env.c                    |   49 ++
 comms/asterisk18/patches/patch-funcs_func__pjsip__aor.c             |   22 +
 comms/asterisk18/patches/patch-funcs_func__pjsip__contact.c         |   22 +
 comms/asterisk18/patches/patch-funcs_func__pjsip__endpoint.c        |   23 +
 comms/asterisk18/patches/patch-funcs_func__strings.c                |   40 +
 comms/asterisk18/patches/patch-include_asterisk_autoconfig.h.in     |   27 +
 comms/asterisk18/patches/patch-include_asterisk_lock.h              |   31 +
 comms/asterisk18/patches/patch-include_asterisk_sha1.h              |  131 +++++
 comms/asterisk18/patches/patch-include_asterisk_strings.h           |   40 +
 comms/asterisk18/patches/patch-main_Makefile                        |   38 +
 comms/asterisk18/patches/patch-main_acl.c                           |   40 +
 comms/asterisk18/patches/patch-main_app.c                           |   13 +
 comms/asterisk18/patches/patch-main_ast__expr2.c                    |   16 +
 comms/asterisk18/patches/patch-main_ast__expr2.y                    |   16 +
 comms/asterisk18/patches/patch-main_asterisk.c                      |   40 +
 comms/asterisk18/patches/patch-main_astmm.c                         |   13 +
 comms/asterisk18/patches/patch-main_bridge__basic.c                 |   13 +
 comms/asterisk18/patches/patch-main_callerid.c                      |   28 +
 comms/asterisk18/patches/patch-main_cdr.c                           |   25 +
 comms/asterisk18/patches/patch-main_cel.c                           |   13 +
 comms/asterisk18/patches/patch-main_cli.c                           |   22 +
 comms/asterisk18/patches/patch-main_conversions.c                   |   13 +
 comms/asterisk18/patches/patch-main_dns__naptr.c                    |   40 +
 comms/asterisk18/patches/patch-main_enum.c                          |   76 +++
 comms/asterisk18/patches/patch-main_features.c                      |   20 +
 comms/asterisk18/patches/patch-main_http.c                          |   13 +
 comms/asterisk18/patches/patch-main_indications.c                   |   13 +
 comms/asterisk18/patches/patch-main_logger.c                        |   22 +
 comms/asterisk18/patches/patch-main_manager.c                       |   83 +++
 comms/asterisk18/patches/patch-main_pbx.c                           |   13 +
 comms/asterisk18/patches/patch-main_pbx__builtins.c                 |   33 +
 comms/asterisk18/patches/patch-main_pbx__timing.c                   |   13 +
 comms/asterisk18/patches/patch-main_sched.c                         |   27 +
 comms/asterisk18/patches/patch-main_stdtime_localtime.c             |  147 ++++++
 comms/asterisk18/patches/patch-main_tdd.c                           |   13 +
 comms/asterisk18/patches/patch-main_test.c                          |   13 +
 comms/asterisk18/patches/patch-main_utils.c                         |   60 ++
 comms/asterisk18/patches/patch-menuselect_menuselect.c              |   22 +
 comms/asterisk18/patches/patch-pbx_pbx__config.c                    |   22 +
 comms/asterisk18/patches/patch-pbx_pbx__dundi.c                     |   40 +
 comms/asterisk18/patches/patch-res_ael_pval.c                       |   41 +
 comms/asterisk18/patches/patch-res_res__calendar.c                  |   37 +
 comms/asterisk18/patches/patch-res_res__calendar__caldav.c          |   13 +
 comms/asterisk18/patches/patch-res_res__calendar__icalendar.c       |   13 +
 comms/asterisk18/patches/patch-res_res__hep__pjsip.c                |   23 +
 comms/asterisk18/patches/patch-res_res__limit.c                     |   13 +
 comms/asterisk18/patches/patch-res_res__musiconhold.c               |   13 +
 comms/asterisk18/patches/patch-res_res__pjproject.c                 |   31 +
 comms/asterisk18/patches/patch-res_res__xmpp.c                      |   13 +
 comms/asterisk18/patches/patch-sounds_Makefile                      |   25 +
 comms/asterisk18/patches/patch-tests_test__locale.c                 |   13 +
 comms/asterisk18/patches/patch-tests_test__voicemail__api.c         |   13 +
 comms/asterisk18/patches/patch-utils_Makefile                       |   24 +
 comms/asterisk18/patches/patch-utils_db1-ast_include_db.h           |   13 +
 comms/asterisk18/patches/patch-utils_extconf.c                      |   67 +++
 comms/asterisk18/patches/patch-utils_smsq.c                         |   13 +
 80 files changed, 2969 insertions(+), 0 deletions(-)

diffs (truncated from 3289 to 300 lines):

diff -r 939f11496c44 -r 5f2b685cf94e comms/asterisk18/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/asterisk18/files/smf/manifest.xml   Sun Jun 13 07:47:18 2021 +0000
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="export">
+  <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name='network' grouping='require_all' restart_on='error' type='service'>
+      <service_fmri value='svc:/milestone/network:default' />
+    </dependency>
+    <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/filesystem/local:default' />
+    </dependency>
+    <method_context>
+      <method_environment>
+        <envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
+      </method_environment>
+    </method_context>
+    <exec_method type="method" name="start" exec="@PREFIX@/sbin/asterisk" timeout_seconds="60" />
+    <exec_method type="method" name="stop" exec="@PREFIX@/sbin/asterisk -nr -x 'core stop gracefully' >/dev/null" timeout_seconds="60" />
+    <exec_method type="method" name="refresh" exec="@PREFIX@/sbin/asterisk -nr -x 'core reload' >/dev/null" timeout_seconds="60" />
+    <property_group name="startd" type="framework">
+      <propval name="duration" type="astring" value="contract" />
+      <propval name="ignore_error" type="astring" value="core,signal" />
+    </property_group>
+    <property_group name="application" type="application">
+      <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/asterisk.conf" />
+    </property_group>
+    <template>
+      <common_name>
+        <loctext xml:lang="C">Asterisk PBX</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>
diff -r 939f11496c44 -r 5f2b685cf94e comms/asterisk18/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/asterisk18/patches/patch-Makefile   Sun Jun 13 07:47:18 2021 +0000
@@ -0,0 +1,134 @@
+$NetBSD: patch-Makefile,v 1.1.1.1 2021/06/13 07:47:18 jnemeth Exp $
+
+--- Makefile.orig      2021-05-06 15:34:57.000000000 +0000
++++ Makefile
+@@ -143,7 +143,7 @@ DEBUG=-g3
+ 
+ # Asterisk.conf is located in ASTETCDIR or by using the -C flag
+ # when starting Asterisk
+-ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
++ASTCONFPATH=$(ASTEXAMPLEDIR)/asterisk.conf
+ AGI_DIR=$(ASTDATADIR)/agi-bin
+ 
+ # If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file
+@@ -215,12 +215,6 @@ ifeq ($(AST_DEVMODE),yes)
+   endif
+ endif
+ 
+-ifeq ($(OSARCH),NetBSD)
+-  _ASTCFLAGS+=-isystem /usr/pkg/include
+-else ifneq ($(findstring BSD,$(OSARCH)),)
+-  _ASTCFLAGS+=-isystem /usr/local/include
+-endif
+-
+ ifeq ($(OSARCH),FreeBSD)
+   # -V is understood by BSD Make, not by GNU make.
+   BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
+@@ -435,7 +429,6 @@ dist-clean: distclean
+ 
+ distclean: $(SUBDIRS_DIST_CLEAN) _clean
+       @$(MAKE) -C menuselect dist-clean
+-      @$(MAKE) -C sounds dist-clean
+       rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
+       rm -f config.log config.status config.cache
+       rm -rf autom4te.cache
+@@ -493,7 +486,7 @@ doc/core-en_US.xml: makeopts .lastclean 
+                       MODULEINFO=$$($(AWK) -f build_tools/get_moduleinfo $$i) ; \
+                       if [ -n "$$MODULEINFO" ] ; \
+                       then \
+-                              echo "<module language=\"en_US\" name=\"`$(BASENAME) -s .c $$i`\">" >> $@ ; \
++                              echo "<module language=\"en_US\" name=\"`$(BASENAME) $$i .c`\">" >> $@ ; \
+                               echo "$$MODULEINFO" >> $@ ; \
+                               echo "</module>" >> $@ ; \
+                       fi ; \
+@@ -563,7 +556,7 @@ update:
+ 
+ NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
+ OLDHEADERS=$(filter-out $(NEWHEADERS) $(notdir $(DESTDIR)$(ASTHEADERDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
+-INSTALLDIRS="$(ASTLIBDIR)" "$(ASTMODDIR)" "$(ASTSBINDIR)" "$(ASTCACHEDIR)" "$(ASTETCDIR)" "$(ASTVARRUNDIR)" \
++INSTALLDIRS="$(ASTLIBDIR)" "$(ASTMODDIR)" "$(ASTSBINDIR)" "$(ASTCACHEDIR)" "$(ASTEXAMPLEDIR)" "$(ASTVARRUNDIR)" \
+       "$(ASTSPOOLDIR)" "$(ASTSPOOLDIR)/dictate" "$(ASTSPOOLDIR)/meetme" \
+       "$(ASTSPOOLDIR)/monitor" "$(ASTSPOOLDIR)/system" "$(ASTSPOOLDIR)/tmp" \
+       "$(ASTSPOOLDIR)/voicemail" "$(ASTSPOOLDIR)/recording" \
+@@ -769,7 +762,7 @@ upgrade: bininstall
+ #  (2) the extension to strip off
+ define INSTALL_CONFIGS
+       @for x in $(1)/*$(2); do \
+-              dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x $(2)`"; \
++              dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x $(2)`"; \
+               if [ -f "$${dst}" ]; then \
+                       if [ "$(OVERWRITE)" = "y" ]; then \
+                               if cmp -s "$${dst}" "$$x" ; then \
+@@ -799,9 +792,9 @@ define INSTALL_CONFIGS
+                       -e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \
+                       -e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
+                       -e 's|^astsbindir.*$$|astsbindir => $(ASTSBINDIR)|' \
+-                      "$(DESTDIR)$(ASTCONFPATH)" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
+-              $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)" ; \
+-              rm -f "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
++                      "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf" > "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp" ; \
++              $(INSTALL) -m 644 "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp" "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf" ; \
++              rm -f "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp" ; \
+       fi
+ endef
+ 
+@@ -826,15 +819,15 @@ install-configs:
+ # XXX why *.adsi is installed first ?
+ adsi:
+       @echo Installing adsi config files...
+-      $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
++      $(INSTALL) -d "$(DESTDIR)$(ASTEXAMPLEDIR)"
+       @for x in configs/samples/*.adsi; do \
+-              dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
++              dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x`" ; \
+               if [ -f "$${dst}" ] ; then \
+                       echo "Overwriting $$x" ; \
+               else \
+                       echo "Installing $$x" ; \
+               fi ; \
+-              $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
++              $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x`" ; \
+       done
+ 
+ samples: adsi
+@@ -867,7 +860,7 @@ basic-pbx:
+ webvmail:
+       @[ -d "$(DESTDIR)$(HTTP_DOCSDIR)/" ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
+       @[ -d "$(DESTDIR)$(HTTP_CGIDIR)" ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
+-      $(INSTALL) -m 4755 contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi"
++      $(INSTALL) contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail"
+       $(INSTALL) -d "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk"
+       for x in images/*.gif; do \
+               $(INSTALL) -m 644 $$x "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/"; \
+@@ -917,11 +910,11 @@ endif
+ endif
+ 
+ install-logrotate:
+-      if [ ! -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ]; then \
+-              $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ; \
++      if [ ! -d "$(DESTDIR)$(ASTEXAMPLEDIR)/../logrotate.d" ]; then \
++              $(INSTALL) -d "$(DESTDIR)$(ASTEXAMPLEDIR)/../logrotate.d" ; \
+       fi
+       sed 's#__LOGDIR__#$(ASTLOGDIR)#g' < contrib/scripts/asterisk.logrotate | sed 's#__SBINDIR__#$(ASTSBINDIR)#g' > contrib/scripts/asterisk.logrotate.tmp
+-      $(INSTALL) -m 0644 contrib/scripts/asterisk.logrotate.tmp "$(DESTDIR)$(ASTETCDIR)/../logrotate.d/asterisk"
++      $(INSTALL) -m 0644 contrib/scripts/asterisk.logrotate.tmp "$(DESTDIR)$(ASTEXAMPLEDIR)/../logrotate.d/asterisk"
+       rm -f contrib/scripts/asterisk.logrotate.tmp
+ 
+ config:
+@@ -1048,7 +1041,7 @@ uninstall-all: _uninstall uninstall-head
+       rm -rf "$(DESTDIR)$(ASTVARLIBDIR)"
+       rm -rf "$(DESTDIR)$(ASTDATADIR)"
+       rm -rf "$(DESTDIR)$(ASTSPOOLDIR)"
+-      rm -rf "$(DESTDIR)$(ASTETCDIR)"
++      rm -rf "$(DESTDIR)$(ASTEXAMPLEDIR)"
+       rm -rf "$(DESTDIR)$(ASTLOGDIR)"
+ 
+ menuconfig: menuselect
+@@ -1138,6 +1131,7 @@ check-alembic: makeopts
+ .PHONY: install-configs
+ .PHONY: install-headers
+ .PHONY: menuselect
++.PHONY: menuselect.makeopts
+ .PHONY: main
+ .PHONY: sounds
+ .PHONY: clean
diff -r 939f11496c44 -r 5f2b685cf94e comms/asterisk18/patches/patch-addons_chan__ooh323.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/asterisk18/patches/patch-addons_chan__ooh323.c      Sun Jun 13 07:47:18 2021 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-addons_chan__ooh323.c,v 1.1.1.1 2021/06/13 07:47:18 jnemeth Exp $
+
+--- addons/chan_ooh323.c.orig  2018-05-01 20:12:26.000000000 +0000
++++ addons/chan_ooh323.c
+@@ -4035,7 +4035,7 @@ static void *do_monitor(void *data)
+                               h323->lastrtprx + h323->rtptimeout < t) {
+                               if (!ast_channel_trylock(h323->owner)) {
+                                       ast_softhangup_nolock(h323->owner, AST_SOFTHANGUP_DEV);
+-                                      ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n", ast_channel_name(h323->owner), (long) (t - h323->lastrtprx));
++                                      ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %jd seconds\n", ast_channel_name(h323->owner), (intmax_t) (t - h323->lastrtprx));
+                                       ast_channel_unlock(h323->owner);
+                               }
+ 
diff -r 939f11496c44 -r 5f2b685cf94e comms/asterisk18/patches/patch-apps_app__adsiprog.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/asterisk18/patches/patch-apps_app__adsiprog.c       Sun Jun 13 07:47:18 2021 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-apps_app__adsiprog.c,v 1.1.1.1 2021/06/13 07:47:18 jnemeth Exp $
+
+--- apps/app_adsiprog.c.orig   2018-05-07 17:17:45.731153122 +0000
++++ apps/app_adsiprog.c
+@@ -215,7 +215,7 @@ static int process_token(void *out, char
+                       /* Convert */
+                       *((unsigned int *)out) = htonl(*((unsigned int *)out));
+               }
+-      } else if ((strlen(src) > 2) && (src[0] == '0') && (tolower(src[1]) == 'x')) {
++      } else if ((strlen(src) > 2) && (src[0] == '0') && (tolower((unsigned char)src[1]) == 'x')) {
+               if (!(argtype & ARG_NUMBER))
+                       return -1;
+               /* Hex value */
+@@ -225,7 +225,7 @@ static int process_token(void *out, char
+                       /* Convert */
+                       *((unsigned int *)out) = htonl(*((unsigned int *)out));
+               }
+-      } else if ((!ast_strlen_zero(src) && isdigit(src[0]))) {
++      } else if ((!ast_strlen_zero(src) && isdigit((unsigned char)src[0]))) {
+               if (!(argtype & ARG_NUMBER))
+                       return -1;
+               /* Hex value */
diff -r 939f11496c44 -r 5f2b685cf94e comms/asterisk18/patches/patch-apps_app__chanspy.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/asterisk18/patches/patch-apps_app__chanspy.c        Sun Jun 13 07:47:18 2021 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-apps_app__chanspy.c,v 1.1.1.1 2021/06/13 07:47:18 jnemeth Exp $
+
+--- apps/app_chanspy.c.orig    2018-05-07 17:20:13.916423247 +0000
++++ apps/app_chanspy.c
+@@ -1105,7 +1105,7 @@ static int common_exec(struct ast_channe
+                               if ((ptr = strchr(peer_name, '/'))) {
+                                       *ptr++ = '\0';
+                                       for (s = peer_name; s < ptr; s++) {
+-                                              *s = tolower(*s);
++                                              *s = tolower((unsigned char)*s);
+                                       }
+                                       if ((s = strchr(ptr, '-'))) {
+                                               *s = '\0';
diff -r 939f11496c44 -r 5f2b685cf94e comms/asterisk18/patches/patch-apps_app__directory.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/asterisk18/patches/patch-apps_app__directory.c      Sun Jun 13 07:47:18 2021 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-apps_app__directory.c,v 1.1.1.1 2021/06/13 07:47:18 jnemeth Exp $
+
+--- apps/app_directory.c.orig  2018-05-07 17:19:54.317128994 +0000
++++ apps/app_directory.c
+@@ -194,7 +194,7 @@ static int compare(const char *text, con
+       }
+ 
+       while (*template) {
+-              digit = toupper(*text++);
++              digit = toupper((unsigned char)*text++);
+               switch (digit) {
+               case 0:
+                       return -1;
diff -r 939f11496c44 -r 5f2b685cf94e comms/asterisk18/patches/patch-apps_app__dumpchan.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/asterisk18/patches/patch-apps_app__dumpchan.c       Sun Jun 13 07:47:18 2021 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-apps_app__dumpchan.c,v 1.1.1.1 2021/06/13 07:47:18 jnemeth Exp $
+
+--- apps/app_dumpchan.c.orig   2015-10-09 21:48:48.000000000 +0000
++++ apps/app_dumpchan.c
+@@ -117,7 +117,7 @@ static int serialize_showchan(struct ast
+               "1stFileDescriptor=  %d\n"
+               "Framesin=           %u %s\n"
+               "Framesout=          %u %s\n"
+-              "TimetoHangup=       %ld\n"
++              "TimetoHangup=       %jd\n"
+               "ElapsedTime=        %dh%dm%ds\n"
+               "BridgeID=           %s\n"
+               "Context=            %s\n"
+@@ -155,7 +155,7 @@ static int serialize_showchan(struct ast
+               ast_channel_fd(c, 0),
+               ast_channel_fin(c) & ~DEBUGCHAN_FLAG, (ast_channel_fin(c) & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
+               ast_channel_fout(c) & ~DEBUGCHAN_FLAG, (ast_channel_fout(c) & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
+-              (long)ast_channel_whentohangup(c)->tv_sec,
++              (intmax_t)ast_channel_whentohangup(c)->tv_sec,
+               hour,
+               min,
+               sec,
diff -r 939f11496c44 -r 5f2b685cf94e comms/asterisk18/patches/patch-apps_app__followme.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/asterisk18/patches/patch-apps_app__followme.c       Sun Jun 13 07:47:18 2021 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-apps_app__followme.c,v 1.1.1.1 2021/06/13 07:47:18 jnemeth Exp $
+
+--- apps/app_followme.c.orig   2015-10-09 21:48:48.000000000 +0000
++++ apps/app_followme.c
+@@ -380,7 +380,7 @@ static struct number *create_followme_nu
+               *tmp = '\0';
+       ast_copy_string(cur->number, buf, sizeof(cur->number));
+       cur->order = numorder;
+-      ast_debug(1, "Created a number, %s, order of , %d, with a timeout of %ld.\n", cur->number, cur->order, cur->timeout);
++      ast_debug(1, "Created a number, %s, order of , %d, with a timeout of %jd.\n", cur->number, cur->order, (intmax_t)cur->timeout);
+ 
+       return cur;
+ }
+@@ -1010,7 +1010,7 @@ static struct ast_channel *findmeexec(st
+                       break;
+               }
+ 




Home | Main Index | Thread Index | Old Index