Yealink Forums
Turn ON and OFF LED with XML - Printable Version

+- Yealink Forums (http://forum.yealink.com/forum)
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: T4x Series (/forumdisplay.php?fid=31)
+--- Thread: Turn ON and OFF LED with XML (/showthread.php?tid=46486)



Turn ON and OFF LED with XML - mhoekstratelpa - 02-28-2023 05:37 AM

Hi,

We want the phone to execute a XML URI when the phone SIP registers and in this XML we want the phone to turn on a LED.
We have already succesfully made a XML browser key, and when pushed the phone DOES successfully turn ON of OFF a LED.

When we put a link to our XML scrpt in the "execute xml URI" when SIP is registered, and we can see in the HTTP logs of our server the phone successfully does a GET from our server when the SIP registration is successful.

Now the phone NEVER turns ON of OFF a LED even though this is in the XML.

I think I have somewhere this is for security reasons. That only a phone can ONLY apply a command like to turn ON of OFF a LED via XML, when a button is pushed physically. Is this correct and are there maybe some work arounds?

We have also tried with a sort of dummy button, which we let the phone virtually press (<ExecuteItem URI="Key:LINE15"/>) whithin the XML script that the phone gets when SIP-Resgistered, but we can never get the phone to light up a simple LED.

Can anyone help us?

(02-28-2023 05:37 AM)mhoekstratelpa Wrote:  Hi,

We want the phone to execute a XML URI when the phone SIP registers and in this XML we want the phone to turn on a LED.
We have already succesfully made a XML browser key, and when pushed the phone DOES successfully turn ON of OFF a LED.

When we put a link to our XML scrpt in the "execute xml URI" when SIP is registered, and we can see in the HTTP logs of our server the phone successfully does a GET from our server when the SIP registration is successful.

Now the phone NEVER turns ON of OFF a LED even though this is in the XML.

I think I have somewhere this is for security reasons. That only a phone can ONLY apply a command like to turn ON of OFF a LED via XML, when a button is pushed physically. Is this correct and are there maybe some work arounds?

We have also tried with a sort of dummy button, which we let the phone virtually press (<ExecuteItem URI="Key:LINE15"/>) whithin the XML script that the phone gets when SIP-Resgistered, but we can never get the phone to light up a simple LED.

Can anyone help us?

Below the XML script that we put in the XML URI Registered:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<YealinkIPPhoneExecute Beep="yes">
<ExecuteItem URI="Key:LINE15"/>
<ExecuteItem URI="Led:LINE1_RED=on"/>
<ExecuteItem URI="Led:LINE2_RED=off"/>
<ExecuteItem URI="Led:LINE3_RED=off"/>
</YealinkIPPhoneExecute>



RE: Turn ON and OFF LED with XML - complex1 - 02-28-2023 09:04 PM

(02-28-2023 05:37 AM)mhoekstratelpa Wrote:  Hi,

We want the phone to execute a XML URI when the phone SIP registers and in this XML we want the phone to turn on a LED.
We have already succesfully made a XML browser key, and when pushed the phone DOES successfully turn ON of OFF a LED.

When we put a link to our XML scrpt in the "execute xml URI" when SIP is registered, and we can see in the HTTP logs of our server the phone successfully does a GET from our server when the SIP registration is successful.

Now the phone NEVER turns ON of OFF a LED even though this is in the XML.

I think I have somewhere this is for security reasons. That only a phone can ONLY apply a command like to turn ON of OFF a LED via XML, when a button is pushed physically. Is this correct and are there maybe some work arounds?

We have also tried with a sort of dummy button, which we let the phone virtually press (<ExecuteItem URI="Key:LINE15"/>) whithin the XML script that the phone gets when SIP-Resgistered, but we can never get the phone to light up a simple LED.

Can anyone help us?

Below the XML script that we put in the XML URI Registered:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<YealinkIPPhoneExecute Beep="yes">
<ExecuteItem URI="Key:LINE15"/>
<ExecuteItem URI="Led:LINE1_RED=on"/>
<ExecuteItem URI="Led:LINE2_RED=off"/>
<ExecuteItem URI="Led:LINE3_RED=off"/>
</YealinkIPPhoneExecute>

Hi,

I don't know if it will work, but try this:

First create a xml file on your server with the name test.xml and add:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
  <YealinkIPPhoneExecute Beep="yes">
    <ExecuteItem URI="Led:LINE3_RED=off"/>
    <ExecuteItem URI="Led:LINE2_RED=off"/>
    <ExecuteItem URI="Led:LINE1_RED=on"/>
    <ExecuteItem URI="Dial:100" interruptCall="no"/>
  </YealinkIPPhoneExecute>

then set a Line Key:
Phone – DSS Keys – Line Keys
Line key 1: XML Browser - <IP-address server>/test.xml

Now if you press Line Key 1 then the LEDs of Line 3 and 2 should go Off, and Line 1 should go On.
Assuming you want to dial extension 100 with Line Key 1, now ext. 100 will be dialed at the end of the test.xml file.