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. On Fri, Jun 27, 2008 at 6:52 AM, Klaus Teller <klaus.teller@gmx.net> wrote:
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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400