Yealink Forums

Full Version: [SOLVED] ]XML Push InputScreen response?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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>';
?>
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.
Reference URL's