priyanka
priyanka

Reputation: 86

how to configure call url in twilio api

i am creating a program for recieving the call, but every time i am calling via phone or browser it says a auto generated message : https://demo.twilio.com/welcome/voice/

i need to answer the call via phone and browser both, and which url i have to giv in twiml app for voice ? outgoing call or incoming?? if i am merging them no effect??

  Twilio.Device.incoming(function (conn) {
    $("#log").text("Incoming connection from " + conn.parameters.From);
    // accept the incoming connection and start two-way audio
    conn.accept();
  });

Upvotes: 1

Views: 2082

Answers (1)

Devin Rader
Devin Rader

Reputation: 10366

Twilio evangelist here.

It sounds like you have not configured the Voice Request URL for your Twilio phone number.

enter image description here

This URL should return some TwiML to Twilio that tell it what to do with this inbound phone call. In your case it sounds like you want Twilio to dial another phone number or a Twilio Client, so your TwiML would look something like this to dial another phone:

<Response>
    <Dial>
        <Number>+1-555-555-5555</Number>
    </Dial>
</Response>

or this to dial a client:

<Response>
    <Dial>
        <Client>[name-of-the-registered-client]</Client>
    </Dial>
</Response>

Hop that helps.

Upvotes: 2

Related Questions