{"id":18882421,"url":"https://github.com/gmaruzz/saraphone","last_synced_at":"2025-04-07T13:06:32.395Z","repository":{"id":44760378,"uuid":"255640488","full_name":"gmaruzz/saraphone","owner":"gmaruzz","description":"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. ","archived":false,"fork":false,"pushed_at":"2024-06-24T15:24:48.000Z","size":612,"stargazers_count":168,"open_issues_count":11,"forks_count":76,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-31T11:03:55.939Z","etag":null,"topics":["asterisk","blf","freeswitch","fusionpbx","janus","jssip","kamailio","mwi","open","opensips","opensource","phone","sip","sip-js","sipjs","source","voip","webphone","webrtc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmaruzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-14T14:59:30.000Z","updated_at":"2025-03-24T08:53:43.000Z","dependencies_parsed_at":"2024-12-27T23:36:16.145Z","dependency_job_id":"843f882a-8ce3-404c-b6fe-9a75f89a75fb","html_url":"https://github.com/gmaruzz/saraphone","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmaruzz%2Fsaraphone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmaruzz%2Fsaraphone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmaruzz%2Fsaraphone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmaruzz%2Fsaraphone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmaruzz","download_url":"https://codeload.github.com/gmaruzz/saraphone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657277,"owners_count":20974344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asterisk","blf","freeswitch","fusionpbx","janus","jssip","kamailio","mwi","open","opensips","opensource","phone","sip","sip-js","sipjs","source","voip","webphone","webrtc"],"created_at":"2024-11-08T06:58:18.485Z","updated_at":"2025-04-07T13:06:32.373Z","avatar_url":"https://github.com/gmaruzz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"What is SaraPhone?\n--------------------------------------\n\nSaraPhone is an open source bare bone SIP WebRTC office phone (no video), complete with most features real companies want to use in real world: HotDesking, Redial, BLFs, MWI, DND, PhoneBook, Hold, Transfer, Mute, Attended Transfer, Notifications, running on all Browsers both on Desktop and SmartPhone.\n\nSaraPhone is fully integrated with FusionPBX, the full-featured domain based multi-tenant PBX and voice switch for FreeSwitch.\n\nBased on SIP.js, SaraPhone works with all WebRTC compliant SIP proxies, gateways, and servers (FreeSWITCH, Asterisk, OpenSIPS, Kamailio, etc).\n\nInitial author is Giovanni Maruzzelli, and SaraPhone gets its name from Giovanni's wife, Sara.\n\n\nIn addition to providing all of the usual DeskPhone functionality, SaraPhone got:\n\n- Desktop Notification for Incoming Calls\n- Live MWI update\n- Real Time BLFs status update\n- BLF click to call\n- Caller Name and Number Display\n- Call Error Cause Display\n- AutoAnswer\n- Network Disconnect Reload\n- Show and Set Caller-ID (incoming-outbound)\n\nSoftware Requirements\n--------------------------------------\n\n- FusionPBX\n- or\n- WSS SIP Server (FreeSWITCH, Asterisk, OpenSIPS, Kamailio, etc) + Web Server (Apache, Nginx, etc)\n\nHow to Install SaraPhone on FusionPBX\n----------------------------\n\nYOU **REALLY** NEED TO DO **ALL** FOLLOWING STEPS\n\n**ALL THOSE BORING FOLLOWING STEPS**\n\n**SAD, BUT TRUE**\n\n**1 As root do the following:**\n\n```\ncd /var/www/fusionpbx/app;\ngit clone https://github.com/gmaruzz/saraphone.git;\nchown -R www-data:www-data saraphone;\n```\n\n**2 Login as superadmin to your FusionPBX Web GUI,**\n\nMenu-\u003eAdvanced-\u003eUpgrade, check:\n- App Defaults\n- Menu Defaults\n- Permission Defaults\n\nthen click \"Execute\"\n\n**3 Then, go to**\n\nMenu-\u003eAdvanced-\u003eDefault Settings\nSaraPhone settings:\n- wss_proxy SIP external IP Address of FusionPBX server\n\nthen click \"Reload\"\n\n**4 Go to Menu-\u003eAdvanced-\u003eSip Profiles**\n\nclick on \"internal\", then:\n- liberal-dtmf true true\n- send-message-query-on-register true true\n- send-presence-on-register true true\n- wss-binding :7443 true\n\n**5 Go to menu-\u003estatus-\u003esipstatus**\n\n- click fluchcache\n- click reloadxml\n\n\n**6 You NEED well working letsencrypt SSL certificates:**\n\n```\ncd /usr/src/fusionpbx-install.sh/debian/resources/\n./letsencrypt.sh\n\ncat /etc/dehydrated/certs/XXX/fullchain.pem /etc/dehydrated/certs/XXX/privkey.pem \u003e /etc/freeswitch/tls/wss.pem\n\n```\n**7 then restart FreeSWITCH:**\n\n```\nsystemctl restart freeswitch;\n```\n\n**8 For well working MWI:**\n\nedit /etc/freeswitch/autoload_configs/lua.conf.xml, uncomment line:\n```\n\u003cparam name=\"startup-script\" value=\"app/voicemail/resources/scripts/mwi_subscribe.lua\"/\u003e\n```\n\n**9 then restart FreeSWITCH:**\n\n```\nsystemctl restart freeswitch;\n```\n\n**10 check USERs, EXTENSIONs, DEVICEs**\n\nUser **MUST** have one or more **EXTENSION** assigned to her, and at least one of such extensions **MUST** be assigned to a **DEVICE** (you can create a fake device making up the macaddress).\n\nSaraPhone will get its config from the **DEVICE** so, you want to configure the BLFs in the DEVICE page (menu-\u003eAccounts-\u003eDevices).\n\nSaraphone will not care about \"Port\" and \"Transport\" settings in the DEVICE page. Saraphone will always use WSS transport, and the port defined in menu-\u003eAdvanced-\u003eDefault Settings-\u003esaraphone.\n\n(optional: for best looking results, in the menu-\u003eAccounts-\u003eExtensions extension page, set effective-caller-id-name)\n\n\n**11 Logout from FusionPBX and login as a normal user, you will find:**\n\nMenu-\u003eApps-\u003eSaraPhone\n\n\n**12 Desktop Notifications of incoming calls**\n\nTo allow for desktop notifications of incoming calls, click on \"Allow Notification\" on the bottom of SaraPhone web page\n\n\n**13 Upgrading After Install**\n\n```\ncd /var/www/fusionpbx/app/saraphone;\ngit stash; git pull; git stash apply\n```\noften, and you will get latest features/bigfixes, and maintain your own modifications\n\n\nHow to Install SaraPhone on WSS SIP Server + Web Server\n----------------------------\n\n* As root go into HTML directory of your webserver, and:\n\n```\ngit clone https://github.com/gmaruzz/saraphone.git;\nchown -R www-data:www-data saraphone;\n```\nthen edit saraphone.html to preset WSS proxy address and port, and the SIP domain.\n\nYou can then access SaraPhone at:\n```\nhttps://your.webserver.address/saraphone/saraphone.html\n```\n\u003c!--\nWSS BLFs on FreeSWITCH\n----------------------------\nAt this moment (2020-04-06) BLFs in FreeSWITCH are not working on SIP via WSS (bug filed: https://github.com/signalwire/freeswitch/issues/398 ).\n\nWhile the problem is getting fixed in an elegant way upstream, you can apply the quick and dirty patch included into SaraPhone sources (saraphone/patch.diff) and recompile FreeSWITCH mod_sofia.\n```\ncd /usr/src/freeswitch;\ngit apply patch.diff;\nmake mod_sofia-install;\nsystemctl restart freeswitch;\n```\n--\u003e\n\n\nDON'T: Self -Signed SSL certs\n----------------------------\n\nDON'T: To authorize self-signed certificates (only for test) for WSS, from your browser (works on Opera and FireFox, Chrome does not accept self signed WSS at all) go to:\n```\nhttps://your.fusionpbx.address:7443/\n```\nand force the browser to accept (I understand the risks, etc)\n\n\nFAQs, PROBLEMs, Troubleshooting\n----------------------------\n\n**Q:** There is a sensible delay in establishing audio after call is connected\n\n**A:** Check if you have two network interfaces (eg: Ethernet and VPN on PCs, or WiFi and Data on Cells) active at same moment. ICE gathering is confused by two Net interfaces. Disable \"Data always on\" on smartphones, so you will have either WiFi OR Data at each single moment.\n\n**Q:** In FusionPBX, I want to click on VoiceMail/Messages button and go straight to my messages, no login no password\n\n**A:** Into saraphone.js, edit the lines:\n```\n$(\"#checkvmailbtn\").click(function() {\n    $(\"#extstarbtn\").click();\n    $(\"#ext9btn\").click();\n    $(\"#ext8btn\").click();\n    $(\"#callbtn\").click();\n});\n\n```\nto become:\n```\n$(\"#checkvmailbtn\").click(function() {\n    $(\"#extstarbtn\").click();\n    $(\"#ext9btn\").click();\n    $(\"#ext7btn\").click();\n    $(\"#callbtn\").click();\n});\n\n```\n\neg, it will call *97 instead of *98\n\nthen edit the dialplan extension named vmain_user (*97) and add:\n\n```\naction set voicemail_authorized=true\n```\n\nat order 37 (before app.lua voicemail.lua)\n\n**Q:** I want to use SaraPhone with multiple \"Internel\" SIP Profiles in FusionPBX\n\n**A:** You must edit BOTH your SIP Profiles AND your Domains:\n\nSIP Profiles:\n\nmenu-\u003eAdvanced-\u003eSip Profiles\n\nfor each \"internal\" Sip Profile:\n\nwss-binding :74XX True\n\n#note the colon in the port value, sao is colon then portnumber, XX is a number\n\nDOMAINS:\n\nmenu-\u003eadvanced-\u003edomains\n\nclick on a domainname\n\nfor each domainname\n\ngo at bottom right of page\n\nclick on Add (domain setting)\n\nCategory: saraphone\n\nSubcategory: wss_port\n\nType: text\n\nValue: the port number (no colon) you assigned to the profile of this domain\n\nEnabled: True\n\n\n\nSCREENSHOTS !\n----------------------------\n\n![saraphone_01](https://user-images.githubusercontent.com/331862/79241436-5758d600-7e73-11ea-92ce-7522db44fe63.jpg)\n![saraphone_02](https://user-images.githubusercontent.com/331862/79241434-5627a900-7e73-11ea-8196-549379e603ec.jpg)\n![saraphone_03](https://user-images.githubusercontent.com/331862/79241430-558f1280-7e73-11ea-9994-c8b9d48a587d.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmaruzz%2Fsaraphone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmaruzz%2Fsaraphone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmaruzz%2Fsaraphone/lists"}