Skip to content

voiceip/tinyphone

Repository files navigation

Tinyphone

Minimalist Softphone based on PJSIP with API Control

Tinyphone Build

Getting Started

Checkout the repo and follow the building process to compile your own, or just download the latest version from the downloads section.

Installation

You can download the latest msi installer from here or from the releases section.

[Optional] After Installing you can customise the tinyphone properties by downloading and placing the config file in the folder C:\Program Files (x86)\Tinyphone\.

APIs

The softphone exposes the following resources on port 6060.

Resource Method Payload Description
/ GET Returns hi and the app version
/events WS WebSocket endpoint for realtime events
/login POST
{
"username": "string" ,
"login": "optional-string**" ,
"password": "string",
"domain": "string",
"proxy": "optional-string**"
}
Account login with the provided details
/logout POST Logout of all accounts
/accounts GET Returns list of registed accounts
/accounts/{account_name}/logout GET Logout of account with provided account_name
/dial POST
{
"uri": "sip-uri",
"account": "account_name**" 
}
Dial a call with provided sip-uri
/calls GET Returns list of active calls
/calls/{call_id}/answer POST answer call with specified call_id
/calls/{call_id}/dtmf/{digits} POST Send dtmf digits digits to call with specified call_id
/calls/{call_id}/hold PUT Hold call with specified call_id
/calls/{call_id}/hold DELETE UnHold call with specified call_id
/calls/{call_id}/conference PUT Create conference by merging other running calls with given call_id
/calls/{call_id}/conference DELETE Break specified call_id out of conference
/calls/{call_id}/transfer POST
{
"uri": "sip-uri",
}
transfer call_id to specified uri
/calls/{call_id}/attended-transfer/{dest_call_id} POST Initiate attended call transfer
call_id=The call id to be transfered
dest_call_id=The call id to be replaced
/calls/{call_id}/hangup POST hangup call with specified call_id
/hangup_all POST Hangup all calls
/exit POST Exit the application

** Optional Fields, should exist only with valid value

You can view the postman collection of the APIs here

Building Locally

Pre Requsite

You must have boost libraries installed on your system. Incase you don't have you can either download the sources and build it, or install a precompiled binaries from here.

Manual Compiling

git clone https://github.com/voiceip/tinyphone.git
cd tinyphone
git submodule update --init --recursive
#build dependencies follow appveyor.yml#build-step
#open lib/pjproject/pjproject-vs14.sln in visual studio 2015 and compile it
#open tinyphone/tinyphone.sln in visual studio 2015 and compile it (you will need to compile the dependencies in lib/* folder)
run tinyphone/Debug/tinyphone.exe

Issues & Contribution

Found a issue and have a solution? Go ahead and create a pull request :) Incase you don't have a immediate solution but have an replicable issue please create an Issue with the details so that we can have a look at it.