[Freeswitch-dev] Accessing rtp_sessions (switch_rtp) from modules
Hello, I'm new to FreeSwitch (developement). I'm currently writing a FreeSwitch module where I would like to access the zrtp_stream property of rtp streams (located in the switch_rtp struct/switch_rtp.c) from a module. Example: switch_rtp_t *rtp_session; rtp_session = switch_channel_get_private(channel, "__zrtp_audio_rtp_session"); zrtp_stream_t *zrtp_stream; zrtp_stream = rtp_session->zrtp_stream; The last line fails with "error: dereferencing pointer to incomplete type" It something I expected. The struct is defined in switch_rtp.c, which can't be included. So I can access the properties only from withing switch_rtp.c. Am I missing something? Is there another way to access the active zrtp_streams ? Best Regards, Gustav Koller
you would have to propose a patch to switch_rtp.c to add a pointer to the zrtp stream using the switch_channel_set_private so you could get it from your module. On Tue, May 24, 2011 at 8:27 AM, Gustav Koller <gustavkoller@googlemail.com> wrote:
Hello,
I'm new to FreeSwitch (developement).
I'm currently writing a FreeSwitch module where I would like to access the zrtp_stream property of rtp streams (located in the switch_rtp struct/switch_rtp.c) from a module.
Example:
switch_rtp_t *rtp_session; rtp_session = switch_channel_get_private(channel, "__zrtp_audio_rtp_session");
zrtp_stream_t *zrtp_stream; zrtp_stream = rtp_session->zrtp_stream;
The last line fails with "error: dereferencing pointer to incomplete type"
It something I expected. The struct is defined in switch_rtp.c, which can't be included. So I can access the properties only from withing switch_rtp.c.
Am I missing something? Is there another way to access the active zrtp_streams ?
Best Regards, Gustav Koller
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
I'm going to guess you're working on the app level to toggle things around ? /b On May 26, 2011, at 3:12 PM, Anthony Minessale wrote:
you would have to propose a patch to switch_rtp.c to add a pointer to the zrtp stream using the switch_channel_set_private so you could get it from your module.
participants (3)
-
Anthony Minessale
-
Brian West
-
Gustav Koller