Jump to content

invalidSessionID


JuliusSart

Recommended Posts

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?

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...