Yealink Forums
[SOLVED] ]XML Push InputScreen response? - Printable Version

+- Yealink Forums (http://forum.yealink.com/forum)
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: Phone specific topic (/forumdisplay.php?fid=12)
+---- Forum: T2xP Series (/forumdisplay.php?fid=21)
+---- Thread: [SOLVED] ]XML Push InputScreen response? (/showthread.php?tid=581)



[SOLVED] ]XML Push InputScreen response? - marvinh - 06-25-2013 08:14 PM

Good afternoon,

I've some problems with sending a response to the phone which submitted data from an inputscreen XML;

Inputscreen XML send to phone:
Code:
<YealinkIPPhoneInputScreen type="string" Timeout="20" LockIn="yes" editable="no">
    <Title wrap="yes">Restricties niet actief</Title>
    <Prompt>Restricties activeren?</Prompt>
    <URL>http://****.nl/callplan/index.php</URL>
    <Parameter>activeren</Parameter>
    <SoftKey index="1">        
        <Label>Nee</Label>
        <URI>SoftKey:Exit</URI>
    </SoftKey>
    <SoftKey index="2">    
    </SoftKey>    
    <SoftKey index="3">    
    </SoftKey>
    <SoftKey index="4">    
        <Label>Ja</Label>
        <URI>SoftKey:Submit</URI>
    </SoftKey>    
</YealinkIPPhoneInputScreen>

Everything is working, and the server receives the parameter 'activeren'. After everything is done, i want to display a message on the screen of the Phone, TextScreen Object.

XML TextScreen from server to Phone;

Code:
<YealinkIPPhoneTextScreen>
    <Title>Status</Title>
    <Text>Restricties geactiveerd.</Text>
</YealinkIPPhoneTextScreen>

But the Phone isn't displaying the message, but gives me an error:

"File format error!"

I think the Phone is expecting some xml answer after submitting the user data, but what kind of answer do i need to give?

Thanks,

Marvin


RE: XML Push InputScreen response? - marvinh - 06-25-2013 10:14 PM

Already found it, instead of sending the Response XML to the Phone i needed just to reply...

So instead of:
Code:
<?php
$xml = '<?xml version="1.0" encoding="utf-8"?>'.
     '<YealinkIPPhoneTextScreen>'.
        '<Title>Status</Title>'.
        '<Text>Restricties gedeactiveerd.</Text>'.
        '<SoftKey index=\"1\">'.    
        '<Label>Sluiten</Label>'.
        '<URI>SoftKey:CANCEL</URI>'.
        '</SoftKey>'.                    
     '</YealinkIPPhoneTextScreen>';
    
push2phone("192.168.20.100","192.168.22.79",$xml);
?>

I needed to do:
Code:
<?php
echo '<?xml version="1.0" encoding="utf-8"?>'.
     '<YealinkIPPhoneTextScreen>'.
        '<Title>Status</Title>'.
        '<Text>Restricties gedeactiveerd.</Text>'.
        '<SoftKey index=\"1\">'.    
        '<Label>Sluiten</Label>'.
        '<URI>SoftKey:CANCEL</URI>'.
        '</SoftKey>'.                    
     '</YealinkIPPhoneTextScreen>';
?>



RE: [SOLVED] ]XML Push InputScreen response? - Billx - 06-25-2013 11:15 PM

Thank you for posting your work.

I copied your code and received the same error.

I am new to Yealink so I found your solution very helpful.