asterisk: bump to version 18.11.2 761/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Fri, 20 Aug 2021 20:59:49 +0000 (22:59 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Mon, 18 Apr 2022 15:56:18 +0000 (17:56 +0200)
asterisk: update AST_EXT_TOOL_CHECK for OpenWrt

Issue #672 shows that the current macro has some pitfalls, at least when
running within OpenWrt's buildroot.

The macro is used to detect these tools:

  1. xml2-config
  2. mysql_config
  3. neon-config
  4. net-snmp-config
  5. sdl-config (we're not using SDL)

The macro also adds configure arguments that allow to specify a path
like so:

  --with-mysqlclient=PATH

Macro problems:

  1. If no PATH is specified, it adds "/bin" to the search path.
     Obviously this is a bad thing when cross-compiling.
  2. If a PATH is specified, it adds it to the start of every include
     and library path it encounters. These paths are then broken.

This commit makes problem 1 go away by making the addition of
"${$1_DIR}/bin" to the PATH dependent on there being a PATH handed to
the macro. An alternative would be to remove the PATH addition
altogether, but then the macro wouldn't behave as expected.

It also removes the path filtering of the include and lib dirs to
address problem 2.

Closes #672

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
(cherry picked from commit 79a0acfe56256748615159f6e08687570ac2cf88)

asterisk: bump to 18.7.1

The removed patch has been applied upstream and is part of this release.

Signed-off-by: Andre Heider <a.heider@gmail.com>
(cherry picked from commit 0399a3dc730ae639636bcd053193b37751f8df4d)

asterisk: add missing modules + dependency

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
(cherry picked from commit 04b6b267f1c36e228655236ce054b5e0eb15c804)

asterisk: fix build on macos

This commit adds a patch to fix /sbin/launchd detection on macos

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
(cherry picked from commit 4209a36afe4c66365bdffc5f62d287e94cfc8edd)

asterisk: bump to version 18.11.2

- add two new modules (app_sf and func_json)
- update 100-build-reproducibly.patch as upstream refactored some of the
  code
- refresh patches

This bump includes fixes for the following security issues:

https://downloads.asterisk.org/pub/security/AST-2022-001.html
https://downloads.asterisk.org/pub/security/AST-2022-002.html
https://downloads.asterisk.org/pub/security/AST-2022-003.html

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
(cherry picked from commit 958401fa8f98e50df02917eded1eb4815997985d)

asterisk: add --without-libxslt to configure

Since upstream commit b40c4d59b1dd803cad79060fb5b5a48d249ba578
"--disable-xmldoc" does no longer prevent the linking to libxslt, if
available. If that's the case one is greeted with the following error:

Package asterisk is missing dependencies for the following libraries:
libxslt.so.1

This commit explicitly disables the use of libxslt, to avoid the
dependency.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
(cherry picked from commit 64a1d2faef62352327c4aaeec803ce71ff5d2c40)

net/asterisk/Makefile
net/asterisk/patches/001-disable-semaphores-on-uclibc-otherwise-allow.patch
net/asterisk/patches/002-configure-fix-detection-of-re-entrant-resolver-funct.patch
net/asterisk/patches/090-app_dial-expanded-A-option-to-add-caller-announcement.patch [deleted file]
net/asterisk/patches/100-build-reproducibly.patch
net/asterisk/patches/130-eventfd.patch
net/asterisk/patches/140-use-default-lua.patch
net/asterisk/patches/160-AST_EXT_TOOL_CHECK.patch [new file with mode: 0644]
net/asterisk/patches/180_build-fix-bininstall-launchd-issue-on-cross-platfrom.patch [new file with mode: 0644]

index 8cc8755df63dba70201ef1115ecda7788e285c63..f63789b71800f7874c7f60a7a587d8634a3e2256 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asterisk
-PKG_VERSION:=18.5.1
-PKG_RELEASE:=2
+PKG_VERSION:=18.11.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
-PKG_HASH:=e7d78716a0deeadf24b7d537cd24c11c2d9a096265eefc9470565c4da0fc54c7
+PKG_HASH:=b456d19610e53789446e097bb9773a82a04088922de0cfaff2b818326b67296b
 
 PKG_BUILD_DEPENDS:=libxml2/host
 
@@ -58,6 +58,7 @@ MODULES_AVAILABLE:= \
        app-directed-pickup \
        app-directory \
        app-disa \
+       app-dtmfstore \
        app-dumpchan \
        app-exec \
        app-externalivr \
@@ -68,6 +69,7 @@ MODULES_AVAILABLE:= \
        app-ices \
        app-image \
        app-ivrdemo \
+       app-mf \
        app-milliwatt \
        app-minivm \
        app-mixmonitor \
@@ -81,10 +83,12 @@ MODULES_AVAILABLE:= \
        app-read \
        app-readexten \
        app-record \
+       app-reload \
        app-saycounted \
        app-sayunixtime \
        app-senddtmf \
        app-sendtext \
+       app-sf \
        app-skel \
        app-sms \
        app-softhangup \
@@ -100,6 +104,7 @@ MODULES_AVAILABLE:= \
        app-url \
        app-userevent \
        app-verbose \
+       app-waitforcond \
        app-voicemail \
        app-voicemail-imap \
        app-voicemail-odbc \
@@ -180,6 +185,7 @@ MODULES_AVAILABLE:= \
        func-enum \
        func-env \
        func-extstate \
+       func-frame-drop \
        func-frame-trace \
        func-global \
        func-groupcount \
@@ -187,6 +193,7 @@ MODULES_AVAILABLE:= \
        func-holdintercept \
        func-iconv \
        func-jitterbuffer \
+       func-json \
        func-lock \
        func-math \
        func-md5 \
@@ -196,6 +203,8 @@ MODULES_AVAILABLE:= \
        func-presencestate \
        func-rand \
        func-realtime \
+       func-sayfiles \
+       func-scramble \
        func-sha1 \
        func-shell \
        func-sorcery \
@@ -304,6 +313,7 @@ MODULES_AVAILABLE:= \
        res-stun-monitor \
        res-timing-dahdi \
        res-timing-pthread \
+       res-tonedetect \
        res-xmpp
 
 UTILS_AVAILABLE:= \
@@ -564,6 +574,7 @@ CONFIGURE_ARGS+= \
        --without-pjproject-bundled \
        --with-libedit="$(STAGING_DIR)/usr" \
        --with-libxml2 \
+       --without-libxslt \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-res-snmp),--with-netsnmp="$(STAGING_DIR)/usr",--without-netsnmp) \
        --without-newt \
        --without-osptk \
@@ -781,16 +792,18 @@ $(eval $(call BuildAsteriskModule,app-dictate,Virtual dictation machine,Virtual
 $(eval $(call BuildAsteriskModule,app-directed-pickup,Directed call pickup,Directed call pickup application.,,,app_directed_pickup,,))
 $(eval $(call BuildAsteriskModule,app-directory,Extension directory,Extension directory.,,,app_directory,,))
 $(eval $(call BuildAsteriskModule,app-disa,Direct Inward System Access,Direct Inward System Access application.,,,app_disa,,))
+$(eval $(call BuildAsteriskModule,app-dtmfstore,DTMF storage,Technology independent async DTMF storage.,,,app_dtmfstore,,))
 $(eval $(call BuildAsteriskModule,app-dumpchan,Dump info about channel,Dump info about the calling channel.,,,app_dumpchan,,))
 $(eval $(call BuildAsteriskModule,app-exec,Exec application,Executes dialplan applications.,,,app_exec,,))
 $(eval $(call BuildAsteriskModule,app-externalivr,External IVR interface,External IVR interface application.,,,app_externalivr,,))
 $(eval $(call BuildAsteriskModule,app-festival,Simple festival interface,Simple Festival interface.,,festival.conf,app_festival,,))
 $(eval $(call BuildAsteriskModule,app-flash,Flash channel,Flash channel application.,+$(PKG_NAME)-chan-dahdi,,app_flash,,))
 $(eval $(call BuildAsteriskModule,app-followme,Find-me/follow-me,Find-Me/Follow-Me application.,,followme.conf,app_followme,,))
-$(eval $(call BuildAsteriskModule,app-getcpeid,Get ADSI CPE ID,Get ADSI CPE ID.,,,app_getcpeid,,))
+$(eval $(call BuildAsteriskModule,app-getcpeid,Get ADSI CPE ID,Get ADSI CPE ID.,+asterisk-res-adsi,,app_getcpeid,,))
 $(eval $(call BuildAsteriskModule,app-ices,Encode and stream,Encode and stream via Icecast and IceS.,,,app_ices,,))
 $(eval $(call BuildAsteriskModule,app-image,Image transmission,Image transmission application.,,,app_image,,))
 $(eval $(call BuildAsteriskModule,app-ivrdemo,IVR demo,IVR demo application.,,,app_ivrdemo,,))
+$(eval $(call BuildAsteriskModule,app-mf,MF digits,Send MF digits Application.,,,app_mf,,))
 $(eval $(call BuildAsteriskModule,app-milliwatt,Digital milliwatt [mu-law] test app,Digital milliwatt test application.,,,app_milliwatt,,))
 $(eval $(call BuildAsteriskModule,app-minivm,Minimal voicemail system,A minimal voicemail e-mail system.,,extensions_minivm.conf minivm.conf,app_minivm,,))
 $(eval $(call BuildAsteriskModule,app-mixmonitor,Record a call and mix the audio,Mixed audio monitoring application.,,,app_mixmonitor,,))
@@ -804,10 +817,12 @@ $(eval $(call BuildAsteriskModule,app-queue,True Call Queueing,True call queuein
 $(eval $(call BuildAsteriskModule,app-read,Variable read,Read variable application.,,,app_read,,))
 $(eval $(call BuildAsteriskModule,app-readexten,Extension to variable,Read and evaluate extension validity.,,,app_readexten,,))
 $(eval $(call BuildAsteriskModule,app-record,Record sound file,Trivial record application.,,,app_record,,))
+$(eval $(call BuildAsteriskModule,app-reload,Reload,Reload module[s].,,,app_reload,,))
 $(eval $(call BuildAsteriskModule,app-saycounted,Decline words,Decline words according to channel language.,,,app_saycounted,,))
 $(eval $(call BuildAsteriskModule,app-sayunixtime,Say Unix time,Say time.,,,app_sayunixtime,,))
 $(eval $(call BuildAsteriskModule,app-senddtmf,Send DTMF digits,Send DTMF digits application.,,,app_senddtmf,,))
 $(eval $(call BuildAsteriskModule,app-sendtext,Send text,Send text applications.,,,app_sendtext,,))
+$(eval $(call BuildAsteriskModule,app-sf,SF Sender and Receiver Applications,SF Sender and Receiver Applications.,,,app_sf,,))
 $(eval $(call BuildAsteriskModule,app-skel,Skeleton [sample],Skeleton application.,,app_skel.conf,app_skel,,))
 $(eval $(call BuildAsteriskModule,app-sms,SMS,SMS/PSTN handler.,,,app_sms,,))
 $(eval $(call BuildAsteriskModule,app-softhangup,Hang up requested channel,Hangs up the requested channel.,,,app_softhangup,,))
@@ -823,6 +838,7 @@ $(eval $(call BuildAsteriskModule,app-transfer,Transfers caller to other ext,Tra
 $(eval $(call BuildAsteriskModule,app-url,Send URL,Send URL applications.,,,app_url,,))
 $(eval $(call BuildAsteriskModule,app-userevent,Custom user event,Custom user event application.,,,app_userevent,,))
 $(eval $(call BuildAsteriskModule,app-verbose,Verbose logging,Send verbose output.,,,app_verbose,,))
+$(eval $(call BuildAsteriskModule,app-waitforcond,Wait for condition,Wait until condition is true.,,,app_waitforcond,,))
 $(eval $(call BuildAsteriskModule,app-voicemail,Voicemail,Voicemail module.,,voicemail.conf,app_voicemail,vm-*,))
 $(eval $(call BuildAsteriskModule,app-voicemail-imap,Voicemail IMAP,Voicemail module.,+uw-imap,,app_voicemail_imap,,))
 $(eval $(call BuildAsteriskModule,app-voicemail-odbc,Voicemail ODBC,Voicemail module.,+unixodbc,,app_voicemail_odbc,,))
@@ -903,6 +919,7 @@ $(eval $(call BuildAsteriskModule,func-dialplan,Dialplan context/extension/prior
 $(eval $(call BuildAsteriskModule,func-enum,ENUM,ENUM related dialplan functions.,,enum.conf,func_enum,,))
 $(eval $(call BuildAsteriskModule,func-env,Environment functions,Environment/filesystem dialplan functions.,,,func_env,,))
 $(eval $(call BuildAsteriskModule,func-extstate,Hinted extension state,Gets the state of an extension in the dialplan.,,,func_extstate,,))
+$(eval $(call BuildAsteriskModule,func-frame-drop,Frame drop,Function to drop frames on a channel.,,,func_frame_drop,,))
 $(eval $(call BuildAsteriskModule,func-frame-trace,Frame trace for internal ast_frame debugging,Frame trace for internal ast_frame debugging.,,,func_frame_trace,,))
 $(eval $(call BuildAsteriskModule,func-global,Global variable,Variable dialplan functions.,,,func_global,,))
 $(eval $(call BuildAsteriskModule,func-groupcount,Group count,Channel group dialplan functions.,,,func_groupcount,,))
@@ -910,6 +927,7 @@ $(eval $(call BuildAsteriskModule,func-hangupcause,HANGUPCAUSE related functions
 $(eval $(call BuildAsteriskModule,func-holdintercept,Hold interception dialplan function,Hold interception dialplan function.,,,func_holdintercept,,))
 $(eval $(call BuildAsteriskModule,func-iconv,Charset conversion,Charset conversions.,,,func_iconv,,,$(ICONV_DEPENDS)))
 $(eval $(call BuildAsteriskModule,func-jitterbuffer,Jitter buffer for read side of channel,Jitter buffer for read side of channel.,,,func_jitterbuffer,,))
+$(eval $(call BuildAsteriskModule,func-json,JSON decoding function,JSON decoding function.,,,func_json,,))
 $(eval $(call BuildAsteriskModule,func-lock,Dialplan mutexes,Dialplan mutexes.,,,func_lock,,))
 $(eval $(call BuildAsteriskModule,func-math,Math functions,Mathematical dialplan function.,,,func_math,,))
 $(eval $(call BuildAsteriskModule,func-md5,MD5 digest dialplan functions,MD5 digest dialplan functions.,,,func_md5,,))
@@ -919,6 +937,8 @@ $(eval $(call BuildAsteriskModule,func-pitchshift,Audio effects dialplan functio
 $(eval $(call BuildAsteriskModule,func-presencestate,Hinted presence state,Gets or sets a presence state in the dialplan.,,,func_presencestate,,))
 $(eval $(call BuildAsteriskModule,func-rand,RAND dialplan function,Random number dialplan function.,,,func_rand,,))
 $(eval $(call BuildAsteriskModule,func-realtime,REALTIME dialplan function,Read/write/store/destroy values from a realtime repository.,,,func_realtime,,))
+$(eval $(call BuildAsteriskModule,func-sayfiles,Say files,Say application files.,,,func_sayfiles,,))
+$(eval $(call BuildAsteriskModule,func-scramble,Scramble,Frequency inverting voice scrambler.,,,func_scramble,,))
 $(eval $(call BuildAsteriskModule,func-sha1,SHA-1 computation dialplan function,SHA-1 computation dialplan function.,,,func_sha1,,))
 $(eval $(call BuildAsteriskModule,func-shell,Shell,Collects the output generated by a command executed by the system shell.,,,func_shell,,))
 $(eval $(call BuildAsteriskModule,func-sorcery,Get a field from a sorcery object,Get a field from a sorcery object.,,,func_sorcery,,))
@@ -1027,6 +1047,7 @@ $(eval $(call BuildAsteriskModule,res-stir-shaken,STIR/SHAKEN resource module,ST
 $(eval $(call BuildAsteriskModule,res-stun-monitor,STUN monitoring,STUN network monitor.,,res_stun_monitor.conf,res_stun_monitor,,))
 $(eval $(call BuildAsteriskModule,res-timing-dahdi,DAHDI Timing Interface,DAHDI timing interface.,+$(PKG_NAME)-chan-dahdi,,res_timing_dahdi,,))
 $(eval $(call BuildAsteriskModule,res-timing-pthread,pthread Timing Interface,pthread timing interface.,,,res_timing_pthread,,))
+$(eval $(call BuildAsteriskModule,res-tonedetect,Tone detection,Tone detection module.,,,res_tonedetect,,))
 $(eval $(call BuildAsteriskModule,res-xmpp,XMPP client and component module,Asterisk XMPP interface.,+libiksemel +libopenssl,xmpp.conf,res_xmpp,,))
 
 ################################
index b7d3f53f2cc9a48542f280babaa507cfb2049fc2..e8917e993500d6c92bd727175c6fc02c9005eb64 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1040,15 +1040,18 @@ AC_LINK_IFELSE(
+@@ -1090,15 +1090,18 @@ AC_LINK_IFELSE(
  
  # Some platforms define sem_init(), but only support sem_open(). joyous.
  AC_MSG_CHECKING(for working unnamed semaphores)
index 9dad5bbb2c0cffb639e1fbcaeac75e6a0d6d9e5b..fad44176587785cec8bfa61cc30135b2b8025a7a 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1434,7 +1434,11 @@ AC_LINK_IFELSE(
+@@ -1484,7 +1484,11 @@ AC_LINK_IFELSE(
                        #include <arpa/nameser.h>
                        #endif
                        #include <resolv.h>],
diff --git a/net/asterisk/patches/090-app_dial-expanded-A-option-to-add-caller-announcement.patch b/net/asterisk/patches/090-app_dial-expanded-A-option-to-add-caller-announcement.patch
deleted file mode 100644 (file)
index bd20730..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-From 1e5a2cfe3037823b17dd4ac47b071f02d6f9825f Mon Sep 17 00:00:00 2001
-From: Naveen Albert <mail@interlinked.x10host.com>
-Date: Fri, 21 May 2021 20:08:58 -0400
-Subject: [PATCH] app_dial: Expanded A option to add caller announcement
-
-Hitherto, the A option has made it possible to play
-audio upon answer to the called party only. This option
-is expanded to allow for playback of an audio file to
-the caller instead of or in addition to the audio
-played to the answerer.
-
-ASTERISK-29442
-
-Change-Id: If6eed3ff5c341dc8c588c8210987f2571e891e5e
----
- apps/app_dial.c                               | 79 +++++++++++++++----
- doc/CHANGES-staging/app_dial_announcement.txt |  6 ++
- 2 files changed, 68 insertions(+), 17 deletions(-)
- create mode 100644 doc/CHANGES-staging/app_dial_announcement.txt
-
---- a/apps/app_dial.c
-+++ b/apps/app_dial.c
-@@ -93,11 +93,17 @@
-                       </parameter>
-                       <parameter name="options" required="false">
-                               <optionlist>
--                              <option name="A">
--                                      <argument name="x" required="true">
-+                              <option name="A" argsep=":">
-+                                      <argument name="x">
-                                               <para>The file to play to the called party</para>
-                                       </argument>
--                                      <para>Play an announcement to the called party, where <replaceable>x</replaceable> is the prompt to be played</para>
-+                                      <argument name="y">
-+                                              <para>The file to play to the calling party</para>
-+                                      </argument>
-+                                      <para>Play an announcement to the called and/or calling parties, where <replaceable>x</replaceable>
-+                                      is the prompt to be played to the called party and <replaceable>y</replaceable> is the prompt
-+                                      to be played to the caller. The files may be different and will be played to each party
-+                                      simultaneously.</para>
-                               </option>
-                               <option name="a">
-                                       <para>Immediately answer the calling channel when the called channel answers in
-@@ -2941,33 +2947,71 @@ static int dial_exec_full(struct ast_cha
-                       int digit = 0;
-                       struct ast_channel *chans[2];
-                       struct ast_channel *active_chan;
-+                      char *calledfile = NULL, *callerfile = NULL;
-+                      int calledstream = 0, callerstream = 0;
-                       chans[0] = chan;
-                       chans[1] = peer;
--                      /* we need to stream the announcement to the called party when the OPT_ARG_ANNOUNCE (-A) is setted */
--
--                      /* stream the file */
--                      res = ast_streamfile(peer, opt_args[OPT_ARG_ANNOUNCE], ast_channel_language(peer));
--                      if (res) {
--                              res = 0;
--                              ast_log(LOG_ERROR, "error streaming file '%s' to callee\n", opt_args[OPT_ARG_ANNOUNCE]);
-+                      /* we need to stream the announcement(s) when the OPT_ARG_ANNOUNCE (-A) is set */
-+                      callerfile = opt_args[OPT_ARG_ANNOUNCE];
-+                      calledfile = strsep(&callerfile, ":");
-+
-+                      /* stream the file(s) */
-+                      if (!ast_strlen_zero(calledfile)) {
-+                              res = ast_streamfile(peer, calledfile, ast_channel_language(peer));
-+                              if (res) {
-+                                      res = 0;
-+                                      ast_log(LOG_ERROR, "error streaming file '%s' to callee\n", calledfile);
-+                              } else {
-+                                      calledstream = 1;
-+                              }
-+                      }
-+                      if (!ast_strlen_zero(callerfile)) {
-+                              res = ast_streamfile(chan, callerfile, ast_channel_language(chan));
-+                              if (res) {
-+                                      res = 0;
-+                                      ast_log(LOG_ERROR, "error streaming file '%s' to caller\n", callerfile);
-+                              } else {
-+                                      callerstream = 1;
-+                              }
-                       }
-+                      /* can't use ast_waitstream, because we're streaming two files at once, and can't block
-+                              We'll need to handle both channels at once. */
-+
-                       ast_channel_set_flag(peer, AST_FLAG_END_DTMF_ONLY);
--                      while (ast_channel_stream(peer)) {
--                              int ms;
-+                      while (ast_channel_stream(peer) || ast_channel_stream(chan)) {
-+                              int mspeer, mschan;
--                              ms = ast_sched_wait(ast_channel_sched(peer));
-+                              mspeer = ast_sched_wait(ast_channel_sched(peer));
-+                              mschan = ast_sched_wait(ast_channel_sched(chan));
--                              if (ms < 0 && !ast_channel_timingfunc(peer)) {
--                                      ast_stopstream(peer);
-+                              if (calledstream) {
-+                                      if (mspeer < 0 && !ast_channel_timingfunc(peer)) {
-+                                              ast_stopstream(peer);
-+                                              calledstream = 0;
-+                                      }
-+                              }
-+                              if (callerstream) {
-+                                      if (mschan < 0 && !ast_channel_timingfunc(chan)) {
-+                                              ast_stopstream(chan);
-+                                              callerstream = 0;
-+                                      }
-+                              }
-+
-+                              if (!calledstream && !callerstream) {
-                                       break;
-                               }
--                              if (ms < 0)
--                                      ms = 1000;
--                              active_chan = ast_waitfor_n(chans, 2, &ms);
-+                              if (mspeer < 0)
-+                                      mspeer = 1000;
-+
-+                              if (mschan < 0)
-+                                      mschan = 1000;
-+
-+                              /* wait for the lowest maximum of the two */
-+                              active_chan = ast_waitfor_n(chans, 2, (mspeer > mschan ? &mschan : &mspeer));
-                               if (active_chan) {
-                                       struct ast_channel *other_chan;
-                                       struct ast_frame *fr = ast_read(active_chan);
-@@ -3017,6 +3061,7 @@ static int dial_exec_full(struct ast_cha
-                                       ast_frfree(fr);
-                               }
-                               ast_sched_runq(ast_channel_sched(peer));
-+                              ast_sched_runq(ast_channel_sched(chan));
-                       }
-                       ast_channel_clear_flag(peer, AST_FLAG_END_DTMF_ONLY);
-               }
---- /dev/null
-+++ b/doc/CHANGES-staging/app_dial_announcement.txt
-@@ -0,0 +1,6 @@
-+Subject: app_dial announcement option
-+
-+The A option for Dial now supports
-+playing audio to the caller as well
-+as the called party.
-+
index b4f017ce5fcf7c74a8c34133487b3e6d094d641b..f16421b4a3d4f07ed154178535d197361bd3a716 100644 (file)
  cat << END
  /*
   * build.h
---- a/Makefile
-+++ b/Makefile
-@@ -489,7 +489,7 @@ doc/core-en_US.xml: makeopts .lastclean
-       @echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
-       @for x in $(MOD_SUBDIRS); do \
-               printf "$$x " ; \
--              for i in `find $$x -name '*.c'`; do \
-+              for i in `find $$x -name '*.c' | LC_ALL=C sort`; do \
-                       MODULEINFO=$$($(AWK) -f build_tools/get_moduleinfo $$i) ; \
-                       if [ -n "$$MODULEINFO" ] ; \
-                       then \
+--- a/build_tools/make_xml_documentation
++++ b/build_tools/make_xml_documentation
+@@ -187,7 +187,7 @@ printf "Building Documentation For: "
+ for subdir in ${mod_subdirs} ; do
+       printf "%s " "${subdir}"
+       subdir_path="${source_tree}/${subdir}"
+-      for i in $(${FIND} "${subdir_path}" -name '*.c' -or -name '*.cc'); do
++      for i in $(${FIND} "${subdir_path}" -name '*.c' -or -name '*.cc' | LC_ALL=C sort); do
+               if [ "${with_moduleinfo}" -eq "1" ] ; then
+                       MODULEINFO=$(${AWK} -f "${source_tree}/build_tools/get_moduleinfo" "${i}")
+                       if [ "${MODULEINFO}" != "" ] ; then
index c783a52a87e8a4c24628085fe7aadbfc8e13ab97..39ed7d3e97c5220265ca350609ae3e500c8ed0d3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1205,7 +1205,7 @@ if test "${ac_cv_have_variable_fdset}x"
+@@ -1263,7 +1263,7 @@ if test "${ac_cv_have_variable_fdset}x"
  fi
  
  AC_MSG_CHECKING([if we have usable eventfd support])
index bd7041f538ee927314fd75306aa3969d4589f6e2..9247664ac186e3563777efd91a253b2e2d7aac66 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -2555,7 +2555,7 @@ if test -z "$__opus_include" -o x"$__opu
+@@ -2619,7 +2619,7 @@ if test -z "$__opus_include" -o x"$__opu
  fi
  AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])
  
diff --git a/net/asterisk/patches/160-AST_EXT_TOOL_CHECK.patch b/net/asterisk/patches/160-AST_EXT_TOOL_CHECK.patch
new file mode 100644 (file)
index 0000000..97c9d35
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/autoconf/ast_ext_tool_check.m4
++++ b/autoconf/ast_ext_tool_check.m4
+@@ -8,13 +8,16 @@ AC_DEFUN([AST_EXT_TOOL_CHECK],
+       AC_REQUIRE([AST_PROG_SED])dnl
+       if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
+               PBX_$1=0
+-              AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH])
++              if test "x${$1_DIR}" != "x"; then
++                      AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH])
++              else
++                      AC_PATH_TOOL(CONFIG_$1, $2, No, [$PATH])
++              fi
+               if test ! "x${CONFIG_$1}" = xNo; then
+                       $1_INCLUDE=$(${CONFIG_$1} m4_default([$3],[--cflags]))
+-                      $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-I|-I${$1_DIR}|g" -e "s|-std=c99||g")
++                      $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-std=c99||g")
+                       $1_LIB=$(${CONFIG_$1} m4_default([$4],[--libs]))
+-                      $1_LIB=$(echo ${$1_LIB} | $SED -e "s|-L|-L${$1_DIR}|g")
+                       m4_ifval([$5], [
+                               saved_cppflags="${CPPFLAGS}"
diff --git a/net/asterisk/patches/180_build-fix-bininstall-launchd-issue-on-cross-platfrom.patch b/net/asterisk/patches/180_build-fix-bininstall-launchd-issue-on-cross-platfrom.patch
new file mode 100644 (file)
index 0000000..cebaee6
--- /dev/null
@@ -0,0 +1,55 @@
+From: https://issues.asterisk.org/jira/browse/ASTERISK-29905
+
+From d27d75ad8058f6ed35197737b949bac57202dd54 Mon Sep 17 00:00:00 2001
+From: "Sergey V. Lobanov" <sergey@lobanov.in>
+Date: Wed, 9 Feb 2022 01:29:46 +0300
+Subject: [PATCH] build: fix bininstall launchd issue on cross-platfrom build
+
+configure script detects /sbin/launchd, but the result of this
+check is not used in Makefile (bininstall). Makefile also detects
+/sbin/launchd file to decide if it is required to install
+safe_asterisk.
+
+configure script correctly detects cross compile build and sets
+PBX_LAUNCHD=0
+
+In case of building asterisk on MacOS host for Linux target using
+external toolchain (e.g. OpenWrt toolchain), bininstall does not
+install safe_asterisk (due to /sbin/launchd detection in Makefile),
+but it is required on target (Linux).
+
+This patch adds HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@ to makeopts.in to
+use the result of /sbin/launchd detection from configure script in
+Makefile.
+Also this patch uses HAVE_SBIN_LAUNCHD in Makefile (bininstall) to
+decide if it is required to install safe_asterisk.
+
+Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
+---
+ Makefile    | 6 +++---
+ makeopts.in | 2 ++
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -558,9 +558,9 @@ bininstall: _all installdirs $(SUBDIRS_I
+       $(INSTALL) -m 755 contrib/scripts/astversion "$(DESTDIR)$(ASTSBINDIR)/"
+       $(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
+       $(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
+-      if [ ! -f /sbin/launchd ]; then \
+-              ./build_tools/install_subst contrib/scripts/safe_asterisk "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk"; \
+-      fi
++ifneq ($(HAVE_SBIN_LAUNCHD),1)
++      ./build_tools/install_subst contrib/scripts/safe_asterisk "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk";
++endif
+ ifneq ($(DISABLE_XMLDOC),yes)
+       $(INSTALL) -m 644 doc/core-*.xml "$(DESTDIR)$(ASTDATADIR)/documentation"
+--- a/makeopts.in
++++ b/makeopts.in
+@@ -373,3 +373,5 @@ SNDFILE_LIB=@SNDFILE_LIB@
+ BEANSTALK_INCLUDE=@BEANSTALK_INCLUDE@
+ BEANSTALK_LIB=@BEANSTALK_LIB@
++
++HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@