[Freeswitch-users] Current timestamp variable in dialplan?
Gregor Nanger
gregor at infomedia.si
Wed Nov 9 14:49:04 UTC 2022
What does ${regex(${system date '+%F %T.%6N'}|(.+)|%1)} returns? If I try
it in CLI I don't get anything.
On Wed, 9 Nov 2022 at 14:17, Antony Stone <
Antony.Stone at freeswitch.open.source.it> wrote:
> On Wednesday 09 November 2022 at 13:54:07, Gregor Nanger wrote:
>
> > If you would aks me, I would say that this simple functionality is
> > available in FS and within 2 minutes I can google it. But now I am
> > struggling for hours and can't find a solution to print, log... current
> > time in microseconds or nanoseconds. If %q would work in strftime it
> would
> > be a solution, but it doesn't work.
> >
> > Is there another tool to display the current time in micro/nano seconds?
>
> The only thing I've come up with is:
>
> <action
> application="set"
> data="now=${regex(${system date '+%F %T.%6N'}|(.+)|%1)}"
> />
>
> Note however that Brian West has said "I'd not recommend doing that,
> because
> every time you do a get var, you cause a pool allocation and doing this in
> a
> loop will make your session pool swell at the rate of whatever you're
> calling
> get_var on. Doing anything at all inline with the dialplan is not the
> right
> approach. your logic and info should be all external, keying off events
> either
> on ESL or custom modules you wrote."
>
>
> Antony.
>
> --
> All generalisations are inaccurate.
>
> Please reply to the
> list;
> please *don't* CC
> me.
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time
> https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20221109/287236c5/attachment.html>
More information about the FreeSWITCH-users
mailing list