JuliusSart Posted June 28, 2012 Report Posted June 28, 2012 I'm trying to get a handle on this CSTA and i get proper response when starting application session but everything after that returns CSTAError:invalidSessionID. Could not find any example where the session ID is sent, where should i insert this data? currently sending: <?xml version=\"1.0\" encoding=\"UTF-8\"><GetCSTAFeatures xmlns=\"http://www.ecma-international.org/standards/ecma-323/csta/ed3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><sessionID>2sdftETwer23421</sessionID></GetCSTAFeatures> Any suggestions? Quote
pbx support Posted June 28, 2012 Report Posted June 28, 2012 Did you take a look at http://wiki.snomone.com/index.php?title=CSTA_example page for the sequence of operations? Quote
JuliusSart Posted July 5, 2012 Author Report Posted July 5, 2012 Did you take a look at http://wiki.snomone.com/index.php?title=CSTA_example page for the sequence of operations? I have read the example but there is no mention of session id or how it should be supplied. After the Application Session Start all of the listed queries return the same invalidSession error. any actual code samples anywhere? not just the xml that should be sent but everything from start to end. Currently my send function is as follows: var bytesSent = Encoding.UTF8.GetBytes([xmlstring]); Socket s = ConnectSocket(IPAddress.Parse([serverIP]), [portnumber]); if (s == null) return ("Connection failed"); s.Send(bytesSent, bytesSent.Length, 0); with the [xmlstring] as <?xml version="1.0" encoding="UTF-8"><MonitorStart xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed4"><monitorObject><deviceObject>[extension@domain]</deviceObject></monitorObject>monitorType>device</monitorType></MonitorStart> Quote
pbx support Posted July 5, 2012 Report Posted July 5, 2012 The example shown there is the actual XML that you have to send to the PBX and it will return the session id in the response. Quote
Bill H Posted July 5, 2012 Report Posted July 5, 2012 You need to Start a session first, From the CSTA Example page: Sent: <?xml version="1.0" encoding="UTF-8"><StartApplicationSession xmlns= =============================================================================================== Then if it is done correctly, you will receive something like this: Again,from the CSTA Example page: Received: '\x00\x00\x01\xc0l ve<?xml version="1.0" encoding="UTF-8"?> <StartApplicationSessionPosResponse xmlns="http://www.ecma-international.org/standards/ecma-354/appl_session" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <sessionID>99bjucmahlernqjl55xx</sessionID> That is where you get the Session ID from. Just use it in any further CSTA Messages sent to the PBX. Quote
JuliusSart Posted August 27, 2012 Author Report Posted August 27, 2012 Issue got resolved. the session id is used in webrequest and the session id should be in the cookiecontainer not in the actual xml that was sent. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.