Howto:Voicemail message duration: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
(New page: ==Applies To== This information applies to PBX V11 or higher. <!-- Keywords: enter keywords, foreign translations and/or synoyms not appearing in the article here for better search resul...)
(No difference)

Revision as of 14:16, 25 August 2020

Applies To

This information applies to

PBX V11 or higher.


More Information

The current email.xml file, used by the system to send emails, doesn't provide information about message duration. This information could be useful to identify easily the very short messages recorded by mistake.

Problem Details

The Voicemail XML documentation (available here https://www.innovaphone.com/xsd/vm.htm) doesn't provide any special command to get the message duration. Anyhow we have a command ables to provide the file size generated during the recording phase. The idea is calculate the duration based on the file size. The following code must be added to the original email.xml just after the statement:

<store-getstat root="" name="$vm" out-size="$size" out-error="$error"/>

<switch var="$size">

 <case less-equal="40000">
   <assign out="$message_duration" value="message duration less than 5 seconds "/>
 </case>
 <case less-equal="64000">
   <assign out="$message_duration" value="message duration of 5 - 8 seconds "/>
 </case>
 <case less-equal="80000">
   <assign out="$message_duration" value="message duration of 8 - 10 seconds "/>
 </case>
 <case less-equal="96000">
   <assign out="$message_duration" value="message duration of 10 - 12 seconds "/>				
 </case>
 <case less-equal="120000">
   <assign out="$message_duration" value="message duration of 12 - 15 seconds "/>				
 </case>
 <case greater="120000">
   <assign out="$message_duration" value="message duration greater than 15 seconds "/>
 </case>

</switch>


System Requirements

Installation

Configuration

Known Problems