Commit 6e41250d authored by Patrik Stridvall's avatar Patrik Stridvall
Browse files

voice_client: sip_provider: quality: New option, refs #8530

voice_client: sip: qualifyfreq: New option, refs #8530
parent 93cd4c47
......@@ -6,7 +6,7 @@ bindaddr=0.0.0.0
srvlookup=|SRVLOOKUP|
maxexpiry=600
minexpiry=60
qualifyfreq=55
qualifyfreq=|QUALIFYFREQ|
alwaysauthreject=yes
t1min=100
timert1=500
......
......@@ -8,7 +8,7 @@ fromdomain = |FROMDOMAIN|
insecure = port,invite
canreinvite = no
insecure = invite
;qualify = yes
qualify = |QUALIFY|
nat = yes
context = incoming_calls
port=|PORT|
......
......@@ -8,7 +8,7 @@ fromdomain = |FROMDOMAIN|
insecure = port,invite
canreinvite = no
insecure = invite
;qualify = yes
qualify = |QUALIFY|
nat = yes
context = incoming_calls
port=|PORT|
......
......@@ -347,6 +347,7 @@ configure_sip()
local dtmfmode
local blindxfer
local defaultexpiry
local qualifyfreq
local registertimeout
local registerattempts
local registertimeoutbackoff
......@@ -376,6 +377,7 @@ configure_sip()
config_get dtmfmode $1 dtmfmode
config_get blindxfer $1 blindxfer
config_get defaultexpiry $1 defaultexpiry
config_get qualifyfreq $1 qualifyfreq
config_get registertimeout $1 registertimeout
config_get registerattempts $1 registerattempts
config_get registertimeoutbackoff $1 registertimeoutbackoff
......@@ -428,6 +430,11 @@ configure_sip()
sed -i "s/|DEFAULTEXPIRY|/$defaultexpiry/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
......@@ -698,6 +705,7 @@ configure_sip_provider()
local secret
local is_fax
local autoframing
local qualify
local encryption
config_get enabled $1 enabled
......@@ -711,6 +719,7 @@ configure_sip_provider()
config_get secret $1 secret
config_get is_fax $1 is_fax
config_get autoframing $1 autoframing
config_get qualify $1 qualify
config_get transport $1 transport
config_get encryption $1 encryption
......@@ -798,6 +807,13 @@ configure_sip_provider()
fi
sed -i "s/|AUTOFRAMING|/$autoframing/" $WORKDIR/sip_provider.tmp
# 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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment