]> 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:55:10 +0000 (13:55 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c

index c4e67bdf0d68b442f7899f0970f458ad89e69640..bdc1944725e7c6f99f256f65321639abef9234c4 100644 (file)
@@ -5044,7 +5044,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;