First of all: May the 4th be with you! Always!!!
Second: (Obviously) In May Microsoft is going to retire Skype
and is asking everybody to migrate to Microsoft Teams
.
My only use-case for Skype was to dial landline numbers from my (ubuntu) laptop. As an alternative I have looked into Google Voice
, but was not able to associate my Irish mobile phone number with my Goggle account to enable the voice features.
Means I was kind-a stuck.
Then I had a quick discussion with Claude and realized that I have been thinking about it wrong. I was not necessarily looking for a new tool, but more for a solution to make outbound landline calls from my laptop (preferably using a command line tool).
Means, if I go from first principles I will probably come up with something mean and lean that will just work
(tm).
First principles means, I just need a platform that can make calls. Luckily I have spend the last 5 years of my live using such a platform to send SMS messages, namely Twilio.
Turns out there is a small wrinkle: When I tried to buy an Irish phone number that I can use with the Twilio API/CLI to place the calls, I was not able to do so, because regulations only give you certain numbers for the address that needs to be asscociated with the phone number (in my case phone numbers that start with +335-1-122...
).
Then I realized that to make calls (outbound) you actually do not need a phone number. What you need is just a(n) (Elastic) SIP trunk
.
Means my next step was to setup a SIP trunk and configure the termination endpoint. Given that I only want to place calls and do not want to receive calls, I do not need to set up the origination and I do not need to buy a number.
Configuring the SIP is easy and straight-forward (see also screencast below), but there is one thing that is tricky: To make outbound calls you need to make sure the calls are initiated from a Verified Caller ID
. There are 2 steps here …
- Set up a
Verified Caller ID
- Use the
Verified Caller ID
to make calls
First: To set up the Verified Caller ID
you need go to the Verified Caller ID
page and verify a phone number (landline or mobile) that you have access to.
Second: You need to use it. More on that later/below. (Important) Note: To be able to use it, you also need to make sure that the username of the credentials that you are configuring for the termination matches the phonenumber that you have verified.
You can then use twilio-cli to make calls, but this will not give you want you want because twilio-cli
cannot handle the audio streams that you want/need to run over the call. For that you need a softphone
. Luckily there is a very good/popular open-source option available: linphone. linphone
comes with a UI, but also with a CLI: linphonec. Given my preference for CLIs I decided to use linphonec
. You can install it with sudo apt install linphone-cli
.
Setting it up is easy. You just run linphonec
and then add your proxy with proxy add
. If there is more than one proxy make sure you use proxy use <n>
to define the proxy you want to use. Then you list all of the audio interfaces with soundcard list
and pick the headset interface with soundcard use <n>
. With that you should be ready to place your first call. I suggest to use one of the test numbers that are suggested on the Elastic SIP trunk configuration page, means the command to use is (for instance) call +441749608378
.
If this is not working you can restart linphonec
with linphonec -d 6 -l /tmp/linphone_$(date +%Y%m%d-%H%M%S).log
and use the logfile to debug what is wrong.
After this works you can then try to dial other numbers. That might work right away … or not :).
If it does not work, you want to check that you have configured/enabled the right Voice Geographic Permissions.
Even more important (as mentioned above) you need to use a Verified Caller ID
. That means the username for the SIP trunk authentication needs to be your Verified Caller ID
phonenumber. And that means your reg_identity
configuration in your .linphonerc
file needs to look like this …
[proxy_0]
reg_proxy=<sip:linphone-rolandtritsch.pstn.dublin.twilio.com;transport=udp>
reg_identity="+353868563975" <sip:+353868563975@linphone-rolandtritsch.pstn.dublin.twilio.com>
... <more> ...
After that is configured you should be fine to make calls to any number you like.
With that I am now able to make a call with …
linphonec
Warning: video is disabled in linphonec, use -V or -C or -D to enable.
linphonec> call +441749608378
Establishing call id to sip:+441749608378@linphone-rolandtritsch.pstn.dublin.twilio.com, assigned id 1
Call 1 to sip:+441749608378@linphone-rolandtritsch.pstn.dublin.twilio.com in progress.
Call 1 to sip:+441749608378@linphone-rolandtritsch.pstn.dublin.twilio.com ringing.
soundcardCall 1 with sip:+441749608378@linphone-rolandtritsch.pstn.dublin.twilio.com connected.
Media streams established with sip:+441749608378@linphone-rolandtritsch.pstn.dublin.twilio.com for call 1 (audio).
linphonec> terminate
Call 1 with sip:+441749608378@linphone-rolandtritsch.pstn.dublin.twilio.com ended (No error).
linphonec>
Here is a screencast to explain even more/better how this works …
I am using this now for a week and it works great. Good quality. Reliable connections. And it is cheap.
May the force be with you. Always …
