Yealink Forums
T42G - Action URL and XML browser - 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: T42G - Action URL and XML browser (/showthread.php?tid=3459)



T42G - Action URL and XML browser - MRS - 03-18-2015 06:37 PM

Hello,

I am trying to display a server status via action url and xml browser. The phone is sending a request via action url (Registered, Unregistered ...) to the server and a xml content is in the response, which should be executed on the phone.

The XML-Content is working via Line Key - XML Browser, but it doesn't work via action url reqeust. Why it doesn't work?

XML-Content:
<?xml version="1.0" encoding="ISO-8859-1"?>
<YealinkIPPhoneExecute Beep="yes">
<ExecuteItem URI="Led:LINE2_GREEN=on"/>
</YealinkIPPhoneExecute>

Syslog:
Mar 18 10:52:14 Log [529]: ACCU<6+info >934.980.905:Usable Account NumberSad0)
Mar 18 10:52:14 Log [529]: CCET<6+info >934.981.471:ACD Message(65542), wParam(0) lParam(1)
Mar 18 10:52:14 Log [529]: CCET<6+info >934.982.560:bAccountOldUsable = 0
Mar 18 10:52:15 Log [529]: ACCU<6+info >935.020.507:OnLineStateChange(ServerId:0, State:2)
Mar 18 10:52:15 Log [529]: ACCU<6+info >935.026.647:CAccount::SendActionURL[0][1][2]
Mar 18 10:52:15 Log [529]: FWDD<6+info >935.040.198:FWD: Sync Status-- account:0 CFA:0 CFB:0 CFNA:0
Mar 18 10:52:15 Log [529]: ACCU<6+info >935.042.373:EtlMsgHandler_NotifyApp ACCOUNT_STATUS_CHANGED(0, 1, 2)!
Mar 18 10:52:15 Log [529]: FWDD<6+info >935.066.872:CFWDData::SendSyncStatus([2],[0],[1],[0])[2]
Mar 18 10:52:15 Log [529]: FWDD<6+info >935.069.964:CDNDData::SendSyncStatus([2],[0],[1]) [0]
Mar 18 10:52:15 Log [529]: CUIT<6+info >935.072.696:Handle Account(0) Status(1-->2). Send CallWaiting Code.
Mar 18 10:52:15 Log [529]: TASK<6+info >935.077.976:TaskAction: TryThreadMessage taskaction is 0x4770fc48
Mar 18 10:52:15 Log [529]: TASK<6+info >935.081.732:TaskAction: Exec.
Mar 18 10:52:15 Log [529]: TASK<6+info >935.082.618:DownloadFile: eProtocolType
Mar 18 10:52:15 Log [529]: TASK<6+info >935.085.924:Http download file: 'http://provisioning.sip.local/phones_firmware/test.xml' start.
Mar 18 10:52:15 LIBD[529]: DCMN<6+info > Connecting provisioning.sip.local:80
Mar 18 10:52:15 LIBD[529]: DCMN<6+info > Connecting IP = 193.9.252.138, Port = 80
Mar 18 10:52:15 LIBD[529]: HTTP<6+info > Request Line: GET /phones_firmware/test.xml HTTP/1.1^M
Mar 18 10:52:15 LIBD[529]: HTTP<6+info > Host: provisioning.sip.local
Mar 18 10:52:15 LIBD[529]: HTTP<6+info > User-Agent: Yealink SIP-T42G 29.73.0.50 00:15:65:67:2a:8d
Mar 18 10:52:15 LIBD[529]: HTTP<6+info > process response
Mar 18 10:52:15 LIBD[529]: HTTP<5+notice> response code: 200
Mar 18 10:52:15 LIBD[529]: HTTP<6+info > Content-Length: 152
Mar 18 10:52:15 LIBD[529]: HTTP<5+notice> response process finish!
Mar 18 10:52:15 LIBD[529]: HTTP<5+notice> recv : 152 bytes
Mar 18 10:52:15 Log [529]: TASK<6+info >935.109.625:TaskAction: Send message to call back base.
Mar 18 10:52:15 Log [529]: TASK<6+info >935.112.085:TaskAction: Send message to calling thread.


Firmware:
29.73.0.50


RE: T42G - Action URL and XML browser - Flora_Yealink - 03-18-2015 10:41 PM

Hello,
Yealink phone only can suport Xml browser, push xml and sip notify .
from your scenario, I would suggest you can use the sip notify to suport it .
I will send the pcap trace through private message to you for your reference.
Best Regards!
flora


RE: T42G - Action URL and XML browser - MRS - 03-20-2015 09:56 PM

Hello Flora,

thanks for the response.

We also tried push XML, but it also seems not to work.

Configuration:
Push XML Server IP Address: 172.21.2.100
SIP Notify: Disabled
Block XML In Calling: Disabled
Action URI allow IP List: 172.21.2.100

Phone IP: 10.55.2.56
Server IP: 172.21.2.100

Request
POST / HTTP/1.1
Host: 10.55.2.56
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: text/xml; charset=UTF-8
Content-Length: 106
Pragma: no-cache
Cache-Control: no-cache
<?xml version="1.0" encoding="ISO-8859-1"?>
<YealinkIPPhoneExecute Beep=RED=on"/>
</YealinkIPPhoneExecute>


Response
HTTP/1.1 200 OK
Content-Length: 0
Date: Fri, 20 Mar 2015 14:05:42 GMT
Server: embed httpd


Syslog:
Mar 20 14:14:28 Log [467]: TASK<6+info >868.040.046:chObject, delete object 0x2efe20
Mar 20 14:14:28 ipp [489]: IIPP<5+notice> SET_VOLUNE,00000001 00000008
Mar 20 14:14:28 netS[298]: LLDP<6+info > unable to guess frame type, dest mac [01 00 0c cc cc cc]
Mar 20 14:14:28 netS[298]: LLDP<6+info > unable to guess frame type, dest mac [01 00 0c cc cc cc]
Mar 20 14:14:38 Log [378]: WEB <6+info >ip:172.21.2.100 Push XML
Mar 20 14:14:38 Log [378]: WEB <4+warnin>ip:172.21.2.100 Push XML Error: ip don't match or xml content is wrong


Is there anything missing in the request?
Can you send me a wireshark sample?

Kind regards, Christoph


RE: T42G - Action URL and XML browser - Flora_Yealink - 03-21-2015 12:05 AM

Thanks Christoph.
How about using SIP Notify ,does it can work ?
and for the trace of push xml, please refer to attached.
and this is template file for your reference
<?php
#
function push2phone($server,$phone,$data)
{
$xml = "xml=".$data;
$post = "POST / HTTP/1.1\r\n";
$post .= "Host: $phone\r\n";
$post .= "Referer: $server\r\n";
$post .= "Connection: Keep-Alive\r\n";
$post .= "Content-Type: text/xml\r\n";
$post .= "Content-Length: ".strlen($xml)."\r\n\r\n";
$fp = @fsockopen ( $phone, 80, $errno, $errstr, 5);
if($fp)
{
fputs($fp, $post.$xml);
flush();
fclose($fp);
}
}
##############################

$xml = "<YealinkIPPhoneExecute Beep=\"yes\">\n";
$xml .= "<ExecuteItem URI=\"Led:LINE2_GREEN=on\"/>";
$xml .= "</YealinkIPPhoneExecute>\n";

push2phone("10.2.5.174","10.2.10.74",$xml);



#replace 10.2.5.174 with your Apache ip address
#replace 10.2.10.74 with your phone ip address
?>

Best Regards!
Flora