[Freeswitch-users] Current timestamp variable in dialplan?

Gregor Nanger gregor at infomedia.si
Wed Nov 9 09:31:26 UTC 2022


now is by default, if you just use strftime. Try eval ${strftime()}

Do you know how to print now in milliseconds like:
<action application="set" data="var_name=${utcnow}"/>


On Wed, 9 Nov 2022 at 10:22, Antony Stone <
Antony.Stone at freeswitch.open.source.it> wrote:

> On Tuesday 08 November 2022 at 23:55:18, Gregor Nanger wrote:
>
> > Antony, would strftime [format_string] do the job?
>
> Quite possibly, provided I can find a value of "now" to format with it.
>
> > On Sat, 5 Nov 2022 at 21:48, Piotr Gregor wrote:
> > > Antony,
> > >
> > > This sounds like a job for a module, especially that you mentioned you
> > > would like to upload/send it somewhere and combine it with data from
> > > other services.
> > > You create a module that exports one or more applications, you can call
> > > them from dialplan.
> > >
> > > best,
> > >
> > >
> > > Piotr Gregor
> > >
> > > On Fri, Nov 4, 2022 at 7:30 PM Antony Stone wrote:
> > >> On Friday 04 November 2022 at 19:13:27, Brian West wrote:
> > >> > Antony,
> > >> >
> > >> > Maybe you can come to our next office hours?
> > >>
> > >> Er, what?  Where are you?
> > >>
> > >> > On Fri, Nov 4, 2022 at 1:05 PM Antony Stone wrote:
> > >> > > On Friday 04 November 2022 at 18:25:21, Brian West wrote:
> > >> > > > 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.
> > >> > >
> > >> > > Hm, this sounds like an interesting and important conceptual
> aspect
> > >> > > of the way FreeSwitch works which I suspect I haven't fully "got".
> > >> > >
> > >> > > Can you point me at the documentation which explains this, for
> > >> > > people who are more used to procedural programming, and show how
> we
> > >> > > should be thinking about FreeSwitch dialplans instead?
> > >> > >
> > >> > > I'm certainly keen on using FreeSwitch in as efficient a manner as
> > >> > > possible :)
> > >>
> > >> Antony.
>
> --
> <flopsie> yes, but this is #lbw, we don't do normal
>
>                                                    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/bab19796/attachment.html>


More information about the FreeSWITCH-users mailing list