[asterisk-commits] simon.perreault: branch group/v6 r114171 - /team/group/v6/trunk/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 16 10:51:06 CDT 2008


Author: simon.perreault
Date: Wed Apr 16 10:51:05 2008
New Revision: 114171

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114171
Log:
Correctly build To: header with verbatim IPv6 addresses.

Thanks to SNOM, AcmePacket, and Tandberg for a great interop session at SIPit 22!

Modified:
    team/group/v6/trunk/channels/chan_sip.c

Modified: team/group/v6/trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/channels/chan_sip.c?view=diff&rev=114171&r1=114170&r2=114171
==============================================================================
--- team/group/v6/trunk/channels/chan_sip.c (original)
+++ team/group/v6/trunk/channels/chan_sip.c Wed Apr 16 10:51:05 2008
@@ -8076,9 +8076,12 @@
 			}
 			ast_str_append(&invite, 0, "%s@", n);
 		}
-		ast_str_append(&invite, 0, "%s", p->tohost);
-		if (port != STANDARD_SIP_PORT)
-			ast_str_append(&invite, 0, ":%d", port);
+
+		char hp[NI_MAXHOST];
+		ast_vinetsock_hp2str(p->tohost, port == STANDARD_SIP_PORT ? NULL : port,
+				hp, sizeof(hp));
+
+		ast_str_append(&invite, 0, "%s", hp);
 		ast_str_append(&invite, 0, "%s", urioptions);
 	}
 




More information about the asterisk-commits mailing list