Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 143609) +++ channels/chan_sip.c (working copy) @@ -14595,6 +14595,7 @@ p->socket.type = transport; if (ast_test_flag(&p->flags[0], SIP_PROMISCREDIR)) { + char *host = NULL; if (!strncasecmp(s, "sip:", 4)) s += 4; else if (!strncasecmp(s, "sips:", 5)) @@ -14602,6 +14603,12 @@ e = strchr(s, '/'); if (e) *e = '\0'; + if ((host = strchr(s, '@'))) { + *host++ = '\0'; + ast_debug(2, "Found promiscuous redirection to 'SIP/%s::::%s@%s'\n", s, get_transport(transport), host); + if (p->owner) + ast_string_field_build(p->owner, call_forward, "SIP/%s::::%s@%s", s, get_transport(transport), host); + } ast_debug(2, "Found promiscuous redirection to 'SIP/::::%s@%s'\n", get_transport(transport), s); if (p->owner) ast_string_field_build(p->owner, call_forward, "SIP/::::%s@%s", get_transport(transport), s);