Child pages
  • Notifications via Infobox


Contents

The phone allows the user to control the content and visual layout of the Infobox by sending <InfoBoxQueue> to it via XML. The XML can be sent either directly via SIP Notify or be included in XML files that are launched via e.g Action URLs


NOTIFY sip:430385@10.10.10.92:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.1.1:5060;branch=z9hG4bK-28818-1-0
From: wbc <sip:sipp@127.0.1.1:5060>;tag=1
To: sut <sip:430385@10.10.10.92:5060>
Call-ID: 1-28818@127.0.1.1
CSeq: 1 NOTIFY
Max-Forwards: 70
Content-Type: application/snomxml
Content-Length: 140
<?xml version="1.0" encoding="UTF-8"?>
<InfoBoxQueue>
 <Infobox>
  <Line>
   <Text>Hallo Welt</Text>
  </Line>
  </InfoBox> 
</InfoBoxQueue>


Displaying a simple <InfoBoxQueue>

In the following example the phone will display a status message box with one line showing "Hallo Welt":

<?xml version="1.0" encoding="UTF-8"?>
<InfoBoxQueue>
 <Infobox>
  <Line>
   <Text>Hallo Welt</Text>
  </Line>
  </InfoBox> 
</InfoBoxQueue>


Displaying an <InfoBoxQueue> with more than one line <Line pos=“”>

In the following example the first line of the Infobox will draw "Hallo" while the second one will show "Welt":

<?xml version="1.0" encoding="UTF-8"?>
<InfoBoxQueue>
 <InfoBox>
  <Line pos="1">
   <Text>Hallo</Text>
  </Line>
  <Line pos="2">
   <Text>Welt</Text>
  </Line>
 </InfoBox> 
</InfoBoxQueue>




The phone will ignore all additional <Text> or <Icon> values if it does not support the number of rows specified via the xml. 

If no line attributes are specified but there are e.g. two <Line> tags inside the <Infobox> tag, the phone treats these the same way as if lines were specified.

If only one <Line>/<Text> tag is specified but the text is longer than the available space for one row, the phone will utilize the second row to show the rest of the text. Consequently when another <Infobox> is send that either replaces the first or second line, the phone renders the new message correctly in the first or second line (where it is specified with attribute or if just one is sent then the first is replaced)

If two <Line> tags are sent and both of them are too long to fit in one row, the text inside each line is cut off and ended with an ellipsis at the end of the corresponding line.

Displaying an <InfoBoxQueue> with Images via <Icon>

In the following example a DND icon is shown in the first line, while in the second an image is loaded from an external URL showing a small:


<?xml version="1.0" encoding="UTF-8"?>
<InfoBoxQueue>
 <InfoBox>
  <Line pos=“1">
   <Icon>kIconTypeStatusMessageDnd</Icon>
   <Text>Hallo</Text> </Line>
  <Line pos=“2”>
   <Icon>http://192.168.0.100:8081/dnd.png</Icon>
   <Text>Welt</Text>
  </Line>
 </InfoBox> 
</InfoBoxQueue>


The icons should be 18x18px. Icons that are bigger will not fit perfectly within the lines and might lead to misaligned elements.

Displaying an <InfoBoxQueue> with a set duration for each Infobox <Infobox duration="">

In the following example the phone will display a status message box with one line showing "Hallo Welt” for two seconds and then automatically disappear:


<?xml version="1.0" encoding="UTF-8"?> 
<InfoBoxQueue>
 <InfoBox duration="2">
  <Line>
   <Text>Hallo Welt</Text>
  </Line>
 </InfoBox>
</InfoBoxQueue>



If no duration is set, then it will stay there permanently until explicitly cleared by pressing Cancel if cancel_desktop is enabled in the settings or by sending an empty <InfoBoxQueue>


Creating a Queue with <Infobox duration="">

In the following example the phone will first show “Hallo Welt” then after 1 sec the previous message is cleared and “Hello Sunny” is shown and one second later “Hallo Chris”:


<?xml version="1.0" encoding="UTF-8"?> 
<InfoBoxQueue>
 <Infobox duration="1">
  <Line> 
   <Text>Hallo Welt</Text>
  </Line>
 </InfoBox>
 <InfoBox duration="1">
  <Line> 
   <Text>Hello Sunny</Text>
  </Line>
 </InfoBox>
 <InfoBox duration="1">
  <Line> 
   <Text>Hallo Chris</Text>
 </Line>
 </InfoBox>
</InfoBoxQueue>



After the last Infobox has been displayed the box disappears.


Looping a Queue with <InfoboxQueue loop="">

In the example below the first Infobox will be displayed for two seconds and afterwards the second Infobox is displayed for two seconds. When timer for the second Infobox has passed, the first Infobox is displayed again:


<?xml version="1.0" encoding="UTF-8"?>
<InfoBoxQueue loop="true">
 <InfoBox duration="2">
  <Line>
   <Text>Hallo</Text>
  </Line>
  <Line>
   <Text>Welt</Text>
  </Line>
 </InfoBox>
 <InfoBox duration="2">
  <Line>
   <Text>Hello</Text>
  </Line>
  <Line>
   <Text>World</Text>
  </Line>
 </InfoBox>
</InfoBoxQueue>



Sending an InfoBoxQueue after an InfoBoxQueue that is currently looping with no "loop" attribute will simply replace the previous one.

Appending to a Queue with <InfoBoxQueue append="">

By default a newly received InfoBoxQueue overwrites any existing one. In order to append it to an existing one, the "append" parameter has to be included. In the previous example "Hallo Welt" and "Hello World" were looping. The example below appends another Infobox to that loop:


<?xml version="1.0" encoding="UTF-8"?>
<InfoBoxQueue append="true">
 <InfoBox duration="2">
  <Line>
   <Text>Append</Text>
  </Line>
  <Line>
   <Text>Another Hello World</Text>
  </Line>
 </InfoBox>
</InfoBoxQueue>



Appending an <InfoBoxQueue> to a queue with <Infobox> that have a duration correctly updates either all or specific lines depending on what is specified in the <Infobox>.

Appending to an <InfoBoxQueue> without duration set for the containing <Infobox> does not automatically update the current infobox e.g. If the current Infobox shows only one line and has no duration and another infobox is appended that targets the second line it will not update the current display. The first message has to be manually cancelled first or alternatively the second Infobox has to contain the same lines as the first infobox.

Sending an InfoBoxQueue after an InfoBoxQueue that is currently looping with an "append" attribute will append the Infoboxes of the second InfoBoxQueue to the first one and thereby extending the looping InfoBoxQueue at the end

Sending an InfoBoxQueue with both "loop" and "append" set to true while a non-looping queue is active, will append the new queue to the existing one and switch it to looping.

Sending an InfoBoxQueue with "loop=false" or no loop attribute and "append=true"" while a looping queue is active, will append the new queue to the existing one and switch off looping.

Clearing an <InfoBoxQueue>

Clearing the complete Queue is done by sending an empty <InfoBoxQueue>:


<?xml version="1.0" encoding="UTF-8"?>
<InfoBoxQueue>
</InfoBoxQueue>


Clearing a specific line in an <InfoBox>


Clearing a specific line is done by sending an empty <Text> Tag for that specific line:


<?xml version="1.0" encoding="UTF-8"?>
<InfoBoxQueue>
 <InfoBox>
  <Line pos="2">
   <Text></Text>
  </Line>
 </InfoBox>
</InfoBoxQueue>


Changing the visual colors of the <InfoBox>

The color of the infobox can also be controlled via settings. These are the default values:


status_msgs_background_color=242 242 242 255
status_msgs_border_color=182 183 184 255
  • No labels