[Freeswitch-dev] How to get switch_core_session for a call
Hello, Is there a way to get the switch_core_session of a call? Is it possible by subscribing to any channel or any other event? Thanks, Farhan
Hi, switch_core_session_t *session; if ((session = switch_core_session_locate(uuid_here))) { /* do stuff with session */ switch_core_session_rwunlock(session); } Mathieu Rene Avant-Garde Solutions Inc Office: + 1 (514) 664-1044 x100 Cell: +1 (514) 664-1044 x200 mrene@avgs.ca On 2010-08-31, at 1:47 AM, Farhan Husain wrote:
Hello,
Is there a way to get the switch_core_session of a call? Is it possible by subscribing to any channel or any other event?
Thanks, Farhan _______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Thanks Mathieu. On Tue, Aug 31, 2010 at 12:56 AM, Mathieu Rene <mrene_lists@avgs.ca> wrote:
Hi,
switch_core_session_t *session; if ((session = switch_core_session_locate(uuid_here))) { /* do stuff with session */ switch_core_session_rwunlock(session); }
Mathieu Rene Avant-Garde Solutions Inc Office: + 1 (514) 664-1044 x100 Cell: +1 (514) 664-1044 x200 mrene@avgs.ca
On 2010-08-31, at 1:47 AM, Farhan Husain wrote:
Hello,
Is there a way to get the switch_core_session of a call? Is it possible by subscribing to any channel or any other event?
Thanks, Farhan _______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
On Tue, Aug 31, 2010 at 7:56 AM, Mathieu Rene <mrene_lists@avgs.ca> wrote:
Hi,
switch_core_session_t *session; if ((session = switch_core_session_locate(uuid_here))) { /* do stuff with session */ switch_core_session_rwunlock(session);
Just to stress the point: note that the "switch_core_session_rwunlock(session);" is MANDATORY when you're done with what you want do to with the session, because "switch_core_session_locate" will lock it automatically. -giovanni -- Sincerely, Giovanni Maruzzelli Cell : +39-347-2665618
participants (3)
-
Farhan Husain
-
Giovanni Maruzzelli
-
Mathieu Rene