New SIP client, SMS and Fax apps

Since many Nextcloud users showed interest for a SIP client app, here it is: SIP Trip Phone. It’s in fact a browser phone for audio calls. It can be connected directly to the SIP provider, if the provider allows direct connections from WebRTC applications, or it can be connected to the provider via Asterisk. You can install Asterisk on your VPS, alongside Nextcloud, then connect Asterisk to a SIP provider like Telnyx or Localphone, so that you can use a real phone number acquired from the SIP provider, to make/receive phone calls to/from any phone number in the world.

If you want to send/receive SMS messages and faxes in Nextcloud, please check SMS Relentless and Pax Fax respectively.

If in addition to audio phone calls, you need video calls, video conferences and text chat, you can use Roundpin, but this is a standalone application, independent from Nextcloud.

Detailed documentation is offered for all these apps. There is no affiliation between us and the SIP providers mentioned in the documentation. We chose them only for their low prices and good quality services. In fact, SIP Trip Phone can be used with any SIP provider, if that provider allows external Asterisk servers to connect to them or if it allows direct connections from WebRTC applications.

1 Like

We recommend Nginx and we describe in the documentation how to configure Nginx to serve Nextcloud and the 3 applications mentioned above. However, if anyone is interested to use Apache instead of Nginx to serve Nextcloud and SIP Trip Phone, SMS Relentless and Pax Fax, here is how to do it:

  • Create the configuration file:
nano /etc/apache2/sites-available/nextcloud.conf
  • Add the following content inside this file:
<VirtualHost *:80>

        ServerName cloud.example.com
        Redirect permanent / https://cloud.example.com/

</VirtualHost>


<VirtualHost *:443>

        DocumentRoot /var/www/cloud.example.com
        ServerName cloud.example.com

        Protocols h2 http/1.1

        ProxyRequests off
        SSLProxyEngine on
        ProxyPreserveHost on

        Header always set Strict-Transport-Security "max-age=63072000;"

        SSLEngine on
        SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
        SSLUseStapling on
        SSLHonorCipherOrder on
        SSLCipherSuite      ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384

        SSLCertificateFile       /etc/letsencrypt/live/cloud.example.com/cert.pem
        SSLCertificateKeyFile    /etc/letsencrypt/live/cloud.example.com/privkey.pem
        SSLCertificateChainFile  /etc/letsencrypt/live/cloud.example.com/chain.pem
        SSLOpenSSLConfCmd DHParameters  /etc/nginx/ssl/dhparam.pem

        <Directory /var/www/cloud.example.com/>

             Require all granted
             Options FollowSymlinks MultiViews
             AllowOverride All

             <IfModule mod_dav.c>
                Dav off
             </IfModule>

             SetEnv HOME /var/www/cloud.example.com
             SetEnv HTTP_HOME /var/www/cloud.example.com
             Satisfy Any
        </Directory>

        <FilesMatch \.php$>
             SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost"
        </FilesMatch>

        <Directory /var/www/cloud.example.com/apps/sip_trip_phone/phone/>
             DirectoryIndex index.html
        </Directory>

	<Location /var/www/cloud.example.com/apps/sip_trip_phone/lib/>

             ProxyPass http://0.0.0.0:8088/ws/
             ProxyPassReverse http://0.0.0.0:8088/ws/
             Order allow,deny
             Allow from all

             RequestHeader  set X-Real-IP $remote_addr
             RequestHeader  set Host $http_host
             RequestHeader  set X-Forwarded-For $proxy_add_x_forwarded_for
             
             RequestHeader  set Upgrade $http_upgrade
             RequestHeader  set Connection "upgrade"

	</Location>

        LogLevel warn
        ErrorLog /var/log/sites/cloud.example.com/error.log
        CustomLog /var/log/sites/cloud.example.com/access.log combined

</VirtualHost>

SSLStaplingCache shmcb:/tmp/stapling_cache(128000)

Replace example.com with your domain.

  • Create the directory to store the access log and the error log:
mkdir -p /var/log/sites/cloud.example.com
  • Enable the newly created configuration file:
a2ensite nextcloud.conf
  • Enable the necessary Apache modules:
a2enmod rewrite headers env dir mime setenvif ssl proxy proxy_fcgi
  • Restart Apache:
systemctl restart apache2
  • Configure logrotate to rotate the newly created log files:
nano /etc/logrotate.d/apache2
  • Add the following block at the bottom of the file:
/var/log/sites/cloud.example.com/access.log /var/log/sites/cloud.example.com/error.log {
    missingok
    rotate 10
    compress
    delaycompress
    notifempty
    create 0640 www-data adm
    size 2M
    sharedscripts
    prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then
            run-parts /etc/logrotate.d/httpd-prerotate
        fi
    endscript
    postrotate
        if pgrep -f ^/usr/sbin/apache2 > /dev/null; then
            invoke-rc.d apache2 reload 2>&1 | logger -t apache2.logrotate
        fi
    endscript
}

Replace example.com with your domain.