Revert "FS-7917 add check for ipv6 in sofia_glue_create_via"
This reverts commit 4c8bf297fb
.
This behavior change was incorrect, sorry
This commit is contained in:
parent
59ddb36a48
commit
351a8ca34c
|
@ -455,18 +455,17 @@ char *sofia_glue_create_external_via(switch_core_session_t *session, sofia_profi
|
||||||
|
|
||||||
char *sofia_glue_create_via(switch_core_session_t *session, const char *ip, switch_port_t port, sofia_transport_t transport)
|
char *sofia_glue_create_via(switch_core_session_t *session, const char *ip, switch_port_t port, sofia_transport_t transport)
|
||||||
{
|
{
|
||||||
char *ipv6 = strchr(ip, ':');
|
|
||||||
if (port && port != 5060) {
|
if (port && port != 5060) {
|
||||||
if (session) {
|
if (session) {
|
||||||
return switch_core_session_sprintf(session, "SIP/2.0/%s %s%s%s:%d;rport", sofia_glue_transport2str(transport), ipv6 ? "[" : "", ip, ipv6 ? "]" : "", port);
|
return switch_core_session_sprintf(session, "SIP/2.0/%s %s:%d;rport", sofia_glue_transport2str(transport), ip, port);
|
||||||
} else {
|
} else {
|
||||||
return switch_mprintf("SIP/2.0/%s %s%s%s:%d;rport", sofia_glue_transport2str(transport), ipv6 ? "[" : "", ip, ipv6 ? "]" : "", port);
|
return switch_mprintf("SIP/2.0/%s %s:%d;rport", sofia_glue_transport2str(transport), ip, port);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (session) {
|
if (session) {
|
||||||
return switch_core_session_sprintf(session, "SIP/2.0/%s %s%s%s;rport", sofia_glue_transport2str(transport), ipv6 ? "[" : "", ip, ipv6 ? "]" : "");
|
return switch_core_session_sprintf(session, "SIP/2.0/%s %s;rport", sofia_glue_transport2str(transport), ip);
|
||||||
} else {
|
} else {
|
||||||
return switch_mprintf("SIP/2.0/%s %s%s%s;rport", sofia_glue_transport2str(transport), ipv6 ? "[" : "", ip, ipv6 ? "]" : "");
|
return switch_mprintf("SIP/2.0/%s %s;rport", sofia_glue_transport2str(transport), ip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue