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
Open Raspberry Pi Configuration (Menu > Preferences > Raspberry Pi Configuration). Change the Boot setting to 'To CLI' and click OK. Now when you reboot, you'll start in the command line (enter startx to boot into the desktop).
However, like all forms of Linux, Raspbian has a powerful command line interface that gives you a lot more control over the computer than you can get using the GUI.
System Information Commandscat /proc/meminfo: Shows details about your memory. cat /proc/partitions: Shows the size and number of partitions on your SD card or hard drive. cat /proc/version: Shows you which version of the Raspberry Pi you are using. df -h: Shows information about the available disk space.
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)
From the SFLphone mailing list I got this feedback, which might help you:
I'm interests to known if the project write something for that. By the pass, I used Twinkle SIP client that permit to pass command to an already launched processus that permit for instance to answer an incoming call. It was really cool and permit me to map some keyboard shortcuts to control my phone without to switch desktop and find the good windows.
After some search, I'm found some old scripts that permit to control old versions of sflphone by using it's DBUS API. Inspire by this scripts, I wrote my own, compatible with the version of sflphone I used (1.4.1 in Debian Wheezy) :
https://gitlab.com/brenard/sflphone-ctl
It's work weel and I'm use it every day. Call transfer does not work on my desktop but it seam to be a bug on version 1.4.1 of sflphone.
B. R.
BTW: twinkle --help
shows the following:
--cmd <cli command>
Instruct Twinkle to execute the CLI command. You can run
all commands from the command line interface mode.
When Twinkle is already running, this will instruct the running
process to execute the CLI command.
Examples:
twinkle --cmd answer
twinkle --cmd mute
twinkle --cmd 'transfer 12345'
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.
sudo apt-get install twinkle
Use the app to create a profile (i.e. setup the account) and name it twinkle (all lower case). This gets saved to
/home/pi/.twinkle/twinkle.conf
The below command will take you into a Twinkle’s command processing prompt.
$ twinkle -c
Twinkle> call +17601234567 Twinkle> bye Twinkle> quit $
Here is the python script that should help you to do command line:
import sys from subprocess import Popen, PIPE proc = Popen(["twinkle", "-c"], stdin=PIPE, stdout=PIPE, bufsize=1) for line in iter(proc.stdout.readline, b''): print line if (line.find("registration succeeded") > 0): proc.stdin.write("call +17601234567\n") #do whatever you want by adding code... if (line.find("far end answered call") > 0): proc.stdin.write("bye\n") proc.stdin.write("quit\n") proc.communicate()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With