<div dir="ltr">The patch adding text pvar in case of negative result.<div><br></div><div><a href="https://sourceforge.net/tracker/?group_id=232389&amp;atid=1086412">https://sourceforge.net/tracker/?group_id=232389&amp;atid=1086412</a><br>
<div class="gmail_extra"><br clear="all"><div>--<br>Nick</div>
<br><br><div class="gmail_quote">2013/2/26 Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<u></u>

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    <tt>I would suggest to spit -1 even more... or we can make the
      function to populate a kind of strerror :) - to return in a pvar
      the description of the failure....just exploring here :)<br>
      <br>
      Regards,<br>
    </tt><div class="im">
    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    <br></div><div><div class="h5">
    On 02/26/2013 05:16 PM, Nick Altmann wrote:
    <blockquote type="cite">
      <div dir="ltr">Now we have:
        <div>
          <ul style="font-size:medium;font-family:Helvetica,Arial" type="disc">
            <li>
              <p style="font-size:12px;text-align:justify"><span><em>1</em></span> - the message is RFC3261
                compliant and has been successfully validated.</p>
            </li>
            <li>
              <p style="font-size:12px;text-align:justify"><span><em>-1</em></span> - the message is not
                RFC3261 compliant.</p>
            </li>
            <li>
              <p style="font-size:12px;text-align:justify"><span><em>-2</em></span> - signals a parsing error.</p>
            </li>
            <li>
              <p style="font-size:12px;text-align:justify"><span><em>-3</em></span> - invalid SDP body.</p>
            </li>
            <li>
              <p style="font-size:12px;text-align:justify"><span><em>-4</em></span> - invalid headers body.</p>
            </li>
            <li>
              <p style="font-size:12px;text-align:justify"><span><em>-5</em></span> - invalid R-URI.</p>
            </li>
            <li>
              <p style="font-size:12px;text-align:justify"><span><em>-6</em></span> - invalid R-URI domain.</p>
            </li>
            <li>
              <p style="font-size:12px;text-align:justify"><span><em>-255</em></span> - undefined errors.</p>
            </li>
          </ul>
        </div>
        <div class="gmail_extra">&quot;-1&quot; can be:</div>
        <div class="gmail_extra">- message doesn&#39;t have callid</div>
        <div class="gmail_extra">- message doesn&#39;t have Content
          Length header for proto %d</div>
        <div class="gmail_extra">- PATH header supported only
          for REGISTERs<br>
        </div>
        <div class="gmail_extra">- Cseq not parsed properly</div>
        <div class="gmail_extra">- invalid body - content
          length %ld different then actual body %d<br>
        </div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">Maybe increase log level for
          &quot;-1&quot; only?</div>
        <div class="gmail_extra">But now I think I just can
          increase debug level before sip_msg_validate() and lower it
          after. :-)</div>
        <div class="gmail_extra"><br clear="all">
          <div>--<br>
            Nick</div>
          <br>
          <br>
          <div class="gmail_quote">2013/2/26 Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span><br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
              <div bgcolor="#ffffff" text="#000000"> <tt>
                  <div>In this case, it means the function
                    has to report something more than -1....like: -1 no
                    MF hdr, -2 missing body, -3 missing TO, etc...<br>
                    <br>
                  </div>
                  Regards,</tt>
                <div>
                  <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                  <br>
                </div>
                <div> On 02/26/2013 03:32 PM, Nick Altmann
                  wrote: </div>
                <div>
                  <div>
                    <blockquote type="cite">
                      <div dir="ltr">Bogdan, 
                        <div><br>
                        </div>
                        <div>I&#39;m second time deal with problem when I
                          receive &quot;-1&quot; from script and to understand
                          what is not okay I should compare message with
                          source code. :-)</div>
                        <div>
                          <div class="gmail_extra"> Of course I receive
                            and interpret this codes, but &quot;-1&quot; is not
                            fully informative sometimes. Especially when
                            sdp length is not okay. :-)</div>
                          <div class="gmail_extra"><br clear="all">
                            <div>--<br>
                              Nick</div>
                            <br>
                            <br>
                            <div class="gmail_quote">2013/2/26
                              Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span><br>
                              <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
                                <div bgcolor="#ffffff" text="#000000"> <tt>Hi
                                    Nick,<br>
                                    <br>
                                    Such a change may induce a
                                    self-spaming effect on your logs :).
                                    I would rather interpret the return
                                    code from script and let the script
                                    writer the decision if he wants to
                                    log that or not...(depending on the
                                    failed check, maybe if local
                                    subscriber or not, etc).<br>
                                    <br>
                                    At least these are my 2 cents on the
                                    matter :)<br>
                                    <br>
                                    Regards,<br>
                                  </tt>
                                  <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                                  <div>
                                    <div> <br>
                                      On 02/26/2013 01:01 PM, Nick
                                      Altmann wrote: </div>
                                  </div>
                                  <blockquote type="cite">
                                    <div>
                                      <div>
                                        <div dir="ltr">Hello!
                                          <div><br>
                                          </div>
                                          <div>What about to change DBG
                                            messages in
                                            sip_msg_validate() to ERR or
                                            INFO? It will help to
                                            understand the reason of
                                            reject. Especially for -1
                                            return (<span style="text-align:justify;font-size:12px;font-family:Helvetica,Arial">the
                                              message is not RFC3261
                                              compliant)</span>.</div>
                                          <div><br clear="all">
                                            <div>--<br>
                                              Nick</div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                    <pre><fieldset></fieldset>
_______________________________________________
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>
                                </div>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
  </div></div></div>

</blockquote></div><br></div></div></div>