<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">What Alberto said still applies. <br>
<br>
The timer route is outside the context of any SIP message, while
the function you want to use (get_profile_size) is part of the
dialog module, where most of the functions do requires the context
of a SIP dialog. I agree get_profile_size() does not need the
context and could be more flexible.<br>
So, try this hack of using a intermediary route[], like:<br>
timer_route[]<br>
{ route(foo); }<br>
route[foo]<br>
{ get_profile_size(); }<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 5/18/23 3:13 PM, Daniel Zanutti
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAN0jgiOJxsGNGn5+U8fyjhWZdnLsq5yw+W7qg5=ebwAc62GKwg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi Alberto
<div><br>
</div>
<div>In fact, i need to use: get_profile_size()</div>
<div><br>
</div>
<div>I want to count some type of calls. I've done using
statistics but not very precise.</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, May 17, 2023 at
7:48 PM Alberto <<a href="mailto:alberto.rinaudo@gmail.com"
moz-do-not-send="true">alberto.rinaudo@gmail.com</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">
<div dir="auto">This reminded me of something else, maybe it
can be used here too:
<div dir="auto">In a event route, before you can use dialog
variables, you have to load the dialog context by using
func_load_dialog_ctx. Maybe it's the same with timer
routes.</div>
<div dir="auto"><br>
</div>
<div dir="auto"><a
href="https://opensips.org/docs/modules/3.2.x/dialog#func_load_dialog_ctx"
target="_blank" moz-do-not-send="true">https://opensips.org/docs/modules/3.2.x/dialog#func_load_dialog_ctx</a><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, 17 May 2023, 21:07
Daniel Zanutti, <<a
href="mailto:daniel.zanutti@gmail.com" target="_blank"
moz-do-not-send="true">daniel.zanutti@gmail.com</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">
<div dir="ltr">Hi folks
<div><br>
</div>
<div>Why is it not possible to call <b>fetch_dlg_value </b>inside
a timer route? Is there any other alternative to it?</div>
<div><br>
</div>
<div>I wanted to generate some statistics every X
seconds.</div>
<div><br>
</div>
<div>Thanks</div>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" rel="noreferrer"
target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a><br>
<a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank"
moz-do-not-send="true">Users@lists.opensips.org</a><br>
<a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>