14 #ifndef _CpPeerCall_h_ 15 #define _CpPeerCall_h_ 25 #include <os/OsRWMutex.h> 42 int mediaTypeStreamIndex,
43 UtlString mediaRecieveAddress,
63 CpMediaInterface::MEDIA_STREAM_TYPE
mMediaType;
95 CpPeerCall(UtlBoolean isEarlyMediaFor180Enabled = TRUE,
97 CpMediaInterface* callMediaInterface = NULL,
99 const char* callId = NULL,
100 SipUserAgent* sipUA = NULL,
101 int sipSessionReinviteTimer = 0,
102 const char* defaultCallExtension = NULL,
106 const char* forwardUnconditionalUrl = NULL,
108 const char* forwardOnBusyUrl = NULL,
109 int forwardOnNoAnswerMilliSeconds = -1,
110 const char* forwardOnNoAnswerUrl = NULL,
130 virtual void inFocus(
int talking = 1);
131 virtual void outOfFocus();
137 Connection* addParty(
const char* partyAddress,
138 const char* callController,
139 const char* originalCallConnectionAddress,
140 const char* pNewCallId,
142 const void* pDisplay = NULL,
143 const void* pSecurity = NULL,
144 const char* locationHeader = NULL,
146 UtlBoolean bOnHold =
false,
147 const char* originalCallId = NULL,
149 const RTP_TRANSPORT rtpTransportOptions = RTP_TRANSPORT_UDP);
154 void* pEventData = NULL,
155 UtlBoolean fireIfNoConnection = FALSE);
159 virtual void printCall();
161 virtual void getLocalAddress(
char* address,
int len);
163 virtual void getLocalTerminalId(
char* terminal,
int len);
165 void hangUp(
const char* callId,
const char* toTag,
166 const char* fromTag);
168 UtlBoolean getConnectionState(
const char* callId,
172 UtlBoolean strictCompare);
180 static UtlBoolean shouldCreateCall(SipUserAgent& sipUa,
182 SdpCodecList& codecFactory);
184 virtual UtlBoolean hasCallId(
const char* callId);
188 virtual UtlBoolean isQueued();
190 virtual UtlBoolean isLocalTerminal(
const char* terminalId);
192 UtlBoolean isConnection(
const char* callId,
const char* toTag,
193 const char* fromTag);
195 virtual UtlBoolean canDisconnectConnection(
Connection* pConnection);
197 UtlBoolean isConnectionLocallyInitiatedRemoteHold(
const char* callId,
199 const char* fromTag) ;
204 virtual UtlBoolean handleCallMessage(OsMsg& eventMessage);
205 virtual UtlBoolean handleMiNotificationMessage(MiNotification& notification) ;
207 UtlBoolean handleRenegotiateCodecsConnection(OsMsg* pEventMessage);
210 UtlBoolean handleRenegotiateCodecsAllConnections(OsMsg* pEventMessage);
213 UtlBoolean handleSilentRemoteHold(OsMsg* pEventMessage);
216 UtlBoolean handleGetCodecCPULimit(OsMsg& eventMessage);
219 UtlBoolean handleSetCodecCPULimit(OsMsg& eventMessage);
222 UtlBoolean handleGetCodecCPUCost(OsMsg& eventMessage);
225 UtlBoolean handleSetMicGain(OsMsg& eventMessage);
229 UtlBoolean handleDialString(OsMsg* pEventMessage);
231 UtlBoolean handleDequeueCall(OsMsg* pEventMessage);
233 UtlBoolean handleTransfer(OsMsg* pEventMessage);
236 UtlBoolean handleTransferAddress(OsMsg* pEventMessage);
240 UtlBoolean handleTransferConnection(OsMsg* pEventMessage);
243 UtlBoolean handleTransfereeConnection(OsMsg* pEventMessage);
246 UtlBoolean handleSipMessage(OsMsg* pEventMessage);
248 UtlBoolean handleDropConnection(OsMsg* pEventMessage);
250 UtlBoolean handleForceDropConnection(OsMsg* pEventMessage);
253 UtlBoolean handleGetAddresses(OsMsg* pEventMessage);
256 UtlBoolean handleAcceptConnection(OsMsg* pEventMessage);
259 UtlBoolean handleRejectConnection(OsMsg* pEventMessage);
262 UtlBoolean handleRedirectConnection(OsMsg* pEventMessage);
265 UtlBoolean handleHoldTermConnection(OsMsg* pEventMessage);
268 UtlBoolean handleHoldAllTermConnection(OsMsg* pEventMessage);
271 UtlBoolean handleUnholdTermConnection(OsMsg* pEventMessage);
274 UtlBoolean handleTransferConnectionStatus(OsMsg* pEventMessage);
277 UtlBoolean handleTransfereeConnectionStatus(OsMsg* pEventMessage);
280 UtlBoolean handleGetNumConnections(OsMsg* pEventMessage);
283 UtlBoolean handleGetConnections(OsMsg* pEventMessage);
286 UtlBoolean handleGetSession(OsMsg* pEventMessage);
289 UtlBoolean handleGetCallState(OsMsg* pEventMessage);
292 UtlBoolean handleGetConnectionState(OsMsg* pEventMessage);
295 UtlBoolean handleGetNextCseq(OsMsg* pEventMessage);
298 UtlBoolean handleGetTerminalConnectionState(OsMsg* pEventMessage);
301 UtlBoolean handleIsLocalTerminalConnection(OsMsg* pEventMessage);
304 UtlBoolean handleCancelTimer(OsMsg* pEventMessage);
307 UtlBoolean handleOfferingExpired(OsMsg* pEventMessage);
310 UtlBoolean handleRingingExpired(OsMsg* pEventMessage);
313 UtlBoolean handleUnholdAllTermConnections(OsMsg* pEventMessage);
316 UtlBoolean handleUnholdLocalTermConnection(OsMsg* pEventMessage);
319 UtlBoolean handleHoldLocalTermConnection(OsMsg* pEventMessage);
322 UtlBoolean handleGetLocalContacts(OsMsg* pEventMessage);
325 UtlBoolean handleSendInfo(OsMsg* pEventMessage);
328 UtlBoolean handleGetInviteHeaderValue(OsMsg* pEventMessage);
331 UtlBoolean handleGetMediaConnectionId(OsMsg* pEventMessage);
334 UtlBoolean handleLimitCodecs(OsMsg* pEventMessage);
337 UtlBoolean handleLimitCodecPreferences(OsMsg* pEventMessage);
340 UtlBoolean handleGetMediaEnergyLevels(OsMsg* pEventMessage);
343 UtlBoolean handleGetCallMediaEnergyLevels(OsMsg* pEventMessage);
346 UtlBoolean handleGetMediaRtpSourceIDs(OsMsg* pEventMessage);
349 UtlBoolean handleGetCanAddParty(OsMsg* pEventMessage);
352 UtlBoolean handleSplitConnection(OsMsg* pEventMessage) ;
355 UtlBoolean handleJoinConnection(OsMsg* pEventMessage) ;
358 UtlBoolean handleSetMediaPassThrough(
const OsMsg& eventMessage);
361 UtlBoolean handleTransferOtherPartyHold(OsMsg* pEventMessage) ;
364 UtlBoolean handleTransferOtherPartyJoin(OsMsg* pEventMessage) ;
367 UtlBoolean handleTransferOtherPartyUnhold(OsMsg* pEventMessage) ;
370 UtlBoolean handleGetUserAgent(OsMsg* pEventMessage);
372 virtual UtlBoolean getConnectionState(
const char* remoteAddress,
int& state);
374 virtual UtlBoolean getTermConnectionState(
const char* address,
375 const char* terminal,
378 virtual void onHook();
379 virtual void offHook(
const void* hWnd = NULL);
382 Connection* findHandlingConnection(OsMsg& eventMessage);
383 Connection* findHandlingConnection(UtlString& remoteAddress);
384 Connection* findHandlingConnection(
const char* callId,
387 UtlBoolean strictCompare);
390 void removeConnection(
Connection* connection);
392 UtlBoolean isConnectionLive(
int* localConnectionState = NULL);
394 void dropDeadConnections();
396 void handleGetTermConnections(OsMsg* pEventMessage);
397 void handleSetOutboundLine(OsMsg* pEventMessage);
401 size_t& nActualContacts) ;
439 UtlBoolean checkForTag(UtlString &address);
446 #endif // _CpPeerCall_h_ Abstract call manager.
Definition: CpCallManager.h:97
Definition: Connection.h:164
UtlString forwardOnNoAnswer
Definition: CpPeerCall.h:416
SIPX_CALLSTATE_CAUSE
Callstate cause events identify the reason for a Callstate event or provide more detail.
Definition: sipXtapiEvents.h:244
UtlString forwardUnconditional
Definition: CpPeerCall.h:412
Definition: CpPeerCall.h:89
MediaStreamPassThroughData * mpPassThroughData
Definition: CpPeerCall.h:441
#define CP_MAXIMUM_RINGING_EXPIRE_SECONDS
Definition: CallManager.h:43
SipUserAgent * sipUserAgent
Definition: CpPeerCall.h:417
callDialingMode
Definition: CpPeerCall.h:86
int noAnswerTimeout
Definition: CpPeerCall.h:415
UtlBoolean mIsEarlyMediaFor180
Definition: CpPeerCall.h:426
Definition: CpCallManager.h:223
int lineBusyBehavior
Definition: CpPeerCall.h:413
sipXtapi event declarations
SIPXTACK_SECURITY_ATTRIBUTES * mpSecurity
Definition: CpPeerCall.h:428
Definition: Connection.h:58
int SIPX_CONTACT_ID
Type for storing Contact Record identifiers.
Definition: sipXtapi.h:632
SIPX_CALLSTATE_EVENT
Major call state events identify significant changes in the state of a call.
Definition: sipXtapiEvents.h:163
Definition: Connection.h:139
UtlBoolean mbRequestedDrop
Definition: CpPeerCall.h:427
UtlString mLocalAddress
Definition: CpPeerCall.h:424
SIPX_CALLSTATE_CAUSE eLastMinor
Definition: CpPeerCall.h:431
UNKNOWN
Definition: PtGatewayInterface.h:84
SIPX_MEDIA_EVENT
Enumeration of possible media events.
Definition: sipXtapiEvents.h:490
SIPX_MEDIA_TYPE
Enumeration of possible media event types.
Definition: sipXtapiEvents.h:660
Definition: CpPeerCall.h:80
UtlString forwardOnBusy
Definition: CpPeerCall.h:414
Definition: sipXtapiInternal.h:288
int lineAvailableBehavior
Definition: CpPeerCall.h:411
Definition: Connection.h:145
UtlString mLocalTerminalId
Definition: CpPeerCall.h:425
SIPX_CALLSTATE_EVENT eLastMajor
Definition: CpPeerCall.h:430
handleWillingness
Definition: CpCall.h:101
UtlDList mConnections
Definition: CpPeerCall.h:421
Value used to signify the default bandwidth level when calling sipxCallConnect, sipxCallAccept, or sipxConferenceAdd.
Definition: sipXtapi.h:203
OsRWMutex mConnectionMutex
Definition: CpPeerCall.h:422
int offeringDelay
Definition: CpPeerCall.h:410
The CONTACT_ADDRESS structure includes contact information (IP-address and port), address source type...
Definition: sipXtapi.h:640
int mDialMode
Definition: CpPeerCall.h:423
int mSipSessionReinviteTimer
Definition: CpPeerCall.h:420
SIPX_MEDIA_CAUSE
Enumeration of possible media event causes.
Definition: sipXtapiEvents.h:638