SIP onion domain

This commit is contained in:
Bob Mottram 2016-01-06 12:15:14 +00:00
parent b6e9dfae9d
commit f3b7043e6f
1 changed files with 12 additions and 0 deletions

View File

@ -355,6 +355,7 @@ VOIP_PORT=64738
SIP_SERVER_PASSWORD= SIP_SERVER_PASSWORD=
SIP_PORT=5060 SIP_PORT=5060
VOIP_ONION_PORT=8095 VOIP_ONION_PORT=8095
SIP_ONION_PORT=8096
# Location of VoIP database and configuration # Location of VoIP database and configuration
VOIP_DATABASE="mumble-server.sqlite" VOIP_DATABASE="mumble-server.sqlite"
@ -9597,6 +9598,16 @@ function install_sip {
groupadd sipwitch groupadd sipwitch
usermod -aG sipwitch $MY_USERNAME usermod -aG sipwitch $MY_USERNAME
SIP_ONION_HOSTNAME=
if [[ $ONION_ONLY == "no" ]]; then
SIP_ONION_HOSTNAME=$(add_onion_service sip ${SIP_PORT} ${SIP_ONION_PORT})
else
SIP_ONION_HOSTNAME=$(add_onion_service sip ${SIP_PORT} ${SIP_PORT})
fi
if ! grep -q $"SIP onion domain" $COMPLETION_FILE; then
echo "SIP onion domain:$SIP_ONION_HOSTNAME" >> $COMPLETION_FILE
fi
systemctl restart sipwitch systemctl restart sipwitch
if ! grep -q $"SIP Server" /home/$MY_USERNAME/README; then if ! grep -q $"SIP Server" /home/$MY_USERNAME/README; then
@ -9604,6 +9615,7 @@ function install_sip {
echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README
echo $'SIP Server' >> /home/$MY_USERNAME/README echo $'SIP Server' >> /home/$MY_USERNAME/README
echo '==========' >> /home/$MY_USERNAME/README echo '==========' >> /home/$MY_USERNAME/README
echo $"SIP onion_domain: $SIP_ONION_HOSTNAME" >> /home/$MY_USERNAME/README
echo $"SIP server username: $MY_USERNAME" >> /home/$MY_USERNAME/README echo $"SIP server username: $MY_USERNAME" >> /home/$MY_USERNAME/README
echo $"SIP server extension: 201" >> /home/$MY_USERNAME/README echo $"SIP server extension: 201" >> /home/$MY_USERNAME/README
echo $"SIP server password: $SIP_SERVER_PASSWORD" >> /home/$MY_USERNAME/README echo $"SIP server password: $SIP_SERVER_PASSWORD" >> /home/$MY_USERNAME/README