web socket url
I get asked several times a day in the Discord and Skype group chats about how to fix peoples webphones. So this article will be the typical steps I take in order to debug these type of issues.
The first thing I check is is dahdi running? I do this by typing “dahdi_cfg -v” and the output should look like it does below:
You do not want it to say “1 error(s) detected” as shown below:
If it does respond like above, you need to run the command “modprobe dahdi” which will bring it into a state like the first picture which is good, retest to verify with “dahdi_cfg -v”. It could also need to be recompiled if it wasnt installed properly. I will create a separate article for this later this week.
if the above is functioning correctly, the next step is to make sure you see the ports that are needed for websockets to be running. You can do this by typing “ss -ltnu” and you should see ports 8088 and 8089 running like in the picture below:
If the ports are showing correctly here, move on to step 3, if not it means your configuration file for web sockets is not setup correctly. To fix this you need to edit your /etc/asterisk/http.conf file and make sure it looks like below or you can copy this file from my github:
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
enablestatic=yes
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=/etc/letsencrypt/live/DOMAINNAME/fullchain.pem
tlsprivatekey=/etc/letsencrypt/live/DOMAINNAME/privkey.pem
One you update this file, restart Asterisk and check its status for web sockets by typing the follow commands:
asterisk -rx 'core restart now'
/usr/share/astguiclient/ADMIN_keepalive_ALL.pl
asterisk -rx 'http show status'
It should output as shown below:
You can also verify the ports are running like we did in step 2 above.
Now let’s login to the ViciDial admin GUI and make sure the webrtc template is setup with the proper settings. You can copy the template below and refer to the picture to verify yours is done correctly.
type=friend
host=dynamic
context=default
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/letsencrypt/live/DOMAIN/cert.pem
dtlsprivatekey=/etc/letsencrypt/live/DOMAIN/privkey.pem
dtlssetup=actpass
You can get to this area by going down to “Admin” then clicking “templates”
On this last step, go into admin once again and click on “servers” and make sure you have the websocket set in the “Web Socket URL” as shown below in the following format:
wss://DOMAIN:8089/ws
If everything here is setup correctly, your webphones should be working. However there is a couple other possible causes, such as not allowing the mic to access the agents webpage, broken headsets, expired or bad SSL certificates. You can acceess our support channels in the Discord and Skype links at the top of the page for more help, its free. Hopefully this helps solve some of the more common issues.
Chris aka carpenox
How to - Fix "WARNING[2204]: acl.c:890 resolve_first: Unable to lookup 'SERVER_EXTERNAL_IP'" This error is the…
How to - Upgrade any Leap ViciBox install to Leap 15.6 A lot of people…
How to - Set Up Load Balanced Phones and Calling for ViciDial Step 1: Ensure…
How to - Renew your certbot SSL cert when it fails enewing a Let's Encrypt…
Introducing the New and Improved Full White Label Theme for ViciDial 2025 Edition by CyburDial…
How to - Fix ViciBox 11 and 12 errors Step 1 - Fix Apache errors…
This website uses cookies.