<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    127.0.0.1:8022 happens to be the default configuration for an
    inbound esl connection. Your server may not be listening on this
    port at all; FreeSWITCH itself might be. Check your
    event_socket.conf.xml and make sure the inbound listen port is
    different from your server's port.<br>
    <br>
    Adam<br>
    <br>
    <div class="moz-cite-prefix">On 08/11/2012 7:23 AM, Mumuney
      Abdlquadri wrote:<br>
    </div>
    <blockquote
cite="mid:%3CCAGDHizkE46=KVJ_QccyYP0uzAR79XYc0YGni=k=_idUzAxc6pw@mail.gmail.com%3E"
      type="cite">
      <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 &nbsp;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>&nbsp; &lt;extension name="<a moz-do-not-send="true"
            href="http://abdlquadri.com/" target="_blank">abdlquadri.com</a>"&gt;<br>
        </div>
        <div>&nbsp; &nbsp; &lt;condition field="destination_number"
          expression="^(1982)$"&gt;<br>
        </div>
        <div>&lt;action application="sleep" data="1000"/&gt;</div>
        <div>&lt;action application="set" data="name=abdlquadri"/&gt;</div>
        <div>&nbsp; &nbsp; &nbsp; &lt;action application="log" data="INFO ${name} is
          online!"/&gt;<br>
        </div>
        <div>&nbsp; &nbsp; &nbsp;&lt;action application="socket" data="<a
            moz-do-not-send="true" href="http://127.0.0.1:8022/"
            target="_blank">127.0.0.1:8022</a>&nbsp;sync full"/&gt;</div>
        <div>&nbsp; &nbsp; &lt;/condition&gt;<br>
        </div>
        <div>&nbsp; &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 moz-do-not-send="true"
            href="mailto:1000@10.0.2.2" target="_blank">1000@10.0.2.2</a>&nbsp;[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 moz-do-not-send="true"
          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
            moz-do-not-send="true" href="mailto:1000@10.0.2.2"
            target="_blank">1000@10.0.2.2</a>&nbsp;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
            moz-do-not-send="true" href="mailto:1000@10.0.2.2"
            target="_blank">1000@10.0.2.2</a>&nbsp;[CS_EXECUTE]
          [NORMAL_CLEARING]</div>
        <div>2012-11-07 12:40:29.563345 [NOTICE]
          switch_core_session.c:1400 Session 6 (sofia/internal/<a
            moz-do-not-send="true" 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
            moz-do-not-send="true" href="mailto:1000@10.0.2.2"
            target="_blank">1000@10.0.2.2</a>&nbsp;[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 &nbsp;esl = require('modesl');</div>
        <div>var conn = new esl.Server({</div>
        <div>&nbsp; &nbsp; port:'8022',&nbsp;</div>
        <div>&nbsp; &nbsp; host:'127.0.0.1'</div>
        <div>},function(){</div>
        <div>&nbsp; &nbsp;&nbsp;</div>
        <div>&nbsp; &nbsp; conn.on('connection::open', function(){</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; conn.execute("answer");</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; conn.getInfo();</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; console.log('Connection Open');</div>
        <div>&nbsp; &nbsp; });</div>
        <div>&nbsp; &nbsp; conn.on('connection::ready', function(conne){</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; conne.execute("answer");</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; conne.getInfo();</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; console.log('Connection Ready');</div>
        <div>&nbsp; &nbsp; });</div>
        <div>&nbsp; &nbsp; conn.on('connection::close', function(){</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; conn.execute("answer");</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; conn.getInfo();</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; console.log('Connection Closed');</div>
        <div>&nbsp; &nbsp; });</div>
        <div>&nbsp; &nbsp; 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:&nbsp;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 &nbsp;PID &nbsp; &nbsp; &nbsp; USER &nbsp; FD
            &nbsp; TYPE DEVICE SIZE/OFF NODE NAME</font></div>
        <div><font face="arial, sans-serif">node &nbsp; &nbsp;7911 abdlquadri &nbsp;
            &nbsp;7u &nbsp;IPv4 225303 &nbsp; &nbsp; &nbsp;0t0 &nbsp;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>
    </blockquote>
    <br>
    <div class="moz-signature">
      <table id="signature" style="font-size:85%;color:#3D2316"
        border="0" cellpadding="1" cellspacing="0">
        <tbody>
          <tr>
            <td rowspan="2" valign="middle" align="center"><br>
            </td>
            <td rowspan="6" width="6px"><br>
            </td>
            <td><br>
            </td>
            <td rowspan="6" width="6px"><br>
            </td>
            <td><br>
            </td>
          </tr>
          <tr>
            <td rowspan="6" style="font-weight:bold; font-size:100%;"
              width="1px" bgcolor="#A8CF38"><br>
            </td>
            <td><br>
            </td>
          </tr>
          <tr>
            <td align="right"><br>
            </td>
            <td><br>
            </td>
          </tr>
          <tr>
            <td align="right"><br>
            </td>
            <td><br>
            </td>
          </tr>
          <tr>
            <td align="right"><br>
            </td>
            <td><br>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>