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