diff -u asterisk-1.8.3.2/main/netsock2.c.orig asterisk-1.8.3.2/main/netsock2.c --- asterisk-1.8.3.2/main/netsock2.c.orig 2010-10-18 21:50:04.000000000 +0200 +++ asterisk-1.8.3.2/main/netsock2.c 2011-04-19 12:08:51.000000000 +0200 @@ -94,6 +94,18 @@ ast_log(LOG_ERROR, "getnameinfo(): %s\n", gai_strerror(e)); return ""; } + + /* + * Remove scope ID (interface name on Linux) from IPv6 link local addresses, so + * to comply to IPv6address BNF in RFC 3261. Section 25.1. + */ + if (ast_sockaddr_is_ipv6(sa) && + IN6_IS_ADDR_LINKLOCAL(&(((struct sockaddr_in6 *)sa)->sin6_addr))) { + char *p = strchr(host, '%'); + if (NULL != p) { + *p = '\0'; + } + } switch (format) { case AST_SOCKADDR_STR_DEFAULT: