If you work with FreeSWITCH there’s a good chance every time you do, you run fs_cli and attempt to read the firehose of data shown when making a call to make sense of what’s going on and why what you’re trying to do isn’t working.
But, if you are also using the Event Socket Language service built into FreeSWITCH (Which you totally should) either for programming FreeSWITCH behaviour, or for realtime charging with CGrateS, then you’ll find that fs_cli will fail to connect.
That’s because we’ve edited the event_socket.conf.xml file, and fs_cli uses the event socket to connect to FreeSWITCH as well.
But there’s a simple fix,
Create a new file in /etc/fs_cli.conf and populate it with the info needed to connect to your ESL session you defined in event_socket.conf.xml, so if this is is your
<configuration name="event_socket.conf" description="Socket Client"> <settings> <param name="nat-map" value="false"/> <param name="listen-ip" value="10.98.0.76"/> <param name="listen-port" value="8021"/> <param name="password" value="mysupersecretpassword"/> <param name="apply-inbound-acl" value="NickACL"/> </settings> </configuration>
Then your /etc/fs_cli.conf should look like:
[default] ; Put me in /etc/fs_cli.conf or ~/.fs_cli_conf ;overide any default options here loglevel => 6 log-uuid => false host => 10.98.0.76 port => 8021 password => mysupersecretpassword debug => 7
And that’s it, now you can run fs_cli and connect to the terminal once more!