I am using C++ Builder 10.2.3 with Intraweb 15.5.5
I am trying to make a Twilio automatic phone call using TwilioClient
Below is a summary of the code:
TTwilioClient *Client;
std::auto_ptr&tTStringList&t allParams(new TStringList);
TTwilioClientResponse response;
UnicodeString fromPhoneNumber, toPhoneNumber;
allParams-&tAdd("From=" + fromPhoneNumber);
allParams-&tAdd("To=" + toPhoneNumber);
allParams-&tAdd("Url=https://www.mywebsite/twilio.xml");
response = Client-&tPost("Calls", allParams.get());
twilio.xml is saved in wwwroot directory and it contains the text which is supposed to be spoken during the automatic call. Unfortunately this is how Twilio works for automatic outbound calls.
The call is performed on the destination number. But an error message is spoken by instead of the text in the xml file.
When I contacted Twilio support, this is what they responded (see attached PDF file).
The application is returning code 6 instead of text/xml or application/xml. I have an Apache server where the xml file is stored. But the Intraweb application I am running is not behind an Apache server!
And code 6 does not correspond to any Apache server response.
So, I think it is Intraweb application which is sending the wrong response.
When I check in IWMimeTypes.hpp, I see this:
enum DECLSPEC_DENUM TMimeType : unsigned char { mtUnknown, mtBinary, mtJPG, mtGIF, mtPNG, mtRSS, mtXML, mtTXT, mtICO, mtHTML, mtJavaScript, mtPDF, mtZIP, mtCSS, mtMP3, mtOGG, mtWAV, mtEXE, mtFlash, mtWMV, mtMOV, mtAVI, mtMPEG, mtXSL, mtGZIP, mtWOFF, mtTTF, mtOTF, mtSVG, mtJSON, mtDOCX, mtXLSX, mtPPTX, mtMP4 };
Code 6 corresponds to mtXML in the enum declaration.
So, is it Intraweb which is sending the wrong response as it seems?
TwilioResponse.pdf (Size: 282.76 KB / Downloads: 3)
I am trying to make a Twilio automatic phone call using TwilioClient
Below is a summary of the code:
TTwilioClient *Client;
std::auto_ptr&tTStringList&t allParams(new TStringList);
TTwilioClientResponse response;
UnicodeString fromPhoneNumber, toPhoneNumber;
allParams-&tAdd("From=" + fromPhoneNumber);
allParams-&tAdd("To=" + toPhoneNumber);
allParams-&tAdd("Url=https://www.mywebsite/twilio.xml");
response = Client-&tPost("Calls", allParams.get());
twilio.xml is saved in wwwroot directory and it contains the text which is supposed to be spoken during the automatic call. Unfortunately this is how Twilio works for automatic outbound calls.
The call is performed on the destination number. But an error message is spoken by instead of the text in the xml file.
When I contacted Twilio support, this is what they responded (see attached PDF file).
The application is returning code 6 instead of text/xml or application/xml. I have an Apache server where the xml file is stored. But the Intraweb application I am running is not behind an Apache server!
And code 6 does not correspond to any Apache server response.
So, I think it is Intraweb application which is sending the wrong response.
When I check in IWMimeTypes.hpp, I see this:
enum DECLSPEC_DENUM TMimeType : unsigned char { mtUnknown, mtBinary, mtJPG, mtGIF, mtPNG, mtRSS, mtXML, mtTXT, mtICO, mtHTML, mtJavaScript, mtPDF, mtZIP, mtCSS, mtMP3, mtOGG, mtWAV, mtEXE, mtFlash, mtWMV, mtMOV, mtAVI, mtMPEG, mtXSL, mtGZIP, mtWOFF, mtTTF, mtOTF, mtSVG, mtJSON, mtDOCX, mtXLSX, mtPPTX, mtMP4 };
Code 6 corresponds to mtXML in the enum declaration.
So, is it Intraweb which is sending the wrong response as it seems?
