Terence Eden’s Blog<p><strong>Adding SIP calls to Android - for free!</strong></p><p><a href="https://shkspr.mobi/blog/2020/07/adding-sip-calls-to-android-for-free/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">shkspr.mobi/blog/2020/07/addin</span><span class="invisible">g-sip-calls-to-android-for-free/</span></a></p><p></p><p><a href="https://en.wikipedia.org/wiki/Session_Initiation_Protocol" rel="nofollow noopener" target="_blank">SIP</a> is a stupid acronym. It's basically a standard way of making phone calls over the Internet. This means you can make and receive phone calls over WiFi. Here's how I got it working - for free - on Android.</p><p>By the end of this tutorial you will be able to:</p><ol><li>Receive calls to a new phone number, sent via WiFi to your Android handset.</li><li>Receive calls to your existing phone number, redirected to arrive over WiFi.</li></ol><p><strong>Get a SIP account</strong></p><p>Sign up for a free <a href="https://web.archive.org/web/20200923215008/https://www.sipgatebasic.co.uk/" rel="nofollow noopener" target="_blank">SIPGate Basic</a> account. Doesn't cost you anything. You can choose a UK landline number for free as well.</p><p>You will get a username, password, and config URl.</p><p></p><p><strong>Configure your handset</strong></p><p>Every Android phone is different. This is how I configured my OnePlus 5T.</p><p>Phone > Settings > Call Settings > SIP accounts.</p><p>Add the details from SIPgate into your phone.</p><p></p><p>Once done, activate the "Receive incoming calls" option.</p><p></p><p><strong>Wait</strong></p><p>Patience, grasshopper. Before you can receive calls, SIPgate need to verify you. They'll send you a letter in the post. This letter will have a confirmation code on it. Follow the instructions to activate your account.</p><p>The letter also sets your emergency services location which is passed along with any 999 / 112 calls.</p><p><strong>Receive a call</strong></p><p>Once your account has been activated, use another phone to call your new SIP landline. It should automatically be routed to your Android phone. The CallerID will show up as a number, followed by <code>@sipgate.co.uk</code>. Your dialler should be smart enough to pull the caller info out of your address book.</p><p></p><p>That's part 1 done! Anyone ringing your landline will get routed to your mobile via SIP. It works on WiFi, 3G, and 4G. Magic!</p><p><strong>Routing your existing number</strong></p><p>Distributing a new phone number is annoying. And people may not understand that ringing a landline number can be answered by a mobile. So, let's cheat!</p><p>This code will forward <em>all</em> calls people make to your mobile number, and redirect them to your SIP number.</p><p><code>**21*DESTINATION_NUMBER#</code></p><p>So, if your landline is 01632 960123, you'd dial this number into your regular phone dialler:</p><p><code>**21*+441632960123#</code></p><p>Anyone who rings your mobile, will be diverted to your SIP instantly. Your SIP will ring your mobile and you can chat normally.</p><p><strong>Configuration</strong></p><p><a href="https://shkspr.mobi/blog/2010/07/ussd/" rel="nofollow noopener" target="_blank">I wrote about call forwarding USSD codes back in 2010</a>. Man... I'm old...</p><p>To check it has worked, dial <code>*#21#</code> - you should see a confirmation message on screen.</p><p>To temporarily disable, <code>#21#</code></p><p>To re-enable, <code>*21#</code></p><p><strong>Cost</strong></p><p>Forwarding a call comes out of your mobile plan's minutes. Fine if you have an unlimited call plan, but expensive if not.</p><p>If in doubt, check with your mobile network provider.</p><p>SIPGate don't charge you for routing your calls.</p><p><strong>Firewalls</strong></p><p>I didn't need to change anything on my ISP's router to get this to work. It also worked over my mobile data connection.</p><p>The WiFi at your employer / cafe / aeroplane may be configured to block WiFi calling.</p><p><strong>What's next?</strong></p><p>There are a number of things you <em>could</em> do with a SIP connection.</p><ul><li>Route calls based on incoming phone number. Always send your boss to voicemail.</li><li>Custom voicemail greetings. Different messages for friends, family, work.</li><li>Block unknown numbers. A good way to reduce spam, but a pain to update.</li><li>Audio CAPTCHA. If a caller is unknown, ask them to solve a maths puzzle before they can be put through.</li><li>Time of day routing. After 18:00 send all work calls to voicemail.</li><li>Send an HTTP POST every time you receive a phone call.</li><li>Use your imagination!</li></ul><p>Right, I'm off to play with the <a href="https://www.sipgate.io/" rel="nofollow noopener" target="_blank">Sipgate.io API</a> to see what fun things I can build.</p><p></p><p><a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://shkspr.mobi/blog/tag/android/" target="_blank">#android</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://shkspr.mobi/blog/tag/howto/" target="_blank">#HowTo</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://shkspr.mobi/blog/tag/mobile/" target="_blank">#mobile</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://shkspr.mobi/blog/tag/sip/" target="_blank">#sip</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://shkspr.mobi/blog/tag/voice/" target="_blank">#voice</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://shkspr.mobi/blog/tag/voip/" target="_blank">#voip</a></p>