sydneyos
sydneyos

Reputation: 4557

Twilio in a Development Environment

I want to develop a browser-to-browser call function for our application, but until the code gets released to production, all browsers are running against mydomain.local addresses on an internal network. I am able to make the outgoing call and get the trial message, but I'm assuming the call doesn't go through to the target browser because it's not running on a public site. Is there any way around this? I assume this is a common scenario.

UPDATE: Details: This is for a customer service user on web page A to call a customer web page B1 (with the Twilio connection code) and B2 (with the TwiML as described in the tutorial):

A (Customer Service side)

call: function () {
         var phone = { 'PhoneNumber': ' 444e0d6c161644a6a27a305332a4cbbd') };
         Twilio.Device.connect(phone);
          $(".call").hide();
          $(".hang-up").show();
        },

B1: (Customer page) .... capability.AllowClientIncoming("444e0d6c161644a6a27a305332a4cbbd"); ....

B2: (Launched from the customer page) 444e0d6c161644a6a27a305332a4cbbd

My VoiceURL is configured to point to B2;

Both A & B have the Twilio setup code running, the "ready" function is called.

When the call method is triggered on the Customer Service side, the Twilio demo message plays and hangs up after I "press any key to continue";

B1 never gets an incoming call. Likewise, calling my Twilio phone number just plays the default demo message and does not seem to connect to the web page.

The documentation is pretty spare, and it sure feels like there is a piece missing.

Upvotes: 0

Views: 347

Answers (1)

Devin Rader
Devin Rader

Reputation: 10366

Twilio evangelist here.

This could be because your firewalls are blocking the inbound ports needed for Twilio Client. If that's the case, short of opening them, I don't believe there is much that can be done.

Before you start messing with firewalls thought, I would start by double checking that your second instance of Twilio Client is actually connecting to Twilio when it loads by handling the error function, and I would also open up your browsers developer console and make sure that there are no JavaScript errors being reported. You can also include the 'debug' parameter when you call the setup function to have Twilio Client log debug info to the browser console.

Finally, I would verify that the TwiML your using to forward the call to that client is being generated correctly, includes the <Client> noun with the correct name that the second client is registering with.

Hope that helps.

Upvotes: 1

Related Questions