#include <call.h>
Public Member Functions | |
Construction | |
OpalCall (OpalManager &manager) | |
~OpalCall () | |
Overrides from PObject | |
void | PrintOn (ostream &strm) const |
Basic operations | |
BOOL | IsEstablished () const |
virtual void | OnEstablishedCall () |
OpalConnection::CallEndReason | GetCallEndReason () const |
void | SetCallEndReason (OpalConnection::CallEndReason reason) |
void | Clear (OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser, PSyncPoint *sync=NULL) |
virtual void | OnCleared () |
Connection management | |
virtual BOOL | OnSetUp (OpalConnection &connection) |
virtual BOOL | OnAlerting (OpalConnection &connection) |
virtual OpalConnection::AnswerCallResponse | OnAnswerCall (OpalConnection &connection, const PString &caller) |
virtual void | AnsweringCall (OpalConnection::AnswerCallResponse response) |
virtual BOOL | OnConnected (OpalConnection &connection) |
virtual BOOL | OnEstablished (OpalConnection &connection) |
virtual void | OnReleased (OpalConnection &connection) |
PSafePtr< OpalConnection > | GetOtherPartyConnection (const OpalConnection &connection) const |
PSafePtr< OpalConnection > | GetConnection (PINDEX idx, PSafetyMode mode=PSafeReference) |
Media management | |
OpalMediaFormatList | GetMediaFormats (const OpalConnection &connection, BOOL includeSpecifiedConnection) |
virtual BOOL | OpenSourceMediaStreams (const OpalConnection &connection, const OpalMediaFormatList &mediaFormats, unsigned sessionID) |
virtual BOOL | PatchMediaStreams (const OpalConnection &connection, OpalMediaStream &source) |
virtual void | CloseMediaStreams () |
virtual void | RemoveMediaStreams () |
virtual BOOL | IsMediaBypassPossible (const OpalConnection &connection, unsigned sessionID) const |
User indications | |
virtual void | OnUserInputString (OpalConnection &connection, const PString &value) |
virtual void | OnUserInputTone (OpalConnection &connection, char tone, int duration) |
Member variable access | |
OpalManager & | GetManager () const |
const PString & | GetToken () const |
const PString & | GetPartyA () const |
const PString & | GetPartyB () const |
void | SetPartyB (const PString &b) |
const PTime & | GetStartTime () const |
Protected Member Functions | |
friend | OpalConnection::OpalConnection (OpalCall &call, OpalEndPoint &ep, const PString &token) |
Protected Attributes | |
OpalManager & | manager |
PString | myToken |
PString | partyA |
PString | partyB |
PTime | startTime |
BOOL | isEstablished |
OpalConnection::CallEndReason | callEndReason |
PSafeList< OpalConnection > | connectionsActive |
PSyncPoint * | endCallSyncPoint |
An OpalCall could manage (for example) a H323Connection and PCSSConnection instance, which allows the user to use opal in a H.323 application. Alternatively, if OpalCall manages a H323Connection and a SIPConnection instance, the call is being gatewayed from one protocol to another.
In a conference situation, one OpalCall would manage lots of H323Connection/SIPConnection classes.
|
Create a new call.
|
|
Destroy call. |
|
|
|
Clear call. This releases all connections currently attached to the call. Note that this function will return quickly as the release and disposal of the connections is done by another thread. The sync parameter is a PSyncPoint that will be signalled during the destructor for the OpalCall. Note only one thread may do this at a time.
|
|
Close the media streams on the connections. |
|
Get the call clearand reason for this connection shutting down. Note that this function is only generally useful in the H323EndPoint::OnConnectionCleared() function. This is due to the connection not being cleared before that, and the object not even exiting after that. If the call is still active then this will return OpalConnection::NumCallEndReasons. |
|
Get the specified active connection in call. |
|
Get the manager for this endpoint. |
|
Get the media formats of the connections in call. This returns the intersection of all the media formats that all connections in the call, optionally excepting the one provided as a parameter, are capable of. This will also add to the list all media formats for which there are transcoders registered.
|
|
Get the other party's connection object. This will return the other party in the call. It will return NULL if there is no other party yet, or there are more than two parties in the call. Usefull during certain stages during initial call set up.
|
|
Get the A party for the call. Note this will be available even after the A party connection has been released from the call. |
|
Get the B party for the call. Note this will be available even after the B party connection has been released from the call. Also this will only be the first B party if the object represents a conference call with more that 2 parties. |
|
Get the time the call started. |
|
Get the internal identifier token for this connection. |
|
Indicate tha all connections in call are connected and media is going. |
|
See if the media can bypass the local host.
|
|
Call back for alerting. The default behaviour is to call SetAlerting() on all the other connections in the call.
|
|
|
|
Call back to indicate that the call has been cleared. At this point in time there are no connections left in the call. The default behaviour is to call OpalManager::OnClearedCall(). |
|
A call back function whenever a connection is "connected". This indicates that a connection to an endpoint was connected. That is the endpoint received acknowledgement via whatever protocol it uses that the connection may now start media streams. In the context of H.323 this means that the CONNECT pdu has been received. The default behaviour is to call SetConnected() on all other connections in the call.
|
|
A call back function whenever a connection is "established". This indicates that a connection to an endpoint was connected and that media streams are opened. In the context of H.323 this means that the CONNECT pdu has been received and either fast start was in operation or the subsequent Open Logical Channels have occurred. For SIP it indicates the INVITE/OK/ACK sequence is complete. The default behaviour is to check that all connections in call are established and if so, marks the call as established and calls OnEstablishedCall().
|
|
Call back to indicate that the call has been established. At this point in time there are no connections left in the call. The default behaviour is to call OpalManager::OnEstablishedCall(). |
|
A call back function whenever a connection is released. The default behaviour releases the remaining connection if there is only one left.
|
|
Call back for SetUp conenction. The default behaviour is to call SetUpConnection() on all the other connections in the call.
|
|
Call back for remote endpoint has sent user input as a string. The default behaviour call OpalConnection::SetUserInput() which saves the value so the GetUserInput() function can return it.
|
|
Call back for remote enpoint has sent user input as tones. If duration is zero then this indicates the beginning of the tone. If duration is non-zero then it indicates the end of the tone output. The default behaviour calls connection.OnUserInputString(tone) if there are no other connections in the call, otherwise it calls SendUserInputTone() for each of the other connections in the call.
|
|
|
|
Open transmitter media streams for each connection. All connections in the call except the one specified are requested to open a source media stream. If successful, then PatchMediaStreams() is called which in turns starts the sink media stream on the connection.
|
|
Connect up the media streams on the connections. This creates a media patch and a sink media stream on the specified connection for the specified source media stream. The created media patch is a thread, but it is not started immediately.
|
|
Standard stream print function. The PObject class has a << operator defined that calls this function polymorphically.
|
|
Remove the media streams on the connections. |
|
Set the call clearance reason. An application should have no cause to use this function. It is present for the H323EndPoint::ClearCall() function to set the clearance reason.
|
|
Set the B party for a call. This is used when we wish to make two outgoing calls and bridge them. When the OnConnected() call back occurs for the first outgoing call (the A-Party) then this variable ised to make teh second outgoing call. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|