-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center.
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center.
- HP Community
- HP Support Community Knowledge Base
- Poly Phones Knowledge Base
- Poly Phones Knowledge Base
- [FAQ] Poly Rove XML Application Framework
Hello all,
Since Poly ROVE 8.0.7 Software the Poly Rove range supports a feature called XML App
In order to enable this navigate via the Web Interface to Service Providers > XML App
The above basically connects via HTTP to a Server or Script that listens to a request.
A basic Power Shell Script to demonstrate the functionality:
# Poly Rove XML Application Server (PowerShell 5.0 Compatible - Non-Blocking)
$port = 8080
$listener = New-Object System.Net.HttpListener
$listener.Prefixes.Add("http://+:$port/")
$listener.Start()
# Retrieve all local IPv4 addresses to display in the console
$localIps = [System.Net.Dns]::GetHostAddresses([System.Net.Dns]::GetHostName()) |
Where-Object { $_.AddressFamily -eq 'InterNetwork' } |
Select-Object -ExpandProperty IPAddressToString
Write-Host "Listening for Poly Rove requests on port $port."
Write-Host "Configure the Poly ROVE XML App parameter X_XmlAppServer parameter to one of the following addresses:"
foreach ($ip in $localIps) {
Write-Host " -> ${ip}:${port}" -ForegroundColor Cyan
}
Write-Host "`nPress Ctrl+C to stop.`n"
try {
while ($listener.IsListening) {
# Start listening for a request asynchronously
$asyncResult = $listener.BeginGetContext($null, $null)
# Wait 200ms at a time for a request to arrive.
# This loop yields control so PowerShell can process the Ctrl+C interrupt.
while (-not $asyncResult.AsyncWaitHandle.WaitOne(200)) {
# Do nothing, just waiting
}
# Once a request is detected, retrieve the context
$context = $listener.EndGetContext($asyncResult)
$request = $context.Request
$response = $context.Response
# Extract the Serial Number from the User-Agent header
$userAgent = $request.UserAgent
$serialNumber = "Unknown"
if (-not [string]::IsNullOrEmpty($userAgent) -and $userAgent -match '\(([^)]+)\)') {
# $matches[1] contains the value inside the parentheses
$serialNumber = $matches[1]
}
Write-Host "Received request from Handset ($serialNumber): $($request.Url.PathAndQuery)"
# Set XML Content Type per Poly Rove framework requirements
$response.ContentType = "application/xml"
$response.StatusCode = 200
$xmlResponse = ""
# Route the request based on the URL path
switch -Regex ($request.Url.AbsolutePath) {
"^/special" {
$xmlResponse = @"
<IPPhoneTextScreen>
<Text>Welcome to the Special Menu. Press 'Back' to return.</Text>
<Prompt>Cafeteria System</Prompt>
<SoftKey index="1">
<Label>Back</Label>
<URI>http://$($request.Url.Host):$port/</URI>
</SoftKey>
</IPPhoneTextScreen>
"@
}
"^/collect" {
$xmlResponse = @"
<IPPhoneInputScreen>
<URL>http://$($request.Url.Host):$port/submit</URL>
<InputField>
<Prompt>First_Name</Prompt>
<Parameter>__firstName__</Parameter>
<Default>Jeff</Default>
<InputFlags>AU</InputFlags>
</InputField>
</IPPhoneInputScreen>
"@
}
default {
$xmlResponse = @"
<IPPhoneTextMenu>
<Title>Cafeteria Menu</Title>
<Menu>
<Name>Today's Special</Name>
<URL>http://$($request.Url.Host):$port/special</URL>
</Menu>
<Menu>
<Name>User Input Demo</Name>
<URL>http://$($request.Url.Host):$port/collect</URL>
</Menu>
</IPPhoneTextMenu>
"@
}
}
# Convert string to UTF8 byte array and write to output stream
$buffer = [System.Text.Encoding]::UTF8.GetBytes($xmlResponse)
$response.ContentLength64 = $buffer.Length
$output = $response.OutputStream
$output.Write($buffer, 0, $buffer.Length)
$output.Close()
}
}
catch {
Write-Host "`nScript interrupted or encountered an error: $_"
}
finally {
if ($listener -and $listener.IsListening) {
Write-Host "Closing HTTP Listener..."
$listener.Stop()
$listener.Close()
}
}
The above "listens" on port 8080 to request from the Poly Rove Base station.
NOTE: You may need to allow the firewall to bypass port 8080 (this is at your own risk)
New-NetFirewallRule -DisplayName "Allow Rove XML Listener Port 8080" -Direction Inbound -LocalPort 8080 -Protocol TCP -Action Allow
Once started the script will display the network interfaces it has identified
.\PolyRoveXMLDemo.ps1
Listening for Poly Rove requests on port 8080.
Configure the Poly ROVE XML App parameter X_XmlAppServer parameter to one of the following addresses:
-> 192.168.1.99:8080
-> 192.168.1.158:8080
Press Ctrl+C to stop.
One of those would be the value to select as the X_XmlAppServer in the Web Interface
Once it is running it will show which menu was selected by the Handset and the Mac Address (based on the User agent) of the Handset in question
Received request from Handset (64167FF4CA9E): /
Received request from Handset (64167FF4CA9E): /special
- On the Handset press the three lines button
- Press the Navigation button to the left
- Press the middle Navigation button to select the XML Application
- A menu will be displayed
- Once selected the Sub Menu will display
The Icons are hardcoded at present and are:
| X-XmlAppIconIdx | Icon |
| 0 | |
| 1 | |
| 2 | |
| 3 | |
| 4-7 | Reserved for future use |
The script above leverages three primary root elements supported by the Poly Rove XML Framework
Automatic appending to query specific HTTP GET request:
-
Handset Index Example via X_XmlAppAddHsIdx:
GET /IPPhoneTextMenu.xml?IDX=3 -
Handset IPEI Example via X_XmlAppAddIPEI:
GET /IPPhoneTextMenu.xml?IPEI=03A8C00942 -
Handset Extension Example via X_XmlAppAddExt:
GET /IPPhoneTextMenu.xml?EXT=7011
- IPPhoneTextMenu
Menu screen, consisting of a title and a scrollable list of menu entries<IPPhoneTextMenu> <Title>Cafeteria Menu</Title> <Menu> <Name>Today's Special</Name> <URL>http://192.168.50.119:8080/special.xml</URL> </Menu> <Menu> <Name>Pasta</Name> <URL>http://192.168.50.119:8080/pasta.xml</URL> </Menu> </IPPhoneTextMenu> -
<IPPhoneTextMenu>: The root element telling the handset to render a scrollable list menu. -
<Title>: Sets the top header banner text of the menu screen (e.g., Cafeteria Menu). -
<Menu>: A container block for each individual selectable item in the list.-
<Name>: The text label displayed to the user for that specific menu row (e.g., Today's Special). -
<URL>: The destination link the handset requests when the user selects that menu entry.
-
- IPPhoneTextScreen
Text Screen, consisting of a title and a text box<IPPhoneTextScreen> <Text>Welcome to Onboarding Press 'Sign In'</Text> <Prompt>Voice Solution</Prompt> <SoftKey index="1"> <Label>Sign In</Label> <URI>http://192.168.50.119:8080/Web_Credential.xml</URI> </SoftKey> </IPPhoneTextScreen> -
<IPPhoneTextScreen>: The root XML element that tells the Poly Rove handset to render a free-form text display screen. -
<Prompt>: Defines the header title or prompt displayed at the very top banner of the screen (rendered as Voice Solution). -
<Text>: Contains the main body text displayed within the central text box container (rendered as Welcome to Onboarding \n Press 'Sign In'). -
<SoftKey index="1">: Configures a physical or virtual softkey button on the handset.-
<Label>: The text label displayed above the key at the bottom of the screen (rendered as Sign In). -
<URI>: The target URL that the handset will fetch when the user presses that softkey (e.g., pulling a new XML credential page from your server at[http://192.168.50.119:8080/Web_Credential.xml](http://192.168.50.119:8080/Web_Credential.xml)).
-
- IPPhoneInputArea
Multiline input. Only 1 input parameter to be collected<IPPhoneInputScreen> <URL>http://192.168.50.119:8080/collect.php?myvar=__firstName__&fakevar=1</URL> <InputField> <Prompt>First_Name</Prompt> <Parameter>__firstName__</Parameter> <Default>Jeff</Default> <InputFlags>AU</InputFlags> </InputField> </IPPhoneInputScreen> -
<IPPhoneInputScreen>: The root element that instructs the handset to render an input form. -
<URL>: The target script URL where the handset submits the collected form variables via a GET/POST request. -
<InputField>: Encloses the configuration parameters for a specific text field.-
<Prompt>: The label text displayed above the input box (e.g., First_Name). -
<Parameter>: The variable name substituted into the submission URL when the user saves the data. -
<Default>: Pre-populated placeholder text inside the input field (e.g., Jeff). -
<InputFlags>: Restricts the input character set (e.g.,AUfor alphanumeric input mode).
-
- IPPhoneDirectory
Directory Screen with Title and a scrollable list of entries<IPPhoneDirectory> <Title>phonebook</Title> <MenuItem> <Prompt>Whatever K. Xyzel</Prompt> <Dial>4505</Dial> </MenuItem> <MenuItem> <Prompt>CallD1</Prompt> <Dial>0307</Dial> </MenuItem> </IPPhoneDirectory> -
<IPPhoneDirectory>: The root element that tells the handset to render a directory list. -
<Title>: Sets the header title displayed at the top of the directory screen (e.g., phonebook). -
<MenuItem>: A container block for a single directory entry.-
<Prompt>: The display name or description of the contact shown in the list (e.g., Whatever K. Xyzel). -
<Dial>: The phone number or extension string that the handset will automatically dial when the user selects this contact item
-
Troubleshooting
In order to troubleshoot XML issue Navigate via the Web Interface to System Management > Device Admin > Syslog
The Logging Levels for LevelPLT should be changed to Debug
Once this was change replicate an issue and the go to Platform > Syslog
[ XmlAppHdlTask: Restart Timer ]
[ XmlAppHdl_Mgr: XMLAPP_START_SESSION_REQ ]
[ XmlAppHdl_GetCallerIdIndex() - IdxRet=0. SwCallerId=1 ]
[ XmlAppHdl_OpenInitialFile() - idx=0. pUrl=NULL. ]
[ XmlAppHdl_StartDownload() - idx=0. url=192.168.1.99:8080/ ]
[ XmlAppHdl_StartDownload() - handlelist[idx].fileName=/. handlelist[idx].filePath=192.168.1.99, GftProtocol=1 ]
[ XmlAppHdlTask: Restart Timer ]
[ XmlAppHdl_GetCallerIdIndex() - IdxRet=0. SwCallerId=1 ]
[ XmlAppHdl_Mgr: GFT_DOWNLOAD_CFM, Id: 1, Size: 304 ]
[ XmlAppHdl_Mgr(): RootElementSupported=XML_MB_TAG_PHONE_MENU ]
[ XmlAppHdl_Mgr(): handlelist[idx].NumberOfActiveEntries=2,idx=0 ]
[ XmlAppHdl_Mgr() call SendPhbMgrStartSessionCfm() ]
[ XmlAppHdlTask: Restart Timer ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ handlelist[0].ItemSelect=FALSE ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - RootElementSupported ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_PHONE_MENU/XML_MB_TAG_MENU ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - numberOfSoftKeys=0 ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_TITLE ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_VALUE_TYPE_NAME ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_NAME ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_PHONE_NUMBER ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_MENU/XML_MB_TAG_PHONE_MENU ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_VALUE_TYPE_NAME ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_NAME ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_PHONE_NUMBER ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_MENU/XML_MB_TAG_PHONE_MENU ]
[ XmlAppHdl_ProcessSoftKeys - XML_MB_TAG_SOFT_KEY_ITEM. numberOfSoftKeys=0 ]
[ XmlAppHdl_Mgr: XMLAPP_READ_XML_REQ, Title=Cafeteria Menu ]
[ XmlAppHdl_Mgr: SendXmlAppReadCfm() - pEntry != NULL. ReadCnt=2, Start=1 ]
[ XmlAppHdlTask: Restart Timer ]
[ XmlAppHdl_Mgr: XMLAPP_ITEM_SELECT_XML_REQ. Idx=0,SelctionType=0, SelectedIndex=1,UserInputLength=0 ]
[ XmlAppHdl_Mgr: XMLAPP_ITEM_SELECT_XML_REQ. RootElementEntry is valid ]
[ XmlAppHdl_Mgr: XMLAPP_ITEM_SELECT_XML_REQ. RootElementEntry=0 TotalPhbEntries=0 ]
[ XmlAppHdl_Mgr: XmlAppHdl_SelectInputFromPP_Hdl() called ]
[ XmlAppHdl_StartDownload() - idx=0. url=http://192.168.1.99:8080/special ]
[ XmlAppHdl_StartDownload() - handlelist[idx].fileName=/special. handlelist[idx].filePath=192.168.1.99, GftProtocol=1 ]
[ XmlAppHdlTask: Restart Timer ]
[ XmlAppHdl_GetCallerIdIndex() - IdxRet=0. SwCallerId=1 ]
[ XmlAppHdl_Mgr: GFT_DOWNLOAD_CFM, Id: 1, Size: 267 ]
[ XmlAppHdl_Mgr(): RootElementSupported=XML_MB_TAG_TXTSCREEN ]
[ XmlAppHdl_Mgr(): handlelist[idx].NumberOfActiveEntries=1,idx=0 ]
[ XmlAppHdl_Mgr() call SendXmlAppItemSelectCfm() ]
[ XmlAppHdlTask: Restart Timer ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ handlelist[0].ItemSelect=TRUE ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - RootElementSupported ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_TXTSCREEN TotalPhbEntries=0 ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - numberOfSoftKeys=1 ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_TXTSCREEN. Txt(defaultvalue)=Welcome to the Special Menu. Press 'Back' to return. Prompt(name)=Cafeteria System TextFlags(flags)= ]
[ XmlAppHdl_ProcessSoftKeys - XML_MB_TAG_SOFT_KEY_ITEM. numberOfSoftKeys=1 ]
[ XmlAppHdl_Mgr: PHBMGR_READ_REQ - XML_MB_TAG_INPUT_ITEM/XML_MB_TAG_DIRECTORY/XML_MB_TAG_MENUITEM/XML_MB_TAG_TXTSCREEN ]
[ XmlAppHdl_Mgr: XMLAPP_READ_XML_REQ, Title= ]
[ XmlAppHdl_Mgr: SendXmlAppReadCfm() - pEntry != NULL. ReadCnt=2, Start=1 ]