<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Guys,<br>
    <br>
    yes, the prototype of the function was changed exactly because of
    this kind of problems - you cannot use the script function to return
    values via return code (this is used for something else), so the
    returned value is passed now via an output parameter.<br>
    <br>
    Regards,<br>
    Bogdan<br>
    <br>
    On 04/08/2011 09:27 PM, Duane Larson wrote:
    <blockquote
      cite="mid:BANLkTi=DjHU8kFF89QHjHQttx21fjVw2Kg@mail.gmail.com"
      type="cite">
      <p>I believe you need to have something like
        get_source_address("var(x)")</p>
      <p>That is probably the issue.&nbsp; Bogdan mentions in a previous
        mailing list issue that the prototype of the function was
        changed.</p>
      <p>Sent from Droid</p>
      <div class="gmail_quote">On Apr 8, 2011 1:17 PM, "Wesley Volcov"
        &lt;<a moz-do-not-send="true"
          href="mailto:wesleyvolcov@gmail.com">wesleyvolcov@gmail.com</a>&gt;
        wrote:<br type="attribution">
        &gt; Hey Duane,<br>
        &gt; <br>
        &gt; I have others groups id in my address table, that's why my
        source address<br>
        &gt; function have 0, to check all groupid.<br>
        &gt; But my is problem is the groupid that the function
        get_source_group(); is<br>
        &gt; getting..<br>
        &gt; <br>
        &gt; Regards,<br>
        &gt; <br>
        &gt; On 8 April 2011 14:14, Duane Larson &lt;<a
          moz-do-not-send="true" href="mailto:duane.larson@gmail.com">duane.larson@gmail.com</a>&gt;
        wrote:<br>
        &gt; <br>
        &gt;&gt; I your check source address function shouldn't you have
        a 1 instead of a 0<br>
        &gt;&gt; since that is what you have in your permissions table.<br>
        &gt;&gt;<br>
        &gt;&gt; Sent from Droid<br>
        &gt;&gt; On Apr 8, 2011 12:03 PM, "Wesley Volcov" &lt;<a
          moz-do-not-send="true" href="mailto:wesleyvolcov@gmail.com">wesleyvolcov@gmail.com</a>&gt;
        wrote:<br>
        &gt;&gt; &gt; Hello list,<br>
        &gt;&gt; &gt;<br>
        &gt;&gt; &gt; I'm using opensips 1.6.2.<br>
        &gt;&gt; &gt;<br>
        &gt;&gt; &gt; I have the follow configuration in my AUTH route:<br>
        &gt;&gt; &gt;<br>
        &gt;&gt; &gt; if (check_source_address("0","$avp(i:9)")) {<br>
        &gt;&gt; &gt; $avp(i:10) = get_source_group();<br>
        &gt;&gt; &gt; xlog("L_INFO", "GroupID: $avp(i:10)");<br>
        &gt;&gt; &gt; }<br>
        &gt;&gt; &gt;<br>
        &gt;&gt; &gt; In my address table, i have:<br>
        &gt;&gt; &gt; grp = 1<br>
        &gt;&gt; &gt; ip = 192.68.10.10<br>
        &gt;&gt; &gt; mask = 32<br>
        &gt;&gt; &gt; port = 0<br>
        &gt;&gt; &gt; proto = UDP<br>
        &gt;&gt; &gt;<br>
        &gt;&gt; &gt; When I send a call, from a gw authenticated via
        IP, it gets the follow<br>
        &gt;&gt; group<br>
        &gt;&gt; &gt; ID:<br>
        &gt;&gt; &gt; GroupID: 4294967295<br>
        &gt;&gt; &gt;<br>
        &gt;&gt; &gt; And then, it can not found a route, because all
        the routes are configured<br>
        &gt;&gt; &gt; with groupid 1. But, I don't know how opensips is
        getting this groupid..<br>
        &gt;&gt; &gt; Could someone helpe me?<br>
        &gt;&gt; &gt;<br>
        &gt;&gt; &gt; Thanks a lot!<br>
        &gt;&gt; &gt;<br>
        &gt;&gt; &gt; --<br>
        &gt;&gt; &gt; Wesley Volcov<br>
        &gt;&gt; &gt; Email: <a moz-do-not-send="true"
          href="mailto:wesleyvolcov@gmail.com">wesleyvolcov@gmail.com</a><br>
        &gt;&gt; &gt; Messenger: <a moz-do-not-send="true"
          href="mailto:volcov@live.com">volcov@live.com</a><br>
        &gt;&gt; &gt; Mobile: +55 11 9989-5348<br>
        &gt;&gt; &gt; Website: <a moz-do-not-send="true"
          href="http://volcov.blogspot.com">http://volcov.blogspot.com</a><br>
        &gt;&gt;<br>
        &gt;&gt; _______________________________________________<br>
        &gt;&gt; Users mailing list<br>
        &gt;&gt; <a moz-do-not-send="true"
          href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
        &gt;&gt; <a moz-do-not-send="true"
          href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
        &gt;&gt;<br>
        &gt;&gt;<br>
        &gt; <br>
        &gt; <br>
        &gt; -- <br>
        &gt; Wesley Volcov<br>
        &gt; Email: <a moz-do-not-send="true"
          href="mailto:wesleyvolcov@gmail.com">wesleyvolcov@gmail.com</a><br>
        &gt; Messenger: <a moz-do-not-send="true"
          href="mailto:volcov@live.com">volcov@live.com</a><br>
        &gt; Mobile: +55 11 9989-5348<br>
        &gt; Website: <a moz-do-not-send="true"
          href="http://volcov.blogspot.com">http://volcov.blogspot.com</a><br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>
    <br>
    <pre class="moz-signature" cols="72">-- 
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"</pre>
  </body>
</html>