Hello,<div><br></div><div>I have been looking to se if I can store on my DB along with the time field that is actually a datetime in the DB, and EPOCH value.</div><div><br></div><div>I have been looking in the acc module documentation but I haven&#39;t found anything relevant.</div>
<div><br></div><div>I would like to get the EPOCH directly from the dialog module in opensips, and not with a DB now() hack.</div><div><br></div><div>When I do a opensipsctl fifo dlg_list </div><div><br></div><div><div>dialog::  hash=3011:1918496183</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>state:: 4</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>user_flags:: 0</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>timestart:: 1301897869</div>
<div><br></div><div>I can see the timestart value in EPOCH, how can I access it? </div><div><br></div><div>I found the variables <font class="Apple-style-span" face="monospace" size="3">functions </font><span class="Apple-style-span" style="font-family: Helvetica, Arial; font-size: medium; "><code class="function" style="text-decoration: none; ">fetch_dlg_value(name,pvar) or </code></span><span class="Apple-style-span" style="font-family: Helvetica, Arial; font-size: medium; "><code class="function">get_dialog_info(attr,var,key,key_val) but I don&#39;t think this is what I&#39;m looking for.</code></span></div>
<div><span class="Apple-style-span" style="font-family: Helvetica, Arial; font-size: medium; "><code class="function"><br></code></span></div><div><span class="Apple-style-span" style="font-family: Helvetica, Arial; font-size: medium; "><code class="function">From a general sql log, I could find that the insert query already has a string like formated value for the time column.</code></span></div>
<div><span class="Apple-style-span" style="font-family: Helvetica, Arial; font-size: medium; "><code class="function"><br></code></span></div><div><code class="function"><font class="Apple-style-span" size="3">insert into acc (method,from_tag,to_tag,callid,sip_code,sip_reason,<b>time</b>,src,dst,duration,setuptime,created ) values (&#39;INVITE&#39;,&#39;809be9c8-f25c-e011-9bb7-bcaec5119b9b&#39;,&#39;as67e5ca83&#39;,&#39;ba9de9c8-f25c-e011-9bb7-bcaec5119b9b@wkst&#39;,&#39;200&#39;,&#39;OK&#39;,&#39;<b>2011-04-04 00:31:22</b>&#39;,&#39;robert&#39;,&#39;50624309951&#39;,17,0,&#39;2011-04-04 00:31:22&#39;)</font></code></div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div>I&#39;m looking for a way to get the internal epoch value for the timestart of the dialog.<br>
-- <br>Robert<br>
</div>