1

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("xxx@xxx.com");
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.

NomadicDeveloper
  • 857
  • 4
  • 17
  • 29

1 Answers1

3

I figured it out. Its:

Dial dial = new Dial(sip.toXML());
NomadicDeveloper
  • 857
  • 4
  • 17
  • 29