Howto:Speaking Clock with Voicemail XML Script: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
mNo edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 7: Line 7:


==More Information==
==More Information==
The Speaking Clock is a telephony service that gives the current date and time. This is a tipical Telco service but is usefull for blind and partially sighted people.
The Speaking Clock is a telephony service that gives the current date and time. This is a typical Telecom service but is useful for blind and partially sighted people.




====XML script====
====XML script====
The service is realized using Innovaphone XML Voicemail script, no license is required for this feature.
The service is realized using Innovaphone XML Voicemail script.


Everytime you call the script, the XML writes a file called "time.txt". The content of the file is not important.
Every time you call the script, the XML writes a file called "time.txt". The content of the file is not important.
Significant informations are file properties.
Significant informations are file properties.
Infact, the second action of the script is to use "store-getstat" XML element to obtain the day of the week, day of month, month, year, hour and minute.
In fact, the second action of the script is to use "store-getstat" XML element to obtain the day of the week, day of month, month, year, hour and minute.
The last task is reproduce files stored in the "audio" folder for every collected informations.
The last task is reproduce files stored in the "audio" folder for every collected informations.


Line 21: Line 21:


==Configuration==
==Configuration==
Create a VM object in your PBX and put in the “Script URL” the path of your XML object. Example if installed on a directory called "SPEAKING CLOCK":
Create a VM object in your PBX and put in the “Script URL” the path of your XML object. Example if installed in a directory called "SPEAKING CLOCK":


http://xxx.yyy.zzz.vvv/inno/speaking_clock/speaking_clock.xml
http://xxx.yyy.zzz.vvv/inno/speaking_clock/speaking_clock.xml
Line 31: Line 31:
To set your language, download the appropriate Innovaphone Voice Mail package from http://download.innovaphone.com/ice/6.00/ and copy audio file in "audio" folder.
To set your language, download the appropriate Innovaphone Voice Mail package from http://download.innovaphone.com/ice/6.00/ and copy audio file in "audio" folder.


E.g.  vm-it for italian, vm-en for english, etc.
E.g.  vm-it for Italian, vm-en for English, etc.


Edit the script at line 7 and change the value of variable '''$lang''' according to your language:
Edit the script at line 7 and change the value of variable '''$lang''' according to your language:


'''<assign out="$lang" value="it"/>''' for italian
'''<assign out="$lang" value="it"/>''' for Italian


'''<assign out="$lang" value="en"/>''' for english
'''<assign out="$lang" value="en"/>''' for English


Edit the script at line 37, 46 and 57 and change the name of '''string2''' variable to permit the right localization of files that play "hours", "and", "minutes" announcement.
Edit the script at line 37, 46 and 57 and change the name of '''string2''' variable to permit the right localization of files that play "hours", "and", "minutes" announcement.


==Download==
==Licensing Information==
The aforementioned ''audio files'' are part of the innovaphone voice mail package and as such require a valid license.  You thus need to have a voice-mail license installed to use them.  Of course, you can record the files yourself to avoid this.


[[media:speaking_clock.zip]]
== Download ==
*[http://wiki.innovaphone.com/index.php?title=Howto:Wiki_Sources#speakclock Download] the complete file package of scripts and files described in this article.
 
== Known Problems ==
Sometimes the store-getstat xml function has trouble to get stats.
As workaround simply add a "<wait sec="1"/>" after store-cookie.

Latest revision as of 15:18, 23 August 2021

3rd party input
this is 3rd party content not provided by innovaphone, see history for authors.

Applies To

innovaphone PBX, V7 or higher


More Information

The Speaking Clock is a telephony service that gives the current date and time. This is a typical Telecom service but is useful for blind and partially sighted people.


XML script

The service is realized using Innovaphone XML Voicemail script.

Every time you call the script, the XML writes a file called "time.txt". The content of the file is not important. Significant informations are file properties. In fact, the second action of the script is to use "store-getstat" XML element to obtain the day of the week, day of month, month, year, hour and minute. The last task is reproduce files stored in the "audio" folder for every collected informations.

The script is structured to use the Innovaphone Voicemail audio file.

Configuration

Create a VM object in your PBX and put in the “Script URL” the path of your XML object. Example if installed in a directory called "SPEAKING CLOCK":

http://xxx.yyy.zzz.vvv/inno/speaking_clock/speaking_clock.xml

Assign a number to this object, now you can call it from any phone.

Sp vm obj.PNG

To set your language, download the appropriate Innovaphone Voice Mail package from http://download.innovaphone.com/ice/6.00/ and copy audio file in "audio" folder.

E.g. vm-it for Italian, vm-en for English, etc.

Edit the script at line 7 and change the value of variable $lang according to your language:

<assign out="$lang" value="it"/> for Italian

<assign out="$lang" value="en"/> for English

Edit the script at line 37, 46 and 57 and change the name of string2 variable to permit the right localization of files that play "hours", "and", "minutes" announcement.

Licensing Information

The aforementioned audio files are part of the innovaphone voice mail package and as such require a valid license. You thus need to have a voice-mail license installed to use them. Of course, you can record the files yourself to avoid this.

Download

  • Download the complete file package of scripts and files described in this article.

Known Problems

Sometimes the store-getstat xml function has trouble to get stats. As workaround simply add a "<wait sec="1"/>" after store-cookie.