VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
nitesh at vipernetwork... Guest
|
Posted: Fri Jan 18, 2008 3:13 pm Post subject: [asterisk-users] SAY TIME + PHPAGI + Timezone |
|
|
Hello All,
Is there any way to change the timezone on the fly? I have this little
time clock program running on Asterisk system developed using PHPAGI.
Currently, whenever user logs in, Asterisk will prompt the current
system time using "$agi->say_time();" which executes "SAY TIME". Now the
current timezone set on the system is "PST", and I have a request to
prompt multiple timezones based on the users location.
First part is easy to lookup from which area code the user is calling,
now the second part is to set the timezone based on the area code and
prompt the users correct time.
For example, if 248 (MI) user dials into the system, then time clock has
to prompt EST time and if 714 (CA) user dials in then prompt PST time.
Any suggestions... Thanks
Cheers,
Nitesh |
|
Back to top |
|
|
sip at arcdiv.com Guest
|
Posted: Fri Jan 18, 2008 3:32 pm Post subject: [asterisk-users] SAY TIME + PHPAGI + Timezone |
|
|
Use the Set(TZone=blah) command in the dialplan. I.e. Set(TZone=EST5EDT)
N.
Nitesh Divecha wrote:
Quote: | Hello All,
Is there any way to change the timezone on the fly? I have this little
time clock program running on Asterisk system developed using PHPAGI.
Currently, whenever user logs in, Asterisk will prompt the current
system time using "$agi->say_time();" which executes "SAY TIME". Now the
current timezone set on the system is "PST", and I have a request to
prompt multiple timezones based on the users location.
First part is easy to lookup from which area code the user is calling,
now the second part is to set the timezone based on the area code and
prompt the users correct time.
For example, if 248 (MI) user dials into the system, then time clock has
to prompt EST time and if 714 (CA) user dials in then prompt PST time.
Any suggestions... Thanks
Cheers,
Nitesh
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
Back to top |
|
|
sip at arcdiv.com Guest
|
Posted: Fri Jan 18, 2008 3:35 pm Post subject: [asterisk-users] SAY TIME + PHPAGI + Timezone |
|
|
of course, that assumes you're reading the variable in the AGI.
SIP wrote:
Quote: | Use the Set(TZone=blah) command in the dialplan. I.e.
Set(TZone=EST5EDT)
N.
Nitesh Divecha wrote:
Quote: | Hello All,
Is there any way to change the timezone on the fly? I have this
little time clock program running on Asterisk system developed using
PHPAGI. Currently, whenever user logs in, Asterisk will prompt the
current system time using "$agi->say_time();" which executes "SAY
TIME". Now the current timezone set on the system is "PST", and I
have a request to prompt multiple timezones based on the users location.
First part is easy to lookup from which area code the user is
calling, now the second part is to set the timezone based on the area
code and prompt the users correct time.
For example, if 248 (MI) user dials into the system, then time clock
has to prompt EST time and if 714 (CA) user dials in then prompt PST
time.
Any suggestions... Thanks
Cheers,
Nitesh
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
|
Back to top |
|
|
tilghman at mail.jeffa... Guest
|
Posted: Fri Jan 18, 2008 5:42 pm Post subject: [asterisk-users] SAY TIME + PHPAGI + Timezone |
|
|
On Friday 18 January 2008 14:13:55 Nitesh Divecha wrote:
Quote: | Is there any way to change the timezone on the fly? I have this little
time clock program running on Asterisk system developed using PHPAGI.
Currently, whenever user logs in, Asterisk will prompt the current
system time using "$agi->say_time();" which executes "SAY TIME". Now the
current timezone set on the system is "PST", and I have a request to
prompt multiple timezones based on the users location.
|
Don't use SAY TIME. Use EXEC with the SayUnixTime application and the
appropriate arguments.
--
Tilghman |
|
Back to top |
|
|
nitesh at vipernetwork... Guest
|
Posted: Fri Jan 18, 2008 10:48 pm Post subject: [asterisk-users] SAY TIME + PHPAGI + Timezone |
|
|
Thanks everyone for the feedback... Manage to prompt time using EXEC
with the SayUnixTime.
Here is the snapshot of the timezone: -
============================
// Get current time
$currentTime = time();
// Set the offset
$offset = 3;
// Modified time
$modifiedTime = $currentTime + ($offset * 60 * 60);
debug("Current time: $currentTime", 3);
debug("Offset time: $modifiedTime", 3);
// Say unix time
$agi->exec("SayUnixTime", "$modifiedTime,EST5EDT,ABdY \'digits/at\' IMp");
Cheers,
Nitesh
Tilghman Lesher wrote:
Quote: | On Friday 18 January 2008 14:13:55 Nitesh Divecha wrote:
Quote: | Is there any way to change the timezone on the fly? I have this little
time clock program running on Asterisk system developed using PHPAGI.
Currently, whenever user logs in, Asterisk will prompt the current
system time using "$agi->say_time();" which executes "SAY TIME". Now the
current timezone set on the system is "PST", and I have a request to
prompt multiple timezones based on the users location.
|
Don't use SAY TIME. Use EXEC with the SayUnixTime application and the
appropriate arguments.
|
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|