[Freeswitch-users] outbound connection using node-esl socket errormore detail added

Chad Engler Chad.Engler at patlive.com
Thu Nov 8 16:50:35 MSK 2012


Interesting, are you able to reach the node program using telnet?

 

                telnet localhost 8022

 

-Chad 

 

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
Mumuney Abdlquadri
Sent: Thursday, November 08, 2012 6:23 AM
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] outbound connection using node-esl socket
errormore detail added

 

Hi All,

 

I am using node-esl to setup an outbound connection.

 

I am on ubuntu. I have a softphone connected to  freeswitch from a win7
system on Virtualbox.

 

my dialplan is such:

 

<include>

  <extension name="abdlquadri.com <http://abdlquadri.com/> ">

    <condition field="destination_number" expression="^(1982)$">

<action application="sleep" data="1000"/>

<action application="set" data="name=abdlquadri"/>

      <action application="log" data="INFO ${name} is online!"/>

     <action application="socket" data="127.0.0.1:8022
<http://127.0.0.1:8022/>  sync full"/>

    </condition>

  </extension>

</include>

 

When I dial 1982 the output from freeswitch is such:

 

2012-11-07 12:40:04.403324 [NOTICE] switch_channel.c:926 New Channel
sofia/internal/1000 at 10.0.2.2 [df4ad290-28cf-11e2-a3ea-bdbddea31077]

2012-11-07 12:40:04.403324 [INFO] mod_dialplan_xml.c:485 Processing
abdlquadri <1000>->1982 in context default

2012-11-07 12:40:05.403318 [INFO] mod_dptools.c:1420 abdlquadri is
online!

2012-11-07 12:40:05.403318 [INFO] switch_core_session.c:2137 Sending
early media

2012-11-07 12:40:05.423325 [NOTICE] mod_sofia.c:2585 Pre-Answer
sofia/internal/1000 at 10.0.2.2!

2012-11-07 12:40:29.563345 [ERR] mod_event_socket.c:458 Socket Error!

2012-11-07 12:40:29.563345 [NOTICE] switch_core_state_machine.c:226
sofia/internal/1000 at 10.0.2.2 has executed the last dialplan instruction,
hanging up.

2012-11-07 12:40:29.563345 [NOTICE] switch_core_state_machine.c:228
Hangup sofia/internal/1000 at 10.0.2.2 [CS_EXECUTE] [NORMAL_CLEARING]

2012-11-07 12:40:29.563345 [NOTICE] switch_core_session.c:1400 Session 6
(sofia/internal/1000 at 10.0.2.2) Ended

2012-11-07 12:40:29.563345 [NOTICE] switch_core_session.c:1402 Close
Channel sofia/internal/1000 at 10.0.2.2 [CS_DESTROY]

 

 

My node-esl code does not get called. Here is it:

 

var  esl = require('modesl');

var conn = new esl.Server({

    port:'8022', 

    host:'127.0.0.1'

},function(){

    

    conn.on('connection::open', function(){

        conn.execute("answer");

        conn.getInfo();

        console.log('Connection Open');

    });

    conn.on('connection::ready', function(conne){

        conne.execute("answer");

        conne.getInfo();

        console.log('Connection Ready');

    });

    conn.on('connection::close', function(){

        conn.execute("answer");

        conn.getInfo();

        console.log('Connection Closed');

    });

    console.log(conn);

});

 

 

I guess the problem is this line: 2012-11-07 12:40:29.563345 [ERR]
mod_event_socket.c:458 Socket Error!

 

My does not give any log.

 

I also checked to make sure I have the socket up with lsof -i :8022

 

COMMAND  PID       USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

node    7911 abdlquadri    7u  IPv4 225303      0t0  TCP localhost:8022
(LISTEN)

 

Please is there anything am doing wrong.

 

Thanks. All.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121108/f75939af/attachment-0001.html 


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