33
Access from own applications
10. Access from own applications
In addition to the SIP access, the SIP Ring Switch also offers the option of
accessing from your own application.
This can be done via TCP/IP sockets from the common high-level languages.
However, it is also possible to use common web techniques such as AJAX or PHP
to communicate with the web IO.
The SIP Ring Switch offers two ways to access using TCP/IP sockets:
• Command strings
ASCII
• HTTP requests AJAX
Command strings ASCII
The counters can be read and the outputs can be set by exchanging simple
command strings.
The SIP Ring Switch operates in this mode as a TCP server.
A list of the supported commands and additional details on access via ASCII sockets
can be found in the Web-IO programming manual. (download at http:www.WuT.de).
Follow the manual link on the data sheet page of Web-IO.
TCP server
To access the SIP Ring Switch as a TCP server using ASCII sockets, enable
TCP
ASCII-Sockets
under
Communication paths » Socket-API
. Specify on which server
port the SIP Ring Switch should accept connections. The SIP Ring Switch can
provide up to four TCP connections on the specified port at the same time. Any
additional connection attempt is rejected.
If the SIP Ring Switch does not receive a valid command within 10 seconds, it
closes the connection and is then free for a new connection. The SIP Ring Switch
behaves in the same way if an incorrect or unknown command is received.
The outputs are usually read using a polling procedure.