NomadicDeveloper
NomadicDeveloper

Reputation: 889

Twilio Sip Dial for incoming call

I'm using the Twilio Java API and I can't seem to build a response that will dial a Sip extension.

TwiMLResponse twiml = new TwiMLResponse();
Sip sip = new Sip("[email protected]");
Dial dial = new Dial();

try {
    dial.append(sip);
    twiml.append(say);
    twiml.append(dial);
}

The above code throws the exception "This is not a supported verb" when I get to dial.append(sip)

How do you nest Sip inside of Dial? Or How do I dial a Sip number? I need this to route my incoming calls.

Upvotes: 1

Views: 254

Answers (1)

NomadicDeveloper
NomadicDeveloper

Reputation: 889

I figured it out. Its:

Dial dial = new Dial(sip.toXML());

Upvotes: 4

Related Questions