Re: get Calling number from redirected call
Milan Matys <[email protected]> Fri, 21 Jul 2006 10:25:35 +0200
| Newsgroups | gmane.comp.java.sun.jtapi |
|---|---|
| Message-ID | <[email protected]> |
Thanks for this information, but I have this done.But I learned = something new from your example. I have problem with showing Caller number, when = is call redirected. For example to your company came outside call from tel. number 111. Secretary (tel. Number 222) take this call and redirect it = to someone else (tel. Number 333). I' want to show on display of this = telephone (333) a number of call incoming from outside (111). But I'm able only to show number of secretary phone (222). Is in jtapi any event or something which can show me that call was = redirect? Have a nice day Milan Matys -----Original Message----- From: Discussion list for Java Telephony API [mailto:[email protected]] On Behalf Of J=F6rg Wiesmann Sent: Friday, July 21, 2006 7:39 AM To: [email protected] Subject: Re: [JTAPI] get Calling number from redirected call You can get the number by catching the events and get the call. if you got a listener, the callChangeEvent will be raised. There you can get the calls and figure out what number called you or you = did call ... public final void callChangedEvent(CallEv[] events) { for (int i =3D 0; i < events.length; i++) { [...] // CISCO EXAMPLE: Address myCalledAddress =3D ( (CiscoCall)(events[i]).getCall()).getCalledAddress(); Address myCallingAddress =3D ( (CiscoCall)(events[i]).getCall()).getCallingAddress(); ... } watch out that the getCall is not null .. how to set the listener: ( if you did not do so allready ) public void initialize(Address observedAddress, Terminal = observedTerminal) { if (observedAddress !=3D null) { try { // adding the address ( thats our telnumber ) observedAddress.addCallObserver(this); observedTerminal.addCallObserver(this); // Now add observer on Address and Terminal observedAddress.addObserver(this); observedTerminal.addObserver(this); } catch (ResourceUnavailableException e) { // do something } catch (MethodNotSupportedException e) { // do something } } } Hope it helps Greetz J=F6rg Wiesmann =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= 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". =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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".