0

Received non-2XX status code on Tropo-Thread

I'm getting a non-2xx status code using the following code developed in c# and running on one of the Microsoft Azure host sites: public string gfMpiSchedulerAlert(string numberToDial, string message) { string voiceToken = "09e1aa4b59600543aa32d3201c85cc1923afab5af9199830bd74c798b60c73dc2cf3e6f5fca85736f8f0d9d9"; string messageToken = "09e1b28ba547c24ba4d0f181064e584fcb28e14a22e040c669fc0962f930554868bd658222218e64af861b84"; string sessionResult = ""; string msg = message; IDictionary parameters = new Dictionary(); // Enter process control parameter. parameters.Add("processControl", "SampleDialog"); //// Enter a phone number here. //parameters.Add("numberToDial", numberToDial); // Enter a phone number to send a call or SMS message to here. parameters.Add("sendToNumber", "13135755207"); // Enter a phone number to use as the caller ID. parameters.Add("sendFromNumber", "13135281139"); // Select the channel you want to use via the Channel struct. parameters.Add("channel", Channel.Text); // Select the network you want to use with the Network struct. parameters.Add("network", Network.SMS); // Message is sent as a query string parameter, make sure it is properly encoded. parameters.Add("msg", HttpUtility.UrlEncode(msg)); // Instanntiate a new instance of the Tropo object. Tropo tropo = new Tropo(); // Create an XML doc to hold the response from the Tropo Session API. XmlDocument doc = new XmlDocument(); // Load the XML document with the return vallue of the CreateSession() method call. doc.Load(tropo.CreateSession(messageToken, parameters)); // Assign the relevent return values to sessionResult = doc.SelectSingleNode("session/success").InnerText.ToUpper(); string tokenReturn = doc.SelectSingleNode("session/token").InnerText; return sessionResult; } This error results: 00000 00-1 02:55:27 AM Set logging context for http-0.0.0.0-8080-exec-1 to accountID=92622 host=null sessionGUID=-1 sessionNumber=-1 callID=-1 00001 00-1 02:55:27 AM Tropo app dir is /tropo_app_home 00002 0000 02:55:27 AM Set logging context for http-0.0.0.0-8080-exec-1 to accountID=92622 host=null sessionGUID=0 sessionNumber=0 callID=0 00003 0000 02:55:27 AM Application[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx:cus] ver(1.0.57277) has been created. 00004 0000 02:55:27 AM Found hosted Application[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx:cus] ver(1.0.57277) [token=09e1b28ba547c24ba4d0f181064e584fcb28e14a22e040c669fc0962f930554868bd658222218e64af861b84] 00005 0000 02:55:27 AM Set logging context for http-0.0.0.0-8080-exec-1 to accountID=92622 host=null sessionGUID=0 sessionNumber=0 callID=0 00006 0000 02:55:27 AM Application[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx:cus] ver(1.0.57277) has been found. 00007 0000 02:55:27 AM Set logging context for http-0.0.0.0-8080-exec-1 to accountID=92622 host=null sessionGUID=0 sessionNumber=218398ea7a9bebed511e36cba33b3322 callID=0 00008 0000 02:55:27 AM Account 92622 has 1 sessions 00009 0000 02:55:27 AM Thread http-0.0.0.0-8080-exec-1 acquired engine com.tropo.rest.engine.TropoScriptEngine@5e5746db of type tropo-web, activeEngines = 9 00010 0000 02:55:27 AM Thread http-0.0.0.0-8080-exec-1 got engine to compile script 00011 0000 02:55:27 AM Thread http-0.0.0.0-8080-exec-1 returning engine after compiling script 00012 0000 02:55:27 AM Thread http-0.0.0.0-8080-exec-1 returned engine com.tropo.rest.engine.TropoScriptEngine@5e5746db of type tropo-web, activeEngines = 8 00013 0000 02:55:27 AM In SimpleApplication.execute() for token launch, HttpSession hssn-8530A594890A2F3B9C20A360EA9ADC4D associated with SipApplicationSession sas_2-15-sm13nx8jm97a9t0tropo 00014 0000 02:55:27 AM SipApplicationSession sas_2-15-sm13nx8jm97a9t0tropo associated with Tropo session 218398ea7a9bebed511e36cba33b3322 00015 0000 02:55:27 AM token:09e1b28ba547c24ba4d0f181064e584fcb28e14a22e040c669fc0962f930554868bd658222218e64af861b84 is added into the context of app instance : ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] 00016 0000 02:55:27 AM processControl:SampleDialog is added into the context of app instance : ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] 00017 0000 02:55:27 AM network:SMS is added into the context of app instance : ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] 00018 0000 02:55:27 AM channel:TEXT is added into the context of app instance : ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] 00019 0000 02:55:27 AM action:create is added into the context of app instance : ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] 00020 0000 02:55:27 AM sendToNumber:13135755207 is added into the context of app instance : ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] 00021 0000 02:55:27 AM msg:The 9:00PM arrival time has not been reported for patient Emanuel Lopez is added into the context of app instance : ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] 00022 0000 02:55:27 AM sendFromNumber:13135281139 is added into the context of app instance : ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] 00023 0000 02:55:27 AM ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] has been created. 00024 0000 02:55:27 AM com.voxeo.tropo.core.SimpleCallFactory@70ad398 is added into the context of app instance : ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] 00025 0000 02:55:27 AM Clearing logging context for http-0.0.0.0-8080-exec-1 00026 0000 02:55:27 AM Set logging context for Tropo-Thread-218398ea7a9bebed511e36cba33b3322 to accountID=92622 host=null sessionGUID=0 sessionNumber=218398ea7a9bebed511e36cba33b3322 callID=-1 00027 0000 02:55:27 AM ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] starts execution on Thread Tropo-Thread-218398ea7a9bebed511e36cba33b3322 00028 0000 02:55:27 AM Thread Tropo-Thread-218398ea7a9bebed511e36cba33b3322 acquired engine com.tropo.rest.engine.TropoScriptEngine@5e5746db of type tropo-web, activeEngines = 9 00029 0000 02:55:27 AM Sending TropoML Payload on Tropo-Thread-218398ea7a9bebed511e36cba33b3322 [url=http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx]: {"session":{"id":"218398ea7a9bebed511e36cba33b3322","accountId":"92622","timestamp":"2012-03-31T02:55:27.604Z","userType":"NONE","initialText":null,"callId":null,"parameters":{"token":"09e1b28ba547c24ba4d0f181064e584fcb28e14a22e040c669fc0962f930554868bd658222218e64af861b84","processControl":"SampleDialog","network":"SMS","channel":"TEXT","action":"create","sendToNumber":"13135755207","msg":"The 9:00PM arrival time has not been reported for patient Emanuel Lopez","sendFromNumber":"13135281139"}}} 00030 0000 02:55:27 AM Received non-2XX status code on Tropo-Thread-218398ea7a9bebed511e36cba33b3322 [url=http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx, code=500] 00031 0000 02:55:27 AM Thread Tropo-Thread-218398ea7a9bebed511e36cba33b3322 returned engine com.tropo.rest.engine.TropoScriptEngine@5e5746db of type tropo-web, activeEngines = 8 00032 0000 02:55:27 AM ApplicationInstance[http://gfmarsprodconfigxm.cloudapp.net/mpiVisitReportProcessing.aspx , sas_2-15-sm13nx8jm97a9t0tropo] ends execution on Thread Tropo-Thread-218398ea7a9bebed511e36cba33b3322 00033 0000 02:55:27 AM sas_2-15-sm13nx8jm97a9t0tropo invalidated 00034 0000 02:55:27 AM Account 92622 has 0 sessions 00035 0000 02:55:27 AM Instance 218398ea7a9bebed511e36cba33b3322 removed 00036 0000 02:55:27 AM Clearing logging context for Tropo-Thread-218398ea7a9bebed511e36cba33b3322 I copied this code from one of the c# examples provided by Tropo. Voice and text-to-speech is working okay but this has me stumped. Thanks.

13 comments

Please sign in to leave a comment.