Integrate Softphone on Vicidial

by sistemettona
Integrate Softphone on Vicidial
Integrate Softphone on Vicidial, WebRTC is an open source solution which provides facility to its users to use web browser as SIP client without using any softphone or IP phone.
1 – setup ssl for web
2 – setup ssl for asterisk
3 – setup vicidial
4 – Use of PBXWebPhone as webrtc phone
Work done on a VPS 4 cores 16 Gb Ram 80 Gb HDD, Vicidiabox 8 with asterisk 13.
Needed to set up separated cert for asterisk in addition to the web cert setup it worked after.
I did those steps in a drafty mode it worked I hope I will optimize it and may be not a day a kind of script to do all those steps.
Don’t forget to replace yourdomain.com with your domain.
Don’t forget the domain not the IP.
1 – Setup ssl for web
First you need to modify the file /etc/certbot/cli.ini. Here’s what you need to modify or verify:
1) Uncomment and make sure the ’email =’ section is set to your valid email. This is what ties the SSL certificates to you for management.
2) Uncomment and put the Fully Qualified Domain Name (FQDN) into the ‘domains =’ section.
3) Uncomment the line ‘agree-tos = True’
4) Uncomment the line ‘renew-by-default = True’
5) Uncomment the ‘authenticator =’ line and change it from standalone to webroot, I.E. ‘authenticator = webroot’
6) Uncomment the ‘webroot-path =a /srv/www/htdocs’ line
7) Comment out the staging ‘server =’ line and uncomment the production ‘server =’ line.
After this, you need to make sure you can successfully generate an SSL certificate before continuing to modify Apache configs. If you modify Apache and cannot get an SSL cert issued then Apache will error and refuse to start. You can run certbot by running ‘certbot certonly –webroot’. In the output it should say that the SSL was successfully issued. Only once you have successfully gotten an SSL cert issued should you continue with the next set of instructions.
Once you have the SSL cert issued, you need to modify the file /etc/apache2/vhosts.d/1111-default-ssl.conf to reflect where the new SSL certs will be. Replace <FQDN> with the actual fully qualified domain name, I.E. http://www.vicibox.com, etc:
1) Change the SSLCertificateFile line to read: SSLCertificateFile /etc/certbot/live/<FQDN>/cert.pem
2) Uncomment and change the SSLCertificateChainFile line to read: SSLCertificateChainFile /etc/certbot/live/<FQDN>/fullchain.pem
3) Change the SSLCertificateKeyFile line to read: SSLCertificateKeyFile /etc/certbot/live/<FQDN>/privkey.pem
4) service apache2 restart
After that, you should be able to go to https://<FQDN> and successfully reach your ViciDial server.
2 – Setup ssl for asterisk:
First check if this line is correct in asterisk.conf : astkeydir => /usr/share/asterisk
And if a folder named key is in.
Then get the script from the asterisk repo :
https://github.com/asterisk/asterisk/bl … t_tls_cert
execute it
./ast_tls_cert -C pbx.example.com -O “My Super Company” -d /usr/share/asterisk/keys
You can then check your /usr/share/asterisk/keys directory to verify the new files were created, as such:
# ls -w 1 /usr/share/asterisk/keys
And you should see:
- asterisk.crt
- asterisk.csr
- asterisk.key
- asterisk.pem
- ca.cfg
- ca.crt
- ca.key
- tmp.cfg
Now go to httpd.conf
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
enablestatic=yes
tlsenable=yes
tlsbindaddr=YOURIP:8089
tlscertfile=/etc/certbot/live/yourdomain.com/cert.pem
tlsprivatekey=/etc/certbot/live/yourdomain.com/privkey.pem
Edit/add those lines to sip.conf :
[general]
transport=udp,ws,wss
avpf=yes
srvlookup=yes
udpbindaddr=0.0.0.0:5060
context=trunkinbound
allowguest=no
allowoverlap=no
realm=YOURDOMAIN.com
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
disallow=all
allow=ulaw
allow=alaw
mohinterpret=default
mohsuggest=default
language=en
3 – Setup vicidial
Go to admin – servers edit server then add to the web socket line:
wss://yourdomaine.com:8089/ws
Then go to admin templates add a new template call it WebRTC Phone then add :
type=friend
host=dynamic
trustrpid=yes
sendrpid=no
qualify=yes
qualifyfreq=600
transport=ws,wss,udp
encryption=yes
avpf=yes
icesupport=yes
rtcp_mux=yes
directmedia=no
disallow=all
allow=ulaw,opus,vp8,h264
nat=yes
directmedia=no
dtlsenable=yes
dtlsverify=no
dtlscertfile=/etc/certbot/live/yourdomain.com/cert.pem
dtlsprivatekey=/etc/certbot/live/yourdomain.com/privkey.pem
dtlssetup=actpass
Go to admin – phone then create a phone using the webrtc template, then go to edit the phone setting go to the line set as webphone to “Y”.
4 – Use of PBXWebPhone as webrtc phone
https://github.com/chornyitaras/PBXWebPhone
Git clone it into your web root folder /srv/www/htdocs/
Then in vicidial go to admin > system settings then to the line :
Default webphone set it to 1
Webphone url:
PBXWebPhone/index.php
Recommended Posts
Dial an outside phone as an extension
December 4, 2019

How to setup WebRTC on Vicibox 8
August 25, 2018

Default Crontab in Vicidial system
August 24, 2018
Comments
Comments are closed.
is this working 100 percent
I am ltonser. I need help. What can i do it?
I like the article