[Freeswitch-users] Unexpected behavior with hostname in socket application

Hector Geraldino Hector.Geraldino at ipsoft.com
Thu Mar 29 23:26:49 MSD 2012


The obvious answer would be: fix the DNS settings :) (or use the ip address of the network, not the loopback ip)

Anyway, I'm curious about this one. What happens if you try to do a "telnet localhost 4574" and then a "telnet 127.0.0.1 4574" on the same machine? Works in one case and not in the other?


-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Doug Campbell
Sent: Thursday, March 29, 2012 1:25 PM
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] Unexpected behavior with hostname in socket application

I am getting unexpected behavior on the hostname used in the socket application.

I have a trivial dialplan:

   <context name="phoneglue">
     <extension name="outside_call" continue="true">
       <condition>
         <action application="socket" data="127.0.0.1:4574 async"/>
       </condition>
     </extension>
   </context>

This outbound event socket gets connected fine on my CentOS 6.2 machine.
Though the freeswitch.log file seems to change "127.0.0.1" to "localhost":

EXECUTE sofia/phoneglue/9789735994 socket(localhost:4574 async)

However, with the identical software (including fs built from git today), on my RHEL 6.2 machine that has a DNS glitch resolving "localhost" badly (don't ask), it fails.
The freeswitch.log file says:

EXECUTE sofia/phoneglue/9789735994 socket(localhost:4574 async)
2012-03-29 10:05:08.200547 [ERR] mod_event_socket.c:458 Socket Error!

Why is it changing "127.0.0.1" to "localhost"?
Shouldn't it be using the raw IP when it is so specified?
Without it doing this, my RHEL box is doomed.

Much thanks for any help,
Doug

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com

 

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list