How to – install a webphone/viciphone on your Vicidial server

How to – install a webphone/viciphone on your Vicidial server

webrtc installation

How to – install a webphone/viciphone on your Vicidial server

UPDATED: Oct. 10th 2023

I’ve been having a bunch of people ask me to write up an article for installing the Viciphone which I never did before because Viciphone.com has some really great instructions already. But I will create this post with picture and alternative Viciphones for you guys to use. There is also an easier method by using my auto installer on my GitHub at this link: https://github.com/carpenox/vicidial-install-scripts. This will complete all the steps below for CentOS, Alma, Rocky or Ubuntu based systems. Leap or ViciBox users will still have to follow the commands below:

CyburPhone
CyburPhone

Step 1 – Create the SSL certificate to use for your server and viciphone

This is a pretty easy process using certbot which uses letsencrypt. the first thing you have to do is setup your FQDN(Fully qualified domain name) to point to your server. For this demonstration I will show you with namecheap.com registrar services. You want to add an A record as shown below:

This you need to run the following command for certbot:

  • certbot certonly –webroot

You’re output should look as it does below:

Step 2 – Install the SSL certificate in Apache

  • cd /etc/apache
  • nano ssl-global.conf
  • scroll down until you see these two lines and change them to point to your certificate and uncomment the SSLCertificateFIle and SSLCertificateKeyFile as show below:
  • cd vhosts.d/
  • nano 1111-default-ssl.conf
  • Edit this file if you have installed using the Vicibox iso, if this is a scratch install you can skip this step.

Step 3 – Install the SSL certificate in Asterisk

  • cd /etc/asterisk/
  • nano http.conf
  • enter the following information as shown below:

[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
enablestatic=yes
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=/etc/letsencrypt/live/cyburdial.com/cert.pem
tlsprivatekey=/etc/letsencrypt/live/cyburdial.com/privkey.pem

  • service apache restart
  • service asterisk restart
  • run this command to make sure the ports are now open and running: ss -ltnu

Go into Aterisk with “asterisk -r” to verify it and type the command: http show status

Step 4 – Install Viciphone 3 or you can try my version of the Viciphone which I call CyburPhone

I will provide two githubs of which you can choose which version you want to use. The first one is by Mike from Viciphone.com of whom I have the utmost respect for his work on the Viciphone to improve it and update to sip.js-0.20. His link is:

https://github.com/vicimikec/ViciPhone

ViciPhone
ViciPhone

To use this you need to go into your root web directory and then git cloning by running the following commands:

  • cd /srv/www/htdocs for Leap or cd /var/www/html for CentOS, Alma or Rocky
  • git clone https://github.com/ccabrerar/ViciPhone.git

Or if you prefer to use my version which looks like this:

CyburPhone

You can go to my github at:

https://github.com/carpenox/CyburPhone

You should already be in the web directory at this point but to use my webrtc phone clone it with this command:

  • git clone https://github.com/carpenox/CyburPhone.git

Now that you’ve downloaded the webrtc phone you’ve decided to use, you need to set the proper permissions for it, for this article I will demonstrate on my version

  • chmod -R 777 CyburPhone/
  • chown -R wwwrun:www CyburPhone/ – Leap
  • chown -R apache:apache CyburPhone – CentOS, Alma and Rocky

You would do the same thing for the Viciphone by just replacing CyburPhone with ViciPhone

Thats it for the phone installation, now to set what you need in the Vicidial GUI

Step 4 – Setting the webphone in Vicidial

Go into Admin > system settings and scroll down near the bottom:

Set the webphone url to the above or if you’re using the Viciphone use https://yourdomain.com/ViciPhone/viciphone.php

Step 5 – Setting the Web Socket URL on the server

Go to admin > servers > your server

Step 6 – Creating the webrtc template

Go to admin > templates and create a new template

Enter the folllwing into the template and change the domain to yours:

type=friend
host=dynamic
encryption=yes
avpf=yes
icesupport=yes
directmedia=no
transport=wss
force_avp=yes
dtlsenable=yes
dtlsverify=no
dtlscertfile=/etc/letsencrypt/live/cyburdial.com/cert.pem
dtlsprivatekey=/etc/letsencrypt/live/cyburdial.com/privkey.pem
dtlssetup=actpass
rtcp_mux=yes

WebRTC Template

Thats all there is to it, now you are all set to use webrtc technology and do away with annoying softphone configurations and reps always complaining about their phone not registering, lol. I hope this article has helped and if you have any problems, feel free to stop by our live support channel on skype or post a comment here: https://join.skype.com/ujkQ7i5lV78O

I hope this helps

-Chris aka carpenox

Leave a Reply