Sorry to wake up an old thread.<div><br></div><div>However - I am looking to export this $timef function to the param initialization for accounting, i.e. db_table_acc</div><div><br></div><div>modparam(&quot;db_table_acc&quot;, &quot;acc_$ftime(Ymd)&quot;);</div>
<div><br></div><div>I&#39;ve looked into completing this myself however I simply am not familiar enough at this point between the three different modules that it would take to implement this (acc, dbsr1, pv).</div><div><br>
</div><div>Look forward to any help / insight you may be able to provide.</div><div><br></div><div>Thanks as always!</div><div><br></div><div>Sincerely,</div><div>Brandon Armstead<br><br><div class="gmail_quote">On Mon, Dec 19, 2011 at 11:55 AM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<div><div class="h5"><br>
<br>
On 12/19/11 7:50 PM, Andreas Granig wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Daniel,<br>
<br>
On 12/19/2011 07:29 PM, Daniel-Constantin Mierla wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don&#39;t know what are all the functions you think of, but for the<br>
example provided above, config file does it easy right now. There is a<br>
pseudo-variable that gives broken-time attribute that can be used with<br>
avp_check(), iirc, should be:<br>
<br>
avp_db_load(...);<br>
if(avp_check(&quot;$time(wday)&quot;, &quot;eq/$avp(s:cf_weekday)/g&quot;)) { do CF }<br>
<br>
Of course there is the option of doing while loop, but maybe gets to<br>
large for desired config file.<br>
</blockquote>
This is pretty much what I had in mind with my new functions/module, but<br>
I&#39;ve completely overlooked that PV when searching the docs for this<br>
feature. Thank you very much for pointing that out!<br>
</blockquote></div></div>
for sake of public knowledge, just to add on time specific features: there is also $timef(format) which returns current time attributes based on strftime specifiers -- its documentation was missing, I just added it. Also, there is a transformation {s.ftime,format) which can take any integer variable holding timestamp and return value based on strftime format.<div class="HOEnZb">
<div class="h5"><br>
<br>
Cheers,<br>
Daniel<br>
<br>
-- <br>
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br>
<br>
<br>
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</div></div></blockquote></div><br></div>