Code Monkey home page Code Monkey logo

gmaruzz / saraphone Goto Github PK

View Code? Open in Web Editor NEW
141.0 11.0 68.0 606 KB

SaraPhone is an open source SIP WebRTC phone, complete with HotDesking, Redial, BLFs, MWI, DND, PhoneBook, Hold, Mute, Notifications. SaraPhone is fully integrated with FusionPBX. Based on SIP.js, SaraPhone works with all WebRTC compliant servers: FreeSWITCH, Asterisk, OpenSIPS, Kamailio, etc. SaraPhone gets its name from Giovanni's wife, Sara.

License: Mozilla Public License 2.0

PHP 12.86% CSS 1.10% JavaScript 78.71% HTML 6.81% Lua 0.52%
sip webrtc phone freeswitch asterisk opensips kamailio janus fusionpbx mwi

saraphone's People

Contributors

frytimo avatar gmaruzz avatar greenbea avatar nandy1925 avatar rbetancor avatar seven1240 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

saraphone's Issues

Remember Registration Information

Hi Giovanni,

I installed to https://xswitch.cn/sara/ it looks great, however, I don't use fusionpbx and it seems it cannot remember the account info I filled. Each time I refresh it goes back to the default.

I'd like to ask is that a missing feature or would you like to add it, I generally remember it in localStorage, see the verto based demo: https://git.xswitch.cn/xswitch/xcc-examples/src/branch/master/webrtc/es6/demo.js

Would you like to add it or accept a PR?

Cheers,
Seven.

Voicemail Bug

Good Morning

i had an issue with my fusionpbx that when a user called in to listen to VM free-switch was playing back for adavnced options press 5, this was before the greeting that said you have x new voicemails...... we noticed in the CLI that as soon as the voicemail gets activated the sara dialplan got invoked, so i just disabled all the dialplans from sara and my VM works regular now

Menu disappears

My fusionpbx version is as below

Version 4.5.27
Git Information Branch: master Commit: 1049b37e6be7a77ed0e862ce3b12116852db95e4 Origin: https://github.com/fusionpbx/fusionpbx Status: Your branch is up to date with 'origin/master'. +173 days ago
Project Path /var/www/fusionpbx
Switch Version 1.10.3 (32bit)
PHP Version 7.3.31-1~deb10u1

When I follow the instructions for saraphone

2 Login as superadmin to your FusionPBX Web GUI,

Menu->Advanced->Upgrade, check:

    App Defaults
    Menu Defaults
    Permission Defaults

then click "Execute"

The menu on the top disappears, I have to close the browser and relogin to get it back

Do not register and back to login

I am trying to work with Asterisk (not FusionPBX) and when I click Login a black screen flashes then goes back to the login screen. I have configured the User, Password, Name, SIP Domain, Wss Proxy, Port. Details work using another webRTC dialer (sipml5).
Wondering if you can provide any guidance on what I maybe missing?
Many thanks :)

Failed opening required 'resources/require.php'

I tried saraphone according to "How to Install SaraPhone on WSS SIP Server + Web Server" and got this:

[Sat Apr 18 13:58:19.697412 2020] [php7:warn] [pid 22243] [client 192.168.43.82:37986] PHP Warning:  require_once(resources/require.php): failed to open stream: No such file or directory in /var/www/saraphone/contacts.php on line 30, referer: https://test.tutpro.com/saraphone/saraphone.html
[Sat Apr 18 13:58:19.697469 2020] [php7:error] [pid 22243] [client 192.168.43.82:37986] PHP Fatal error:  require_once(): Failed opening required 'resources/require.php' (include_path='.:/usr/share/php:/var/www') in /var/www/saraphone/contacts.php on line 30, referer: https://test.tutpro.com/saraphone/saraphone.html

Such a file (require.php) does not exist.

Inbound Call - No Audio (except for firefox)

Outbound everything works fine in all my tested browsers.

Inbound calls ie. extension 100 (yealink handset) calls 200 (Saraphone).
Saraphone 200 can hear the audio from Yealink 100
Yealink 100 can NOT hear audio from Saraphone 200.

This is an issue on Google Chrome (latest version), Opera (latest version), Microsoft Edge.

Tested on Windows and Mac. Same thing.

However with Firefox, all works perfectly.

Bugs and feature improvements

i noticed there is a FS patch which is based on old code so doesnt apply to master, secondly if you enter a incorrect login it doesnt indicate if its incorrect, thirdly would it be possible to add code to activate proximity sensor and activate the earpiece rather than speakerphone on a mobile.

I tried the dialer with my FS server using wss and that works fine provided DTLS isnt blocked in a country but for some odd reason i start getting choppy audio after a while and then it totally stops whereas SRTP works flawless with the same FS instance along with TLS. i tried the opentokrtc demo and it works flawless which also runs on webrtc so no idea whats causing the choppy audio

Halted at Choose which phone

as soon as I open saraphone it shows me the display page with a drop-down list which has no options to select from, the user has extensions and those extensions are connected to devices but nothing is being displayed here
image
image
image
image
image

Multiple Profiles Support in FusionPBX

I have followed your instructions but the phone cannot login. I think the issue has something to do with Multiple internal SIP profiles?

What should I do?

Error when loading Saraphone: Cannot use object of type database as array

I have followed the installation instructions and getting the error below when loading the saraphone application (that's all I see nothing else loads except for that error).

My system has the following installed:

FusionPBX 4.4.11
Freeswitch 1.8.6
PHP 7.1.33

Fatal error: Uncaught Error: Cannot use object of type database as array in /var/www/fusionpbx/app/saraphone/saraphone.php:77 Stack trace: #0 {main} thrown in /var/www/fusionpbx/app/saraphone/saraphone.php on line 77

Unable to load webphone - Stuck at "Please Wait" in chrome

Hi Giovanni,

I have downloaded SaraPhone and tried to load up in Chrome and it appears to be stuck at "Please wait" Any clue as to why this issue?

We would like to test your webrtc for our pbx platform based on 2600hz kazoo. Let us know if that is supported.

Thanks
Rabbani

image

488: Incompatible SDP

Tried to demo to a customer and got the above error in the soft-phone. What causes this?

Call to undefined method database

Sir,
I am using Fusionpbx on Centos7 and mariadb for the database. When I login to saraphone under Apps I am getting the below error. Is this something to do with database connection ?

Fatal error: Call to undefined method database::select() in /var/www/html/app/saraphone/saraphone.php on line 57

Cross Domain Ext

Hi

i just installed the phone and i set up a user that maps to Ext 103 and i have a yealink deivce assigned

when i log in to the saraphone it it will pull in the drop down all 103 from all domains

saraphone

Dial string gets reset when a new incoming call arrives

If you are dialing a number to do an outbound call and during that dialing you receive a new incoming call, the dialing string input get reset.

Input dial string should not be touched and let the user to decide if continue dialing or answer de incoming call.

Red bar up top with "NETWORK DISCONNECTED" etc

Went back through and followed the guide three times making sure I didn't skip any steps sans the MWI subscribe line.

I am able to select a phone and click choose which phone, but then I get the page warning that it shouldn't be there for more than half a second.

login page keeps loading

in test it in my domain and it worked fine

i gave it to one customer to test and by him the login page will keep trying to login and reload

i checked in the page code it has the right
username
password
domain name
pot number

i tired it in chrome and explorer

any idea what to test

Hold, XTrans, etc. buttons did not work during call

I see the DTMF codes on the FS CLI, but they do not do anything.

I saw that the .lua script have some calls to bind_digit_action ... but I don't saw that lua script been executed during the call stablishement or the SaraPhone loading.

Maybe some missing instruction on the install docs?

no display name on incoming calls throws exception?

First of all, great work Giovanni !! Many thanks for a very useful tool.

I noticed that this line assumes all incoming calls will have a display name in the From header:

var txt = document.createTextNode(s.remoteIdentity.displayName.toString());

When I sent this INVITE for an incoming call (which I believe is valid) I saw the app throw an exception:

020-04-30 20:25:40.652968 send 1220 bytes to wss/[xxx]:48492 at 20:25:40.652872:
INVITE sip:[email protected];transport=wss SIP/2.0^M
Via: SIP/2.0/WSS xxx.xxx.xxx:4433;branch=z9hG4bKS3XBSj9gBaX6g^M
Max-Forwards: 70^M
From: <sip:[email protected]:48492>;tag=KD1r1Xa3t7e1F^M
To: <sip:[email protected]:48492>^M
Call-ID: 99dd1694-05c3-1239-27a8-06241ca032e2^M
CSeq: 19585378 INVITE^M
Contact: <sip:172.31.32.10:4433;transport=wss>^M
Content-Type: application/sdp^M
Content-Length: 757^M
X-CID: 998db3d8-05c3-1239-be86-000000000000^M

REFER transfer support

Does SaraPhone have REFER transfer support? If not, then is this planned for the future?

sip 183 session progress no audio

most of my upstream gateways send a 183 session progress and send media of custom ringtone which FS passes onto saraphone but the media doesnt start unless the connected is signalled, anyway to get around this in FS or the dialer?

Location match in apache2 wss proxy

I edited saraphone.html with my login and server info. When I then press Login, nothing happens except I'm asked for microphone permission.

Browser console has this:

Sat Apr 18 2020 15:28:12 GMT+0300 (Eastern European Summer Time) | sip.ua | next connection attempt in 2 seconds sip.js:2900:10
GEThttps://test.tutpro.com/saraphone/saraphone.html
[HTTP/1.1 200 OK 467ms]

Sat Apr 18 2020 15:28:12 GMT+0300 (Eastern European Summer Time) | sip.ua | user requested closure... sip.js:2900:10
Sat Apr 18 2020 15:28:12 GMT+0300 (Eastern European Summer Time) | sip.ua | closing registerContext sip.js:2900:10
Sat Apr 18 2020 15:28:12 GMT+0300 (Eastern European Summer Time) | sip.transport | closing WebSocket wss://192.168.43.82:443 sip.js:2900:10
GEThttps://test.tutpro.com/saraphone/css/bootstrap.min.css
[HTTP/1.1 200 OK 8ms]

GEThttps://test.tutpro.com/saraphone/css/style2.css
[HTTP/1.1 200 OK 165ms]

GEThttps://test.tutpro.com/saraphone/js/adapter.js
[HTTP/1.1 200 OK 39ms]

GEThttps://test.tutpro.com/saraphone/js/jquery.min.js
[HTTP/1.1 200 OK 277ms]

GEThttps://test.tutpro.com/saraphone/js/sip.js
[HTTP/1.1 200 OK 339ms]

GEThttps://test.tutpro.com/saraphone/saraphone.js?random=5e95b0591ba90
[HTTP/1.1 200 OK 262ms]

GEThttps://test.tutpro.com/saraphone/wav/0.wav
[HTTP/1.1 206 Partial Content 0ms]

GEThttps://test.tutpro.com/saraphone/wav/1.wav
[HTTP/1.1 206 Partial Content 0ms]

GEThttps://test.tutpro.com/saraphone/wav/2.wav
[HTTP/1.1 206 Partial Content 0ms]

GEThttps://test.tutpro.com/saraphone/wav/3.wav
[HTTP/1.1 206 Partial Content 1ms]

GEThttps://test.tutpro.com/saraphone/wav/4.wav
[HTTP/1.1 206 Partial Content 1ms]

GEThttps://test.tutpro.com/saraphone/wav/5.wav
[HTTP/1.1 206 Partial Content 0ms]

GEThttps://test.tutpro.com/saraphone/wav/6.wav
[HTTP/1.1 206 Partial Content 0ms]

GEThttps://test.tutpro.com/saraphone/wav/7.wav
[HTTP/1.1 206 Partial Content 1ms]

GEThttps://test.tutpro.com/saraphone/wav/8.wav
[HTTP/1.1 206 Partial Content 0ms]

GEThttps://test.tutpro.com/saraphone/wav/9.wav
[HTTP/1.1 206 Partial Content 1ms]

GEThttps://test.tutpro.com/saraphone/wav/star.wav
[HTTP/1.1 206 Partial Content 0ms]

GEThttps://test.tutpro.com/saraphone/wav/hash.wav
[HTTP/1.1 206 Partial Content 1ms]

GEThttps://test.tutpro.com/saraphone/wav/silence.wav
[HTTP/1.1 206 Partial Content 1ms]

GEThttps://test.tutpro.com/saraphone/mp3/ring.mp3
[HTTP/1.1 206 Partial Content 11ms]

The doctor is in saraphone.js:1004:13
Is something troubling you? saraphone.js:1005:13
GEThttps://test.tutpro.com/saraphone/favicon.ico

wss proxy uri with path

Looks like it is currently not possible to have path in wss proxy URI. I tried by adding path to WSS Proxy Port:

443/wss/

but connection to proxy was not established.

I tested with JsSIP and connection worked fine. So it is not an issue with my Apache WSS proxy configuration.

I don't know if this issue is a bug or feature request.

If feature request, then instead of WSS Proxy Name and Port, it would be better to allow user to configure the whole URI.

FusionPBX 5.1 PHP8 Saraphone Not Work

I iam try use saraphone in my fusionpbx 5.1 and not work, when i try use in my older instance the fusionpbx 4.X its work.

Now i tested in other instance that use FusionPBX 5.1 but use PHP 7.4 and its OK, i try new installations in Debian 12 that use PHP 8.1 by default and not work, its possible any change to work with PHP 8 in Saraphone?

When i try use saraphone with PHP 8 i receive only screen to select device but not is possivel select or change any configuration.

FEATURE REQUEST: SDES

the calls work fine with FS over wss after patch applied manually but i noticed when dialing from certain countries where DTLS should work and isnt being blocked based on tests using the opentokrtc demo, i still get choppy audio after a minute into the call and then no audio at all. I believe jssip library supports SDES so would it be possible to add an option to use that on SRTP as the works flawless

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.