diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2eb5d38d0f..dbbdbcf1af 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5002,11 +5002,7 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer, struct sockadd /* Get the outbound proxy information */ ref_proxy(dialog, obproxy_get(dialog, NULL)); - if (dialog->outboundproxy) { - /* If we have an outbound proxy, don't bother with DNS resolution at all, but set the port */ - portno = port ? atoi(port) : (dialog->socket.type & SIP_TRANSPORT_TLS) ? STANDARD_TLS_PORT : STANDARD_SIP_PORT; - memcpy(&dialog->sa.sin_addr, &dialog->outboundproxy->ip.sin_addr, sizeof(dialog->sa.sin_addr)); - } else if (sin) { + if (sin) { /* This address should be updated using dnsmgr */ memcpy(&dialog->sa.sin_addr, &sin->sin_addr, sizeof(dialog->sa.sin_addr)); if (!sin->sin_port) {