cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1191
Views
0
Helpful
5
Replies

Programmable soft key - help how to SOLVED - ANSWERED

CavalloABC
Level 1
Level 1

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?

2 Accepted Solutions

Accepted Solutions

Dan Lukes
VIP Alumni
VIP Alumni

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.

View solution in original post

Dan Lukes
VIP Alumni
VIP Alumni

Glad to hear it helped.

Consider marking this thread as "answered" - it may help others to found solutions.

View solution in original post

5 Replies 5

Dan Lukes
VIP Alumni
VIP Alumni

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.

SPA504G.JPG

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?

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

  1. call http://192.168.1.8/toggle.cgi?toggle=E (e.g. your relay will be contacted by script running in your's WWW server, not by SPA504G itself). 
  2. return a well formed XML response to SPA504G (claiming success or failure)

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 "";

?>

Dan Lukes
VIP Alumni
VIP Alumni

Glad to hear it helped.

Consider marking this thread as "answered" - it may help others to found solutions.