<div dir="ltr"><div>Inline below.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 4, 2022 at 11:06 AM Antony Stone <<a href="mailto:Antony.Stone@freeswitch.open.source.it">Antony.Stone@freeswitch.open.source.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Friday 04 November 2022 at 16:05:39, Brian West wrote:<br>
<br>
> The way the dial plan is compiled and executed will vary depending on a lot<br>
> of factors, what purpose are you using this for? because it's a metric that<br>
> will show little to no variance, your best bet is to turn on xml_cdr and<br>
> use that it has all the info and history of what and when things took<br>
> place.  Don't burden the dialplan with these sorts of tasks as freeswitch<br>
> wasn't designed to be used like that.<br>
<br>
Okay, I'll look at xml_cdr.<br>
<br>
I'm currently using cdr_odbc - do you see any problem in using both?<br></blockquote><div><br></div><div>No issue at all, cdr_odbc gives you a fraction of the info that xml_cdr does.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Also, just for a definitive answer, do I take it that there is no variable <br>
which the dialplan can reference in order to get the current timestamp?<br></blockquote><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
Antony.<br>
<br>
> On Wed, Nov 2, 2022 at 2:03 PM Antony Stone wrote:<br>
> > On Wednesday 02 November 2022 at 18:25:52, Brian West wrote:<br>
> > > What problem are you trying to solve?  I still can't clearly<br>
> > > understand what you're trying to accomplish.<br>
> > <br>
> > Oh, I didn't realise you wanted to know what I planned to *do* with the<br>
> > information - I thought you were just trying to understand exactly what<br>
> > information I need.<br>
> > <br>
> > So, to answer your question about why I need these timestamps, I have<br>
> > specific points throughout the dialplan where I need to know the current<br>
> > (accurate) timestamp, in order to collect statistics on the efficiency<br>
> > of different parts of the dialplan (basically, how long does *this* section<br>
> > take to complete, how long does *that* section take, etc).<br>
> > <br>
> > These timing values are then combined with similar timestamps from other<br>
> > parts of the system (which includes Asterisk, database lookups, and other<br>
> > external services) to give an overall measure of the performance of<br>
> > individual parts of the whole thing.<br>
> > <br>
> > Ultimately I do not intend to collect this quantity of data from<br>
> > production systems, but on development and test systems I need to be able<br>
> > to spot quickly when some part of what FreeSwitch is doing, or anything<br>
> > else we are collecting these timestamps from, changes (for better or for<br>
> > worse) in how long the processing takes.<br>
> > <br>
> > Does that answer your question sufficiently to be able to guide to me<br>
> > where I can find the current timestamp inside the dialplan?<br>
> > <br>
> > I didn't realise that this could be a complicated question, but perhaps<br>
> > the fact that I didn't find the answer easily indicates that it is?<br>
> > <br>
> > > On Wed, Nov 2, 2022 at 12:12 PM Antony Stone wrote:<br>
> > > > On Wednesday 02 November 2022 at 17:18:26, Brian West wrote:<br>
> > > > > Ok let's step back, what do you mean by this?<br>
> > > > <br>
> > > > I mean that I wish either to assign the current timestamp to a<br>
> > > > variable in the format 2022-11-02 12:34:56.789789, or to find a<br>
> > > > system variable which will provide this when I reference something<br>
> > > > like ${now}.<br>
> > > > <br>
> > > > I hope that's clear?<br>
> > > > <br>
> > > > As a workaround until I find out how to do this the correct way, the<br>
> > > > following command does what I want, however I suspect it's not very<br>
> > > > efficient:<br>
> > > > <br>
> > > > <action<br>
> > > > <br>
> > > >         application="set"<br>
> > > >         data="now=${regex(${system date '+%F %T.%N'}|(.+)|%1)}"<br>
> > > > <br>
> > > > /><br>
> > > > <br>
> > > > I got the somewhat complicated syntax of that command from<br>
> > <br>
> > <a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools:+system" rel="noreferrer" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools:+system</a><br>
> > <br>
> > > > Antony.<br>
<br>
-- <br>
.evah I serutangis sseltniop tsom eht fo eno eb tsum sihT<br>
<br>
                                                   Please reply to the list;<br>
                                                         please *don't* CC me.<br>
<br>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><font color="#000000"><br></font></div><div style="font-size:12.8px"><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">Brian West | Co-founder and Developer</font></span></p><p style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">Need Commercial support? email <a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a> </font></span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">FreeSWITCH Solutions | <a href="https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g" style="color:rgb(17,85,204)" target="_blank">17345 Civic Drive #2531 Brookfield, WI 53045</a></font></span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><font color="#000000"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Email: </span><span style="color:rgb(17,85,204);font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="mailto:brian@freeswitch.com" target="_blank">brian@freeswitch.com</a></span></font></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">Mobile: <span title="Call with Google Voice">918-424-9378</span></font></span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><font color="#000000"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Website: </span><a href="https://www.freeswitch.com/" style="color:rgb(17,85,204)" target="_blank"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">https://www.FreeSWITCH.com</span></a></font></p><p dir="ltr" style="font-size:12.8px;line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap"><a href="https://www.facebook.com/freeswitch" target="_blank"><img alt="https://www.facebook.com/signalwireinc?src=email" src="https://lh6.googleusercontent.com/AYfRoSNaDNtMPRMevPn_GqcVEMd5NDRFi0GlluGUWzV6I5TAY_3T2-Tt0IuIXeUtEdYsgNsM8DOYKRKhjmrG_-n2Ga-LCnoNk46sO8VyEma1sBFYdiGJcLRUvkrD1CYHN79qimeg" width="31" height="31" style="border: none;"></a> </span><span style="background-color:transparent;font-size:9pt;font-family:Tahoma;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap"><a href="https://twitter.com/freeswitch" target="_blank"><img alt="https://twitter.com/freeswitch" src="https://lh3.googleusercontent.com/W4SqXyybH2qdAozvtoKjcz736qOjk9LHDwldvs1ahc-WVU0putVMSsUH474KDrJ32jsqi6JDjyUWxqeEkN5I1xSlC5ShYrd1b8NIMUkDzDrtbWQfa6A_90UcygqesBtRLgeFirKa" width="31" height="31" style="border: none;"></a></span><br></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div>