Re: Exception in Transfering a call

Richard Deadman <[email protected]> Tue, 26 Apr 2005 09:06:11 -0400
Newsgroups gmane.comp.java.sun.jtapi
Message-ID <[email protected]>
Kenny,

See below...


Richard

--
Richard Deadman
Deadman Consulting, Inc.
Web Services, Policy Management, Java Telephony, Software Architecture
mailto:[email protected]
http://www.deadman.ca
Office: 613-231-5112
Cell: 613-220-2469

On Apr 26, Kenny Wong <[email protected]> wrote:
>
> Richard,
> Thank you for advising me on this matter. I implemented it this way:
>
> if (tc.getState()== CallControlTerminalConnection.ACTIVE)
>                               System.out.println("Pre-Condition callNew State : tc.ACTIVE" );
>                       if (tc.getState()== CallControlTerminalConnection.HELD)
>                               System.out.println("Pre-Condition callNew State : tc.HELD" );

Yes, you should be doing:

    int ccState = ((CallControlTerminalConnection)tc).getCallControlState();
    switch (ccState) {
        case CallControlTerminalConnection.ACTIVE:
            System.out.println("Pre-Condition callNew State : ACTIVE");
            break;
        case CallControlTerminalConnection.ACTIVE:
            System.out.println("Pre-Condition callNew State : ACTIVE");
            break;
        default:
            break;
    }

>
> where tc is a TerminalController.
>
> I will change it to check on the CallControlTerminalConnection's
> state. Sorry but I have another question to inquire about the transfer
> process.
>
> -  I have actually managed to implement a transfer process using only
> 1 transfer controller. According to the API, it is stated that we need
> 2 transfer controller. could you advise me on what the second will be
> and why is there a need for it?
>
> - the transfer process that i have implemented is a blind transfer,
> that is to say, once i have recieved a phone call and upon hold, the
> hold event will fire off and make a call to the transfer destination
> and transfer the call.
> what i really need to implement is a controlled transfer whereby the
> reciever of a incoming call can talk to the transfer destination party
> before commiting the transfer.

You want to do a controlled transfer:
  - set terminal connection on hold
  - make a new call (call2) on the terminal connection to the destination
  - ensure they want to accept the transfer
  - call1.setTransferEnable(true)
  - call1.setTransferController(terminal connection)
  - call1.transfer(call2)

>
> Really hope that you can help me on that.
>
> Thanks
> Kenny
>
> On 4/26/05, Richard Deadman <[email protected]> wrote:
> > Are you calling CallControlTerminalConnection.getCallControlState() or
> > TerminalConnection.getState()? The former should return HELD, if the provider suceeded in
> > holding the terminal connection, whereas the latter will return ACTIVE, since HELD is not
> > an option.
> >
> > JTAPI defines CallControlTerminalConnection as a subinterface of TerminalConnection and
> > provides a different method for finding out the CallControl state. Applications that are
> > just accessing the object as a TerminalConnection and call "getState()" are expecting, and
> > should get, one of IDLE, RINGING, ACTIVE, PASSIVE, DROPPED, or UNKNOWN. According to the
> > JTAPI specification, CallControlTerminalConnection.HELD is mapped to
> > TerminalConnection.ACTIVE.
> >
> > Richard
> >
> > --
> > Richard Deadman
> > Deadman Consulting, Inc.
> > Web Services, Policy Management, Java Telephony, Software Architecture
> > mailto:[email protected]
> > <a href='http://www.deadman.ca'>http://www.deadman.ca</a>
> > Office: 613-231-5112
> > Cell: 613-220-2469
> >
> > On Apr 25, Kenny Wong <[email protected]> wrote:
> > >
> > > Richard,
> > > Can i know how do i set my TerminalConnection state to be on hold? I have
> > > tried using the ((CallCtlTerminalConnection)tc).hold() but the tc state is
> > > still ACTIVE.. Thanks a lot
> > >
> > > ===========================================================================
> > > 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".
> >
>
> ===========================================================================
> 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".