Webphone

Status
Not open for further replies.

KonradSC

Active Member
Mar 10, 2017
166
98
28
Hi All,

I wanted to share my webphone that I'm working on using a modified version of ctxSip. It includes an updated version (0.15.6) of Sipjs which required me to make some adjustments to webphone/phone/scripts/SIP.js/sip.js in order to get hold and mute working correctly. I had issues with one-way audio using the older sipjs version 0.7.8.

Before you attempt to install this make sure you have webrtc working on your system!!
Use this link to test it out: https://collecttix.github.io/ctxSip/

Brief instructions...
1. Make sure you have webrtc up and working. See above.

2. Is webrtc working? Read through this thread if you are stuck. https://www.pbxforums.com/threads/tls-and-webrtc-enablement.146/

3. Download the webphone files and stick them in your /var/www/fusionpbx/apps directory
https://github.com/konradSC/Fusionpbx-Public/tree/master/Apps/webphone

2. Change owner
chown -R www-data:www-data /var/www/fusionpbx/

3. Upgrade Permissions and Menu



A few things...
1. I'm not a JS programmer, so a lot of this was hacked together. I'm open to suggestions on code changes.
2. The wss port is hard coded to 7443. You can adjust that in webphone/phone/index.php. Update the hardcoded variable or use a session variable.
3. There seems to be a two or three second delay in call setup. It could be the ICE or STUN setup. I haven't spent too much time troubleshooting it yet. Let me know if you have a fix.
4. I'm releasing this so the community can test it out. If we get a solid version of this webphone then I'll submit it to the Fusion project.

Thanks,
Konrad
 

Kenny Riley

Active Member
Nov 1, 2017
243
39
28
36
Hi there!

I am trying this and getting an 'Access Denied' error when trying to hit: https://mydomain.fusionpbx.com/app/webphone/webphone.php

I have changed ownership as suggested and have verified the permissions of this folder in /var/www/fusionpbx/app/webphone:
drwxr-xr-x 4 www-data www-data 4096 Apr 22 10:36 webphone

However I'm still not having any luck. I've updated permissions and menu, logged out and back in, etc. What am I missing?
 

Kenny Riley

Active Member
Nov 1, 2017
243
39
28
36
Ahh ignore this, my superadmin permissions were protected and not updating. Thank you Konrad, I'm excited to play with this!
 
  • Like
Reactions: KonradSC

gflow

Active Member
Aug 25, 2019
261
28
28
I've only tested in Master, but perhaps it might work in 4.4.

I just tested it on 4.4 and was getting the following:

Fatal error: Uncaught Error: Class 'token' not found in /var/www/fusionpbx/app/webphone/webphone.php:44 Stack trace: #0 {main} thrown in /var/www/fusionpbx/app/webphone/webphone.php on line 44

Any idea's on how to resolve that?
 
Last edited:

markjcrane

Active Member
Staff member
Jul 22, 2018
447
162
43
49
FusionPBX 4.4 is a previous release that is now insecure and unstable compared to FusionPBX 4.5.
 

gflow

Active Member
Aug 25, 2019
261
28
28
FusionPBX 4.4 is a previous release that is now insecure and unstable compared to FusionPBX 4.5.

Is 4.5 production ready or should is it best to wait for the 4.6 release which I'm guessing isn't too far away.
 

markjcrane

Active Member
Staff member
Jul 22, 2018
447
162
43
49
I would say 4.5. However it depends how much risk you want to tolerate by staying on 4.4.
 

KonradSC

Active Member
Mar 10, 2017
166
98
28
I noticed that this client is using INFO for DTMF. You may want to add something like this to your dialplan in order for DTMF to be processed.

Code:
    <condition field="${sip_user_agent}" expression="SIP.js">
        <action application="set" data="dtmf_type=info"/>
    </condition>
 

killua77

New Member
Sep 14, 2020
1
0
1
27
I found two bugs from console using the webphone
(1) #2
(2) #3

I will post the solution once I found a fix
 

chrisdent

New Member
Oct 14, 2020
1
0
1
44
Hi there!

I am trying this and getting an 'Access Denied' error when trying to hit: https://mydomain.fusionpbx.com/app/webphone/webphone.php

I have changed ownership as suggested and have verified the permissions of this folder in /var/www/fusionpbx/app/webphone:
drwxr-xr-x 4 www-data www-data 4096 Apr 22 10:36 webphone

However I'm still not having any luck. I've updated permissions and menu, logged out and back in, etc. What am I missing?
I'm getting this same error. File and folder permissions ok.

Group Permissions: protected -> false

Can't see it in neither permissions nor menu manager.
 

mydigitalself

Member
Oct 20, 2019
71
7
8
Hi all. Just testing this now. The webphone loads but is not able to send/receive calls. Not seeing anything in the CLI.

I have an SSL cert and TLS is enabled/working. Under SIP status wss is showing as being on the private side IP not public.

Is there a variable to ad such as ext_sip_ip to bind this to the public IP?
 
Last edited:

mydigitalself

Member
Oct 20, 2019
71
7
8
Not sure if this useful, but the delay might be on the side of freeswitch with dtls negotiation. I'm on 1.10.3 and my logs/captures reflect what was reported last November.

 
Status
Not open for further replies.