i want to use my raspberry pi as a SIP/VOIP-Phone, just controlling the RPI via SSH.
I found some tutorials and it seems that Twinkle is one of the most useful apps for that.
So i successfully installed twinkle on my RPI, one SPI-Client on my Android-Phone and for know i am able to send text messages from one to another.
The thing is: I have to use the Twinkel GUI with X-Server-forwarding (currently using MacOS with X11 and iTerm).
But i kind of want to automate the whole process, like using twinkle from command line, controll it with scripts etc.
So, obviously twinkle is not made for that. (there dont even is a documentation for the account-config-file, so i had to struggle through that x11-forwarding-stuff)
So, my final question is: Is there comparable SIP-client for the RPI that can be controlled via CLI?
any hint is highly appreciated. While googling this question i just found projects working with asterisk-server on the RPI or attaching displays to it - but thats not what i am looking for...
cheers and thanks
Controlling the Ring (formerly SFLPhone) daemon with a Python script:
Build the Ring daemon:
Install dependencies: https://projects.savoirfairelinux.com/projects/ring-daemon/wiki/Debian-based
Follow these build instructions: https://projects.savoirfairelinux.com/projects/ring-daemon/wiki/
Additional dependencies (
contrib
): This part will compile some dependencies that are not provided in Debian repos, including a recent version of PJSIP (make sure you don't already have an old PJSIP installed on the system - if you manually installed a recent version, it should work fine and contrib won't build it).Build the Ring daemon (
dring
)Run the Ring daemon:
./bin/dring -c -d
. You should see Ring running with some logs. The first option-c
will print the logs to the console (stdout/stderr) and-d
will enable debug logs.Run the D-Bus python3 controller :
ring/tools/dringctrl
, while keeping the daemon running../dringctrl.py --gara
. If everything worked, you should at least see "IP2IP", the default account that handles direct IP to IP SIP calls../dringctrl.py --call someIP
../dringctrl.py --help
to see currently implemented commands in the python script.Configure Ring and change the python script to fit your needs
/home/$USER/.config/ring/dring.yml
. If you plan to have a static configuration, you could edit the configuration file once manually or using one of the available GUIs, possibly from another computer then copying the file (on a desktop just install official packages: http://ring.cx/en/documentation/gnulinux-installation ).you want "to use your raspberry pi as a SIP/VOIP-Phone, just controlling the RPI via SSH"?
the best and simplest solution IMHO is:
just use asterisk itself and its ingenious console interface + an USB Headset (e.g. Logitech H800 Headset) for that!
The H800 shows up as a conventional sound card being accessed directly by asterisk's 'chan_alsa' channel module. That's it!
This gives me excellent audio quality and a pure console interface with the unsurpassed capabilities of asterisk. Entirely lacking the annoyance of any GUI. All running on a raspberry. Asterisk and 'chan_alsa' (or even 'chan_oss') is integral part of all major distributions.
Optionally you can make the whole thing completely wireless by using a WLAN dongle in the remaining USB port.
I am doing the same thing and I came across additional options so far:
Linphone: Easy to install but I fail to make phone calls
RaspberryPI: Making SIP outbound calls using linphonec or an alternative SIP soft phone
Ring (formerly SFLphone): Looks promising but needs to be installed from source
Installing the "ring.cx SIP client" on a Raspberry PI.
Update: Also check out @aberaud's answer below
PJSIP (C Library)
Twinkle CLI
From the SFLphone mailing list I got this feedback, which might help you:
BTW:
twinkle --help
shows the following:I had no luck so far myself but I really want to get this to work too.
Best VOIP client for Raspbery Pi in my experience is Twinkle.
Use the app to create a profile (i.e. setup the account) and name it twinkle (all lower case). This gets saved to
The below command will take you into a Twinkle’s command processing prompt.
Here is the python script that should help you to do command line:
What i get so far:
I am using the RasPi B+ with Raspbian OS.
What i tried so far: Twinkle (install with sudo apt-get install twinkle)
When its configured, you can use it via CLI, but unfortunately I wasnt able to configure Twinkle via command line. I had to configure X-Forwarding for my Mac. I installed X11 (resp. XQuartz) for Mac. So i was able to see the GUI and configure Twinkle.
What did work: I was able to send messages, but when a call came in, Twinkle crashed. I have to state out, currently there is no sound devices installed (no mic, no speakers).
After that I searched for SFL Phone. This does not come with a CLI. So its not worth testing it.
I also read about Linphone. Currently I did not tried it, because some people report about difficulties to use it in own applications.
The last thing I found is PJSIP.
I installed it like that:
This took a while and is has a decent CLI. I was able to send and receive calls. For now I am waiting for my USB-Soundcard, a microphone and some speakers to do some full testing.