{"id":16359099,"url":"https://github.com/innovateasterisk/browser-phone","last_synced_at":"2025-04-07T05:06:58.847Z","repository":{"id":38096165,"uuid":"249676765","full_name":"InnovateAsterisk/Browser-Phone","owner":"InnovateAsterisk","description":"A fully featured browser based WebRTC SIP phone for Asterisk","archived":false,"fork":false,"pushed_at":"2024-09-21T17:01:07.000Z","size":17091,"stargazers_count":501,"open_issues_count":309,"forks_count":246,"subscribers_count":38,"default_branch":"master","last_synced_at":"2024-10-12T02:07:52.188Z","etag":null,"topics":["asterisk","asterisk-dialplan","asterisk-pbx","asterisk-server","asterisk-webui","audio-calls","browser-phone","free","open-source","sip","text-chat","video-calls","voip","web-sockets","webrtc"],"latest_commit_sha":null,"homepage":"https://www.innovateasterisk.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InnovateAsterisk.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-03-24T10:22:10.000Z","updated_at":"2024-10-08T11:59:54.000Z","dependencies_parsed_at":"2023-12-16T13:54:20.380Z","dependency_job_id":"e96e21aa-0d38-4af6-8aa1-b077e3c1a746","html_url":"https://github.com/InnovateAsterisk/Browser-Phone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InnovateAsterisk%2FBrowser-Phone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InnovateAsterisk%2FBrowser-Phone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InnovateAsterisk%2FBrowser-Phone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InnovateAsterisk%2FBrowser-Phone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InnovateAsterisk","download_url":"https://codeload.github.com/InnovateAsterisk/Browser-Phone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595332,"owners_count":20963943,"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","asterisk-dialplan","asterisk-pbx","asterisk-server","asterisk-webui","audio-calls","browser-phone","free","open-source","sip","text-chat","video-calls","voip","web-sockets","webrtc"],"created_at":"2024-10-11T02:07:30.050Z","updated_at":"2025-04-07T05:06:58.825Z","avatar_url":"https://github.com/InnovateAsterisk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Browser Phone\nA fully featured browser based WebRTC SIP phone for Asterisk\n\n### Description\nThis web application is designed to work with Asterisk PBX. Once loaded application will connect to Asterisk PBX on its web socket, and register an extension. Calls are made between contacts, and a full call detail is saved. Audio Calls can be recorded. Video Calls can be recorded, and can be saved with 5 different recording layouts and 3 different quality settings. This application does not use any cloud systems or services, and is designed to be stand-alone. Additional libraries will be downloaded at run time (but can also be saved to the web server for a complete off-line solution).\n\n## Browser Phone v4.0\n\u003e [!IMPORTANT]\n\u003e The Browser Phone project version 4.0 will be developed under Siperb (https://www.siperb.com/). Siperb is already hosted and offers a mobile version, **and the necessary SIP proxy** to connect to your PBX. Siperb offers much more, including: Hosting, Provisioning, Transcoding (from DTLS to regular RTP), and a complete history of calls and conversations. Try it out: https://www.siperb.com/phone/.\n\n\u003e [!WARNING]\n\u003e Siperb Browser Phone is in __beta phase__, but we are moving fast to become the best **WebRTC Browser Phone on the market**.\n\n\u003e [!NOTE]\n\u003e We are looking for Beta testers for Siperb. Please see here: https://www.siperb.com/kb/article/welcome-to-the-siperb-beta-program/ \n\n![Buddy Stream](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/Buddy_Stream.jpg)\n\n### Hosted versions/samples\n- https://www.innovateasterisk.com/phone/ *(Default Layout - contains a welcome screen)*\n- https://www.innovateasterisk.com/phone/responsive.html *(Responsive Sample Layout - contains ads)*\n- https://www.innovateasterisk.com/phone/popup.html *(Popup Sample Layout - contains ads)*\n\n### Docker\nBrowser Phone now offers a [Dockerfile](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Dockerfile). It is by far \"The easiest way to kick the tires on WebRTC\". It comes fully configured with 3 users, and the SSL certificate needed to run your tests. It may take a while to build, but it's literally a 1, 2, 3 process.\n\n## Features v0.3.x\n- SIP Audio Calling\n- SIP Video Calling\n- XMPP Messaging \n- Call Transfer (Both Blind \u0026 Attended)\n- 3rd Party Conference Call\n- Call Detail Records\n- Call Recording (Audio \u0026 Video)\n- Screen Share during Video Call\n- Scratchpad Share during Video Call\n- Video/Audio File Share during Video Call\n- SIP (text/plain) Messaging\n- SIP Message Accept Notification (not delivery)\n- Buddy (Contact) Management\n- Useful debug messages sent to console.\n- Works on: Chrome (all features work), Edge (same as Chrome), Opera (same as Chrome), Firefox (Most features work), Safari (Most feature work)\n- Asterisk SFU - Including talker notification and Caller ID\n- Dark Mode \u0026 Light Mode - System Setting Detects\n\n## XMPP Features v0.2.x\n- User Login \u0026 Auth (Use SIP credentials)\n- Buddy List (Roster) Saved on Server\n- Buddy vCard\n- Buddy Picture Upload\n- Message Typing Indication\n- Message Delivery \u0026 Read Notification\n- Offline Message History (If supported by server)\n- Tested to work with Openfire\n\n## Server; Requires\n- Asterisk PBX version 13|16|17|18 (with Websockets and Text Messaging, chan_sip or chan_pjsip)\n\n## Server; Optional\n- Openfire XMPP Server\n\n## JavaScript Dependencies\n- sip-0.20.0                    : WebRTC and SIP signalling library\n- jquery-3.3.1                  : JavaScript toolkit\n- jquery.md5                    : Md5 Hash plug-in (unused)\n- Chart-2.7.2                   : Graph and Chart UI\n- jquery-ui                     : Windowing \u0026 UI Library\n- fabric-2.4.6                  : Canvas Editing Library\n- moment-2.24.0                 : Date \u0026 Time Library\n- croppie-2.6.4                 : Profile Picture Crop Library\n- strophe-1.4.1                 : XMPP Library\n\n\u003e Note: These files will load automatically from CDN.\n\n## StyleSheet Dependencies\n- normalize-v8.0.1              : CSS Normalising Stylesheet\n- roboto                        : Roboto Font\n- font-awesome-4.7              : Icon Font library\n- jquery-ui                     : For jQuery UI\n- croppie-2.6.4                 : For Croppie\n\n\u003e Note: These files will load automatically from CDN.\n\n## Lib Folder Download (Off-line)\nYou can download the lib folder containing all related library files: https://github.com/InnovateAsterisk/Browser-Phone/tree/master/lib\n\n\u003e Note: These files are provided \"as-is\" for your convenience. Each library folder may contain its own licence and terms of use please refer to the original license holder for more details.\n\n## Step-by-step Guide\n\nYou can follow the How-to video to achieve the outcome for this project:\n\n### chan_sip:\n\n[![View on YouTube](https://img.youtube.com/vi/mS28vfT8wJ8/0.jpg)](https://www.youtube.com/watch?v=mS28vfT8wJ8)\n\n### chan_pjsip (Part 2):\n\n[![View on YouTube](https://img.youtube.com/vi/azWUfSBz__s/0.jpg)](https://www.youtube.com/watch?v=azWUfSBz__s)\n\nOr follow these steps.\n\n#### Preparing the SD Card with Raspbian\nFlash the you SD card using the Raspberry Pi Imager from https://www.raspberrypi.org/downloads/.\n\nWrite a blank text file named ssh (no extension) to the boot directory of the SD card. On Mac use:\n```\nsudo nano /Voumes/boot/ssh\n```\nand on Windows, you can just use Notepad and save it as: `D:/ssh`\n\nInsert the SD Card into your Raspberry Pi, connect a Network Cable and boot up. \n\nConnect to the raspberry pi over the network using Terminal (on Mac), or Putty (on Windows), as:\n```\nssh pi@raspberrypi.local\n```\n\nThe default password for raspberry pi is: `raspberry`\n\n#### Initial Setup\nYou have to be root, so:\n```\n$ sudo su\n```\nIssue and update:\n```\n# apt-get update\n```\nInstall a few essential applications:\n```\n# apt-get install samba ntp git\n```\n\n#### Configure Samba\nAdd pi username to samba\n```\n# smbpasswd -a pi\n```\nEdit the smb.conf file and add share:\n```\n# nano /etc/samba/smb.conf\n```\nAdd the following at the bottom of the file\n```\n[InnovateAsterisk]\npath = /\nbrowseable = yes\nwriteable = yes\nread only = no\ncreate mask = 0755\ndirectory mask = 0755\nguest ok = no\nsecurity = user\nwrite list = pi\nforce user = root\n```\nRestart samba service:\n```\n# service smbd restart\n```\nexit su:\n```\n# exit\n```\n\n#### Create a Certificate Authority\n\u003e Note: The following steps will make both a CA certificate and a server certificate. The CA certificate will be self-signed, so you will need to copy that to your PC, and install (add) it to your Trust root CA certificate store.\n\nCreate some folders:\n```\n$ mkdir /home/pi/ca\n$ mkdir /home/pi/certs\n$ mkdir /home/pi/csr\n````\nCreate a Root CA Key:\n```\n$ openssl genrsa -des3 -out /home/pi/ca/InnovateAsterisk-Root-CA.key 4096\n```\n(Remember the password you used)\nCreate Root Certificate Authority Certificate:\n```\n$ openssl req -x509 -new -nodes -key /home/pi/ca/InnovateAsterisk-Root-CA.key -sha256 -days 3650 -out /home/pi/ca/InnovateAsterisk-Root-CA.crt\n```\nSomething like this should be fine:\n```\nCountry Name (2 letter code) [AU]: GB\nState or Province Name (full name) [Some-State]: None\nLocality Name (eg, city) []: None\nOrganization Name (eg, company) [Internet Widgits Pty Ltd]: Innovate Asterisk\nOrganizational Unit Name (eg, section) []: www.innovateasterisk.com\nCommon Name (e.g. server FQDN or YOUR name) []: Innovate Asterisk Root CA\nEmail Address []: youremailgoes@here\n```\nGenerate Certificate Signing Request \u0026 Private Key:\n```\n$ openssl req -new -sha256 -nodes -out /home/pi/csr/raspberrypi.csr -newkey rsa:2048 -keyout /home/pi/certs/raspberrypi.key\n```\nGenerate SSL V3 file:\n```\n$ nano /home/pi/csr/openssl-v3.cnf\n```\nAnd populate with:\n```\nauthorityKeyIdentifier=keyid,issuer\nbasicConstraints=CA:FALSE\nkeyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment\nsubjectAltName = @alt_names\n\n[alt_names]\nDNS.1 = raspberrypi.local\n```\n\nGenerate Server Certificate: \n```\n$ openssl x509 -req -in /home/pi/csr/raspberrypi.csr -CA /home/pi/ca/InnovateAsterisk-Root-CA.crt -CAkey /home/pi/ca/InnovateAsterisk-Root-CA.key -CAcreateserial -out /home/pi/certs/raspberrypi.crt -days 365 -sha256 -extfile /home/pi/csr/openssl-v3.cnf\n```\nGenerate PEM Combo Certificate:\n```\n$ cat /home/pi/certs/raspberrypi.crt /home/pi/certs/raspberrypi.key \u003e /home/pi/certs/raspberrypi.pem\n```\nSet Permission to Key:\n```\n$ chmod a+r /home/pi/certs/raspberrypi.key\n```\n\n#### Install Asterisk from Source Code\nChange to root:\n```\n$ sudo su\n```\nInstall Opus dev files:\n```\n# apt-get install xmlstarlet libopus-dev libopusfile-dev\n```\nExit root:\n```\n# exit\n```\nWget the Asterisk source:\n\n\u003e Note: chan_sip works fine on Asterisk 13, but chan_pjsip is rather broken. If you are using chan_pjsip, rather use Asterisk 16+, the guide is exactly the same. If you are on an x86 server, you can enable opus in make menuselect, or download it from the github project, otherwise take the opus codec out of the allow= section of the endpoint. \n```\n$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz\nor\n$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz\n```\nUntar the download:\n```\n$ tar -xvf asterisk-[tab]\n```\nChange to Asterisk folder\n```\n$ cd aster[tab]\n```\nGoing to install again, so go back to root:\n```\n$ sudo su\n```\nInstall the prerequisites:\n```\n# contrib/scripts/install_prereq install\n```\nConfigure Asterisk:\n```\n# ./configure --with-pjproject-bundled\n```\nEnter menuselect, and turn off CDR, CEL, and change MOH to WAV:\n```\n# make menuselect\n```\nCall make\n```\n# make\n```\nInstall the built code:\n```\n# make install \n```\nConfigure Asterisk to start automatically:\n```\n# make config\n```\nExit root:\n```\n# exit\n```\n\n#### Configure Asterisk with Github files\n\u003e Note: this section assumes you are following this guide and don't have any existing configurations in place. If you do, simply open the config files described below, and copy out the settings that you need.\n\nReturn to home folder:\n```\n$ cd ~\n```\nClone the git project:\n```\n$ git clone https://github.com/InnovateAsterisk/Browser-Phone.git\n```\nCopy the config files:\n```\n$ sudo cp /home/pi/Browser-Phone/config/* /etc/asterisk/\n```\nClear the existing files in static-http:\n```\n$ sudo rm /var/lib/asterisk/static-http/*\n```\nCopy the web pages:\n\u003e Note: You can skip this step and simply use the hosted pages at: https://www.innovateasterisk.com/phone/ (contains a welcome screen). This page uses a Let's Encrypt Certificate, but you will still need to have a secure connection to your Asterisk box.\n```\n$ sudo cp -r /home/pi/Browser-Phone/Phone/* /var/lib/asterisk/static-http/\n```\nSet the file permissions:\n```\n$ sudo chmod 744 /var/lib/asterisk/static-http/*\n```\nSetup /etc/asterisk/http.conf with the following:\n```\n[general]\nenabled=no ; HTTP\ntlsenable=yes ; HTTPS\ntlsbindaddr=0.0.0.0:443\ntlscertfile=/home/pi/certs/raspberrypi.crt\ntlsprivatekey=/home/pi/certs/raspberrypi.key\nenablestatic=yes\nsessionlimit=1000\nredirect=/ /static/index.html\n```\n\u003e Note: If you are running asterisk as root (as this guide does), then you can specify port 443, if you are running as asterisk or something else, you will need to specify a port greater than 1024. \n\u003e You can test that this works by going to https://raspberrypi.local/httpstatus but in order to see this page, you have to download that Root CA certificate that you made earlier to your own PC. \n\u003e To install: On Mac, just double click it, then again double click the certificate, and select Trust Always. On windows you will need to Import it to the Certificate Manager. (If you are using Firefox Browser, you have to again install it to the Firefox Trusted Root certificates.)\n\nCopy the Opus codec to modules:\n```\n$ sudo cp /home/pi/Browser-Phone/modules/ast-13/codec_opus_arm.so /usr/lib/asterisk/modules\nor\n$ sudo cp /home/pi/Browser-Phone/modules/ast-16/codec_opus_arm.so /usr/lib/asterisk/modules\n```\n\u003e Note: Asterisk 16 will check that the checksum of the .so files in modules folder matches the id gerenated at make menuselect, so you need to update the checksum in codec_opus_arm.so:\n```\n$ nano /home/pi/asterisk-16.*.0/include/asterisk/buildopts.h\nTake note of the AST_BUILDOPT_SUM (copy the value)\n$ sudo sed -i 's/1fb7f5c06d7a2052e38d021b3d8ca151/\u003cvalue of AST_BUILDOPT_SUM\u003e/g' /usr/lib/asterisk/modules/codec_opus_arm.so\n```\nRestart Asterisk and check the modules loaded:\n```\n$ sudo service asterisk restart\n$ sudo asterisk -r\n\u003e [tab]\n\u003e exit\n```\n\n## chan_sip or chan_pjsip?\nThe browser phone is compatible with both chan_sip and chan_pjsip. Follow the guide that suits your development. You will not be able to use both chan_sip and chan_pjsip in the same installation.\n\n\u003e Note: As of writing, Asterisk 13 chan_pjsip always invites a call with m=video in the SDP (if the endpoint has any video codec) no matter what the SDP of the original inviting call has, this means that all calls appear as video calls and the \"Answer with video\" appears for both audio and video calls. I'm yet to find a solution.\n\n## chan_sip\n\n#### Configure sip.conf\nOpen the original /etc/asterisk/sip.conf file and make the following changes:\n```\nwebsocket_enabled=yes\nmaxcallbitrate=5120\n```\n\nAdd anywhere under [general]:\n```\naccept_outofcall_message=yes\nauth_message_requests=no\noutofcall_message_context=textmessages\n```\nAdd to the bottom of /etc/asterisk/sip.conf:\n```\n; == Users\n\n[User1](basic,webrtc)\ncallerid=\"Conrad de Wet\" \u003c100\u003e\nsecret=1234\n\n[User2](basic,webrtc)\ncallerid=\"User 2\" \u003c200\u003e\nsecret=1234\n\n[User3](basic,phones)\ncallerid=\"User 3\" \u003c300\u003e\nsecret=1234\n```\n\n#### Disable chan_pjsip in /etc/asterisk/modules.conf\nIts best to only use one channel driver\n```\nnoload =\u003e res_pjsip.so\nnoload =\u003e res_pjsip_pubsub.so\nnoload =\u003e res_pjsip_session.so\nnoload =\u003e chan_pjsip.so\nnoload =\u003e res_pjsip_exten_state.so\nnoload =\u003e res_pjsip_log_forwarder.so\n```\n\n#### Configure extensions.conf\nUpdate the /etc/asterisk/extensions.conf to the following:\n```\n[general]\nstatic=yes\nwriteprotect=yes\npriorityjumping=no\nautofallthrough=no\n\n[globals]\nATTENDED_TRANSFER_COMPLETE_SOUND=beep\n\n[textmessages]\nexten =\u003e 100,1,Gosub(send-text,s,1,(User1))\nexten =\u003e 200,1,Gosub(send-text,s,1,(User2))\nexten =\u003e 300,1,Gosub(send-text,s,1,(User3))\nexten =\u003e e,1,Hangup()\n\n[subscriptions]\nexten =\u003e 100,hint,SIP/User1\nexten =\u003e 200,hint,SIP/User2\nexten =\u003e 300,hint,SIP/User3\n\n[from-extensions]\n; Feature Codes:\nexten =\u003e *65,1,Gosub(moh,s,1)\n; Extensions \nexten =\u003e 100,1,Gosub(dial-extension,s,1,(User1))\nexten =\u003e 200,1,Gosub(dial-extension,s,1,(User2))\nexten =\u003e 300,1,Gosub(dial-extension,s,1,(User3))\n; Anything else, Hangup\nexten =\u003e _[+*0-9].,1,NoOp(You called: ${EXTEN})\nexten =\u003e _[+*0-9].,n,Hangup(1)\nexten =\u003e e,1,Hangup()\n\n[moh]\nexten =\u003e s,1,NoOp(Music On Hold)\nexten =\u003e s,n,Ringing()\nexten =\u003e s,n,Wait(2)\nexten =\u003e s,n,Answer()\nexten =\u003e s,n,Wait(1)\nexten =\u003e s,n,MusicOnHold()\n\n[dial-extension]\nexten =\u003e s,1,NoOp(Calling: ${ARG1})\nexten =\u003e s,n,Dial(SIP/${ARG1},30)\nexten =\u003e s,n,Hangup()\nexten =\u003e e,1,Hangup()\n\n[send-text]\nexten =\u003e s,1,NoOp(Sending Text To: ${ARG1})\nexten =\u003e s,n,Set(PEER=${CUT(CUT(CUT(MESSAGE(from),@,1),\u003c,2),:,2)})\nexten =\u003e s,n,Set(FROM=${SHELL(asterisk -rx 'sip show peer ${PEER}' | grep 'Callerid' | cut -d':' -f2- | sed 's/^\\ *//' | tr -d '\\n')})\nexten =\u003e s,n,Set(CALLERID_NUM=${CUT(CUT(FROM,\u003e,1),\u003c,2)})\nexten =\u003e s,n,Set(FROM_SIP=${STRREPLACE(MESSAGE(from),\u003csip:${PEER}@,\u003csip:${CALLERID_NUM}@)})\nexten =\u003e s,n,MessageSend(sip:${ARG1},${FROM_SIP})\nexten =\u003e s,n,Hangup()\n```\n\nRestart Asterisk or Reload SIP and Dialplan:\n```\n$ sudo asterisk -r\n\u003e sip reload\n\u003e dialplan reload\n```\n\n## chan_pjsip\n\n#### Configure pjsip.conf\nOpen the original /etc/asterisk/pjsip.conf file and make the following changes:\n```\n; == Users\n\n[User1](basic_endpoint,webrtc_endpoint)\ntype=endpoint\ncallerid=\"Conrad de Wet\" \u003c100\u003e\nauth=User1\naors=User1\n[User1](single_aor)\ntype=aor\nmailboxes=User1@default\n[User1](userpass_auth)\ntype=auth\nusername=User1\npassword=1234\n\n[User2](basic_endpoint,webrtc_endpoint)\ntype=endpoint\ncallerid=\"User Two\" \u003c200\u003e\nauth=User2\naors=User2\n[User2](single_aor)\ntype=aor\n[User2](userpass_auth)\ntype=auth\nusername=User2\npassword=1234\n\n[User3](basic_endpoint,phone_endpoint)\ntype=endpoint\ncallerid=\"User Three\" \u003c300\u003e\nauth=User3\naors=User3\n[User3](single_aor)\ntype=aor\n[User3](userpass_auth)\ntype=auth\nusername=User3\npassword=1234\n```\n\n#### Disable chan_sip in /etc/asterisk/modules.conf\nIt's best to only use one channel driver\n```\nnoload =\u003e chan_sip.so\n```\n\n#### Configure extensions.conf\nUpdate the /etc/asterisk/extensions.conf to the following:\n```\n[general]\nstatic=yes\nwriteprotect=yes\npriorityjumping=no\nautofallthrough=no\n\n[globals]\nATTENDED_TRANSFER_COMPLETE_SOUND=beep\n\n[textmessages]\nexten =\u003e 100,1,Gosub(send-text,s,1,(User1))\nexten =\u003e 200,1,Gosub(send-text,s,1,(User2))\nexten =\u003e 300,1,Gosub(send-text,s,1,(User3))\n\n[subscriptions]\nexten =\u003e 100,hint,PJSIP/User1\nexten =\u003e 200,hint,PJSIP/User2\nexten =\u003e 300,hint,PJSIP/User3\n\n[from-extensions]\n; Feature Codes:\nexten =\u003e *65,1,Gosub(moh,s,1)\n; Extensions\nexten =\u003e 100,1,Gosub(dial-extension,s,1,(User1))\nexten =\u003e 200,1,Gosub(dial-extension,s,1,(User2))\nexten =\u003e 300,1,Gosub(dial-extension,s,1,(User3))\n; Anything else, Hangup\nexten =\u003e _[+*0-9].,1,NoOp(You called: ${EXTEN})\nexten =\u003e _[+*0-9].,n,Hangup(1)\n\nexten =\u003e e,1,Hangup()\n\n[moh]\nexten =\u003e s,1,NoOp(Music On Hold)\nexten =\u003e s,n,Ringing()\nexten =\u003e s,n,Wait(2)\nexten =\u003e s,n,Answer()\nexten =\u003e s,n,Wait(1)\nexten =\u003e s,n,MusicOnHold()\n\n[dial-extension]\nexten =\u003e s,1,NoOp(Calling: ${ARG1})\nexten =\u003e s,n,Set(JITTERBUFFER(adaptive)=default)\nexten =\u003e s,n,Dial(PJSIP/${ARG1},30)\nexten =\u003e s,n,Hangup()\n\nexten =\u003e e,1,Hangup()\n\n[send-text]\nexten =\u003e s,1,NoOp(Sending Text To: ${ARG1})\nexten =\u003e s,n,Set(PEER=${CUT(CUT(CUT(MESSAGE(from),@,1),\u003c,2),:,2)})\nexten =\u003e s,n,Set(FROM=${SHELL(asterisk -rx 'pjsip show endpoint ${PEER}' | grep 'callerid ' | cut -d':' -f2- | sed 's/^\\ *//' | tr -d '\\n')})\nexten =\u003e s,n,Set(CALLERID_NUM=${CUT(CUT(FROM,\u003e,1),\u003c,2)})\nexten =\u003e s,n,Set(FROM_SIP=${STRREPLACE(MESSAGE(from),\u003csip:${PEER}@,\u003csip:${CALLERID_NUM}@)})\nexten =\u003e s,n,MessageSend(pjsip:${ARG1},${FROM_SIP})\nexten =\u003e s,n,Hangup()\n```\n\nRestart Asterisk or Reload PJSIP and Dialplan:\n```\n$ sudo asterisk -r\n\u003e module reload res_pjsip.so\n\u003e dialplan reload\n```\n\n## Screenshots\n\n![Audio Call with 3rd Party Conference](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/AudioCall_Conference.jpg)\n\n![Audio Call with Transfer](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/AudioCall_Transfer.jpg)\n\n![Image of Main Interface](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/AudioCall.jpg)\n\n![Mobile UI](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/UI_Mobile_List_Dark.jpg)\n\n![Call Stats](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/InCall_Stats.jpg)\n\n![Call Recording Format](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/Recording_Format.jpg)\n\n![Video Call Presenting Camera](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/VideoCall_PresentCamera.jpg)\n\n![Video Call Presenting Scratchpad](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/VideoCall_PresentScratchpad.jpg)\n\n![Video Call Presenting Video File](https://github.com/InnovateAsterisk/Browser-Phone/blob/master/Screenshots/VideoCall_PresentVideo.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovateasterisk%2Fbrowser-phone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnovateasterisk%2Fbrowser-phone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovateasterisk%2Fbrowser-phone/lists"}