Nodejs implementing ESL Inline FreeSWITCH setting instructions

Source: Internet
Author: User
Tags freeswitch

I. BACKGROUND notes:

SIP server IP (Centos): 192.168.11.61, server IP (Windows): 192.168.11.19

Second, the purpose:

The SIP server (FreeSWITCH) can be accessed from the 192.168.11.19 via Nodejs's MODESL inline, enabling access to the status information of the SIPs server. Have seen a lot of documents before,SIP Server and inline programs are on a computer, this article provides a separate implementation of the way for everyone to refer to.

Third, the specific setting:

① in Conf/autoload_configs/event_socket.conf.xml, the modified Listen-ip is: 192.168.11.61, the default is: 127.0.0.1, the following parameters are set:

<configuration name= "event_socket.conf" description= "Socket Client" >
<settings>
<param name= "Nat-map" value= "false"/>
    <param name= "Listen-ip" value= "192.168.11.61"/>
<param name= "Listen-port" value= "8021"/>
<param name= "Password" value= "Cluecon"/>
<!--<param name= "Apply-inbound-acl" value= "LAN"/>--
</settings>
</configuration>

② Installing Nodejs (specific installation is not covered in this article), download Modesl (HTTPS://WWW.NPMJS.ORG/PACKAGE/MODESL)

③esl.js Inline Code writing:

var ESL = require (' D:\\testchat\\modesl '),
conn = new ESL. Connection (' 192.168.11.61 ', 8021, ' Cluecon ', function () {
Conn.api (' Vension ', function (res) {
Res is an ESL. Event instance
Console.log (Res.getbody ());
});
});

Modesl and esl.js are put D:\\testchat directory, start doc into the D:\\testcha folder, input node Esl.js can see the FS version information, replace other instructions, you can achieve convenient operation.

Based on this, the FreeSWITCH information can be passed through the HTTP module to the Web interface, you can also store this information in db, analyze ... Then you can try out other apps.

Nodejs implementing ESL Inline FreeSWITCH setting instructions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.