Archives July 2021

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

How to – Scratch install the dynportal on CentOs, Rocky or Alma Linux

how-to-scratch-install-the-dynportal-on-centos/

How to – Scratch install the dynportal on CentOs, Rocky, or Alma Linux

This article will go over the steps to Scratch install the dynportal on a scratch CentOs, Rocky or Alma Linux Vicidial box that normally comes with the ISO. I have created the files you need and host them on one of my sites for download.

Step 1 – Download the necessary files

You will need 4 files to get this working on your server that you can download below

yum install -y firewalld
cd /home
wget https://dialer.one/dynportal.zip
wget https://dialer.one/firewall.zip
wget https://dialer.one/aggregate
wget https://dialer.one/VB-firewall

Step 2 – Move and unzip the files

You can copy and paste the following

  • mkdir -p /var/www/vhosts/dynportal
  • mv /home/dynportal.zip /var/www/vhosts/dynportal/
  • mv /home/firewall.zip /etc/firewalld/
  • cd /var/www/vhosts/dynportal/
  • unzip dynportal.zip
  • cd etc/httpd/conf.d/
  • mv viciportal-ssl.conf viciportal.conf /etc/httpd/conf.d/
  • cd /etc/firewalld/
  • unzip -o firewall.zip
  • mv /home/aggregate /usr/bin/
  • chmod +x /usr/bin/aggregate
  • mv /home/VB-firewall /usr/bin/
  • chmod +x /usr/bin/VB-firewall
Unzip your files

Step 3 – Add your SSL cert to dynportal-ssl.conf and location for redirect is defaults.inc.php

You need to edit your dynportal-ssl.conf file in /etc/httpd/conf.d/

nano /etc/httpd/conf.d/viciportal-ssl.conf

change the location to your SSL cert files

Scratch install the dynportal on CentOs
Dynportal SSL config

nano /var/www/vhosts/dynportal/inc/defaults.inc.php

Step 4 – add entry to crontab

Add the following lines to the bottom of your crontab by typing: crontab -e

### ViciBox integrated firewall, by default just load the VoIP Black list and reload it every 4 hours
### You can lock everyone out of your server if you set this wrong, so understand what you are doing!!!
@reboot /usr/bin/VB-firewall --whitelist=ViciWhite --dynamic --quiet
* * * * * /usr/bin/VB-firewall --whitelist=ViciWhite --dynamic --quiet --flush

Step 5 – Add ports to firewall and apache

Now use firewall-cmd and open port 446 on the firewall for public zone like such:

firewall-offline-cmd --add-port=446/tcp --zone=public --permanent

And edit the apache conf file to add the port to it:

  • nano /etc/httpd/conf/httpd.conf
  • Add this line: Listen 446

Step 6 – Restart services

  • service firewalld restart
  • service httpd restart
  • systemctl enable firewalld

That’s it, now go to http://yourdomain.com:446/valid8.php and you should see the following:

Dynportal Interface
Dynportal Interface

Why doesn’t my webphone/Viciphone work anymore?

webrtc installation

Why doesn’t my webphone/Viciphone work anymore?

UPDATE: October of 2023

There is a new issue since the evolution of the ViciPhone version 3 and CyburPhone version 3.2.5 that has been happening and I will go over how to solve it for everyone. The new feature in ViciDial that uses a settings container called “viciphone settings” has a setting by default that has the webphone dial its own extension which then gets you a result of a sound file telling you that “The number you have dialed is not in service”. The solution for this is simple, just need to change one line in the settings container as described below:

  1. Go into your Vicidial admin GUI
  2. Click on Admin and then Settings Containers
  3. Change the line that says “dialRegExten” from a 1 to a 0 as shown below

This will now fix your webphone. If you have any questions feel free to comment below or join our live support on Skype: https://join.skype.com/ujkQ7i5lV78O

2021 Issue Solution:

This article is to help those of you having problems with viciphone lately. It seems that googles stun server has reached end of life and no longer works correctly. You need to change the stun server to a different one. Here is a list of public stun servers:

Free Public STUN servers

https://gist.github.com/mondain/b0ec1cf5f60ae726202e

How do I change my STUN server for viciphone?

Good question, you need to edit your rtp.conf file for asterisk.

  • cd /etc/asterisk
  • nano rtp.conf
  • scroll down to the very bottom and change it to one on the list above

That’s it, youre done. If you have any problems or questions feel free to comment below.

I hope this helps.

-Chris aka Nox