From f3b7043e6f6faa201a950c0c3379499efb20be15 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 6 Jan 2016 12:15:14 +0000 Subject: [PATCH] SIP onion domain --- src/freedombone | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/freedombone b/src/freedombone index ee5f5140..8cef98f3 100755 --- a/src/freedombone +++ b/src/freedombone @@ -355,6 +355,7 @@ VOIP_PORT=64738 SIP_SERVER_PASSWORD= SIP_PORT=5060 VOIP_ONION_PORT=8095 +SIP_ONION_PORT=8096 # Location of VoIP database and configuration VOIP_DATABASE="mumble-server.sqlite" @@ -9597,6 +9598,16 @@ function install_sip { groupadd sipwitch 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 if ! grep -q $"SIP Server" /home/$MY_USERNAME/README; then @@ -9604,6 +9615,7 @@ function install_sip { echo '' >> /home/$MY_USERNAME/README echo $'SIP Server' >> /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 extension: 201" >> /home/$MY_USERNAME/README echo $"SIP server password: $SIP_SERVER_PASSWORD" >> /home/$MY_USERNAME/README