Session Timer Event
Hey all, Hopefully quick and easy question. I'm trying to comb through the source to find out - but having a hard time tracking it down. Is there an event FS emits when a refresher request is received on a call with session timers enabled? Best, Colin
I don’t think there is. I’m not even positive we get a callback in mod_sofia at all if the sdp is the same.
On Feb 27, 2017, at 12:04 PM, Colin Morelli <colin.morelli@gmail.com> wrote:
Hey all,
Hopefully quick and easy question. I'm trying to comb through the source to find out - but having a hard time tracking it down. Is there an event FS emits when a refresher request is received on a call with session timers enabled?
Thanks for the reply, Mike. The use case I have is that I have calls tracked in a separate database that is kept in sync via events. In some (albeit rare) circumstances, such as FS crashing and/or events being dropped, the application's database can get out of sync with reality. What I was looking to do was simply track, each time an event is received, the next timestamp that I would expect to see another event from FS (based on the session timers). Then, have a separate job running hourly (or so), that looks for calls that have passed their next expected update and marks them as complete. Do you have any other suggestions for accomplishing something similar? Worth noting I've disabled all SQL storage in FS, as basically everything is managed at different levels in the stack. If that's the only option, it could be re-enabled. Best, Colin On Mon, Feb 27, 2017 at 12:16 PM, Michael Jerris <mike@jerris.com> wrote:
I don’t think there is. I’m not even positive we get a callback in mod_sofia at all if the sdp is the same.
On Feb 27, 2017, at 12:04 PM, Colin Morelli <colin.morelli@gmail.com> wrote:
Hey all,
Hopefully quick and easy question. I'm trying to comb through the source to find out - but having a hard time tracking it down. Is there an event FS emits when a refresher request is received on a call with session timers enabled?
_________________________________________________________________________ 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
might be able to do something like session heartbeat or system heartbeats for this. If freeswitch crashes you should capture that some other way and do the proper cleanup. If you are missing events for some other reason you should look closely at why that is. If its due to your listener not running, you should do some thing on startup of your listener to actively check state, if its for some other reason, you should fix that.
On Feb 27, 2017, at 12:25 PM, Colin Morelli <colin.morelli@gmail.com> wrote:
Thanks for the reply, Mike.
The use case I have is that I have calls tracked in a separate database that is kept in sync via events. In some (albeit rare) circumstances, such as FS crashing and/or events being dropped, the application's database can get out of sync with reality. What I was looking to do was simply track, each time an event is received, the next timestamp that I would expect to see another event from FS (based on the session timers). Then, have a separate job running hourly (or so), that looks for calls that have passed their next expected update and marks them as complete.
Do you have any other suggestions for accomplishing something similar? Worth noting I've disabled all SQL storage in FS, as basically everything is managed at different levels in the stack. If that's the only option, it could be re-enabled.
Best, Colin
On Mon, Feb 27, 2017 at 12:16 PM, Michael Jerris <mike@jerris.com <mailto:mike@jerris.com>> wrote: I don’t think there is. I’m not even positive we get a callback in mod_sofia at all if the sdp is the same.
On Feb 27, 2017, at 12:04 PM, Colin Morelli <colin.morelli@gmail.com <mailto:colin.morelli@gmail.com>> wrote:
Hey all,
Hopefully quick and easy question. I'm trying to comb through the source to find out - but having a hard time tracking it down. Is there an event FS emits when a refresher request is received on a call with session timers enabled?
_________________________________________________________________________ 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 again for the quick replies - this is really helpful. I'm actually already using system heartbeats for discovering FS instances and routing calls to them. I had no idea about session heartbeats though, and this looks like it would be perfect for my use case. It looks like it's enabled with a channel var enable_heartbeat_events=time_in_seconds, is that correct? Is there a way to set it for all calls by default? Best, Colin On Mon, Feb 27, 2017 at 12:32 PM, Michael Jerris <mike@jerris.com> wrote:
might be able to do something like session heartbeat or system heartbeats for this. If freeswitch crashes you should capture that some other way and do the proper cleanup. If you are missing events for some other reason you should look closely at why that is. If its due to your listener not running, you should do some thing on startup of your listener to actively check state, if its for some other reason, you should fix that.
On Feb 27, 2017, at 12:25 PM, Colin Morelli <colin.morelli@gmail.com> wrote:
Thanks for the reply, Mike.
The use case I have is that I have calls tracked in a separate database that is kept in sync via events. In some (albeit rare) circumstances, such as FS crashing and/or events being dropped, the application's database can get out of sync with reality. What I was looking to do was simply track, each time an event is received, the next timestamp that I would expect to see another event from FS (based on the session timers). Then, have a separate job running hourly (or so), that looks for calls that have passed their next expected update and marks them as complete.
Do you have any other suggestions for accomplishing something similar? Worth noting I've disabled all SQL storage in FS, as basically everything is managed at different levels in the stack. If that's the only option, it could be re-enabled.
Best, Colin
On Mon, Feb 27, 2017 at 12:16 PM, Michael Jerris <mike@jerris.com> wrote:
I don’t think there is. I’m not even positive we get a callback in mod_sofia at all if the sdp is the same.
On Feb 27, 2017, at 12:04 PM, Colin Morelli <colin.morelli@gmail.com> wrote:
Hey all,
Hopefully quick and easy question. I'm trying to comb through the source to find out - but having a hard time tracking it down. Is there an event FS emits when a refresher request is received on a call with session timers enabled?
_________________________________________________________________________ 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
participants (2)
-
Colin Morelli
-
Michael Jerris