--- chan_iax2.c~ 2010-05-05 14:19:44.000000000 -0400 +++ chan_iax2.c 2010-05-05 14:22:27.000000000 -0400 @@ -175,7 +175,7 @@ static int min_reg_expire; static int max_reg_expire; -static int srvlookup = 0; +static int srvlookup = 1; static int timingfd = -1; /* Timing file descriptor */ @@ -4189,11 +4189,11 @@ if (!(peer = find_peer(peername, 1))) { cai->found = 0; + sin->sin_port = htons(IAX_DEFAULT_PORTNO); if (ast_get_ip_or_srv(sin, peername, srvlookup ? "_iax._udp" : NULL)) { ast_log(LOG_WARNING, "No such host: %s\n", peername); return -1; } - sin->sin_port = htons(IAX_DEFAULT_PORTNO); /* use global iax prefs for unknown peer/user */ /* But move the calling channel's native codec to the top of the preference list */ memcpy(&ourprefs, &prefs, sizeof(ourprefs)); @@ -12337,7 +12337,7 @@ maxauthreq = 3; - srvlookup = 0; + srvlookup = 1; v = ast_variable_browse(cfg, "general");