[Asterisk-Dev] PATCH: added SAY TIME to AGI Interface
John Todd
jtodd at loligo.com
Sun Sep 14 13:50:21 MST 2003
>http://bugs.digium.com/bug_view_page.php?bug_id=0000269
>
>The above bug ID includes a patch to app_agi.c to expose ast_say_time to
>the AGI interface.
>
>Call as: SAY TIME <epoch> <escapedigits>.
>
>--Eric
>
>--
>BTEL Consulting
>+1-850-484-4535 x2111 (Pensacola)
>+1-504-595-3916 x2111 (New Orleans)
>+1-877-677-9643 x2111 (Toll Free)
>
This is great! I actually had talked Tilghman Lesher about such an
application at the dialplan level. However, he is swamped right now.
Might you be induced to write a SayTime(epoch|format|zone)
application? The stuff in voicemail2 is very interesting, and I often
just want a quick method to say a date within some diaplan logic (not
inside of an AGI) and the ast_say_date_with_format() seems to solve
that problem. My ineptitude with C precludes me from doing this
myself. :( This seems to be a very obvious application that would
be used frequently, but is missing from the basic application list.
I suppose I should put this as a an application request on the
bugtracker, but let's see if it gets any traction here.
Here is my idea (modify as anyone sees fit):
application: SayTime
[Synopsis]:
Says the date given in the specified format and timezone
[Description]
SayTime(time[|[format][|[zone][|options]]): Takes the given time
(UNIX seconds) and announces it in "long" form which is
understandable to the listener, with optional formatting and timezone
data. Standard language localization is honored.
If no format is specified, the default format is "HABd". For a
short example of format options, see voicemail.conf.
Timezones are those used by strftime (examples: see
/usr/share/zoneinfo). Default timezone is whatever the system is set
to use.
The "b" option treats the application as a "background"
application, meaning that the user can press DTMF keys during
playback and they will be interpreted as they are with the Background
application. Common usage would be for being able to "skip" over a
date announcement with a keypress.
Example: SayTime(1063529070|IMp|US/Eastern)
would say: "Four forty-four PM"
Example: SayTime(1063529070)
would say (on a machine set to GMT): "Nineteen fourty-four,
Saturday, September fourteenth"
Example: SayTime(1063529070||US/Eastern|b)
would say "Sixteen forty-four, Saturday, September fourteenth" but
would allow the user to hit a digit to escape from the date readback
JT
More information about the asterisk-dev
mailing list