Re: How to get connections state of a Device .....

Richard Deadman <[email protected]> Tue, 20 Dec 2005 12:03:10 -0500
Newsgroups gmane.comp.java.sun.jtapi
Message-ID <[email protected]>
If you have a handle on the call, then the second part of my example should work. To get a
handle on a call, you can register a CallListener on an Address so that when a Call is
created you will be notified and be able to look at the Connection information.

You can also ask an Address for its Connections and then trace these back to the Calls and
the other Connections on the Calls to get all the Connection states.

Finally, you can ask a Provider for all the Calls in its domain and then look through them
for a Call with a Connection associated with your Address. Note, however, that
Provider.getCalls() may throw a ResourceUnavailableException if too many Calls are present
to return.


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 Dec 20, Abdeltif Nouqrat <[email protected]> wrote:
> Richard,
> primarily thank you for the quick answer.
>
> With my application I don't want to create a call.
> Suppose that the device already in a call (e.g. manual call). Then I
> start my application and want to get information about this call
> (connection-state).
>
> Best regards
>
> Abdeltif
>
>
>
> Richard Deadman schrieb:
>
> >Abdeltif,
> >
> >I'm missing something. Your Call object should have two Connections and each of these
> >should have a state. Code something like this (probably won't compile):
> >
> >Address addr = prov.getAddress(fromAddr);
> >Call call = provider.createCall();
> >Terminal[] ts = addr.getTerminals();
> >call.connect(ts[0], addr, toAddr);
> >
> >// now ask for the states
> >Connection cons[] = c.getConnections();
> >for (int i = 0; i < cons.length; i++) {
> >  Connection connection = cons[i];
> >    // may want to use a switch to print out the states in human readable form
> >  System.out.println("Connection (" + connection.getAddress().getName() + ") in state: " +
> >connection.getState());
> >}
> >
> >----
> >
> >If this is all you are looking for, it is easily accessible in the javadocs and
specification.
> >
> >Cheers,
> >
> >
> >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 Dec 20, Abdeltif Nouqrat <[email protected]> wrote:
> >
> >
> >>Hi,
> >>
> >>I want to execute the following scenario:
> >>    - manually creating a call from 100 to 101, 101 answers
> >>    - My application should get the connections-states of 100 and 101.
> >>connection-state should be e.g. "connected"
> >>       KEYWORD: SnapshotDevice request in CSTA-Standard
> >>
> >>Is there a possibility to realize this feature using JTAPI ?
> >>
> >>
> >>
> >>Thanks & best regards
> >>
> >>Abdelatif
> >>
> >>===========================================================================
> >>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".