[Freeswitch-users] Issue in .NET call control using ESL DLL

Grant Bagdasarian gb at cm.nl
Thu Jan 22 16:14:08 MSK 2015


Hello,

I'm experiencing a rather weird issue when using the ESL libraries for .NET.

When running the below code outside of Visual Studio in its own executable(Console Application) I'm receiving the below exception.
When the code is run inside Visual Studio, it works perfect.

Using ESL library contained in Freeswitch 1.2.13.

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at CSharp_ESLevent_Serialize(Void* jarg1, SByte* jarg2) in c:\users\gb\downloads\freeswitch-1.2.13\freeswitch-1.2.13\libs\esl\managed\esl_wrap.cpp:line 413
   at ManagedEsl.ESLPINVOKE.ESLevent_Serialize(HandleRef jarg1, String jarg2)
   at VoiceEventSocketDemoClient.Program.Main(String[] args) in c:\Users\gb\Documents\Visual Studio 2012\Projects\VoiceEventSocketDemoClient\VoiceEventSocketDemoClient\Program.cs:line 26

TcpListener server = new TcpListener(IPAddress.Parse("LISTEN.IP.GOES.HERE"), 5000);

server.Start();
TcpClient eslClient = server.AcceptTcpClient();
ESLconnection eslConnection = new ESLconnection(eslClient.Client.Handle.ToInt32());
ESLevent e = eslConnection.GetInfo();
Console.WriteLine(e.Serialize("json"));

Does anyone know why this is happening? Maybe someone can reproduce the problem on their own PC using the above code example.

Thank you!

Regards,

Grant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150122/d5fb70f9/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list