What problem are you trying to solve? I still can't clearly understand what you're trying to accomplish. /b On Wed, Nov 2, 2022 at 12:12 PM Antony Stone < Antony.Stone@freeswitch.open.source.it> wrote:
On Wednesday 02 November 2022 at 17:18:26, Brian West wrote:
Ok let's step back, what do you mean by this?
I mean that I wish either to assign the current timestamp to a variable in the format 2022-11-02 12:34:56.789789, or to find a system variable which will provide this when I reference something like ${now}.
I hope that's clear?
As a workaround until I find out how to do this the correct way, the following command does what I want, however I suspect it's not very efficient:
<action application="set" data="now=${regex(${system date '+%F %T.%N'}|(.+)|%1)}" />
I got the somewhat complicated syntax of that command from https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools:+system
Antony.
On Wed, Nov 2, 2022 at 11:15 AM Antony Stone wrote:
On Wednesday 02 November 2022 at 16:12:22, Brian West wrote:
Are you trying to do something like billing? If so using variables or anything getvar related will result in pool swell.
Billing is out of band, or inband with things like nibble bill, which is just an implementation of a core idea of being able to nibble from a balance using the session heartbeats.
No, this is nothing to do with billing.
I'm basically just looking for the same value which would be logged in a verbose logfile output against each dialplan action.
On Wed, Nov 2, 2022 at 9:55 AM Antony Stone wrote:
Hi.
I'm looking for a variable I can access in the dialplan (I use XML if it matters) which will tell me the current time (when I read the variable) in the format 2022-11-02 12:34:56.789789
If that's not available, but a microsecond-resolution Epoch timestamp is, what would be the function to convert this to the above human format? https://freeswitch.org/confluence/display/FREESWITCH/Switch+core+ variables tells me about variables which are set after a channel is hung up, so they're no use during call setup, and
https://freeswitch.org/confluence/display/FREESWITCH/Channel+Variables
doesn't seem to have anything which represents "now".
Can anyone suggest where I should be looking to find such variables?
Thanks,
Antony.
-- Someone has stolen all the toilets from New Scotland Yard. Police say they have absolutely nothing to go on.
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Brian West | Co-founder and Developer Need Commercial support? email sales@freeswitch.com FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g> Email: brian@freeswitch.com Mobile: 918-424-9378 Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/> [image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch>