<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><include></div><div> <extension name="<a href="http://abdlquadri.com/" target="_blank">abdlquadri.com</a>"><br></div><div> <condition field="destination_number" expression="^(1982)$"><br>
</div><div><action application="sleep" data="1000"/></div><div><action application="set" data="name=abdlquadri"/></div><div> <action application="log" data="INFO ${name} is online!"/><br>
</div><div> <action application="socket" data="<a href="http://127.0.0.1:8022/" target="_blank">127.0.0.1:8022</a> sync full"/></div><div> </condition><br></div><div> </extension></div>
<div></include></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 <1000>->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('modesl');</div><div>var conn = new esl.Server({</div><div> port:'8022', </div><div> host:'127.0.0.1'</div>
<div>},function(){</div><div> </div><div> conn.on('connection::open', function(){</div><div> conn.execute("answer");</div><div> conn.getInfo();</div><div> console.log('Connection Open');</div>
<div> });</div><div> conn.on('connection::ready', function(conne){</div><div> conne.execute("answer");</div><div> conne.getInfo();</div><div> console.log('Connection Ready');</div>
<div> });</div><div> conn.on('connection::close', function(){</div><div> conn.execute("answer");</div><div> conn.getInfo();</div><div> console.log('Connection Closed');</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>