02-21-2014 06:19 AM - edited 03-21-2019 08:05 AM
Dear Sir,
I have a ethernet relay for open the gate of my plant. At the moment for open the gate I need to link http://192.168.1.8/toggle.cgi?toggle=E
My goal it's to create a Programmable soft key in order to open the gate, directly by SPA504G.
I created the psk1 managing webserver of SPA504G, under Voice>Phone>psk 1:
fnc=xml;url=http://mylocalwebserver/OpenGate.xml;nme=Open
Below the OpenGate.xml file situated on mylocalwebserver
<?xml version="1.0" encoding="UTF-8"?>
<CiscoIPPhoneExecute>
<ExecuteItem URL="http://192.168.1.8/toggle.cgi?toggle=E"/>
</CiscoIPPhoneExecute>
When I use the psk1, the SPA504G it's able to open the gate, but the follow text it's displayed on the Phone
"XML format error or invalid application".
Is there some one that indicate me the right way in order to fix it?
Solved! Go to Solution.
02-21-2014 06:40 AM
Well - and what content the URL http://192.168.1.8/toggle.cgi?toggle=E is returning to the phone ? Is it well formed XML application ?
And generic advice - turn on and catch the syslog&debug messages.
02-24-2014 03:45 AM
Glad to hear it helped.
Consider marking this thread as "answered" - it may help others to found solutions.
02-21-2014 06:40 AM
Well - and what content the URL http://192.168.1.8/toggle.cgi?toggle=E is returning to the phone ? Is it well formed XML application ?
And generic advice - turn on and catch the syslog&debug messages.
02-21-2014 08:08 AM
Dear Dan. In the first thank you for your interesting.
As you can see by picture, open the link
http://192.168.1.8/toggle.cgi?toggle=E from browser, I have a html response with text " Success! 1".
Unfortunally I can not modify the pages on the ethernet relay.
Any suggestion?
02-21-2014 01:52 PM
Well, it's the problem. SPA504G is not generic HTML client, so it can't accept generic HTML code. it mean that SPA504G can't talk to your's relay directly.
But you may consider different approach. Change your's OpenGate.xml not to be static page but a server side script. Either SSI, PHP. CGI - exact language/API is not important.
The script will
02-24-2014 02:54 AM
Thank you so much for your suggestion!!!!
Hoping to be helpful for someone in the futures.
For the request, please set the PSK1 or 2... as:
fnc=xml;url=http://yourwebserver/OpenGate.php;nme=GateOpen
reachable from SPA504G web configuration (administrator Login): Voice>Phone>
below the code for OpenGate.php file.
";
echo "
"; echo "
"; echo "";
?>
02-24-2014 03:45 AM
Glad to hear it helped.
Consider marking this thread as "answered" - it may help others to found solutions.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide