What happens if you use index -1 in getHeader() call? /Peter ________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] för Gregor Nanger [gregor@infomedia.si] Skickat: den 4 mars 2012 15:38 Till: FreeSWITCH Users Help Ämne: Re: [Freeswitch-users] mod_managed Well, it is code from ManagedEslTest static void OutboundModeAsync(Object stateInfo) { /* add next line to a dialplan <action application="socket" data="localhost:8022 async full" /> */ TcpListener tcpListener = new TcpListener(IPAddress.Parse("127.0.0.1"), 8022); try { tcpListener.Start(); Console.WriteLine("OutboundModeAsync, waiting for connections..."); while (true) { tcpListener.BeginAcceptSocket((asyncCallback) => { TcpListener tcpListened = (TcpListener)asyncCallback.AsyncState; Socket sckClient = tcpListened.EndAcceptSocket(asyncCallback); //Initializes a new instance of ESLconnection, and connects to the host $host on the port $port, and supplies $password to freeswitch ESLconnection eslConnection = new ESLconnection(sckClient.Handle.ToInt32()); ESLevent eslEvent = eslConnection.GetInfo(); string strUuid = eslEvent.GetHeader("UNIQUE-ID", 0); //THERE I GET NULL eslConnection.SendRecv("myevents"); eslConnection.SendRecv("divert_events on"); eslConnection.Execute("answer", String.Empty, String.Empty); eslConnection.Execute("playback", "../../../music/8000/suite-espanola-op-47-leyenda.wav", String.Empty); while (eslConnection.Connected() == ESL_SUCCESS) { eslEvent = eslConnection.RecvEvent(); Console.WriteLine(eslEvent.Serialize(String.Empty)); } sckClient.Close(); Console.WriteLine("Connection closed uuid:{0}", strUuid); }, tcpListener); Thread.Sleep(50); } } catch (Exception ex) { Console.WriteLine(ex); } finally { tcpListener.Stop(); } } 2012/3/4 Peter Olsson <peter.olsson@visionutveckling.se<mailto:peter.olsson@visionutveckling.se>> Please post your sample code here, and I will have a look. /Peter ________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] för Gregor Nanger [gregor@infomedia.si<mailto:gregor@infomedia.si>] Skickat: den 4 mars 2012 14:59 Till: FreeSWITCH Users Help Ämne: Re: [Freeswitch-users] mod_managed I did tried all permutations... Even getBody() returns null.... Do you think that this is because of Windows installation? Otherwise library works ok. 2012/3/4 Peter Olsson <peter.olsson@visionutveckling.se<mailto:peter.olsson@visionutveckling.se><mailto:peter.olsson@visionutveckling.se<mailto:peter.olsson@visionutveckling.se>>> I'm not really sure about this, but the getHeader is maybe case sensitive? Have you tried "Event-Name" as the header name instead? /Peter ________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org><mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>> [freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org><mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>>] för Gregor Nanger [gregor@infomedia.si<mailto:gregor@infomedia.si><mailto:gregor@infomedia.si<mailto:gregor@infomedia.si>>] Skickat: den 4 mars 2012 13:10 Till: FreeSWITCH Users Help Ämne: [Freeswitch-users] mod_managed I'm so close to anounce Freeswitch as the best voip software ever created :-) I am using mod_managed with c# and trying Test Visual studio project that is included. I can connect inbound and outbound and I can control call. But I cannot read header. If I use method getHeader("EVENT-NAME") , response is null. Whichever header I read, I get null. Serialize method prints all headers.. Any suggestion? I am using Freeswitch with Windows OS. _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org><mailto:consulting@freeswitch.org<mailto:consulting@freeswitch.org>> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org><mailto:FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org !DSPAM:4f537db532764595775111!