[OpenSIPS-Users] Max Forward Header Function

Vlad Paiu vladpaiu at opensips.org
Fri Jan 27 11:56:43 CET 2012


Hi,

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.
If the header exists, the default behavior is to decrement the header 
value by one. Please check again the readme for the function.

[1] http://www.opensips.org/html/docs/modules/1.7.x/maxfwd.html#id249099

Regards,
Vlad

Vlad Paiu
OpenSIPS Developer


On 01/26/2012 03:05 PM, Faisal Rehman wrote:
> Hi Vlad,
>
> Okay I got the functionality of"!" symbol & 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 either the max_valuefor 
> the mf_process_maxfwd_headeris 1 or 10:
>
> 564d700c00f837-1--d87543-;rport..Max-Forwards: 70..Cont
>   act: <sip:1000 at 192.168.150.23:16222>..To: 
> "3333"<sip:3333 at 192.168.150.160:5161>..From: 
> "testing"<sip:1000 at 192.168.150.160:5161>;tag=3421ec3e..Call-ID: 
> ba600752f22e
>   9018ZjQ0MGViNzJlZTE5OTY2M2NkZjE3MWY1Nzk5ODVlNGI...CSeq: 1 
> INVITE..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>
> 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?
>
> Regards,
>
> Faisal Rehman
> ------------------------------------------------------------------------
> *From:* Vlad Paiu <vladpaiu at opensips.org>
> *To:* users at lists.opensips.org
> *Sent:* Wednesday, January 25, 2012 7:16 PM
> *Subject:* Re: [OpenSIPS-Users] Max Forward Header Function
>
> Hi,
>
> The '!' symbol has the same meaning as in any other programming 
> language, to negate the return code of the function.
>
> 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.
>
> [1] http://www.opensips.org/html/docs/modules/1.7.x/maxfwd.html#id249099
>
> Regards,
> Vlad Paiu
> OpenSIPS Developer
>
> On 01/25/2012 02:44 PM, Faisal Rehman wrote:
>> Hi Everybody,
>>
>> I have a very tiny & crazy question but it is confusing me & I 
>> couldn't find its accurate answer over google that why we use "!"this 
>> before mf_process_maxfwd_header function in the main routing block. I 
>> have also seen this symbol with other functions 
>> like!is_method("REGISTER|MESSAGE") so what's its soul purpose?
>>
>> How can I test the functionality of just the 
>> mf_process_maxfwd_headerfunction?
>>
>> Regards,
>>
>> Faisal Rehman
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120127/c5420655/attachment.htm>


More information about the Users mailing list