[OpenSIPS-Devel] [ opensips-Feature Requests-3032338 ] expose number of Via headers

SourceForge.net noreply at sourceforge.net
Mon Oct 11 11:01:54 CEST 2010


Feature Requests item #3032338, was opened at 2010-07-21 02:25
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=3032338&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Priority: 5
Private: No
Submitted By: Kennard White (kennardwhite)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: expose number of Via headers

Initial Comment:
Need script variable/method that provides the number of Via headers in the request. Some NAT-related processing should only occur when the proxy is the first "edge" proxy. This can be determined when the number of via headers is exactly 1. Note that counting Via lines isn't simple because Via lines can be merged into a single line (comma separated).

The goal would be to write something like:
   if ( num-of-Via==1 && is_method("SUBSCRIBE|REGISTER|INVITE") && nac_uac_test("23") ) { fix_nated_contact() }

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2010-10-11 12:01

Message:
Hi Kennard,

see the set_count() function from cfgutils module:
  http://www.opensips.org/html/docs/modules/1.6.x/cfgutils.html#id228574

But this will count the number of Via hdr, not the number of Via bodies.

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=3032338&group_id=232389



More information about the Devel mailing list