[Freeswitch-users] Caller ID in Java

Anthony Minessale anthony.minessale at gmail.com
Fri Jun 27 07:43:57 PDT 2008


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 at 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 at 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 at 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 at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080627/4e15242d/attachment-0002.html 


More information about the FreeSWITCH-users mailing list