Plantronics + Polycom. Now together as Poly Logo

PolySoftKey.setSoftkeyLabel() - label missing on soft keys

Frequent Visitor

PolySoftKey.setSoftkeyLabel() - label missing on soft keys

When we run the following sample code from the Developer Guide, then labels are not displayed on the first 3 soft keys.

The 4th key shows label "More" (this is acceptable).

The key events are processed correctly.

 

Phone model: VVX 400

Tried firmwares: 5.3.0.13357 and 5.5.0.20556

 

Are we missing something?

 

<!DOCTYPE html>
<html>
<head>
    <title>App</title>

    <script type="text/javascript">
        PolySoftKey.customSoftkeyEvent.connect(skCallBack);

        PolySoftKey.setSoftkeyLabel(0, "One");
        PolySoftKey.setSoftkeyLabel(1, "Two");
        PolySoftKey.setSoftkeyLabel(2, "Three");
        PolySoftKey.setSoftkeyLabel(3, "Four");


        function skCallBack(key, skEvent){
            switch(key){
                case 0:
                    document.getElementById("eventStuff").innerHTML = "SK 1 was pressed";
                    break;
                case 1:
                    document.getElementById("eventStuff").innerHTML = "SK 2 was pressed";
                    break;
                case 2:
                    document.getElementById("eventStuff").innerHTML = "SK 3 was pressed";
                    break;
                case 3:
                    document.getElementById("eventStuff").innerHTML = "SK 4 was pressed";
                    break;
            }
             document.getElementById("eventValue").innerHTML = skEvent;
        }

        // hide the tool bar
        function hideSKs(){
            PolySoftKey.hideToolBar();
        }

        // show the tool bar
        function showSKs(){
            PolySoftKey.showToolBar();
        }

    </script>
</head>
<body onload="onInit()">
<div id="showButton">
<input type='button' onclick='showSKs()' value='Show Softkeys'/>
</div>
<div id="hideButton">
<input type='button' onclick='hideSKs()' value='Hide Softkeys'/>
</div>
<div id="eventText">
<p>Last Click: <b id='eventStuff'>0</b> </p>
<p>Event Value: <b id='eventValue'>0</b> </p>
</div>
</body>

</html>

 

 

6 REPLIES 6
Polycom Employee & Community Manager

Re: PolySoftKey.setSoftkeyLabel() - label missing on soft keys

Hello miarec,

welcome to the Polycom Community.

The functionality of the Polysoftkey Interface is reserved for the VVX1500 and the formerly owned SpectraLink 84xx series of phones.

 

The newer VVX models no longer support this and we should update the SDK.

Please ensure to provide some feedback if this reply has helped you so other users can profit from your experience.

Best Regards

Steffen Baier

Polycom Global Services




<======== Signature / Disclaimer ========>
Please be aware:For questions about the type of support to expect please check here

Please also ensure you always check the VoIP , Video Endpoint , Skype for Business , PSTN or RPM FAQ's

Please remember, if you see a post that helped you , and it answers your question, please mark it as an "Accept as Solution".

The title Polycom Employee & Community Manager is an automatic setting within the community and any forum reply or post is based upon my personal experience and does not reflect the opinion or view of my employer.
Poly employee participation within this community is not mandatory and any post or FAQ article provided by myself is done either during my working hours or outside working hours, in my private time, and maybe answered on weekends, bank holidays or personal holidays.
Message 2 of 7
Highlighted
Frequent Visitor

Re: PolySoftKey.setSoftkeyLabel() - label missing on soft keys

Thank you for a prompt response.

 

Is there any alternative solution for the same functionality for VVX series?

 

We have developped our application on Polycom VVX phones for controlling call recording (enable/disable and pause/resume recording for PCI compliance). See the attached screenshot.

 

There are a couple of usability issues:

 

1) We would like to display our custom buttons in place of the original softkeys. Our workaround is to display the buttons right above the softkey row. It looks strange, but at least it works.

 

2) We would like to show "Exit" button as well. Unfortunately, there is no way to close the web-page from within the Javascript. Right now, users have to click "More" button two times and then click the "exit" icon (this is not intuitive). Or they just need to wait until page display timeout expires and the web page is closed automatically.

There is a similar post on this forum for this issue: http://community.polycom.com/t5/Polycom-Endpoints-Forum/VVX-500-Looking-for-an-alternate-to-SoftKey-...

 

 

Is there any alternative SDK for developing web applications for Polycom VVX phones?

Advisor

Re: PolySoftKey.setSoftkeyLabel() - label missing on soft keys

Wow... why would such a useful feature be removed?  This makes no sense.

 

We also need a way to close the browser from javascript on a vvx 450, and/or a soft key.

 

The user has to do a convolted process to close the browser without this functionality.

 

Is there a workaround for this?

Message 4 of 7
Advisor

Re: PolySoftKey.setSoftkeyLabel() - label missing on soft keys

One (really awkward, but working) workaround:

Set up an ajax request to a url on the server

Have the server send two separate push commands

 

Key:Home

Key:Home

 

Two home presses will get you out of the browser... SoftKey:Exit does nothing when used as a PolycomIPPhone <Data> command

 

Little proof of concept using perl cgi.

 

foo.fcgi

###

use Proc::Fork;



handle_ajax_request();



sub handle_ajax_request {

run_fork {
parent {
# Whole lotta nuttin!
}
child {

my $IP = '192.168.50.148';



my $cmd = qq{/usr/bin/curl -s -k --digest -u vvxmanager:vvxmanager -d "<PolycomIPPhone><Data priority=\\"Critical\\">Key:Home</Data></PolycomIPPhone>" --header "Content-Type: application/x-com-polycom-spipx" https://${IP}/push};
`$cmd`;



sleep(1);



$cmd = qq{/usr/bin/curl -s -k --digest -u vvxmanager:vvxmanager -d "<PolycomIPPhone><Data priority=\\"Critical\\">Key:Home</Data></PolycomIPPhone>" --header "Content-Type: application/x-com-polycom-spipx" https://${IP}/push};
`$cmd`;



exit;
}
};



}





Message 5 of 7
Occasional Visitor

Re: PolySoftKey.setSoftkeyLabel() - label missing on soft keys

Haha, thanks! Turns out that you just have to send a response to the browser with Content-Type "application/x-com-polycom-spipx" and Body "Key:Home\nKey:Home".

 

 

Message 6 of 7
Frequent Visitor

Re: PolySoftKey.setSoftkeyLabel() - label missing on soft keys

I've tested this code on the vvx 310 and vvx 410 with firmware version 5.9.5.0614 and the soft key behavior is different on each phone.

 

On the vvx 310 it shows the soft keys as expected, "one | two | three | four"

 

On the vvx 410, the soft keys show as "one | two | four | more"

Message 7 of 7