cid_name = session.getVariable("caller_id_name");
cid_num = session.getVariable("caller_id_number");
Try
session.execute("info");
to see all the other variables you have to work with.
Right now I'm using a thread to maintain a reference to the objects i want to keep alive. The caller id issue is right now more critical to me. There is nothing like that in the channel.
Klaus.
--
>
> > Hi,
> >
> > i got two questions:
> >
> > 1) How can i get the caller ID in Java? In javascript this is accessible
> > through session.caller_id_num.
>
> Not sure - check whether it's some kind of channel variable in freeswitch.
>
> > 2) Considere the following application declaration:
> >
> > <action application="java" data="org.delta.MyApp"/>
> >
> > I noticed that the class MyApp will be instantiated for each incoming
> > call. Is there anyway to tell FS to reuse the same object? Or
> alternately
> > is there a way to store an object (e.g. database connections) at the FS
> or
> > VM level and reuse it accross different instances of MyApp?
>
> A different URLClassLoader loads the class on each call, so there is no
> sharing of classes between the different invocations. You'd have to modify
> the mod_java code to reuse the same URLClassLoader, but then you would
> lose the ability to hot swap a class while Freeswitch is running.
>
> The only other way I can think of to share anything is to load it with its
> own class loader and/or create a thread that holds a reference to what you
> want to share, but those are real hacks...
>
> > Thanks,
> >
> > Klaus L'Imbecile.
> >
>
> Bye
> Damjan
>
>
> _______________________________________________
> 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
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
_______________________________________________
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