3

If I have a Google Meet link, how can I programatically join the call? I can get the dial-in phone number and use something like Twilio, but then how can I set the caller ID to have a name?

I've seen various systems join calls with a specified name for a meet / hangout call.

I apologize for the vagueness of the question. I'm not sure how to better ask it - please add comments if you need clarification and I'll happily edit the question.

Shamoon
  • 41,293
  • 91
  • 306
  • 570

2 Answers2

1

If you have a number in the request , You can just call uding the twillo API

        import com.twilio.Twilio;
        import com.twilio.rest.api.v2010.account.Call;
        import com.twilio.type.PhoneNumber;

        import java.net.URI;

        public class Example {
            // Find your Account Sid and Token at twilio.com/console
            // DANGER! This is insecure. See http://twil.io/secure
            public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
            public static final String AUTH_TOKEN = "your_auth_token";

            public static void main(String[] args) {
                Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
                Call call = Call.creator(
                        new com.twilio.type.PhoneNumber("+14155551212"),
                        new com.twilio.type.PhoneNumber("+15017122661"),
                        URI.create("http://demo.twilio.com/docs/voice.xml"))
                    .create();

                System.out.println(call.getSid());
            }
        }

Source : https://www.twilio.com/docs/voice/make-calls#initiate-an-outbound-call-with-twilio

You can also use fetcher to get the existing :

     import com.twilio.Twilio;
        import com.twilio.rest.api.v2010.account.Call;

        public class Example {
          public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
          public static final String AUTH_TOKEN = "your_auth_token";

          public static void main(String[] args) {
            Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

            Call call = Call.fetcher("CA42ed11f93dc08b952027ffbc406d0868").fetch();

            System.out.println(call.getTo());
          }
        }

When you have a Google Hangouts for Enterprise that comes with GSuite When a Google Hangouts meet starts, It gives a dial-in number with a pin.

You can connect using curl itself

    curl 'https://api.twilio.com/2010-04-01/Accounts/AC8bc5f1756b2e10ce344333e0ec6f7acacc46/Calls.json' -X POST \
    --data-urlencode 'To=+1 xxxx-xxxx-3235' \
    --data-urlencode 'From=+1xxxxxxxxxx6' \
    --data-urlencode 'Url=https://demo.twilio.com/welcome/voice/' \
    --data-urlencode 'SendDigits=wwwww34975093#‬#' \
    -u AC8bc5f1756b2e10c824e0ec6f7acacc46:[AuthToken]

Source : Twilio Join Google Hangouts Conference Call

redhatvicky
  • 1,912
  • 9
  • 8
  • Sure - I got that part. But what about the callerID? – Shamoon Nov 13 '19 at 13:35
  • you can use the Non Twillio Phone Number as the caller id , https://support.twilio.com/hc/en-us/articles/223179848-Using-a-non-Twilio-number-as-the-caller-ID-for-outgoing-calls – redhatvicky Nov 13 '19 at 13:45
0

Looks like you can set caller id once the number is verified, otherwise not https://support.twilio.com/hc/en-us/articles/223180148-Unable-to-Display-a-Business-Name-or-Custom-Text-as-Caller-ID

Patrick Goode
  • 1,412
  • 5
  • 20
  • 35