<div dir="ltr">That's a hack! Thanks, i'll try out.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 13, 2023 at 3:31 AM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</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>
    <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 cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
  <a href="https://www.siphub.com" target="_blank">https://www.siphub.com</a></pre>
    <div>On 5/18/23 3:13 PM, Daniel Zanutti
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <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" target="_blank">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">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">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">Users@lists.opensips.org</a><br>
              <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">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">Users@lists.opensips.org</a><br>
          <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div>