public class SayDateTimeCommand extends AbstractAgiCommand
Returns 0 if playback completes without a digit being pressed, or the ASCII numerical value of the digit if one was pressed or -1 on error/hangup.
Available since Asterisk 1.2.
| Constructor and Description |
|---|
SayDateTimeCommand(long time)
Creates a new SayDateTimeCommand that says the given time.
|
SayDateTimeCommand(long time,
String escapeDigits)
Creates a new SayDateTimeCommand that says the given time and allows
interruption by one of the given escape digits.
|
SayDateTimeCommand(long time,
String escapeDigits,
String format)
Creates a new SayDateTimeCommand that says the given time in the given
format and allows interruption by one of the given escape digits.
|
SayDateTimeCommand(long time,
String escapeDigits,
String format,
String timezone)
Creates a new SayDateTimeCommand that says the given time in the given
format and timezone and allows interruption by one of the given escape
digits.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildCommand()
Returns a string suitable to be sent to asterisk.
|
String |
getEscapeDigits()
Returns the digits that allow the user to interrupt this command.
|
String |
getFormat()
Returns the format the time should be said in.
|
long |
getTime()
Returns the time to say in seconds elapsed since 00:00:00 on January 1,
1970, Coordinated Universal Time (UTC).
|
String |
getTimezone()
Returns the timezone to use when saying the time.
|
void |
setEscapeDigits(String escapeDigits)
Sets the digits that allow the user to interrupt this command.
|
void |
setFormat(String format)
Sets the format the time should be said in.
|
void |
setTime(long time)
Returns the time to say in seconds elapsed since 00:00:00 on January 1,
1970, Coordinated Universal Time (UTC).
|
void |
setTimezone(String timezone)
Sets the timezone to use when saying the time.
|
escapeAndQuote, escapeAndQuote, setAsteriskVersion, toStringpublic SayDateTimeCommand(long time)
time - the time to say in seconds elapsed since 00:00:00 on January
1, 1970, Coordinated Universal Time (UTC)public SayDateTimeCommand(long time,
String escapeDigits)
time - the time to say in seconds elapsed since 00:00:00 on January
1, 1970, Coordinated Universal Time (UTC)escapeDigits - the digits that allow the user to interrupt this
command or null for none.public SayDateTimeCommand(long time,
String escapeDigits,
String format)
time - the time to say in seconds elapsed since 00:00:00 on January
1, 1970, Coordinated Universal Time (UTC)escapeDigits - the digits that allow the user to interrupt this
command or null for none.format - the format the time should be said inpublic SayDateTimeCommand(long time,
String escapeDigits,
String format,
String timezone)
time - the time to say in seconds elapsed since 00:00:00 on January
1, 1970, Coordinated Universal Time (UTC)escapeDigits - the digits that allow the user to interrupt this
command or null for none.format - the format the time should be said intimezone - the timezone to use when saying the time, for example
"UTC" or "Europe/Berlin".public long getTime()
public void setTime(long time)
This property is mandatory.
time - the time to say in seconds elapsed since 00:00:00 on January
1, 1970, Coordinated Universal Time (UTC)public String getEscapeDigits()
public void setEscapeDigits(String escapeDigits)
escapeDigits - the digits that allow the user to interrupt this
command or null for none.public String getFormat()
public void setFormat(String format)
See voicemail.conf.
Defaults to "ABdY 'digits/at' IMp".
format - the format the time should be said inpublic String getTimezone()
public void setTimezone(String timezone)
A list of available timezones is available in
/usr/share/zoneinfo on your Asterisk server.
Defaults to machine default.
timezone - the timezone to use when saying the time, for example
"UTC" or "Europe/Berlin".public String buildCommand()
AgiCommandbuildCommand in interface AgiCommandbuildCommand in class AbstractAgiCommandCopyright © 2004–2021. All rights reserved.