a simple phone for the browser
requires signup, provides numbers and endpoints.
application configuration in the Plivo web UI involves
-
associating a SIP endpoint and phone number with an application
-
setting the application's "Answer" and "Hangup" URLs to
<server_url>/plivourls/answer?caller_id=<phone_number>&sip_username=<sip_username>
and
<server_url>/plivourls/hangup
where
<server_url>
is a publicly visible URL that directs HTTP requests to this application's server (see below).
login to the phone with endpoint username and password, not account creds.
be sure to
find test/ server/ client/ -type f -name '*.example'
and duplicate any placeholder credential files --- i.e.
cp <path>.example <path>
updating the file with valid login information for your account
. path/to/simp-phone/sh_src.sh
./bin/update_install.sh
./bin/lint.sh
optionally, pass -t <test_type>
parameter,
where <test_type>
is one of
python
js
json
whitespace
also accepts verbose -v
flag
python -m unittest test_simp_phone
npm test
see package.json
for additional test:
scripts
npm run build
see package.json
for additional build:
scripts
./bin/run_server.py
pass --help
flag for more options
both incoming and outgoing calls are supported, tho probably buggy. and be further forewarned that the user interface is a nightmare.
it's recommended to deploy to a remote for Plivo callback URLs only — load the UI from a local dev server.
lots of the goodness of the codebase's structure is due to patterns practiced with Chad and Emett at Bargible.
(shouts also to Steven and Drew for their care and tending of the Bargible source).