<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:14pt"><div><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; ">Hi Vlad,</span></div><div><span style="font-family: tahoma, 'new york', times, serif; font-size: small;"><br></span></div><div><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; ">Exactly I have seen the value being decremented to 1 while live testing.</span></div><div><span style="font-family: tahoma, 'new york', times, serif; font-size: small;">&nbsp;</span></div><div><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; ">Thanks for your help!!</span></div><div><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; "><br></span></div><div><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; ">Faisal Rehman</span><br></div>  <div
 style="font-size: 14pt; font-family: 'Courier New', courier, monaco, monospace, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Vlad Paiu &lt;vladpaiu@opensips.org&gt;<br> <b><span style="font-weight: bold;">To:</span></b> users@lists.opensips.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, January 27, 2012 3:56 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [OpenSIPS-Users] Max Forward Header Function<br> </font> </div> <br>
<div id="yiv282402002">

  

    
    <title></title>
  
  <div>
    Hi,<br>
    <br>
    The parameter to mf_process_maxfwd_header will only be added to the
    message if the message did not initially contain a Max-Forwards
    header.<br>
    If the header exists, the default behavior is to decrement the
    header value by one. Please check again the readme for the function.<br>
    <br>
    [1]
    http://www.opensips.org/html/docs/modules/1.7.x/maxfwd.html#id249099<br>
    <br>
    Regards,<br>
    Vlad<br>
    <pre class="yiv282402002moz-signature">Vlad Paiu
OpenSIPS Developer</pre>
    <br>
    On 01/26/2012 03:05 PM, Faisal Rehman wrote:
    <blockquote type="cite">
      <div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New', courier, monaco, monospace, sans-serif; ">
        <div><span style="font-size: 13px; font-weight: bold; font-family: tahoma, times, serif; ">Hi Vlad,</span></div>
        <div><span style="font-size: small; font-family: tahoma, times, serif; "><br>
          </span></div>
        <div><span style="font-size: 13px; font-family: tahoma, times, serif; ">Okay I got the functionality of<span style="font-weight:bold;"> "!"</span> symbol &amp; also
            got different return codes while testing on a local server.
            But I am stuck with one thing that I am getting this in the
            wireshark logs&nbsp;</span><span style="font-size: 13px; font-family: tahoma, times, serif; ">either the </span><span style="font-size:13px;">max_value</span><span style="font-size: 13px; font-family: tahoma, times, serif; "> for the </span><span style="
font-size:13px;">mf_process_maxfwd_header</span><span style="font-size: 13px; font-family: tahoma, times, serif; "> is 1 or 10:</span></div>
        <div><span style="font-size: 13px; color: rgb(230, 230, 230); font-family: tahoma, times, serif; "><br>
          </span></div>
        <div><span style="font-family: tahoma, times, serif; ">
            <div style="font-family: courier, monaco, monospace, sans-serif; "><font style="background-color:rgb(230, 230, 230);
color:rgb(64, 127, 0);">564d700c00f837-1--d87543-;rport..<span style="font-weight:bold;font-size:18px;">Max-Forwards:
                  70..</span>Cont</font></div>
            <div style="font-size: 16px; font-family: courier, monaco, monospace, sans-serif; "><font style="background-color:rgb(230, 230, 230);color:rgb(64, 127, 0);" size="2">&nbsp; act:
                <a rel="nofollow" class="yiv282402002moz-txt-link-rfc2396E" ymailto="mailto:sip:1000@192.168.150.23:16222" target="_blank" href="mailto:sip:1000@192.168.150.23:16222">&lt;sip:1000@192.168.150.23:16222&gt;</a>..To:
                "3333"<a rel="nofollow" class="yiv282402002moz-txt-link-rfc2396E" ymailto="mailto:sip:3333@192.168.150.160:5161" target="_blank" href="mailto:sip:3333@192.168.150.160:5161">&lt;sip:3333@192.168.150.160:5161&gt;</a>..From:
                "testing"<a rel="nofollow" class="yiv282402002moz-txt-link-rfc2396E" ymailto="mailto:sip:1000@192.168.150.160:5161" target="_blank" href="mailto:sip:1000@192.168.150.160:5161">&lt;sip:1000@192.168.150.160:5161&gt;</a>;tag=3421ec3e..Call-ID:
                ba600752f22e</font></div>
            <div style="font-size: 16px; font-family: courier, monaco, monospace, sans-serif; "><font style="background-color:rgb(230, 230, 230);color:rgb(64, 127, 0);" size="2">&nbsp;
                9018ZjQ0MGViNzJlZTE5OTY2M2NkZjE3MWY1Nzk5ODVlNGI...CSeq:
                1 INVITE..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
                REFER, NOTIFY, MESSAGE,</font></div>
            <br class="yiv282402002Apple-interchange-newline">
          </span></div>
        <div><span style="font-size: 10pt; font-family: tahoma, times, serif; ">I know that 70 is the recommended Max
            Forwards initial value but will it be the same either we use
            max_value 1 or 10?</span><br>
        </div>
        <div><span style="font-size: 10pt; font-family: tahoma, times, serif; "><br>
          </span></div>
        <div style="font-size:10pt;"><span style="font-family: tahoma, times, serif; ">Regards,</span></div>
        <div style="font-size:10pt;"><span style="font-family: tahoma, times, serif; "><br>
          </span></div>
        <div style="font-size:10pt;"><span style="font-family: tahoma, times, serif; "><span style="
font-weight:bold;">Faisal Rehman</span><br>
          </span></div>
        <div style="font-size: 10pt; font-family: courier, monaco, monospace, sans-serif; ">
          <div style="font-size: 12pt; font-family: times, serif; ">
            <div dir="ltr"> <font size="2"><span style="font-family: tahoma, times, serif; "> </span>
                <hr size="1"> <b style="font-family: times, serif; "><span style="font-weight:bold;">From:</span></b> Vlad
                Paiu <a rel="nofollow" class="yiv282402002moz-txt-link-rfc2396E" ymailto="mailto:vladpaiu@opensips.org" target="_blank" href="mailto:vladpaiu@opensips.org">&lt;vladpaiu@opensips.org&gt;</a><br>
                <b style="font-family: times, serif; "><span style="font-weight:bold;">To:</span></b>
                <a rel="nofollow" class="yiv282402002moz-txt-link-abbreviated" ymailto="mailto:users@lists.opensips.org" target="_blank" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a> <br>
                <b style="font-family: times, serif; "><span style="font-weight:bold;">Sent:</span></b>
                Wednesday, January 25, 2012 7:16 PM<br>
                <b style="font-family: times, serif; "><span style="font-weight:bold;">Subject:</span></b>
                Re: [OpenSIPS-Users] Max Forward Header Function<br>
              </font> </div>
            <br>
            <div id="yiv282402002" style="font-family: times, serif; ">
              <title></title>
              <div> Hi,<br>
                <br>
                The '!' symbol has the same meaning as in any other
                programming language, to negate the return code of the
                function.<br>
                <br>
                So if you look at the return code of the
                mf_process_maxfwd_header at [1], you will see it returns
                a positive return code when the processing of the
                Max-Forward header succeeds, and a negative return code
                if the Max-Forward value is 0 or if there was another
                failure. <br>
                <br>
                [1]
                <a rel="nofollow" class="yiv282402002moz-txt-link-freetext" target="_blank" href="http://www.opensips.org/html/docs/modules/1.7.x/maxfwd.html#id249099">http://www.opensips.org/html/docs/modules/1.7.x/maxfwd.html#id249099</a><br>
                <br>
                Regards,<br>
                <pre class="yiv282402002moz-signature">Vlad Paiu
OpenSIPS Developer</pre>
                <br>
                On 01/25/2012 02:44 PM, Faisal Rehman wrote:
                <blockquote type="cite">
                  <div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 10pt; font-family: tahoma, times, serif; ">
                    <div style="font-size: 10pt; font-family: tahoma, times, serif; "><span style="
font-weight:bold;">Hi Everybody,</span></div>
                    <div style="font-size: 10pt; font-family: tahoma, times, serif; "><span><br>
                      </span></div>
                    <div><span><span style="font-size: 10pt; font-family: tahoma, times, serif; ">I have a
                          very tiny &amp; crazy question but it is
                          confusing me &amp; I couldn't find its
                          accurate answer over google that why we use </span><span style="font-weight: bold; font-family: tahoma, times, serif; ">"!"</span><span style="font-size:10pt;"> this before <span style="font-family: courier, monaco, monospace, sans-serif; ">mf_process_maxfwd_header</span>
                          function in the main routing block. I have
                          also seen this symbol with other functions
                          like<span style="font-family: courier, monaco, monospace, sans-serif; ">
                            !is_method("REGISTER|MESSAGE")</span>&nbsp;so
                          what's its soul purpose?</span></span></div>
                    <div><span><span style="font-size:10pt;"><br>
                        </span></span></div>
                    <div><span><span style="font-size:10pt;">How can I
                          test the functionality of just the&nbsp;</span></span><span style="font-size: 13px; font-family: courier, monaco, monospace, sans-serif; ">mf_process_maxfwd_header</span><span style="font-size:13px;"> function?</span></div>
                    <div><span style="font-size:13px;"><br>
                      </span></div>
                    <div style="font-size: 10pt; font-family: tahoma, times, serif; ">&nbsp;</div>
                    <div style="font-size: 10pt; font-family: tahoma, times, serif; ">Regards,</div>
                    <div style="font-size: 10pt; font-family: tahoma, times, serif; "><br>
                    </div>
                    <div style="font-size: 10pt; font-family: tahoma, times, serif; "><span style="
font-weight:bold;">Faisal Rehman</span></div>
                  </div>
                  <pre><fieldset class="yiv282402002mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a rel="nofollow" class="yiv282402002moz-txt-link-abbreviated" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
</pre>
                </blockquote>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a rel="nofollow" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org" style="font-family: times, serif; ">Users@lists.opensips.org</a><br>
            <a rel="nofollow" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" style="font-family: times, serif; ">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
            <br>
          </div>
        </div>
      </div>
      <pre><fieldset class="yiv282402002mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a rel="nofollow" class="yiv282402002moz-txt-link-abbreviated" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a rel="nofollow" class="yiv282402002moz-txt-link-freetext" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </div>

</div><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br><br><br> </div> </div>  </div></body></html>