<div dir="ltr">I added new pseudovariale $TMS which gives time in miliseconds. If I print $TMS value it is ok, but when I assign it to avp, it gives strange values.<div><br></div><div style>pv_time.c</div><div><br></div><div>
<div>int pv_get_timenows2(struct sip_msg *msg, pv_param_t *param,</div><div>                pv_value_t *res)</div><div>{</div><div>        struct timeval tv;<br></div><div>        char buf[30];</div><div>        str _s;</div>
<div>        gettimeofday(&amp;tv, NULL);</div><div>        unsigned long long msEpoch =</div><div>                (unsigned long long)(tv.tv_sec) * 1000 +</div><div>                (unsigned long long)(tv.tv_usec) / 1000;</div>
<div>        _s.len = sprintf(buf, &quot;%lld&quot;, msEpoch);</div><div>        _s.s = buf;   //&lt;------- I think problem is here<br></div><div>        return pv_get_strval(msg, param, res, &amp;_s);</div><div>}</div></div>
<div><br></div><div style>So how should I properly copy buf to _s ? </div><div style><br></div><div style>Thanks,</div><div style>Mino</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Thu, Feb 7, 2013 at 11:00 AM, Mino Haluz <span dir="ltr">&lt;<a href="mailto:mino.haluz@gmail.com" target="_blank">mino.haluz@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">
<div dir="ltr">Hi,<div><br></div><div>I assume there is no avp or function which could give me duration of ended dialog in miliseconds (I have to send it in RADIUS message). I can run some bash script which could return me this value but seems to me bit awkward.</div>

<div><br></div><div>How you would do it? To adjust dialog module so that it could return it to some avp value within dialog-end event route and thus save it to radius?</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Mino</div>
</font></span></div>
</blockquote></div><br></div>