Re: Request failed because of an invalid destination
KRUCHIO Gabor <[email protected]> Mon, 13 Jun 2005 17:15:18 +0200
| Newsgroups | gmane.comp.java.sun.jtapi |
|---|---|
| Message-ID | <[email protected]> |
Hi,
just some general hints:
- check some return values
if (provider.getAddress("529") == null)
...
if (address.getName() == null)
...
System.out.println("blabla:" + connection.redirect(address.getName()));
- check the valid addresses:
if (provider.getAddresses() != null && provider.getAddresses().length !=
0)
for (int i = 0; i++; i < provider.getAddresses().length)
System.out.println("blabla:" + provider.getAddresses()[i].getName();
Ciao
Gabor
> -----Original Message-----
> From: Jörg Wiesmann [mailto:[email protected]]
> Sent: Monday, June 13, 2005 12:51 PM
> To: [email protected]
> Subject: [JTAPI] Request failed because of an invalid destination
>
>
> Hi,
>
> i am trying to redirect an incoming call to another phone.
> I did it the following way:
>
>
> setting CallControlConnection
> ===============================
>
>
> public final void callChangedEvent(CallEv[] events) {
> TerminalConnection termconn;
> String name;
> for (int i = 0; i < events.length; i++) {
>
> Call call = events[i].getCall();
> activeCall = (CallControlCall) call;
> if ((events[i] instanceof CallCtlConnEv) || ((events[i]
> instanceof TermConnEv))) {
> if (events[i].getID() == CallCtlConnAlertingEv.ID ) {
> callControlConnection =
> (CallControlConnection)((CallCtlConnAlertingEv)events[i]).getC
> onnection();
> }
>
> Calling my function
> ===================
>
> public void setRedirectCall (CallControlConnection connection) {
> try {
> if (connection != null) {
> System.out.println("StringObject:" +
> connection.toString());
> Address address;
> try {
> address = provider.getAddress("529");
> connection.redirect(address.getName());
> } catch (InvalidArgumentException e1) {
> // TODO Auto-generated catch block
> e1.printStackTrace();
> }
>
> if the function is called and an active call is available it
> prints out the
> following error:
> com.cisco.jtapi.InvalidPartyExceptionImpl: Request failed
> because of an
> invalid destination.
>
> the address (529) is valid and also connected.
>
> what am i doing wrong ?
> i searched for a similar problem, but could not find any,
> with a message
> like this.
>
> Any hints are welcome !!
>
> Regards
> Jörg Wiesmann
>
> ==============================================================
> =============
> 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".
>
===========================================================================
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".