twilio / voice-quickstart-android

Quickstart app for the Voice Android SDK
https://www.twilio.com/docs/api/voice-sdk/android/getting-started
MIT License
187 stars 141 forks source link

Twilio phone number to Twilio phone number call is not working #614

Closed shehzadraheem closed 3 months ago

shehzadraheem commented 3 months ago

I have two Twilio phone numbers. I'm trying to call between these two numbers, but it's not working.

I want to build an app in which users will purchase Twilio phone numbers, and then they will call to each other using these phone numbers.

Is it possible to call between two Twilio phone numbers?

bobiechen-twilio commented 3 months ago

Hi @shehzadraheem

This is absolutely achievable using the SDK and some TwiML tricks with a few steps:

  1. Make a call from the SDK (mobile client) to a TwiML app. Let's give this mobile client the ID alice.
  2. With some database table mapping in your backend, this user alice is mapped to a Twilio number 4150001234.
  3. In step 2 your TwiML app endpoint should also receive a parameter indicating to whom this call is for, for example another Twilio number 4150006789 or a client id bob, which again can be mapped to a Twilio number.
  4. Assuming you want to ring another mobile app on which client bob is registered, your TwiML response should look like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Response>
    <Dial callerId="4150001234">
    <Client>bob</Client>
    </Dial>
    </Response>

When the call is received on client bob's app, the user will see an incoming call from the Twilio number 4150001234.

Let us know if this makes sense to you.

shehzadraheem commented 3 months ago

Hi @bobiechen-twilio Thanks for your reply.

I have already done this.

Actually, I want to perform this

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial callerId="4150001234">
    <Number>4150006789</Number>
  </Dial>
</Response>

If I run this, then ''https://demo.twilio.com/welcome/voice/'' this URL triggers (In Active Phone Numbers -> Configurations -> A call come in wehook). I did not get any call or notification on other phone.

How can I fix it?

If its not possible then in case of

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial callerId="4150001234">
    <Client>bob</Client>
  </Dial>
</Response>

How can I trigger my customize URL in this webhook (In Active Phone Numbers -> Configurations -> A call come in wehook).

Actually, I want to interrupt the voice call either it is between clientID-to-clientID, clientID-to-phoneNumber or phoneNumber-to-phoneNumber.

I want to add my audio track in live voice call stream.

afalls-twilio commented 3 months ago

@shehzadraheem I'm going to have to ask you to file a support ticket so that we can direct you to the right folks who can help. Unfortunately, your questions are outside the scope of this Github board, which is relegated to the client side SDK and getting started with the quickstart, things such as Twml configuration and other backend questions arn't this groups specialty and we may lead you astray.. Sorry we couldn't help more.