diff -r -c /usr/src/orig/openser/HEAD/sip-server/modules/rr/doc/rr_user.sgml rr/doc/rr_user.sgml
*** /usr/src/orig/openser/HEAD/sip-server/modules/rr/doc/rr_user.sgml	2005-10-12 09:25:53.000000000 +0300
--- rr/doc/rr_user.sgml	2005-12-07 14:37:37.212727240 +0200
***************
*** 257,271 ****
  
  	<section id="record-route-id">
  		<title>
! 		<function moreinfo="none">record_route()</function>
  		</title>
  		<para>
  		The function adds a new Record-Route header field. The header field 
  		will be inserted in the message before any other Record-Route header 
! 		fields.
  		</para>
  		<para>
! 		This function can be used from REQUEST_ROUTE.
  		</para>
  		<example>
  		<title><function>record_route</function> usage</title>
--- 257,272 ----
  
  	<section id="record-route-id">
  		<title>
! 		<function moreinfo="none">record_route() or record_route(string)</function>
  		</title>
  		<para>
  		The function adds a new Record-Route header field. The header field 
  		will be inserted in the message before any other Record-Route header 
! 		fields.  If string parameter is given, it is added as a
! 		parameter to Record-Route header field.
  		</para>
  		<para>
! 		This function can be used from REQUEST_ROUTE and BRANCH_ROUTE.
  		</para>
  		<example>
  		<title><function>record_route</function> usage</title>
***************
*** 273,278 ****
--- 274,281 ----
  ...
  record_route();
  ...
+ record_route(";from_nated");
+ ...
  </programlisting>
  		</example>
  	</section>
diff -r -c /usr/src/orig/openser/HEAD/sip-server/modules/rr/README rr/README
*** /usr/src/orig/openser/HEAD/sip-server/modules/rr/README	2005-10-12 09:25:53.000000000 +0300
--- rr/README	2005-12-07 14:38:47.117100160 +0200
***************
*** 41,47 ****
  
                1.5.1. loose_route()
                1.5.2. strict_route() -- deprecated
!               1.5.3. record_route()
                1.5.4. record_route_preset(string)
                1.5.5. add_rr_param(param)
                1.5.6. check_route_param(re)
--- 41,47 ----
  
                1.5.1. loose_route()
                1.5.2. strict_route() -- deprecated
!               1.5.3. record_route() or record_route(string)
                1.5.4. record_route_preset(string)
                1.5.5. add_rr_param(param)
                1.5.6. check_route_param(re)
***************
*** 241,258 ****
  ...
       _________________________________________________________
  
! 1.5.3. record_route()
  
     The function adds a new Record-Route header field. The header
     field will be inserted in the message before any other
!    Record-Route header fields.
  
!    This function can be used from REQUEST_ROUTE.
  
     Example 1-8. record_route usage
  ...
  record_route();
  ...
       _________________________________________________________
  
  1.5.4. record_route_preset(string)
--- 241,261 ----
  ...
       _________________________________________________________
  
! 1.5.3. record_route() or record_route(string)
  
     The function adds a new Record-Route header field. The header
     field will be inserted in the message before any other
!    Record-Route header fields. If string parameter is given, it
!    is added as a parameter to Record-Route header field.
  
!    This function can be used from REQUEST_ROUTE and BRANCH_ROUTE.
  
     Example 1-8. record_route usage
  ...
  record_route();
  ...
+ record_route(";from_nated");
+ ...
       _________________________________________________________
  
  1.5.4. record_route_preset(string)
diff -r -c /usr/src/orig/openser/HEAD/sip-server/modules/rr/record.c rr/record.c
*** /usr/src/orig/openser/HEAD/sip-server/modules/rr/record.c	2005-11-23 13:52:59.000000000 +0200
--- rr/record.c	2005-12-07 14:04:31.887542544 +0200
***************
*** 318,323 ****
--- 318,347 ----
  
  
  /*
+  * Insert a new Record-Route header field with lr parameter and parameter
+  * that is given as paramater.
+  */
+ int record_route_1(struct sip_msg* _m, char* _rr_param, char* _s2)
+ {
+ 	str *rr_param = (str *)_rr_param;
+ 
+ 	rr_param_buf.len = 0;
+ 	rr_param_msg = _m->id;
+ 	if (rr_param_buf.len+rr_param->len>RR_PARAM_BUF_SIZE) {
+ 		LOG(L_ERR,"ERROR:rr:record_route_1: maximum size of "
+ 		    "rr_param_buf exceeded\n");
+ 		return -1;
+ 	}
+ 	memcpy(rr_param_buf.s, rr_param->s, rr_param->len);
+ 	rr_param_buf.len = rr_param->len;
+ 	DBG("DEBUG:rr:record_route_1: rr_param_buf=<%.*s>\n",
+ 	    rr_param_buf.len, rr_param_buf.s);
+ 
+ 	return do_RR(_m, 1);
+ }
+ 
+ 
+ /*
   * Insert manually created Record-Route header, no checks, no restrictions,
   * always adds lr parameter, only fromtag is added automatically when requested
   */
diff -r -c /usr/src/orig/openser/HEAD/sip-server/modules/rr/record.h rr/record.h
*** /usr/src/orig/openser/HEAD/sip-server/modules/rr/record.h	2005-08-11 20:54:45.000000000 +0300
--- rr/record.h	2005-12-07 14:02:47.328437944 +0200
***************
*** 40,45 ****
--- 40,52 ----
  
  
  /*
+  * Insert a new Record-Route header field with lr paramater and parameter
+  * that is given as parameter.
+  */
+ int record_route_1(struct sip_msg* _m, char* _rr_param, char* _s2);
+ 
+ 
+ /*
   * Insert manually created Record-Route header, no checks, no restrictions,
   * always adds lr parameter, only fromtag is added automatically when requested
   */
diff -r -c /usr/src/orig/openser/HEAD/sip-server/modules/rr/rr_mod.c rr/rr_mod.c
*** /usr/src/orig/openser/HEAD/sip-server/modules/rr/rr_mod.c	2005-08-11 20:54:45.000000000 +0300
--- rr/rr_mod.c	2005-12-07 14:01:16.403260672 +0200
***************
*** 85,91 ****
  	{"loose_route",          loose_route,           0,     0,
  			REQUEST_ROUTE},
  	{"record_route",         record_route,          0,     0,
! 			REQUEST_ROUTE},
  	{"record_route_preset",  record_route_preset,   1,     str_fixup,
  			REQUEST_ROUTE},
  	{"record_route_strict" , record_route_strict,   0,     0,
--- 85,93 ----
  	{"loose_route",          loose_route,           0,     0,
  			REQUEST_ROUTE},
  	{"record_route",         record_route,          0,     0,
! 			REQUEST_ROUTE|BRANCH_ROUTE},
! 	{"record_route",         record_route_1,        1,     str_fixup,
! 			REQUEST_ROUTE|BRANCH_ROUTE},
  	{"record_route_preset",  record_route_preset,   1,     str_fixup,
  			REQUEST_ROUTE},
  	{"record_route_strict" , record_route_strict,   0,     0,
