Re: Re: [JTAPI] Incoming Telephone Number
Pavel Vesely <[email protected]> Mon, 26 Jun 2006 02:38:06 -0600
| Newsgroups | gmane.comp.java.sun.jtapi |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
Just to finish this problem. TAPI 3.0 Provider puts necessary information
about an incoming call into private data of events of type GenPrivateCallEv.
A piece of code like the following solves the problem of getting the caller
number:
public void callChangedEvent(CallEv[] eventList) {
CallEv ev = eventList[0];
int id = ev.getID();
if (id==PrivateCallEv.ID) {
GenPrivateCallEv privCallEv = (GenPrivateCallEv)ev;
Tapi3PrivateData privateData = (Tapi3PrivateData)
privCallEv.getPrivateData();
System.out.println("Caller name="+privateData.getCallerName()+
"caller number="+privateData.getCallerNumber());
}
}
As a part of gjtapi sources there is a very useful test directory
net.sourceforge.gjtapi.test.tapi3 with program Tapi3Gui.java.
Pavel
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JTAPI-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".