[Freeswitch-dev] please shed me light on code reading
jesse
chat2jesse at gmail.com
Sat Nov 20 23:36:02 PST 2010
one more question.
switch_channel_set_variable(channel, "spy_uuid", my_uuid);
switch_channel_set_private(channel, "_userspy_", (void *) argv[0]);
why one is set via rugular variable and one is set via private? is
that necessary?
-jesse
On Sat, Nov 20, 2010 at 10:48 PM, jesse <chat2jesse at gmail.com> wrote:
> hi,
>
> Any expert can shed me some light on quick code understanding?
> thanks in advance!
>
> suppose I dial 88<1001> to spy on extension user 1001. and 5 minutes
> later 1001 calls 1002.
>
> <extension name="userspy">
> <condition field="destination_number" expression="^88(.*)$|^\*0(.*)$">
> <action application="answer"/>
> <action application="userspy" data="$1 at 192.168.1.1"/>
> </condition>
> </extension>
>
> in event_handle(...) of mod_spy.c.
> -- Whats is the reason that we need to call process_event for both event and
> peer_event?
> is not processing event for call leg-a 's bridge enough? it seems
> mod_spy.c in 1.0.6 version
> doesn't process peer_event.
>
> static void event_handler(switch_event_t *event)
> {
> if (process_event(event) != SWITCH_STATUS_SUCCESS) {
> const char *peer_uuid = switch_event_get_header(event,
> "variable_signal_bond");
> ...
> if (peer_event) {
> process_event(peer_event);
> }
> }
> }
>
>
> http://svn.freeswitch.org/svn/freeswitch/trunk/src/mod/applications/mod_spy/mod_spy.c
>
More information about the FreeSWITCH-dev
mailing list