Jump to content

Using CSTA: sending CSTA/XML commands over plain TCP tips and tricks


mattlandis

Recommended Posts

Thanks to some very helpful tips from BillH and some things i learned the very hard way myself here are resources to get you started playing with CSTA and snomONE.

 

 

#1-to use CSTA over TCP (not use soap) just send your XML using sockets. (with no headers etc.)

Here is example VB.net code on how to send CSTA to snom ONE:

http://forum.snomone.com/index.php?/topic/4679-trying-to-learnuse-csta/page__view__findpost__p__20860

 

#2- here are all the currently support CSTA commands snomONE supports: http://wiki.snomone.com/index.php?title=CSTA_api

(let me edit this: not all the ones on this page are actually supported--for example "snapshot" isn't.

 

#3- Here are nearly verbatim examples of how to form your CSTA XML requests: http://www.ecma-international.org/publications/files/ECMA-TR/TR-087.pdf

 

#4-You will need to remove the second ? in the examples in the above TR-087.pdf if you are copying.

 

<?xml version="1.0" encoding="UTF-8"?>

<GetDoNotDisturb xmlns=“http://www.ecma-international.org/standards/ecma-323/csta/ed3">

<device>sip:tom1@domain.com</device>

</GetDoNotDisturb>

 

should be:

 

<?xml version="1.0" encoding="UTF-8">

<GetDoNotDisturb xmlns=“http://www.ecma-international.org/standards/ecma-323/csta/ed3">

<device>sip:tom1@domain.com</device>

</GetDoNotDisturb>

 

#5-all us VB people need to double quote variables to make it work:

 

<?xml version=""1.0"" encoding=""UTF-8"">

<GetDoNotDisturb xmlns=""http://www.ecma-international.org/standards/ecma-323/csta/ed3"">

<device>sip:tom1@domain.com</device>

</GetDoNotDisturb>

 

#6-some of the quotation marks used by the TR-087 document use something other than VB quotation marks so to be safe remove all quotation marks and replace them with VB quotation marks if your having trouble.

 

#7- you may need to remove the first several characters of the CSTA XML response that snomONE sends back or VB goes haywire and won't return or pass the variable. Not sure why. just remove first couple chars of XML response using the VB mid function.

 

 

I hope this saves someone about a week of fiddling.

 

take care all,

Link to comment
Share on other sites

  • 6 years 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...