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>
<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!"/>
</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@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@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@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@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@10.0.2.2) Ended
2012-11-07 12:40:29.563345 [NOTICE]
switch_core_session.c:1402 Close Channel sofia/internal/
1000@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.