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.
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 [freeswitch-users-bounces@lists.freeswitch.org] för Gregor Nanger [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. !DSPAM:4f53615d32762189818904!
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>
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 [ freeswitch-users-bounces@lists.freeswitch.org] för Gregor Nanger [ 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.
!DSPAM:4f53615d32762189818904!
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: 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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Please post your sample code here, and I will have a look. /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 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>> 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> [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 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> 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:4f5373e932764490361988!
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>
Please post your sample code here, and I will have a look.
/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 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>> 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> [ 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 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> 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:4f5373e932764490361988!
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: 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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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!
Peter, that was it, thank you. It's funny that in test code is 0 in getHeader() Now I can anounce that FS is best ever... :-) 2012/3/4 Peter Olsson <peter.olsson@visionutveckling.se>
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!
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: 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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks for verifying the sample and the correction. Fix was applied to Git Head. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/mod-managed-tp7342274p7343192.... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (3)
-
Gregor Nanger
-
Jeff Lenk
-
Peter Olsson