How to install webphone in vicidial Scratch Install
Topic: webphone/webrtc/viciphone in vicidial scratch install
A step by step guide to install the webphone/webrtc/viciphone in vicidial scratch install in centos with Free SSL from lets encrypt and Free domain from Noip DynDNS. You can use your own SSL and domain using this article. If you are using vicibox and want to install viciphone follow this guide vicibox webphone guide
What is Vicidial and Viciphone(webphone)?
Vicidial is the most popular Open-Source Contact Center Solution in the world, that incorporates a predictive dialer to enable the blended handling of inbound / outbound calls alongside inbound emails and customer website chat.
VICIphone is an Open Source Project. VICIphone was built with WebRTC Technology. WebRTC provides browsers and mobile applications with Real-Time Communications (RTC) capabilities. This enables your users to use VICIphone without having to install or configure anything. Asterisk 13 and later can handle WebRTC connections
Viciphone Pre-requisites
Before proceeding with installation steps , we must have below pre-requisites ready
- Centos 7 installed either full DVD or minimal OS installation
- Console access to the server or SSH access via putty .
- Root access or other user with necessary permission
- Internet access in the server to download software's.
- Basic knowledge of linux commands like vi or Nano editor, copy ,paste.
Installation Steps:
Step-1:Vicidial Scratch Install
I have a separate blog article for the vicidial scratch install, follow the instruction mentioned in the below link, followed to that proceed with Step 2 for the webpphone configuration
Step-2:webphone Pre-Requisites details
- asterisk 13 and above version
- vicidial server should be accessed via FQDN (domain name)
- Vicidial server should be accessed via SSL ie: https://domain/
- Trusted SSL certificate and key from vendor like Letsencrypt, Norton etc.
note: if you are one like me to use all free, I use no-ip for a free domain and Letsencrypt for free SSL certificates.
Refer my article for using vicidial with self signed certificate.
Follow the below steps to configure webrtc with no-ip domain, Letsencrypt SSL certificate and Viciphone/webrtc/webphone.
Step-3:Registering Free Domain from LetsEncrypt
NoIP: No-IP which is a dynamic DNS provider for paid and free services.
NoIP offering free dynamic DNS and URL redirection. Users were able to create a free sub-domain under a few domains owned by No-IP
- goto https://www.noip.com
- Signup a new account
- Create your own domain from there existing top level domain
- for eg: striker24x7.ddns.net
- Next Modify your domain and enter your server public ip
LetsEncrypt is a Certificate Authority (CA) that provides free certificates for Transport Layer Security (TLS) encryption, thereby enabling encrypted HTTPS on web servers. It simplifies the process of creation, validation, signing, installation, and renewal of certificates by providing a software client that automates most of the steps—Certbot.
To generate the Letsencrypt SSL certificate follow below steps.
Step 4-1: Installing Certbot and Dependencies
yum install certbot python2-certbot-apache mod_ssl
Step 4-2: Generate SSL certificate with Certbot Client
certbot certonly --webroot-path /var/www/html -d striker24x7.ddns.net --register-unsafely-without-email
<note: replace striker24x7.ddns.net with your domain>
<enter 3 for webroot location.
How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Apache Web Server plugin (apache)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 3
- Once the process is successful ,you will get the successful message and the certificates and key will be saved in below mentioned folder
- note: enter you domain after /live folder
cd /etc/letsencrypt/live/striker24x7.ddns.net/lscert.pem chain.pem fullchain.pem privkey.pem README
Step-5:Apache configuration to support SSL/Https
You need to point your new ssl certificate and key path in the ssl.conf so that your server will be accessed via new Letsencrypt certificates.
SSLCertificateFile
SSLCertificateKeyFile
SSLCertificateFile /etc/letsencrypt/live/striker24x7.ddns.net/cert.pemSSLCertificateKeyFile /etc/letsencrypt/live/striker24x7.ddns.net/privkey.pemSSLCertificateChainFile /etc/letsencrypt/live/striker24x7.ddns.net/fullchain.pem
Also access you dialer in a browser and make sure it is accessible via https and without any ssl error eg : https://striker24x7.dyndns.com
if Yes you are good to go next steps.
edit httpd.confvi /etc/httpd/conf/httpd.conf
<VirtualHost *:80>ServerName striker24x7.ddns.netDocumentRoot /var/www/htmlErrorLog /var/www/error.logCustomLog /var/www/requests.log combinedRewriteEngine onRewriteCond %{SERVER_NAME} =striker24x7.ddns.netRewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]</VirtualHost>
systemctl restart httpd
By default the vicidial recordings links are update with http extension in DB,
in order to update the recording link to https extension you need edit your cronjob.
just add --HTTPS label in AST_CRON_audio_2_compress.pl followed my --MP3 as shown below
crontab -e
/usr/share/astguiclient/AST_CRON_audio_2_compress.pl --MP3 --HTTPS
Step-6:Asterisk Configuration To support webrtc
In order to asterisk support webrtc you need to edit below files
enabled=yesbindaddr=0.0.0.0bindport=8088tlsenable=yestlsbindaddr=0.0.0.0:8089tlscertfile=/etc/letsencrypt/live/striker24x7.ddns.net/cert.pemtlsprivatekey=/etc/letsencrypt/live/striker24x7.ddns.net/privkey.pem
load => res_http_websocket.so
asterisk -rx 'http show status'
[root@centos~]# asterisk -rx "http show status"HTTP Server Status:Prefix:Server: Asterisk/13.29.2Server Enabled and Bound to 0.0.0.0:8088HTTPS Server Enabled and Bound to 0.0.0.0:8089Enabled URI's:/httpstatus => Asterisk HTTP General Status/phoneprov/... => Asterisk HTTP Phone Provisioning Tool/static/... => Asterisk HTTP Static Delivery/ari/... => Asterisk RESTful API/ws => Asterisk HTTP WebSocketEnabled Redirects:None.
rtpstart=10000rtpend=20000icesupport=yesstunaddr=stun.counterpath.com:3478
stunaddr=stun.counterpath.com:3478stunrefresh = 30
asterisk -vvvvvr
asterisk-CLI> stun show status
Hostname Port Period Retries Status ExternAddr ExternPort
stun.counterpath.com 3478 30 3 OK xx.xxx.xx.xx 32997
centos-s-4vcpu-8gb-intel-nyc1-01*CLI>
realm=your-domain or publicipexternaddr=your-publicip
Step 7: Downloading and installing Viciphone
you can download the official viciphone or enhanced version from below links, i prefer the enhanced version.
official link : https://viciphone.comgithublink : https://github.com/vicimikec/ViciPhone.git
- download the file to a temp directory
cd /var/tmpgit clone https://github.com/ccabrerar/ViciPhone.git
- copy the file to vicidial agc folder and provide permission
cd /var/tmpcp -r ViciPhone /var/www/html/agc/viciphonechmod -R 755 /var/www/html/agc/viciphone
- Set webphone as default phone .
ADMIN > SYSTEM SETTINGS >
Default Webphone: 1
Entering the Webphone URL
Navigate in Admin
type=friendhost=dynamicencryption=yesavpf=yesicesupport=yesdirectmedia=notransport=wssforce_avp=yesdtlsenable=yesdtlsverify=nodtlscertfile=/etc/letsencrypt/live/striker24x7.ddns.net/cert.pemdtlsprivatekey=/etc/letsencrypt/live/striker24x7.ddns.net/privkey.pemdtlssetup=actpassrtcp_mux=yes
Set As Webphone: YWebphone Dialpad:YWebphone Auto-Answer: YWebphone Dialbox: YWebphone Mute: YWebphone Volume:Y
cd /var/www/html/agccp options-example.php options.php
cd /var/www/html/agcvi +64 /var/www/html/agc/options.phpsearch for below line and enter 10$webphone_call_seconds = '10';
Conclusion
- you need regularly update your noip domain either manualy in there website or you can use the noip update client to automate the same
- Let’s Encrypt certificates are valid for 90 days, but it’s recommended that you renew the certificates every 60 , you can renew by running the command "certbot renew --dry-run"
- either run manually or automate via cronjob
- access your dialer via browser http://serverip/vicidial/admin.php
- login with username 6666 and password 1234
- The initial setup will force to change password, Timezone,GTM offset
- once done logout
- relogin with 6666 and new password.
- modify the user 6666 and set 1 for all the admin interface options
- Modify the ADMIN>SERVERS>Asterisk Version : 13.X
- ADMIN>SERVERS>Local GMT: select to GMT
- press submit two times, to rebuild conf files.
- Modify-ADMIN>SYSTEMSETTINGS>ActiveVoicemailServer: serverip
- ADMIN>SYSTEM SETTINGS> Default Local GMT: select to GMT
There are screens on:2307.ASTVDauto (Detached)2147.astshell20140626063212 (Detached)2105.ASTVDadapt (Detached)2304.ASTlisten (Detached)2301.ASTsend (Detached)2153.asterisk (Detached)2109.ASTconf3way (Detached)2107.ASTfastlog (Detached)2310.ASTVDremote (Detached)2298.ASTupdate (Detached)10 Sockets in /var/run/screen/S-root.
Calls are ringing outbound but not connecting to agents what is the issue ... please resolve the issue . i am using goautodial
This comment has been removed by a blog administrator.
Very useful information, thank you for sharing this post. To support the WebRTC app development, I would like to share that according to Market Study Report, the global WebRTC market’s size is predicted to reach $16,570.5 million in 2026. The turning point for WebRTC came in 2017 when Microsoft Edge and iOS Safari 11 began supporting it. Nowadays, the top WebRTC development companies are growing rapidly with the increasing demand of the technology.