]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use this and send {sip_gethostbyname=true} in the dial string to force this behaviour
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 12 Jul 2013 18:54:50 +0000 (13:54 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 12 Jul 2013 18:54:50 +0000 (13:54 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c

index b8b00ac758a818a49a699cf78b21d756c1495fe7..d8cd0219f8891475c79f6d2eaf1de1ae81171a55 100644 (file)
@@ -4276,7 +4276,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
                } else {
                        host++;
                        
-                       if (!strchr(host, '.')) {
+                       if (!strchr(host, '.') || switch_true(switch_event_get_header(var_event, "sip_gethostbyname"))) {
                                struct sockaddr_in sa;
                                struct hostent *he = gethostbyname(host);
                                char *ip, *tmp;