Reputation: 59
Here's my scenario - a user enters his phone number and the number of the person he wants to call.
Via c# Twilio calls the user number then connects to the person he wants to call. I then record the conversation.
I can get it all working and recording for a single phone number.
However, when trying to connect to a second number (the first number does ring, but I get the standard Twilio "application error"), I get the following 502 error:
Twilio was unable to fetch content from: https://xxx.xxx.net/Call/Connect?recipientNumber={number}
Error: Error reading response: Response does not contain content type
Account SID: xxxxxxxxxxxxxxxxxxxxxxxx
SID: xxxxxxxxxxxxxxxxxxxxxx
Request ID: xxxxxxxxxxxxxxxxxxxxx
Remote Host: xxx.xxx.net
Request Method: POST
Request URI: https://xxx.xxx.net/Call/Connect?recipientNumber={number}
SSL Version: TLSv1.2
This stems from basic code:
var response = new VoiceResponse();
response.Say("We are about to connect you.").Dial(recipientNumber).Hangup();
return TwiML(response);
Can anyone advise on where I'm going wrong or what I'm missing?
Upvotes: 0
Views: 110
Reputation: 59
Turns out it was a conflict of versioning and/or DLL's - removed nuget Twilio package and manually added Twilio DLL's. Problem solved!!!
Upvotes: 0