2010-01-18 04:30:48 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace ManagedEslTest
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
// Connect to FreeSWITCH
|
|
|
|
|
ESLconnection eslConnection = new ESLconnection("localhost", "8021", "ClueCon");
|
|
|
|
|
// We want all Events (probably will want to change this depending on your needs)
|
2010-01-27 02:25:22 +00:00
|
|
|
|
eslConnection.SendRecv("event plain ALL");
|
2010-01-18 04:30:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Grab Events until process is killed
|
2010-01-27 02:25:22 +00:00
|
|
|
|
while (eslConnection.Connected() == 1)
|
2010-01-18 04:30:48 +00:00
|
|
|
|
{
|
2010-01-27 02:25:22 +00:00
|
|
|
|
ESLevent eslEvent = eslConnection.RecvEvent();
|
|
|
|
|
Console.WriteLine(eslEvent.Serialize(String.Empty));
|
2010-01-18 04:30:48 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|