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

Doug Campbell d.campbell at ampersand.com
Thu Mar 29 21:25:27 MSD 2012


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



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