Compare commits

...

14 Commits

Author SHA1 Message Date
Patrik Stridvall
9e3ea79880 voice_client: sip: qualifyfreq: New option 2016-03-21 14:14:17 +01:00
Patrik Stridvall
32423fabf8 voice_client: sip: maxexpiry: New option 2016-03-21 14:14:17 +01:00
Patrik Stridvall
ed5c67d119 voice_client: sip: minexpiry: New option 2016-03-21 14:14:17 +01:00
Patrik Stridvall
49f2794da4 voice_client: sip: rtpkeepalive: New option 2016-03-21 14:14:17 +01:00
Patrik Stridvall
550249f7de voice_client: sip_provider: quality: New option 2016-03-21 14:14:17 +01:00
Patrik Stridvall
b7f53e4171 voice_client: sip_provider: nat: New option 2016-03-21 14:14:17 +01:00
Patrik Stridvall
01c029f575 voice_client: asterisk: Use find to avoid matching directories (eliminates warning) 2016-03-21 14:14:17 +01:00
Patrik Stridvall
009f1fc76a asterisk-1.8.x-mod: Makefile: Added place holders for more easy configuring of make options DEBUG and OPTIMIZE 2016-03-21 14:08:05 +01:00
Patrik Stridvall
8564f68eff asterisk-1.8.x-mod: Makefile: Add comment for easy enabling of configure option --enable-coverage if CONFIG_DEBUG=y 2016-03-21 14:08:05 +01:00
Patrik Stridvall
53e806b9cd asterisk-1.8.x-mod: Makefile: Add comments for easy enabling of compiler flags LOADABLE_MODULES and STATIC_BUILD if CONFIG_DEBUG=y 2016-03-21 14:08:05 +01:00
Patrik Stridvall
c98b37ad71 asterisk-1.8.x-mod: Makefile: Enable compiler flags BETTER_BACKTRACES, DEBUG_THREADS, DONT_OPTIMIZE and MALLOC_DEBUG if CONFIG_DEBUG=y 2016-03-21 14:08:05 +01:00
Patrik Stridvall
d1e663523a asterisk-1.8.x-mod: Makefile: Turn off compiler flag LOW_MEMORY if CONFIG_DEBUG=y 2016-03-21 14:08:05 +01:00
Patrik Stridvall
5e1bcfe193 asterisk-1.8.x-mod: Makefile: Turn on Asterisk development mode if CONFIG_DEBUG=y 2016-03-21 14:08:05 +01:00
Patrik Stridvall
c9592f672d asterisk-1.8.x-mod: Makefile: Use menuselect when configuring if required 2016-03-21 14:08:05 +01:00
5 changed files with 92 additions and 12 deletions

View File

@@ -395,7 +395,35 @@ CONFIGURE_ARGS+= \
EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
ifeq ($(CONFIG_DEBUG),y)
CONFIGURE_ARGS+= \
--enable-dev-mode
MENUSELECT_ARGS+= \
--enable BETTER_BACKTRACES
MENUSELECT_ARGS+= \
--enable DEBUG_THREADS
MENUSELECT_ARGS+= \
--enable DONT_OPTIMIZE
MENUSELECT_ARGS+= \
--enable MALLOC_DEBUG
#MENUSELECT_ARGS+= \
# --disable LOADABLE_MODULES
#MENUSELECT_ARGS+= \
# --enable LOW_MEMORY
#MENUSELECT_ARGS+= \
# --enable STATIC_BUILD
DEBUG:=
OPTIMIZE:=
#CONFIGURE_ARGS+= \
# --enable-coverage
else
MENUSELECT_ARGS+= \
--enable LOW_MEMORY
DEBUG:=
OPTIMIZE:=
endif
define Build/Prepare
$(call Build/Prepare/Default)
@@ -407,6 +435,10 @@ endef
define Build/Configure
-rm $(PKG_BUILD_DIR)/menuselect.makeopts
$(call Build/Configure/Default,,$(SITE_VARS))
if test -n "$(MENUSELECT_ARGS)" ; then \
$(MAKE) -C "$(PKG_BUILD_DIR)" menuselect.makeopts ; \
(cd $(PKG_BUILD_DIR) && ./menuselect/menuselect $(MENUSELECT_ARGS)) ; \
fi
endef
define Build/Compile
@@ -414,7 +446,7 @@ define Build/Compile
include/asterisk/version.h \
include/asterisk/buildopts.h defaults.h \
makeopts.embed_rules
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
ASTCFLAGS="$(EXTRA_CFLAGS)" \
ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
$(MAKE) -C "$(PKG_BUILD_DIR)" \
ASTVARLIBDIR="/usr/lib/asterisk" \
@@ -422,8 +454,8 @@ define Build/Compile
ASTKEYDIR="/usr/lib/asterisk" \
ASTDBDIR="/usr/lib/asterisk" \
NOISY_BUILD="1" \
DEBUG="" \
OPTIMIZE="" \
DEBUG="$(DEBUG)" \
OPTIMIZE="$(OPTIMIZE)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install samples
endef

View File

@@ -4,15 +4,15 @@ allowoverlap=yes
allowtransfer=yes
bindaddr=0.0.0.0
srvlookup=|SRVLOOKUP|
maxexpiry=600
minexpiry=60
qualifyfreq=55
maxexpiry=|MAXEXPIRY|
minexpiry=|MINEXPIRY|
qualifyfreq=|QUALIFYFREQ|
alwaysauthreject=yes
t1min=100
timert1=500
timerb=16000
rtptimeout=1800
rtpkeepalive=30
rtpkeepalive=|RTPKEEPALIVE|
rtpholdtimeout=1800
localnet=192.168.0.0/16
localnet=10.0.0.0/8

View File

@@ -8,8 +8,8 @@ fromdomain = |FROMDOMAIN|
insecure = port,invite
canreinvite = no
insecure = invite
;qualify = yes
nat = yes
qualify = |QUALIFY|
nat = |NAT|
context = incoming_calls
port=|PORT|
transport = |TRANSPORT|

View File

@@ -8,8 +8,8 @@ fromdomain = |FROMDOMAIN|
insecure = port,invite
canreinvite = no
insecure = invite
;qualify = yes
nat = yes
qualify = |QUALIFY|
nat = |NAT|
context = incoming_calls
port=|PORT|
transport = |TRANSPORT|

View File

@@ -110,7 +110,7 @@ compare_configs_and_copy_changed()
{
# First, compute md5sums of the config files in $WORKDIR.
cd $WORKDIR/
md5sum * > $MD5SUMSFILE
find . -type f -name \* | sed 's%^\./%%' | xargs md5sum > $MD5SUMSFILE
# Now, check the files in $ASTERISKDIR against the md5sums.
cd $ASTERISKDIR/
@@ -346,11 +346,15 @@ configure_sip()
local rtcpinterval
local dtmfmode
local blindxfer
local minexpiry
local defaultexpiry
local maxexpiry
local qualifyfreq
local registertimeout
local registerattempts
local registertimeoutbackoff
local registerattemptsbackoff
local rtpkeepalive
local remotehold
local tos_sip
local tos_audio
@@ -375,7 +379,10 @@ configure_sip()
config_get rtcpinterval $1 rtcpinterval
config_get dtmfmode $1 dtmfmode
config_get blindxfer $1 blindxfer
config_get minexpiry $1 minexpiry
config_get defaultexpiry $1 defaultexpiry
config_get maxexpiry $1 maxexpiry
config_get qualifyfreq $1 qualifyfreq
config_get registertimeout $1 registertimeout
config_get registerattempts $1 registerattempts
config_get registertimeoutbackoff $1 registertimeoutbackoff
@@ -383,6 +390,7 @@ configure_sip()
config_get register403timeout $1 register403timeout
config_get register503timeout $1 register503timeout
config_get remotehold $1 remotehold
config_get rtpkeepalive $1 rtpkeepalive
config_get tos_sip $1 tos_sip
config_get tos_audio $1 tos_audio
config_get tos_video $1 tos_video
@@ -422,12 +430,29 @@ configure_sip()
sed -i "s/|BINDPORT|/$bindport/g" $WORKDIR/sip.tmp
fi
if [ -z "$minexpiry" ] ; then
sed -i "s/|MINEXPIRY|/60/g" $WORKDIR/sip.tmp
else
sed -i "s/|MINEXPIRY|/$minexpiry/g" $WORKDIR/sip.tmp
fi
if [ -z "$defaultexpiry" ] ; then
sed -i "s/|DEFAULTEXPIRY|/300/g" $WORKDIR/sip.tmp
else
sed -i "s/|DEFAULTEXPIRY|/$defaultexpiry/g" $WORKDIR/sip.tmp
fi
if [ -z "$maxexpiry" ] ; then
sed -i "s/|MAXEXPIRY|/600/g" $WORKDIR/sip.tmp
else
sed -i "s/|MAXEXPIRY|/$maxexpiry/g" $WORKDIR/sip.tmp
fi
if [ -z "$qualifyfreq" ] ; then
qualifyfreq=55
fi
sed -i "s/|QUALIFYFREQ|/$qualifyfreq/" $WORKDIR/sip.tmp
if [ -z "$registertimeout" ] ; then
sed -i "s/registertimeout=|REGISTERTIMEOUT|/;registertimeout=/g" $WORKDIR/sip.tmp
else
@@ -470,6 +495,11 @@ configure_sip()
sed -i "s/|REGISTERATTEMPTSBACKOFF|/$registerattemptsbackoff/g" $WORKDIR/sip.tmp
fi
if [ -z "$rtpkeepalive" ] ; then
rtpkeepalive=30
fi
sed -i "s/|RTPKEEPALIVE|/$rtpkeepalive/g" $WORKDIR/sip.tmp
if [ -z "$register403timeout" ] ; then
sed -i "s/register403timeout=|REGISTER403TIMEOUT|/;register403timeout=/g" $WORKDIR/sip.tmp
else
@@ -698,6 +728,8 @@ configure_sip_provider()
local secret
local is_fax
local autoframing
local nat
local qualify
local encryption
config_get enabled $1 enabled
@@ -711,6 +743,8 @@ configure_sip_provider()
config_get secret $1 secret
config_get is_fax $1 is_fax
config_get autoframing $1 autoframing
config_get nat $1 nat
config_get qualify $1 qualify
config_get transport $1 transport
config_get encryption $1 encryption
@@ -798,6 +832,20 @@ configure_sip_provider()
fi
sed -i "s/|AUTOFRAMING|/$autoframing/" $WORKDIR/sip_provider.tmp
# NAT
if [ -z "$nat" ] ; then
sed -i "s/|NAT|/yes/" $WORKDIR/sip_provider.tmp
else
sed -i "s/|NAT|/$nat/" $WORKDIR/sip_provider.tmp
fi
# Qualify
if [ -z "$qualify" ] ; then
sed -i 's/\(^.*\)|QUALIFY|\(.*$\)/;\1yes\2/' $WORKDIR/sip_provider.tmp
else
sed -i "s/|QUALIFY|/$qualify/" $WORKDIR/sip_provider.tmp
fi
# Set registered extension so that incoming calls match the correct peer
sed -i "s/|CONTACT_USER|/$user/g" $WORKDIR/sip_provider.tmp