NAME
Polycom::App::URI - Module for working with internal URIs used for softkeys and hyperlinks in web applications for Polycom's SoundPoint IP and VVX series VoIP phones
SYNOPSIS
use Polycom::App::URI qw(softkeys);
use Polycom::App::Push;
my $phone = Polycom::App::Push->new(address => "172.23.8.100", username => "Bob", password => "1234");
# Send a message to a Polycom phone that provides custom soft keys using the softkeys() subroutine
my $message =
'<html><h1>Fire drill at 2:00pm!</h1>'
. softkeys(
{label => 'Dir', action => 'Key:Directory'},
{label => "Exit", action => 'SoftKey:Exit'})
. '</html>';
$phone->push_message({priority => 'critical', data => $message});
DESCRIPTION
The Polycom::App::URI
module is for writing web applications for Polycom's SoundPoint IP and VVX series VoIP phones. It provides facilities for generating XHTML pages for the microbrowser that include custom soft key definitions and hyperlinks that execute phone features such as dialing numbers or accessing the contact directory.
SUBROUTINES
a
use Polycom::App::URI qw(a);
# Prints '<a href="Key:Directory">View the phonebook</a>'
print a('Key:Directory', 'View the phonebook');
This subroutine can be used when generating dynamic XHTML pages for the microbrowser on SoundPoint IP phones to generate a hyperlink with the specified URI and caption. The first argument is the internal URI, and the second argument is the caption.
softkeys
use Polycom::App::URI qw(softkeys);
# Prints '<softkey index="1" label="Dir" action="Key:Directory"/>
# <softkey index="2" label="Exit" action="SoftKey:Exit"/>'
print softkeys(
{index => 1, label => 'Dir', action => 'Key:Directory'},
{index => 2, label => "Exit", action => 'SoftKey:Exit'});
This subroutine can be used when generating dynamic XHTML pages for the microbrowser on SoundPoint IP phones to place custom soft keys along the bottom of the screen. For VVX series IP phones, you should use the <button> HTML tag, instead.
The following parameters are supported:
index - the index (1 to 8), relative to the left side of the screen of the soft key.
label - the label (1 to 9 characters) to display on the soft key.
action - a URI to execute when the user presses the soft key. See the developer's guide for a list of supported URIs.
The action
parameter is the only mandatory parameter. If no label
parameter is specified, a default label will be displayed that corresponds to the action. Similarly, the index
parameter can be omitted if consecutive softkeys are desired. For instance, the following code snippet is roughly equivalent to the one above, and will produce two soft keys:
print softkeys({action => 'Key:Directory'}, {action => 'SoftKey:Exit'});
SEE ALSO
Developer's Guide SoundPoint IP / SoundStation IP - http://support.polycom.com/global/documents/support/setup_maintenance/products/voice/Web_Application_Developers_Guide_SIP_3_1.pdf
Polycom::App::Push
- A module for sending push requests to Polycom VoIP phones.
AUTHOR
Zachary Blair, <zblair@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2012 by Zachary Blair
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.