summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c2
-rw-r--r--configs/samples/codecs.conf.sample54
-rw-r--r--main/netsock.c2
-rw-r--r--third-party/pjproject/Makefile10
-rw-r--r--third-party/pjproject/Makefile.rules4
-rwxr-xr-xthird-party/pjproject/apply_patches10
-rw-r--r--third-party/pjproject/patches/0000-remove-third-party.patch33
7 files changed, 77 insertions, 38 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1f3a2f470..4c742cefe 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -21585,7 +21585,7 @@ static char *sip_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_
ast_cli(a->fd, " Sub. max duration: %d secs\n", max_subexpiry);
ast_cli(a->fd, " Outbound reg. timeout: %d secs\n", global_reg_timeout);
ast_cli(a->fd, " Outbound reg. attempts: %d\n", global_regattempts_max);
- ast_cli(a->fd, " Outbound reg. retry 403:%d\n", global_reg_retry_403);
+ ast_cli(a->fd, " Outbound reg. retry 403:%s\n", AST_CLI_YESNO(global_reg_retry_403));
ast_cli(a->fd, " Notify ringing state: %s\n", AST_CLI_YESNO(sip_cfg.notifyringing));
if (sip_cfg.notifyringing) {
ast_cli(a->fd, " Include CID: %s%s\n",
diff --git a/configs/samples/codecs.conf.sample b/configs/samples/codecs.conf.sample
index 9b5738577..63d0352a8 100644
--- a/configs/samples/codecs.conf.sample
+++ b/configs/samples/codecs.conf.sample
@@ -151,3 +151,57 @@ packetloss_percentage=10;
;[celt32]
;type=celt
;samprate=32000
+
+;============================ OPUS Section Options ============================
+;
+;[opus]
+;type= ; Must be of type "opus" (default: "")
+;packet_loss= ; Encoder's packet loss percentage. Can be any number between 0
+ ; and 100, inclusive. A higher value results in more loss
+ ; resistance. (default: 0)
+;complexity= ; Encoder's computational complexity. Can be any number between 0
+ ; and 10, inclusive. Note, 10 equals the highest complexity.
+ ; (default: 10)
+;max_bandwitdth= ; Encoder's maximum bandwidth allowed. Sets an upper bandwidth
+ ; bound on the encoder. Can be any of the following: narrow,
+ ; medium, wide, super_wide, full. (default: full)
+;signal= ; Encoder's signal type. Aids in mode selection on the encoder: Can
+ ; be any of the following: auto, voice, music. (default: auto)
+;application= ; Encoder's application type. Can be any of the following: voip,
+ ; audio, low_delay. (default: voip)
+;max_playback_rate= ; Override the maximum playback rate in the offer's SDP.
+ ; Any value between 8000 and 48000 (inclusive) is valid,
+ ; however typically it should match one of the usual opus
+ ; bandwidths. A value of "sdp" is also allowed. When set
+ ; to "sdp" then the value from the offer's SDP is used.
+ ; (default: "sdp")
+;bitrate= ; Override the maximum average bitrate in the offer's SDP. Any value
+ ; between 500 and 512000 is valid. The following values are also
+ ; allowed: auto, max, sdp. When set to "sdp" then the value from
+ ; the offer's sdp is used. (default: "sdp")
+;cbr= ; Override the constant bit rate parameter in the offer's SDP. A value of
+ ; 0/false/no represents a variable bit rate whereas 1/true/yes represents
+ ; a constant bit rate. A value of "sdp" is also allowed. When set to "sdp"
+ ; then the value from the offer's sdp is used. (default: "sdp")
+;fec= ; Override the use inband fec parameter in the offer's SDP. A value of
+ ; 0/false/no represents disabled whereas 1/true/yes represents enabled.
+ ; A value of "sdp" is also allowed. When set to "sdp" then the value from
+ ; the offer's sdp is used. (default: "sdp")
+;dtx= ; Override the use dtx parameter in the offer's SDP. A value of 0/false/no
+ ; represents disabled whereas 1/true/yes represents enabled. A value of
+ ; "sdp" is also allowed. When set to "sdp" then the value from the offer's
+ ; sdp is used. (default: "sdp")
+
+;=============================== OPUS Examples ================================
+;
+;[opus]
+;type=opus
+;max_playback_rate=8000 ; Limit the maximum playback rate on the encoder
+;fec=no ; Force no inband fec on the encoder (i.e don't use what's on the SDP)
+
+;[myopus]
+;type=opus
+;max_bandwidth=wide ; Maximum encoded bandwidth set to wide band (0-8000 Hz
+; ; audio bandwidth at 16Khz sample rate)
+;cbr=yes ; Force a constant bit rate (i.e don't use what's on the SDP)
+
diff --git a/main/netsock.c b/main/netsock.c
index c11f14a89..d16cf113f 100644
--- a/main/netsock.c
+++ b/main/netsock.c
@@ -33,7 +33,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-#ifndef __linux__
+#if !defined (__linux__) && !defined (__GNU__)
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Darwin__) || defined(__GLIBC__)
#include <net/if_dl.h>
#endif
diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile
index 07a6c9cd6..209e681cd 100644
--- a/third-party/pjproject/Makefile
+++ b/third-party/pjproject/Makefile
@@ -125,11 +125,17 @@ libpj%.a: .rebuild_needed source/build.mak
$(CMD_PREFIX) $(MAKE) -C $(dir $(shell dirname $@))/build $(@F) $(REALLY_QUIET)
-@rm -rf .rebuild_needed
+# pjsua needs resample and g711 to successfully run the testsuite
+libresample%.a: .rebuild_needed source/build.mak
+ $(ECHO_PREFIX) Compiling lib $(@F)
+ $(CMD_PREFIX) $(MAKE) -C $(dir $(shell dirname $@))/build/resample all $(REALLY_QUIET)
+ -@rm -rf .rebuild_needed
+
# We need to compile pjlib, then pjlib-util, then the rest
# so we separate them out and create the dependencies
PJLIB_LIB_FILES = $(foreach lib,$(PJ_LIB_FILES),$(if $(findstring libpj-,$(lib)),$(lib),))
PJLIB_UTIL_LIB_FILES = $(foreach lib,$(PJ_LIB_FILES),$(if $(findstring libpjlib-util,$(lib)),$(lib),))
-PJSIP_LIB_FILES = $(filter-out $(PJLIB_LIB_FILES) $(PJLIB_UTIL_LIB_FILES),$(PJ_LIB_FILES))
+PJSIP_LIB_FILES = $(filter-out $(PJLIB_LIB_FILES) $(PJLIB_UTIL_LIB_FILES) $(APP_THIRD_PARTY_LIB_FILES),$(PJ_LIB_FILES))
ALL_LIB_FILES = $(PJLIB_LIB_FILES) $(PJLIB_UTIL_LIB_FILES) $(PJSIP_LIB_FILES)
$(PJLIB_UTIL_LIB_FILES): $(PJLIB_LIB_FILES)
@@ -152,7 +158,7 @@ source/pjsip-apps/lib/libasterisk_malloc_debug.a: source/pjsip-apps/lib/asterisk
$(CMD_PREFIX) ar qs $@ $< >/dev/null 2>&1
$(apps): APP = $(filter pj%,$(subst -, ,$(notdir $@)))
-$(apps): pjproject.symbols
+$(apps): pjproject.symbols $(APP_THIRD_PARTY_LIB_FILES)
$(ECHO_PREFIX) Compiling $(APP)
$(CMD_PREFIX) +$(MAKE) -C source/pjsip-apps/build $(filter pj%,$(subst -, ,$(notdir $@))) $(REALLY_QUIET)
diff --git a/third-party/pjproject/Makefile.rules b/third-party/pjproject/Makefile.rules
index 62d5a4653..531a259d3 100644
--- a/third-party/pjproject/Makefile.rules
+++ b/third-party/pjproject/Makefile.rules
@@ -9,7 +9,6 @@ PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject \
--disable-gsm-codec \
--disable-ilbc-codec \
--disable-l16-codec \
- --disable-g711-codec \
--disable-g722-codec \
--disable-g7221-codec \
--disable-opencore-amr \
@@ -23,7 +22,6 @@ PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject \
--disable-oss \
--disable-sdl \
--disable-libyuv \
- --disable-resample \
--disable-ffmpeg \
--disable-openh264 \
--disable-ipp \
@@ -31,5 +29,5 @@ PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject \
--without-external-srtp
ifeq ($(shell uname -s),Linux)
- PJPROJECT_CONFIG_OPTS += --enable-epoll
+ PJPROJECT_CONFIG_OPTS += --enable-epoll
endif
diff --git a/third-party/pjproject/apply_patches b/third-party/pjproject/apply_patches
index 69a0ad0c1..5f9fde283 100755
--- a/third-party/pjproject/apply_patches
+++ b/third-party/pjproject/apply_patches
@@ -28,16 +28,6 @@ if [ ! "$(ls -A $patchdir/*.patch 2>/dev/null)" ] ; then
exit 0
fi
-if patch --dry-run </dev/null >/dev/null 2>&1 ; then
- DRY_RUN=--dry-run
-else
- DRY_RUN=-C
-fi
-
-for patchfile in $patchdir/*.patch ; do
- ${PATCH} -d $sourcedir -p1 -s -r- -f -N $DRY_RUN -i "$patchfile" || (echo "Patchfile $(basename $patchfile) failed to apply" >&2 ; exit 1) || exit 1
-done
-
for patchfile in "$patchdir"/*.patch ; do
[ -z $quiet ] && echo "Applying patch $(basename $patchfile)"
${PATCH} -d "$sourcedir" -p1 -s -i "$patchfile" || exit 1
diff --git a/third-party/pjproject/patches/0000-remove-third-party.patch b/third-party/pjproject/patches/0000-remove-third-party.patch
index aca7f0198..2e3bb5f9f 100644
--- a/third-party/pjproject/patches/0000-remove-third-party.patch
+++ b/third-party/pjproject/patches/0000-remove-third-party.patch
@@ -1,5 +1,5 @@
diff --git a/build.mak.in b/build.mak.in
-index 802211c..006d887 100644
+index 802211c..25fd05e 100644
--- a/build.mak.in
+++ b/build.mak.in
@@ -1,4 +1,3 @@
@@ -7,7 +7,7 @@ index 802211c..006d887 100644
include $(PJDIR)/version.mak
export PJ_DIR := $(PJDIR)
-@@ -9,7 +9,7 @@ export HOST_NAME := unix
+@@ -9,7 +8,7 @@ export HOST_NAME := unix
export CC_NAME := gcc
export TARGET_NAME := @target@
export CROSS_COMPILE := @ac_cross_compile@
@@ -16,7 +16,7 @@ index 802211c..006d887 100644
export SHLIB_SUFFIX := @ac_shlib_suffix@
export prefix := @prefix@
-@@ -28,114 +28,6 @@ export APP_THIRD_PARTY_EXT :=
+@@ -28,19 +27,6 @@ export APP_THIRD_PARTY_EXT :=
export APP_THIRD_PARTY_LIBS :=
export APP_THIRD_PARTY_LIB_FILES :=
@@ -33,22 +33,13 @@ index 802211c..006d887 100644
-endif
-endif
-
--ifeq (@ac_pjmedia_resample@,libresample)
--APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample-$(LIB_SUFFIX)
--ifeq ($(PJ_SHARED_LIBRARIES),)
--ifeq (@ac_resample_dll@,1)
--export PJ_RESAMPLE_DLL := 1
--APP_THIRD_PARTY_LIBS += -lresample
--APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX)
--else
--APP_THIRD_PARTY_LIBS += -lresample-$(TARGET_NAME)
--endif
--else
--APP_THIRD_PARTY_LIBS += -lresample
--APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX)
--endif
--endif
--
+ ifeq (@ac_pjmedia_resample@,libresample)
+ APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample-$(LIB_SUFFIX)
+ ifeq ($(PJ_SHARED_LIBRARIES),)
+@@ -57,85 +43,6 @@ APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFI
+ endif
+ endif
+
-ifneq (@ac_no_gsm_codec@,1)
-ifeq (@ac_external_gsm@,1)
-# External GSM library
@@ -131,7 +122,7 @@ index 802211c..006d887 100644
# Additional flags
@ac_build_mak_vars@
-@@ -149,7 +41,7 @@ SDL_CFLAGS = @ac_sdl_cflags@
+@@ -149,7 +56,7 @@ SDL_CFLAGS = @ac_sdl_cflags@
SDL_LDFLAGS = @ac_sdl_ldflags@
# FFMPEG flags
@@ -140,7 +131,7 @@ index 802211c..006d887 100644
FFMPEG_LDFLAGS = @ac_ffmpeg_ldflags@
# Video4Linux2
-@@ -157,7 +49,7 @@ V4L2_CFLAGS = @ac_v4l2_cflags@
+@@ -157,7 +64,7 @@ V4L2_CFLAGS = @ac_v4l2_cflags@
V4L2_LDFLAGS = @ac_v4l2_ldflags@
# OPENH264 flags