Specifications
Aastra July 2014 PA-001011-03-04
192
<URI>http://someserver/somepage.xml</URI>
<Selection>dataToAppend</Selection>
</MenuItem>
<SoftKey index = “1”>
<Label>Custom Key</Label>
<URI>http://someotherserver/someotherpage.xml</URI>
</SoftKey>
</AastraIPPhoneTextMenu>
When the user selects item 1 and presses softkey 1, the URI requested is
http://someotherserver/someotherpage.xml?selection=dataToAppend
Notes:
If a “?” already exists in the URI, then a “&” is used to separate the parameters. Note
the parameter name “selection” is automatic. If the Selection attribute is omitted,
then nothing extra is appended to the URI.
the Selection attribute can be more than one parameter, for instance, the following
Selection attribute is valid <Selection>200&action=set</Selection>
(don’t forget to escape encode the attribute for the “&”).
4.12 TextMenu item formatting on 2 lines (55i/57i/57iCT/9480i/9480iCT/6735i/6737i)
As XML does not allow formatting characters such as TAB or CR or multiple spaces, it is difficult to
create an AastraIPPhoneTextMenu with a controlled formatting.
This paragraph describes ways to achieve some advanced formatting using the unbreakable space
character.
php function format_line()
function format_line($line1,$line2,$style,$offset,$char,$mode='left')
{
# Retrieve phone model
$user_agent=$_SERVER['HTTP_USER_AGENT'];
$value=preg_split("/ MAC:/",$user_agent);
# Get screen size
switch($value[0])
{
case 'Aastra51i':
case 'Aastra53i':
case 'Aastra9143i':
case 'Aastra6730i':
case 'Aastra6731i':
$length='16';
break;
case 'Aastra9480i':
case 'Aastra9480iCT':
$length='21';
break;
case 'Aastra55i':
case 'Aastra57i':
case 'Aastra57iCT':
case 'Aastra6735i':
case 'Aastra6737i':
$length='24';
break;
default:
$length='24';
break;
}