session_locate and deadlocks
Hello, I'm trying to passthrough some events from one leg of a bridged session to the other leg: notify-talk and hold. talk was an easy one. However, regarding the hold, I'm afraid of deadlocks, because I will be modying the peer-session (putting it on hold), which will also try to modify the originating leg (play hold-music). So, can a session get a readlock on a session that is currenly processing a request? I have the impression that there are higher-level-locks on sip-level. So, my question is: What is the function of the readlock created by "switch_core_session_locate" ? And, can multiple locks be acquired (think so), but what should I watch out for then? Thanks, Michel
The function of the session read lock is to ensure safe destruction of the session. The session thread won't destroy the session until all read locks are unlocked. On Apr 21, 2013, at 9:59 AM, Michel Brabants <michel.brabants@gmail.com> wrote:
Hello,
I'm trying to passthrough some events from one leg of a bridged session to the other leg: notify-talk and hold. talk was an easy one.
However, regarding the hold, I'm afraid of deadlocks, because I will be modying the peer-session (putting it on hold), which will also try to modify the originating leg (play hold-music).
So, can a session get a readlock on a session that is currenly processing a request? I have the impression that there are higher-level-locks on sip-level. So, my question is:
What is the function of the readlock created by "switch_core_session_locate" ? And, can multiple locks be acquired (think so), but what should I watch out for then?
Thanks,
Michel _________________________________________________________________________ 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! Michel On Sun, Apr 21, 2013 at 8:53 PM, <cmrienzo@gmail.com> wrote:
The function of the session read lock is to ensure safe destruction of the session. The session thread won't destroy the session until all read locks are unlocked.
On Apr 21, 2013, at 9:59 AM, Michel Brabants <michel.brabants@gmail.com> wrote:
Hello,
I'm trying to passthrough some events from one leg of a bridged session to the other leg: notify-talk and hold. talk was an easy one.
However, regarding the hold, I'm afraid of deadlocks, because I will be modying the peer-session (putting it on hold), which will also try to modify the originating leg (play hold-music).
So, can a session get a readlock on a session that is currenly processing a request? I have the impression that there are higher-level-locks on sip-level. So, my question is:
What is the function of the readlock created by "switch_core_session_locate" ? And, can multiple locks be acquired (think so), but what should I watch out for then?
Thanks,
Michel _________________________________________________________________________ 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
_________________________________________________________________________ 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
participants (2)
-
cmrienzo@gmail.com
-
Michel Brabants