BT Java Web21C

BT’s Java SDK part two: making phone calls

Yesterday we saw how easy it is to send text messages using the SDK, so now let’s try making a phone call.

Imagine you’re implementing a customer support system where people can submit a problem report along with their phone number, and you want to have the appropriate person ring them to help resolve their fault. Your system does whatever magic is required to find who that appropriate person is, then uses the Web21C SDK to set up the call:

package com.kerrybuckley.sdk;


public class ThirdPartyCallDemo {
    public static void main(String[] args) {
        new ThirdPartyCallDemo().makeCall("tel:+447700900123",
    public void makeCall(String engineerPhoneNo, String customerPhoneNo) {
        ThirdPartyCall tpc = new ThirdPartyCall(customerPhoneNo,

The ThirdPartyCall constructor on line 12 takes two arguments, callee and caller. When the call is connected using startCall(), the caller’s phone (the engineer, in our example) rings first. Once they pick up, the callee’s phone starts ringing, and the call between the two is connected as though it had been made directly (although neither party sees the other’s caller ID).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.