<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      Actually, the ERROR:core:fixup_uint: bad number &lt;-1&gt; error
      message was a bug in the code, that it wouldn't accept negative
      numbers for the gateway type ( as the docs suggest would match any
      gw type ).<br>
      <br>
      I've just pushed a fix for this on 1.8, 1.9 and 1.10.<br>
      <br>
      Best Regards,<br>
      <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
</pre>
      On 08/04/2013 11:39 PM, mayamatakeshi wrote:<br>
    </div>
    <blockquote
cite="mid:CABaNFCYd6=BP9h_m=68VLnRir3sJ5_quA2AE60m6KWEQzH9D0A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Thanks,<br>
            actually, I realized it was my mistake: <br>
            i was calling is_from_gw more than once but only used "i" on
            one place and so opensips was not always filling the AVP as
            it was not requested.<br>
          </div>
          <br>
        </div>
        regards,<br>
        Takeshi<br>
        <div>
          <div>
            <div>
              <div class="gmail_extra"><br>
                <br>
                <div class="gmail_quote">On Mon, Aug 5, 2013 at 9:24 AM,
                  Laszlo <span dir="ltr">&lt;<a moz-do-not-send="true"
                      href="mailto:laszlo@voipfreak.net" target="_blank">laszlo@voipfreak.net</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">
                      <div>
                        <div><a moz-do-not-send="true"
                            href="http://openser.org/pipermail/users/2013-May/025705.html"
                            target="_blank">http://openser.org/pipermail/users/2013-May/025705.html</a><br>
                          <br>
                        </div>
                        maybe this can give you an idea......<br>
                        <br>
                      </div>
                      -Laszlo<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote">2013/8/3 mayamatakeshi <span
                          dir="ltr">&lt;<a moz-do-not-send="true"
                            href="mailto:mayamatakeshi@gmail.com"
                            target="_blank">mayamatakeshi@gmail.com</a>&gt;</span><br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div>
                            <div class="h5">
                              <div dir="ltr">
                                <div>Hello, can anyone give me an
                                  example of how to call drouting
                                  function is_from_gw ?<br>
                                  <div><br>
                                    <a moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/1.9.x/drouting.html#id293958"
                                      target="_blank">http://www.opensips.org/html/docs/modules/1.9.x/drouting.html#id293958</a><br>
                                  </div>
                                  <br>
                                </div>
                                The doc gives this example:<br>
                                <div>&nbsp;&nbsp;&nbsp; if (is_from_gw("3","1") <br>
                                </div>
                                <div>which seems to be incorrect as "1"
                                  is not a valid flag.<br>
                                  <br>
                                </div>
                                <div>I am trying to use flag "i" to get
                                  the gwid in the AVP set using
                                  gw_id_avp but it is not working.<br>
                                  I already tried as:<br>
                                  &nbsp; &nbsp; if (is_from_gw("", "i"))<br>
                                  and<br>
                                  &nbsp; &nbsp; if (is_from_gw("0", "i"))<br>
                                </div>
                                <div>
                                  <div>but it is not working: the avp
                                    set by avp_gw_id is no filled.<br>
                                    I know my configuration is correct
                                    because do_routing() does fill the
                                    avp.</div>
                                  <br>
                                </div>
                                <div>Obs: the doc also says that if I
                                  don't care about the type of the
                                  gateway I can pass a negative number.<br>
                                </div>
                                <div>So I tried:<br>
                                  &nbsp; &nbsp; if (is_from_gw("-1", "i") <br>
                                </div>
                                <div>But then i get:<br>
                                  Aug&nbsp; 3 16:53:44 SERVER
                                  /usr/local/src/git/opensips-head/opensips[1454]:
                                  ERROR:core:fixup_uint: bad number
                                  &lt;-1&gt;<br>
                                  Aug&nbsp; 3 16:53:44 SERVER
                                  /usr/local/src/git/opensips-head/opensips[1454]:
                                  ERROR:core:fix_actions: fixing failed
                                  (code=-6) at cfg line 227<br>
                                  Aug&nbsp; 3 16:53:44 SERVER
                                  /usr/local/src/git/opensips-head/opensips[1454]:
                                  CRITICAL:core:fix_expr: fix_actions
                                  error<br>
                                  Aug&nbsp; 3 16:53:44 SERVER
                                  /usr/local/src/git/opensips-head/opensips[1454]:
                                  ERROR:core:main: failed to fix
                                  configuration with err code -6<br>
                                  <br>
                                </div>
                                <div><br>
                                  <br>
                                  In case this is a bug, I tried with
                                  this git commit (head):<br>
                                  <br>
                                  commit
                                  70b6629f88e2e3fc51e42154b7db8fb7b94417a1<br>
                                  Author: Damien Sandras &lt;<a
                                    moz-do-not-send="true"
                                    href="mailto:dsandras@beip.be"
                                    target="_blank">dsandras@beip.be</a>&gt;<br>
                                  Date:&nbsp;&nbsp; Wed Jul 10 17:59:34 2013 +0200<br>
                                  <br>
                                  <br>
                                  <br>
                                </div>
                                <div>regards,<br>
                                </div>
                                <div>Takeshi<br>
                                </div>
                              </div>
                              <br>
                            </div>
                          </div>
_______________________________________________<br>
                          Users mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:Users@lists.opensips.org"
                            target="_blank">Users@lists.opensips.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                            target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <span class="HOEnZb"><font color="#888888"><br>
                          <br clear="all">
                          <br>
                          -- <br>
                          <div dir="ltr">
                            <div>
                              <div>
                                <div><br>
                                  --<br>
                                </div>
                                Kind regards,<br>
                              </div>
                              Laszlo Bekesi<br>
                            </div>
                            <a moz-do-not-send="true"
                              href="http://voipfreak.net"
                              target="_blank">http://voipfreak.net</a><br>
                          </div>
                        </font></span></div>
                    <br>
                    _______________________________________________<br>
                    Users mailing list<br>
                    <a moz-do-not-send="true"
                      href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
                    <a moz-do-not-send="true"
                      href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                      target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                    <br>
                  </blockquote>
                </div>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>