[Asterisk-Users] Set system time over the phone
Mike Sander
mike at corporatebankinginternational.com
Tue Apr 5 13:50:38 MST 2005
Looks good - thanks for the help!
Mike
----- Original Message -----
From: "Roman Volf" <volfman at keystreams.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Sent: Tuesday, April 05, 2005 4:48 PM
Subject: Re: [Asterisk-Users] Set system time over the phone
> Another way is to do:
>
> exten 456,1,Background(Please-set-time-mmddhhmm)
> exten _.,1,System (echo ${EXTEN} > /tmp/datetime )
>
>
> Then have a cron job that runs every minute to check if file exists. For
> example:
>
>
> #!/bin/bash
>
> if [ -f /tmp/datetime ] then
> date `cat /tmp/datetime`
> rm -f /tmp/datetime
> fi
>
>
>
> This should work fine.
>
>
>
> Roman Volf
> Keystreams Internet Solutions
> volfman at keystreams.com
>
>
>
> Matt Riddell wrote:
>
>> Peter Bowyer wrote:
>>
>>>> exten 456,1,Background(Please-set-time-mmddhhmm)
>>>> exten _.,1,System (date ${EXTEN})
>>>>
>>>> If I dial 456 I get the message, so I type 04021305 (2nd April, 13:05).
>>>>
>>>> On the console Asterisk reports the command Dial 04021305 exits
>>>> non-zero.
>>>
>>>
>>> You need 'Read' instead of 'Background'.
>>
>>
>> No, because his next line is _.,1 so it will actually use the extension.
>>
>> His problem is just one of permissions. Maybe he should use a suid prog
>> to set the date.
>>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.2 - Release Date: 5/04/2005
>
>
More information about the asterisk-users
mailing list