<div><span style="font-family:arial,sans-serif;font-size:13px">Hi All,</span><br></div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">I am using node-esl to setup an outbound connection.</div>
<div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">I am on ubuntu. I have a softphone connected to  freeswitch from a win7 system on Virtualbox.</div>
<div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">my dialplan is such:</div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">
<div>&lt;include&gt;</div><div>  &lt;extension name=&quot;<a href="http://abdlquadri.com/" target="_blank">abdlquadri.com</a>&quot;&gt;<br></div><div>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(1982)$&quot;&gt;<br>
</div><div>&lt;action application=&quot;sleep&quot; data=&quot;1000&quot;/&gt;</div><div>&lt;action application=&quot;set&quot; data=&quot;name=abdlquadri&quot;/&gt;</div><div>      &lt;action application=&quot;log&quot; data=&quot;INFO ${name} is online!&quot;/&gt;<br>
</div><div>     &lt;action application=&quot;socket&quot; data=&quot;<a href="http://127.0.0.1:8022/" target="_blank">127.0.0.1:8022</a> sync full&quot;/&gt;</div><div>    &lt;/condition&gt;<br></div><div>  &lt;/extension&gt;</div>
<div>&lt;/include&gt;</div></div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">When I dial 1982 the output from freeswitch is such:</div><div style="font-size:13px;font-family:arial,sans-serif">
<br></div><div style="font-size:13px;font-family:arial,sans-serif"><div>2012-11-07 12:40:04.403324 [NOTICE] switch_channel.c:926 New Channel sofia/internal/<a href="mailto:1000@10.0.2.2" target="_blank">1000@10.0.2.2</a> [df4ad290-28cf-11e2-a3ea-bdbddea31077]</div>
<div>2012-11-07 12:40:04.403324 [INFO] mod_dialplan_xml.c:485 Processing abdlquadri &lt;1000&gt;-&gt;1982 in context default</div><div>2012-11-07 12:40:05.403318 [INFO] mod_dptools.c:1420 abdlquadri is online!</div><div>2012-11-07 12:40:05.403318 [INFO] switch_core_session.c:2137 Sending early media</div>
</div><div style="font-size:13px;font-family:arial,sans-serif">2012-11-07 12:40:05.423325 [NOTICE] mod_sofia.c:2585 Pre-Answer sofia/internal/<a href="mailto:1000@10.0.2.2" target="_blank">1000@10.0.2.2</a>!<br></div><div style="font-size:13px;font-family:arial,sans-serif">
<div>2012-11-07 12:40:29.563345 [ERR] mod_event_socket.c:458 Socket Error!<br></div><div>2012-11-07 12:40:29.563345 [NOTICE] switch_core_state_machine.c:226 sofia/internal/<a href="mailto:1000@10.0.2.2" target="_blank">1000@10.0.2.2</a> has executed the last dialplan instruction, hanging up.</div>
<div>2012-11-07 12:40:29.563345 [NOTICE] switch_core_state_machine.c:228 Hangup sofia/internal/<a href="mailto:1000@10.0.2.2" target="_blank">1000@10.0.2.2</a> [CS_EXECUTE] [NORMAL_CLEARING]</div><div>2012-11-07 12:40:29.563345 [NOTICE] switch_core_session.c:1400 Session 6 (sofia/internal/<a href="mailto:1000@10.0.2.2" target="_blank">1000@10.0.2.2</a>) Ended</div>
<div>2012-11-07 12:40:29.563345 [NOTICE] switch_core_session.c:1402 Close Channel sofia/internal/<a href="mailto:1000@10.0.2.2" target="_blank">1000@10.0.2.2</a> [CS_DESTROY]</div></div><div style="font-size:13px;font-family:arial,sans-serif">
<br></div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">My node-esl code does not get called. Here is it:</div><div style="font-size:13px;font-family:arial,sans-serif">
<br></div><div style="font-size:13px;font-family:arial,sans-serif"><div>var  esl = require(&#39;modesl&#39;);</div><div>var conn = new esl.Server({</div><div>    port:&#39;8022&#39;, </div><div>    host:&#39;127.0.0.1&#39;</div>
<div>},function(){</div><div>    </div><div>    conn.on(&#39;connection::open&#39;, function(){</div><div>        conn.execute(&quot;answer&quot;);</div><div>        conn.getInfo();</div><div>        console.log(&#39;Connection Open&#39;);</div>
<div>    });</div><div>    conn.on(&#39;connection::ready&#39;, function(conne){</div><div>        conne.execute(&quot;answer&quot;);</div><div>        conne.getInfo();</div><div>        console.log(&#39;Connection Ready&#39;);</div>
<div>    });</div><div>    conn.on(&#39;connection::close&#39;, function(){</div><div>        conn.execute(&quot;answer&quot;);</div><div>        conn.getInfo();</div><div>        console.log(&#39;Connection Closed&#39;);</div>
<div>    });</div><div>    console.log(conn);</div><div>});</div></div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">
I guess the problem is this line: 2012-11-07 12:40:29.563345 [ERR] mod_event_socket.c:458 Socket Error!</div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">
My does not give any log.</div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">I also checked to make sure I have the socket up with lsof -i :8022</div>
<div style="font-size:13px;font-family:arial,sans-serif"><br></div><div><div><font face="arial, sans-serif">COMMAND  PID       USER   FD   TYPE DEVICE SIZE/OFF NODE NAME</font></div><div><font face="arial, sans-serif">node    7911 abdlquadri    7u  IPv4 225303      0t0  TCP localhost:8022 (LISTEN)</font></div>
</div><div><font face="arial, sans-serif"><br></font></div><div style="font-size:13px;font-family:arial,sans-serif">Please is there anything am doing wrong.</div><div style="font-size:13px;font-family:arial,sans-serif"><br>
</div><div style="font-size:13px;font-family:arial,sans-serif">Thanks. All.</div>