Receive Event for Silence Timeout in Conference Session
Hi, I am using event socket layer to receive events happenening in the conference session from the Freeswitch in my java program. My program is interested in knowing when there is silence in the conference for a particular period of time. How can I set a condition for silence detection in the conference dialplan and receive its value through a channel variable in my program. Regards, Deepika
Might not be the best way to do it - but you could potentially look for the inverse. Set up an event listener for all conference events - watch for 'start-talking' and 'stop-talking', and just keep track of how long it has been since the last 'start-talking' event. -- Nathan On 01/17/2016 01:21 AM, Deepika Yadav wrote:
Hi,
I am using event socket layer to receive events happenening in the conference session from the Freeswitch in my java program. My program is interested in knowing when there is silence in the conference for a particular period of time.
How can I set a condition for silence detection in the conference dialplan and receive its value through a channel variable in my program.
Regards, Deepika
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect
I was going to suggest the same approach, but measure the time since the last 'stop-talking' event since that indicates that silence has begun. The script should make sure that it has no 'start-talking' events without a matching 'stop-talking' event to ensure that everybody is silent before starting the timer. Bote
-----Original Message----- From: Nathan Neulinger Sent: Sunday, 17 January, 2016 10:00 Subject: Re: [Freeswitch-users] Receive Event for Silence Timeout in Conference Session
Might not be the best way to do it - but you could potentially look for the inverse.
Set up an event listener for all conference events - watch for 'start-talking' and 'stop-talking', and just keep track of how long it has been since the last 'start-talking' event.
-- Nathan
On 01/17/2016 01:21 AM, Deepika Yadav wrote:
Hi,
I am using event socket layer to receive events happenening in the conference session from the Freeswitch in my java program. My program is interested in knowing when there is silence in the conference for a particular period of time.
How can I set a condition for silence detection in the conference dialplan and receive its value through a channel variable in my program.
Regards, Deepika
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect
Woops. Yeah, good point on the stop vs. start... -- Nathan On 01/17/2016 10:13 AM, Bote Man wrote:
I was going to suggest the same approach, but measure the time since the last 'stop-talking' event since that indicates that silence has begun.
The script should make sure that it has no 'start-talking' events without a matching 'stop-talking' event to ensure that everybody is silent before starting the timer.
Bote
-----Original Message----- From: Nathan Neulinger Sent: Sunday, 17 January, 2016 10:00 Subject: Re: [Freeswitch-users] Receive Event for Silence Timeout in Conference Session
Might not be the best way to do it - but you could potentially look for the inverse.
Set up an event listener for all conference events - watch for 'start-talking' and 'stop-talking', and just keep track of how long it has been since the last 'start-talking' event.
-- Nathan
On 01/17/2016 01:21 AM, Deepika Yadav wrote:
Hi,
I am using event socket layer to receive events happenening in the conference session from the Freeswitch in my java program. My program is interested in knowing when there is silence in the conference for a particular period of time.
How can I set a condition for silence detection in the conference dialplan and receive its value through a channel variable in my program.
Regards, Deepika
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect
I have a need to bridge two channels together and then somehow verify that I am getting RTP packets from both directions. The need stems from a desire to detect a one-way audio situation in rare nat’ed scenarios where signaling gets established but one party may have restrictive firewall rules preventing his/her RTP stream from reaching the FS endpoint. Any ideas?
you can, for example, start a recording within a running session, run it for 10 seconds, and then build a histogram using SOX. You would then easily distinguish a complete silence from speech. Also at the end of a call, you can get the RTP statistics in channel variables before it gets destroyed, so you can extract the number of RTP packets received. On Sun, Jan 17, 2016 at 11:17 PM, Dave Horton <dave@dchorton.com> wrote:
I have a need to bridge two channels together and then somehow verify that I am getting RTP packets from both directions. The need stems from a desire to detect a one-way audio situation in rare nat’ed scenarios where signaling gets established but one party may have restrictive firewall rules preventing his/her RTP stream from reaching the FS endpoint. Any ideas? _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Well, my issue is that ‘complete silence’ could mean no RTP packets at all, or it could mean RTP packets arriving with all zeros, and I need to distinguish between the two scenarios. I read the recent issue regarding detecting speaker events in a conference to determine silence, so I suppose I instead of bridging I could put the two legs into conference and look for the lack of a ‘start talking’ event within some number of seconds. But I would prefer to sick with bridging the legs if possible. I am unclear about how the recording is going to look in the case where there is no RTP coming in, and whether I could really inspect the recording to know for sure whether or not I am receiving packets…. Dave On Jan 17, 2016, at 5:29 PM, Stanislav Sinyagin <ssinyagin@gmail.com> wrote: you can, for example, start a recording within a running session, run it for 10 seconds, and then build a histogram using SOX. You would then easily distinguish a complete silence from speech. Also at the end of a call, you can get the RTP statistics in channel variables before it gets destroyed, so you can extract the number of RTP packets received. On Sun, Jan 17, 2016 at 11:17 PM, Dave Horton <dave@dchorton.com <mailto:dave@dchorton.com>> wrote: I have a need to bridge two channels together and then somehow verify that I am getting RTP packets from both directions. The need stems from a desire to detect a one-way audio situation in rare nat’ed scenarios where signaling gets established but one party may have restrictive firewall rules preventing his/her RTP stream from reaching the FS endpoint. Any ideas? _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/> Official FreeSWITCH Sites http://www.freeswitch.org <http://www.freeswitch.org/> http://confluence.freeswitch.org <http://confluence.freeswitch.org/> http://www.cluecon.com <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 <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org <http://www.freeswitch.org/> _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
tshark is quite good at analyzing the SIP and RTP packet captures. But it's rather CPU-intensive, so it's better to launch it after the call in nice mode. On Mon, Jan 18, 2016 at 1:58 AM, Dave Horton <dave@dchorton.com> wrote:
Well, my issue is that ‘complete silence’ could mean no RTP packets at all, or it could mean RTP packets arriving with all zeros, and I need to distinguish between the two scenarios. I read the recent issue regarding detecting speaker events in a conference to determine silence, so I suppose I instead of bridging I could put the two legs into conference and look for the lack of a ‘start talking’ event within some number of seconds. But I would prefer to sick with bridging the legs if possible. I am unclear about how the recording is going to look in the case where there is no RTP coming in, and whether I could really inspect the recording to know for sure whether or not I am receiving packets….
Dave
On Jan 17, 2016, at 5:29 PM, Stanislav Sinyagin <ssinyagin@gmail.com> wrote:
you can, for example, start a recording within a running session, run it for 10 seconds, and then build a histogram using SOX. You would then easily distinguish a complete silence from speech.
Also at the end of a call, you can get the RTP statistics in channel variables before it gets destroyed, so you can extract the number of RTP packets received.
On Sun, Jan 17, 2016 at 11:17 PM, Dave Horton <dave@dchorton.com> wrote:
I have a need to bridge two channels together and then somehow verify that I am getting RTP packets from both directions. The need stems from a desire to detect a one-way audio situation in rare nat’ed scenarios where signaling gets established but one party may have restrictive firewall rules preventing his/her RTP stream from reaching the FS endpoint. Any ideas? _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
If you need to do it within FreeSWITCH (eg from a script), execute the uuid_set_media_stats api. This will set a number of variables that you can then read which'll reflect a number of RTP statistics. This will include the number of RTP frames/packets/bytes going in and out of the server for that call. That'll let you spot if a channel isn't receiving any RTP packets. To see what variables are set see the add_stat lines in src/switch_core_media.c:1470 set_stats(), the names will be prefixed between what appears in the code and the variable set for example "in_raw_bytes" => ${rtp_audio_in_raw_bytes}. On 18 January 2016 at 00:58, Dave Horton <dave@dchorton.com> wrote:
Well, my issue is that ‘complete silence’ could mean no RTP packets at all, or it could mean RTP packets arriving with all zeros, and I need to distinguish between the two scenarios. I read the recent issue regarding detecting speaker events in a conference to determine silence, so I suppose I instead of bridging I could put the two legs into conference and look for the lack of a ‘start talking’ event within some number of seconds. But I would prefer to sick with bridging the legs if possible. I am unclear about how the recording is going to look in the case where there is no RTP coming in, and whether I could really inspect the recording to know for sure whether or not I am receiving packets….
Dave
On Jan 17, 2016, at 5:29 PM, Stanislav Sinyagin <ssinyagin@gmail.com> wrote:
you can, for example, start a recording within a running session, run it for 10 seconds, and then build a histogram using SOX. You would then easily distinguish a complete silence from speech.
Also at the end of a call, you can get the RTP statistics in channel variables before it gets destroyed, so you can extract the number of RTP packets received.
On Sun, Jan 17, 2016 at 11:17 PM, Dave Horton <dave@dchorton.com> wrote:
I have a need to bridge two channels together and then somehow verify that I am getting RTP packets from both directions. The need stems from a desire to detect a one-way audio situation in rare nat’ed scenarios where signaling gets established but one party may have restrictive firewall rules preventing his/her RTP stream from reaching the FS endpoint. Any ideas? _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
On Mon, Jan 18, 2016 at 12:05 PM, Steven Ayre <steveayre@gmail.com> wrote:
If you need to do it within FreeSWITCH (eg from a script), execute the uuid_set_media_stats api. This will set a number of variables that you can then read which'll reflect a number of RTP statistics. This will include the number of RTP frames/packets/bytes going in and out of the server for that call. That'll let you spot if a channel isn't receiving any RTP packets.
To see what variables are set see the add_stat lines in src/switch_core_media.c:1470 set_stats(), the names will be prefixed between what appears in the code and the variable set for example "in_raw_bytes" => ${rtp_audio_in_raw_bytes}.
Neat!
Perfect, thanks! On Jan 18, 2016, at 6:05 AM, Steven Ayre <steveayre@gmail.com> wrote: If you need to do it within FreeSWITCH (eg from a script), execute the uuid_set_media_stats api. This will set a number of variables that you can then read which'll reflect a number of RTP statistics. This will include the number of RTP frames/packets/bytes going in and out of the server for that call. That'll let you spot if a channel isn't receiving any RTP packets. To see what variables are set see the add_stat lines in src/switch_core_media.c:1470 set_stats(), the names will be prefixed between what appears in the code and the variable set for example "in_raw_bytes" => ${rtp_audio_in_raw_bytes}. On 18 January 2016 at 00:58, Dave Horton <dave@dchorton.com <mailto:dave@dchorton.com>> wrote: Well, my issue is that ‘complete silence’ could mean no RTP packets at all, or it could mean RTP packets arriving with all zeros, and I need to distinguish between the two scenarios. I read the recent issue regarding detecting speaker events in a conference to determine silence, so I suppose I instead of bridging I could put the two legs into conference and look for the lack of a ‘start talking’ event within some number of seconds. But I would prefer to sick with bridging the legs if possible. I am unclear about how the recording is going to look in the case where there is no RTP coming in, and whether I could really inspect the recording to know for sure whether or not I am receiving packets…. Dave On Jan 17, 2016, at 5:29 PM, Stanislav Sinyagin <ssinyagin@gmail.com <mailto:ssinyagin@gmail.com>> wrote: you can, for example, start a recording within a running session, run it for 10 seconds, and then build a histogram using SOX. You would then easily distinguish a complete silence from speech. Also at the end of a call, you can get the RTP statistics in channel variables before it gets destroyed, so you can extract the number of RTP packets received. On Sun, Jan 17, 2016 at 11:17 PM, Dave Horton <dave@dchorton.com <mailto:dave@dchorton.com>> wrote: I have a need to bridge two channels together and then somehow verify that I am getting RTP packets from both directions. The need stems from a desire to detect a one-way audio situation in rare nat’ed scenarios where signaling gets established but one party may have restrictive firewall rules preventing his/her RTP stream from reaching the FS endpoint. Any ideas? _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/> Official FreeSWITCH Sites http://www.freeswitch.org <http://www.freeswitch.org/> http://confluence.freeswitch.org <http://confluence.freeswitch.org/> http://www.cluecon.com <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 <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org <http://www.freeswitch.org/> _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/> Official FreeSWITCH Sites http://www.freeswitch.org <http://www.freeswitch.org/> http://confluence.freeswitch.org <http://confluence.freeswitch.org/> http://www.cluecon.com <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 <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org <http://www.freeswitch.org/> _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/> Official FreeSWITCH Sites http://www.freeswitch.org <http://www.freeswitch.org/> http://confluence.freeswitch.org <http://confluence.freeswitch.org/> http://www.cluecon.com <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 <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org <http://www.freeswitch.org/> _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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 Nathan & Bote, I am surely gonna try this approach. On Sun, Jan 17, 2016 at 10:34 PM, Nathan Neulinger <nneul@mst.edu> wrote:
Woops. Yeah, good point on the stop vs. start...
-- Nathan
On 01/17/2016 10:13 AM, Bote Man wrote:
I was going to suggest the same approach, but measure the time since the last 'stop-talking' event since that indicates that silence has begun.
The script should make sure that it has no 'start-talking' events without a matching 'stop-talking' event to ensure that everybody is silent before starting the timer.
Bote
-----Original Message----- From: Nathan Neulinger Sent: Sunday, 17 January, 2016 10:00 Subject: Re: [Freeswitch-users] Receive Event for Silence Timeout in Conference Session
Might not be the best way to do it - but you could potentially look for the inverse.
Set up an event listener for all conference events - watch for 'start-talking' and 'stop-talking', and just keep track of how long it has been since the last 'start-talking' event.
-- Nathan
On 01/17/2016 01:21 AM, Deepika Yadav wrote:
Hi,
I am using event socket layer to receive events happenening in the conference session from the Freeswitch in my java program. My program is interested in knowing when there is silence in the conference for a particular period of time.
How can I set a condition for silence detection in the conference dialplan and receive its value through a channel variable in my program.
Regards, Deepika
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
I tried to receive the events in my java program in this way : Code Snippet ESLconnection con = new ESLconnection("127.0.0.1","8021","ClueCon"); event = con.recvEvent(); String eventHeader = event.getHeader("Event-Name",-1); while (con.connected() == 1) { if(eventHeader.equalsIgnoreCase("stop-talking")){ System.out.println("some stopped speaking"+(System.currentTimeMillis() % 1000)); } if(eventHeader.equalsIgnoreCase("start-talking")){ System.out.println("some started speaking at"+ (System.currentTimeMillis() % 1000)); } ..... } I don not receive events when conference members speak although, I receive other events (DTMF, conference_add_member) correctly Please let know the correct way On Mon, Jan 18, 2016 at 8:43 AM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Thanks Nathan & Bote,
I am surely gonna try this approach.
On Sun, Jan 17, 2016 at 10:34 PM, Nathan Neulinger <nneul@mst.edu> wrote:
Woops. Yeah, good point on the stop vs. start...
-- Nathan
On 01/17/2016 10:13 AM, Bote Man wrote:
I was going to suggest the same approach, but measure the time since the last 'stop-talking' event since that indicates that silence has begun.
The script should make sure that it has no 'start-talking' events without a matching 'stop-talking' event to ensure that everybody is silent before starting the timer.
Bote
-----Original Message----- From: Nathan Neulinger Sent: Sunday, 17 January, 2016 10:00 Subject: Re: [Freeswitch-users] Receive Event for Silence Timeout in Conference Session
Might not be the best way to do it - but you could potentially look for the inverse.
Set up an event listener for all conference events - watch for 'start-talking' and 'stop-talking', and just keep track of how long it has been since the last 'start-talking' event.
-- Nathan
On 01/17/2016 01:21 AM, Deepika Yadav wrote:
Hi,
I am using event socket layer to receive events happenening in the conference session from the Freeswitch in my java program. My program is interested in knowing when there is silence in the conference for a particular period of time.
How can I set a condition for silence detection in the conference dialplan and receive its value through a channel variable in my program.
Regards, Deepika
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect
_________________________________________________________________________
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
If you pull up fs_cli and do /events all plain, you should be able to see all the events, and can help nail down exactly what you are looking to match.
On Jan 21, 2016, at 1:46 AM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
I tried to receive the events in my java program in this way :
Code Snippet
ESLconnection con = new ESLconnection("127.0.0.1","8021","ClueCon"); event = con.recvEvent(); String eventHeader = event.getHeader("Event-Name",-1);
while (con.connected() == 1) { if(eventHeader.equalsIgnoreCase("stop-talking")){ System.out.println("some stopped speaking"+(System.currentTimeMillis() % 1000));
}
if(eventHeader.equalsIgnoreCase("start-talking")){ System.out.println("some started speaking at"+ (System.currentTimeMillis() % 1000));
} ..... }
I don not receive events when conference members speak although, I receive other events (DTMF, conference_add_member) correctly
Please let know the correct way
On Mon, Jan 18, 2016 at 8:43 AM, Deepika Yadav <deepikay@iiitd.ac.in <mailto:deepikay@iiitd.ac.in>> wrote: Thanks Nathan & Bote,
I am surely gonna try this approach.
On Sun, Jan 17, 2016 at 10:34 PM, Nathan Neulinger <nneul@mst.edu <mailto:nneul@mst.edu>> wrote: Woops. Yeah, good point on the stop vs. start...
-- Nathan
On 01/17/2016 10:13 AM, Bote Man wrote:
I was going to suggest the same approach, but measure the time since the last 'stop-talking' event since that indicates that silence has begun.
The script should make sure that it has no 'start-talking' events without a matching 'stop-talking' event to ensure that everybody is silent before starting the timer.
Bote
-----Original Message----- From: Nathan Neulinger Sent: Sunday, 17 January, 2016 10:00 Subject: Re: [Freeswitch-users] Receive Event for Silence Timeout in Conference Session
Might not be the best way to do it - but you could potentially look for the inverse.
Set up an event listener for all conference events - watch for 'start-talking' and 'stop-talking', and just keep track of how long it has been since the last 'start-talking' event.
-- Nathan
On 01/17/2016 01:21 AM, Deepika Yadav wrote:
Hi,
I am using event socket layer to receive events happenening in the conference session from the Freeswitch in my java program. My program is interested in knowing when there is silence in the conference for a particular period of time.
How can I set a condition for silence detection in the conference dialplan and receive its value through a channel variable in my program.
Regards, Deepika
Read https://freeswitch.org/confluence/display/FREESWITCH/mod_conference#mod_conf erence-EventSocketUse about suppress-events --- Bote FreeSWITCH Docs Janitor <http://freeswitch.org/confluence> http://freeswitch.org/confluence From: Michael Jerris Sent: Thursday, 21 January, 2016 12:05 Subject: Re: [Freeswitch-users] Receive Event for Silence Timeout in Conference Session If you pull up fs_cli and do /events all plain, you should be able to see all the events, and can help nail down exactly what you are looking to match. On Jan 21, 2016, at 1:46 AM, Deepika Yadav <deepikay@iiitd.ac.in> wrote: I tried to receive the events in my java program in this way : Code Snippet ESLconnection con = new ESLconnection("127.0.0.1","8021","ClueCon"); event = con.recvEvent(); String eventHeader = event.getHeader("Event-Name",-1); while (con.connected() == 1) { if(eventHeader.equalsIgnoreCase("stop-talking")){ System.out.println("some stopped speaking"+(System.currentTimeMillis() % 1000)); } if(eventHeader.equalsIgnoreCase("start-talking")){ System.out.println("some started speaking at"+ (System.currentTimeMillis() % 1000)); } ..... } I don not receive events when conference members speak although, I receive other events (DTMF, conference_add_member) correctly Please let know the correct way
Thanks Michael, Yeah , by using the fs_cli command /plain CUSTOM conference::maintenance I was able to receive all the events related to the conference. On Thu, Jan 21, 2016 at 10:34 PM, Michael Jerris <mike@jerris.com> wrote:
If you pull up fs_cli and do /events all plain, you should be able to see all the events, and can help nail down exactly what you are looking to match.
On Jan 21, 2016, at 1:46 AM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
I tried to receive the events in my java program in this way :
Code Snippet
ESLconnection con = new ESLconnection("127.0.0.1","8021","ClueCon"); event = con.recvEvent(); String eventHeader = event.getHeader("Event-Name",-1);
while (con.connected() == 1) { if(eventHeader.equalsIgnoreCase("stop-talking")){ System.out.println("some stopped speaking"+(System.currentTimeMillis() % 1000)); } if(eventHeader.equalsIgnoreCase("start-talking")){ System.out.println("some started speaking at"+ (System.currentTimeMillis() % 1000)); } ..... }
I don not receive events when conference members speak although, I receive other events (DTMF, conference_add_member) correctly
Please let know the correct way
On Mon, Jan 18, 2016 at 8:43 AM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Thanks Nathan & Bote,
I am surely gonna try this approach.
On Sun, Jan 17, 2016 at 10:34 PM, Nathan Neulinger <nneul@mst.edu> wrote:
Woops. Yeah, good point on the stop vs. start...
-- Nathan
On 01/17/2016 10:13 AM, Bote Man wrote:
I was going to suggest the same approach, but measure the time since the last 'stop-talking' event since that indicates that silence has begun.
The script should make sure that it has no 'start-talking' events without a matching 'stop-talking' event to ensure that everybody is silent before starting the timer.
Bote
-----Original Message----- From: Nathan Neulinger Sent: Sunday, 17 January, 2016 10:00 Subject: Re: [Freeswitch-users] Receive Event for Silence Timeout in Conference Session
Might not be the best way to do it - but you could potentially look for the inverse.
Set up an event listener for all conference events - watch for 'start-talking' and 'stop-talking', and just keep track of how long it has been since the last 'start-talking' event.
-- Nathan
On 01/17/2016 01:21 AM, Deepika Yadav wrote:
Hi,
I am using event socket layer to receive events happenening in the conference session from the Freeswitch in my java program. My program is interested in knowing when there is silence in the conference for a particular period of time.
How can I set a condition for silence detection in the conference dialplan and receive its value through a channel variable in my program.
Regards, Deepika
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
participants (8)
-
Bote Man
-
Dave Horton
-
Deepika Yadav
-
Giovanni Maruzzelli
-
Michael Jerris
-
Nathan Neulinger
-
Stanislav Sinyagin
-
Steven Ayre