Hi Brett,

1) a SIP URI without username is perfect valid.

2) as Contact URI is just for IP routing purposes, a username part is totally useless.

3) preserving the username may "leak" topo info (you never know what is the username content).

4) see the simple attached patch to force a static dummy username.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 02/05/2013 11:09 AM, Brett Nemeroff wrote:
Hello All,
I noticed that when invoking topology_hiding from the dialog module that the contact header is rewritten without a userpart in the URI. I've had some carriers complain about the lack of a userpart. What is the reasoning for removing the userpart of the URI and is there any way to safely add it back without breaking in-dialog requests?

Thanks,
Brett


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Index: modules/dialog/dlg_tophiding.c
===================================================================
--- modules/dialog/dlg_tophiding.c	(revision 9736)
+++ modules/dialog/dlg_tophiding.c	(working copy)
@@ -93,7 +93,7 @@
 			return 0;
 	}
 
-	prefix_len = 5; /* <sip: */
+	prefix_len = 10; /* <sip:user@ */
 	prefix = pkg_malloc(prefix_len);
 	if (!prefix) {
 		LM_ERR("no more pkg\n");
@@ -107,7 +107,7 @@
 		goto error;
 	}
 
-	memcpy(prefix,"<sip:",prefix_len);
+	memcpy(prefix,"<sip:user@",prefix_len);
 	
 	p_init = p = suffix;
 	*p++ = ';';
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to