sipXcallLib home page


CpCallManager.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005-2017 SIPez LLC. All rights reserved.
3 //
4 // Copyright (C) 2004-2008 SIPfoundry Inc.
5 // Licensed by SIPfoundry under the LGPL license.
6 //
7 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
8 // Licensed to SIPfoundry under a Contributor Agreement.
9 //
10 // $$
12 
13 // Author: Daniel Petrie dpetrie AT SIPez DOT com
14 
15 #ifndef _CpCallManager_h_
16 #define _CpCallManager_h_
17 
18 // SYSTEM INCLUDES
19 //#include <...>
20 
21 // APPLICATION INCLUDES
22 #include <os/OsServerTask.h>
23 #include <os/OsRWMutex.h>
24 #include "os/OsProtectEvent.h"
25 #include "os/OsQueuedEvent.h"
26 
27 #include "ptapi/PtEvent.h"
28 #include "ptapi/PtDefs.h"
29 #include "net/SipMessage.h"
30 #include "net/SipContactDb.h"
31 #include "net/SipDialog.h"
32 #include "cp/Connection.h"
33 #include "tapi/sipXtapiInternal.h"
34 
35 // DEFINES
36 // MACROS
37 // EXTERNAL FUNCTIONS
38 // EXTERNAL VARIABLES
39 // CONSTANTS
40 // STRUCTS
41 // TYPEDEFS
42 // FORWARD DECLARATIONS
43 class CpCall;
44 class CpMediaInterface;
45 class SipSession;
46 class SipDialog;
47 class MpStreamPlayer;
48 class MpStreamPlaylistPlayer;
49 class OsEvent;
50 
52 
97 class CpCallManager : public OsServerTask
98 {
99 /* //////////////////////////// PUBLIC //////////////////////////////////// */
100 public:
101 
102 #ifndef DOXYGEN_SHOULD_SKIP_THIS
103 
105  {
106  CP_UNSPECIFIED = SipMessage::NET_UNSPECIFIED,
107  CP_SIP_MESSAGE = SipMessage::NET_SIP_MESSAGE,
212  };
213 #endif // DOXYGEN_SHOULD_SKIP_THIS
214 
216  {
217  SIP_CALL = 0,
219  };
220 
222  {
225  };
226 
227  enum CpStatus
228  {
234  };
235 
236 /* ============================ CREATORS ================================== */
237 
239  CpCallManager(const char* taskName,
240  const char* callIdPrefix,
241  int rtpPortStart = 8766,
242  int rtpPortEnd = -1,
243  const char* localAddress = NULL,
244  const char* publicAddress = NULL,
245  int internalSamplerate = 8000);
246 
248  virtual
249  ~CpCallManager();
250 
251 /* ============================ MANIPULATORS ============================== */
252 
253  static void getEventSubTypeString(EventSubTypes type,
254  UtlString& typeString);
255 
257 
260  virtual void setOutboundLine(const char* lineUrl) = 0;
261 
267 
269  virtual UtlBoolean handleMessage(OsMsg& eventMessage) = 0;
270 
272  virtual void getNewCallId(UtlString* callId);
273 
275  static void getNewCallId(const char* callIdPrefix, UtlString* callId);
276 
278  void getNewSessionId(UtlString* sessionId);
279 
281  int getNewMetaEventId();
282 
284 
288 
290  virtual void createCall(UtlString* callId,
291  int metaEventId = 0,
292  int metaEventType = PtEvent::META_EVENT_NONE,
293  int numMetaEventCalls = 0,
294  const char* callIds[] = NULL,
295  UtlBoolean assumeFocusIfNoInfocusCall = TRUE) = 0;
296 
299 
305  virtual OsStatus getCalls(int maxCalls, int& numCalls,
306  UtlString callIds[]) = 0;
307 
309 
312  virtual PtStatus connect(const char* callId,
313  const char* toAddress,
314  const char* fromAddress = NULL,
315  const char* desiredConnectionCallId = NULL,
316  SIPX_CONTACT_ID contactId = 0,
317  const void* pDisplay = NULL,
318  const void* pSecurity = NULL,
319  const char* locationHeader = NULL,
320  const int bandWidth=AUDIO_CODEC_BW_DEFAULT,
321  SIPX_TRANSPORT_DATA* pTransportData = NULL,
322  const RTP_TRANSPORT rtpTransportOptions = RTP_TRANSPORT_UDP) = 0;
323 
325 
328  virtual PtStatus consult(const char* idleTargetCallId,
329  const char* activeOriginalCallId,
330  const char* originalCallControllerAddress,
331  const char* originalCallControllerTerminalId,
332  const char* consultAddressUrl,
333  UtlString& targetCallControllerAddress,
334  UtlString& targetCallConsultAddress) = 0;
335 
337  virtual PtStatus transfer_blind(const char* callId,
338  const char* transferToUrl,
339  UtlString* targetCallId,
340  UtlString* targetConnectionAddress = NULL) = 0;
341 
343 
350  virtual PtStatus transfer(const char* targetCallId,
351  const char* originalCallId) = 0;
352 
354  virtual void drop(const char* callId) = 0;
355 
357  virtual void toneStart(const char* callId,
358  int toneId,
359  UtlBoolean local,
360  UtlBoolean remote) = 0;
361 
363  virtual void toneStop(const char* callId) = 0;
364 
366  virtual void toneChannelStart(const char* callId,
367  const char* szRemoteAddress,
368  int toneId,
369  UtlBoolean local,
370  UtlBoolean remote) = 0;
371 
373  virtual void toneChannelStop(const char* callId,
374  const char* szRemoteAddress) = 0;
375 
377 
380  virtual void audioPlay(const char* callId,
381  const char* audioUrl,
382  UtlBoolean repeat,
383  UtlBoolean local,
384  UtlBoolean remote,
385  UtlBoolean mixWithMic = false,
386  int downScaling = 100) = 0;
387 
389 
391  virtual void audioChannelStop(const char* callId,
392  const char* szRemoteAddress) = 0;
393 
395 
398  virtual void audioChannelPlay(const char* callId,
399  const char* szRemoteAddress,
400  const char* audioUrl,
401  UtlBoolean repeat,
402  UtlBoolean local,
403  UtlBoolean remote,
404  UtlBoolean mixWithMic = false,
405  int downScaling = 100) = 0;
406 
408 
410  virtual void audioStop(const char* callId) = 0;
411 
413 
415  virtual void bufferPlay(const char* callId,
416  const void* audiobuf,
417  int bufSize,
418  int type,
419  UtlBoolean repeat,
420  UtlBoolean local,
421  UtlBoolean remote) = 0;
422 
424 
430  virtual void createPlayer(const char* callid,
431  MpStreamPlaylistPlayer** ppPlayer) = 0 ;
432 
434 
452  virtual void createPlayer(int type,
453  const char* callid,
454  const char* szStream,
455  int flags,
456  MpStreamPlayer** ppPlayer) = 0 ;
457 
459  virtual void destroyPlayer(const char* callid,
460  MpStreamPlaylistPlayer* pPlayer) = 0 ;
461 
462 
464  virtual void destroyPlayer(int type,
465  const char* callid,
466  MpStreamPlayer* pPlayer) = 0 ;
467 
468 
470 
474  virtual OsStatus setCodecCPULimitCall(const char* callId,
475  int limit,
476  UtlBoolean bRenegotiate) = 0 ;
477 
479  virtual OsStatus setInboundCodecCPULimit(int limit) = 0 ;
480 
482  virtual OsStatus setMicGain(const char* callId, float gain) = 0;
483 
485 
487 
491  virtual void acceptConnection(const char* callId,
492  const char* address,
493  SIPX_CONTACT_ID contactId = 0,
494  const void* hWnd = NULL,
495  const void* security = NULL,
496  const char* locationHeader = NULL,
497  const int bandWidth=AUDIO_CODEC_BW_DEFAULT,
498  UtlBoolean sendEarlyMedia = FALSE) = 0;
499 
500  virtual void setOutboundLineForCall(const char* callId,
501  const char* address,
502  SIPX_CONTACT_TYPE eType = CONTACT_AUTO) = 0;
503 
504 
506 
510  virtual void rejectConnection(const char* callId,
511  const char* address,
512  int errorCode = 0,
513  const char* errorText = "") = 0;
514 
516 
521  virtual PtStatus redirectConnection(const char* callId,
522  const char* address,
523  const char* forwardAddressUrl) = 0;
524 
526 
530  virtual void dropConnection(const char* callId,
531  const char* address) = 0;
532 
534  virtual void getNumConnections(const char* callId,
535  int& numConnections) = 0;
536 
539  virtual OsStatus getConnections(const char* callId,
540  int maxConnections,
541  int& numConnections,
542  UtlString addresses[]) = 0;
543 
546  virtual OsStatus getCalledAddresses(const char* callId,
547  int maxConnections,
548  int& numConnections,
549  UtlString addresses[]) = 0;
550 
553  virtual OsStatus getCallingAddresses(const char* callId,
554  int maxConnections,
555  int& numConnections,
556  UtlString addresses[]) = 0;
557 
559 
565 
567 
571  virtual void answerTerminalConnection(const char* callId,
572  const char* address,
573  const char* terminalId,
574  const void* pDisplay = NULL,
575  const void* pSecurity = NULL) = 0;
576 
578 
582  virtual void holdTerminalConnection(const char* callId,
583  const char* address,
584  const char* terminalId) = 0;
585 
588  virtual void holdAllTerminalConnections(const char* callId) = 0;
589 
591  virtual void holdLocalTerminalConnection(const char* callId) = 0;
592 
594 
598  virtual void unholdLocalTerminalConnection(const char* callId) = 0;
599 
602  virtual void unholdAllTerminalConnections(const char* callId) = 0;
603 
605  virtual void unholdTerminalConnection(const char* callId,
606  const char* addresss,
607  const char* terminalId) = 0;
608 
611  virtual void limitCodecs(const char* callId,
612  const char* remoteAddr,
613  const char* codecNames) = 0;
614 
617  virtual void limitCodecPreferences(const char* callId,
618  const char* remoteAddr,
619  const int audioBandwidth,
620  const int videoBandwidth,
621  const char* szVideoCodecName) = 0;
622 
624 
628  virtual void renegotiateCodecsTerminalConnection(const char* callId,
629  const char* addresss,
630  const char* terminalId) = 0;
631 
634  virtual void renegotiateCodecsAllTerminalConnections(const char* callId) = 0 ;
635 
637  virtual void getNumTerminalConnections(const char* callId,
638  const char* address,
639  int& numTerminalConnections) = 0;
640 
642  virtual OsStatus getTerminalConnections(const char* callId,
643  const char* address,
644  int maxTerminalConnections,
645  int& numTerminalConnections,
646  UtlString terminalNames[]) = 0;
647 
649  virtual UtlBoolean isTerminalConnectionLocal(const char* callId,
650  const char* address,
651  const char* terminalId) = 0;
652  virtual void doGetFocus(CpCall* call) = 0;
653 
655  virtual OsStatus getSession(const char* callId,
656  const char* address,
657  SipSession& session) = 0;
658 
660  virtual OsStatus getSipDialog(const char* callId,
661  const char* address,
662  SipDialog& dialog) = 0;
664 
665 #ifndef DOXYGEN_SHOULD_SKIP_THIS
666 
669  virtual void unhold(const char* callId) = 0;
671 
673  virtual void dialString(const char* url) = 0;
675 #endif // DOXYGEN_SHOULD_SKIP_THIS
676 
678  virtual void setDoNotDisturb(int flag);
679 
681  virtual void setMessageWaiting(int flag);
682 
684 
687  virtual void setOfferedTimeout(int millisec);
688 
689  virtual UtlBoolean disconnectConnection(const char* callId,
690  const char* addressUrl) = 0;
691 
693  virtual void setTransferType(int type) = 0;
694 
695  virtual void enableIce(UtlBoolean bEnable) ;
696  virtual void getRemoteUserAgent(const char* callId,
697  const char* remoteAddress,
698  UtlString& userAgent) = 0;
699 
703  virtual void setVoiceQualityReportTarget(const char* szTargetSipUrl) ;
704 
705 
706 /* ============================ ACCESSORS ================================= */
707 
711  virtual int getNumLines() = 0;
712 
718  virtual OsStatus getOutboundAddresses(int maxAddressesRequested,
719  int& numAddressesAvailable, UtlString** addresses) = 0;
720 
722  virtual UtlBoolean getCallState(const char* callId,
723  int& state) = 0;
724 
726 
731  virtual UtlBoolean getConnectionState(const char* callId,
732  const char* remoteAddress,
733  int& state) = 0;
734 
736 
741  virtual UtlBoolean getTermConnectionState(const char* callId,
742  const char* address,
743  const char* terminal,
744  int& state) = 0;
745 
746  virtual PtStatus validateAddress(UtlString& address) = 0;
747 
749  virtual OsStatus getFromField(const char* callId,
750  const char* remoteAddress,
751  UtlString& fromField) = 0;
752 
754  virtual OsStatus getToField(const char* callId,
755  const char* remoteAddress,
756  UtlString& toField) = 0;
757 
760 
764  virtual OsStatus getCodecCPUCostCall(const char* callId,
765  int& cost) = 0;
766 
769 
773  virtual OsStatus getCodecCPULimitCall(const char* callId,
774  int& cost) = 0;
775 
776  virtual UtlBoolean isIceEnabled() const ;
777 
781  virtual UtlBoolean getVoiceQualityReportTarget(UtlString& reportSipUrl) ;
782 
786  virtual void getLocalAddress(UtlString& address) ;
787 
788 /* ============================ INQUIRY =================================== */
789 
790  virtual void onCallDestroy(CpCall* pCall) = 0;
791 
792  virtual void yieldFocus(CpCall* call) = 0;
793 
794 #ifndef DOXYGEN_SHOULD_SKIP_THIS
795 
796 /* //////////////////////////// PROTECTED ///////////////////////////////// */
797 protected:
798 
803  virtual CpCall* findCall(const char* callId);
804 
805  int aquireCallIndex();
806  void releaseCallIndex(int callIndex);
807 
808  virtual void pushCall(CpCall* call);
809  virtual void appendCall(CpCall* call);
810 
811  OsMutex mManagerMutex;
812  OsRWMutex mCallListMutex;
813  // Mutex to protect mCallNum.
814  static OsMutex mCallNumMutex;
815  UtlHashBag mCallIndices;
816  UtlString mLocalAddress;
817  UtlString mPublicAddress;
820 
823 
825  UtlString mSipForwardOnBusy;
826 
829 
833  int mInviteExpireSeconds; // The PHONESET_CP_RINGING_EXPIRE_SECONDS parameter,
834  // it is used to set the ringing expired timer if there
835  // is no Expires header field from an incoming INVITE
837 
838 /* //////////////////////////// PRIVATE /////////////////////////////////// */
839 private:
842 
844  CpCallManager(const CpCallManager& rCpCallManager);
845 
848 
849  UtlString mCallIdPrefix;
850  UtlDList mCallList;
852  UtlBoolean mbEnableICE ;
854 
855  // Every CallManager shares the same call counter for generating Call-IDs.
856  static int64_t mCallNum;
857 
858 #endif // DOXYGEN_SHOULD_SKIP_THIS
859 
860 };
861 
862 /* ============================ INLINE METHODS ============================ */
863 
864 #endif // _CpCallManager_h_
Abstract call manager.
Definition: CpCallManager.h:97
static OsMutex mCallNumMutex
Definition: CpCallManager.h:814
Definition: CpCallManager.h:122
virtual void holdAllTerminalConnections(const char *callId)=0
Convenience method to put all of the terminal connections in the specified call on hold...
PtStatus
Definition: PtDefs.h:49
Definition: CpCallManager.h:206
virtual UtlBoolean disconnectConnection(const char *callId, const char *addressUrl)=0
Definition: CpCallManager.h:161
virtual OsStatus getConnections(const char *callId, int maxConnections, int &numConnections, UtlString addresses[])=0
Query the list of addresses or handles for the connections in the specified call. ...
Definition: CpCallManager.h:123
Definition: CpCallManager.h:232
Definition: CpCallManager.h:141
Definition: CpCallManager.h:120
virtual OsStatus getCallingAddresses(const char *callId, int maxConnections, int &numConnections, UtlString addresses[])=0
Query the list of addresses or handles for the connections in the specified call that were set up as ...
virtual UtlBoolean handleMessage(OsMsg &eventMessage)=0
For internal use only.
virtual void holdTerminalConnection(const char *callId, const char *address, const char *terminalId)=0
Put the specified terminal connection on hold.
virtual UtlBoolean getTermConnectionState(const char *callId, const char *address, const char *terminal, int &state)=0
Get the terminal connection state for the specified terminal connection.
Definition: CpCallManager.h:230
Definition: CpCallManager.h:109
Definition: CpCallManager.h:152
virtual PtStatus redirectConnection(const char *callId, const char *address, const char *forwardAddressUrl)=0
Redirect the incoming connection.
virtual void createCall(UtlString *callId, int metaEventId=0, int metaEventType=PtEvent::META_EVENT_NONE, int numMetaEventCalls=0, const char *callIds[]=NULL, UtlBoolean assumeFocusIfNoInfocusCall=TRUE)=0
Creates a new call with an implicit local connection.
Definition: CpCallManager.h:139
virtual CpCall * findCall(const char *callId)
Definition: CpCallManager.cpp:517
Definition: CpCallManager.h:110
Definition: CpCallManager.h:171
virtual void toneChannelStart(const char *callId, const char *szRemoteAddress, int toneId, UtlBoolean local, UtlBoolean remote)=0
Direct the media subsystem to begin playing a DTMF or progress tone.
CpCallManager & operator=(const CpCallManager &rhs)
Assignment operator.
Definition: CpCallManager.cpp:366
Definition: CpCallManager.h:202
virtual void answerTerminalConnection(const char *callId, const char *address, const char *terminalId, const void *pDisplay=NULL, const void *pSecurity=NULL)=0
Answer the incoming terminal connection.
virtual void setOutboundLine(const char *lineUrl)=0
Set the default address for the local connection.
virtual void unhold(const char *callId)=0
Deprecated, use holdAllTerminalConnections.
Definition: CpCallManager.h:106
virtual void renegotiateCodecsAllTerminalConnections(const char *callId)=0
Convenience method to renegotiate the codecs for all of the terminal connections in the specified cal...
Definition: CpCallManager.h:145
virtual void doGetFocus(CpCall *call)=0
Definition: CpCallManager.h:217
virtual void setOutboundLineForCall(const char *callId, const char *address, SIPX_CONTACT_TYPE eType=CONTACT_AUTO)=0
virtual OsStatus setMicGain(const char *callId, float gain)=0
Sets the Mic gain.
CpStatus
Definition: CpCallManager.h:227
Definition: CpCallManager.h:224
Definition: CpCallManager.h:174
Definition: CpCallManager.h:178
Definition: CpCallManager.h:154
Definition: CpCallManager.h:180
Definition: CpCallManager.h:132
virtual void getLocalAddress(UtlString &address)
Get the configured local address.
Definition: CpCallManager.cpp:607
virtual OsStatus getCodecCPUCostCall(const char *callId, int &cost)=0
Gets the CPU cost for an individual connection within the specified call.
Definition: CpCallManager.h:166
virtual void holdLocalTerminalConnection(const char *callId)=0
Convenience method to put the local terminal connection on hold.
Definition: CpCallManager.h:163
Definition: CpCallManager.h:172
Definition: CpCallManager.h:113
Definition: CpCallManager.h:118
void getNewSessionId(UtlString *sessionId)
For internal use only.
Definition: CpCallManager.cpp:384
Definition: CpCallManager.h:146
virtual void acceptConnection(const char *callId, const char *address, SIPX_CONTACT_ID contactId=0, const void *hWnd=NULL, const void *security=NULL, const char *locationHeader=NULL, const int bandWidth=AUDIO_CODEC_BW_DEFAULT, UtlBoolean sendEarlyMedia=FALSE)=0
Accept the incoming connection.
Definition: CpCallManager.h:196
Definition: CpCallManager.h:127
virtual void getNewCallId(UtlString *callId)
For internal use only.
Definition: CpCallManager.cpp:379
Definition: CpCallManager.h:223
virtual void audioStop(const char *callId)=0
Deprecated, use the player controls.
Definition: CpCallManager.h:140
static const int CALLMANAGER_MAX_REQUEST_MSGS
Maximum number of request messages.
Definition: CpCallManager.h:841
Definition: CpCallManager.h:126
int aquireCallIndex()
Definition: CpCallManager.cpp:618
virtual void drop(const char *callId)=0
Drop this call and disconnect all connections associated with it.
virtual void pushCall(CpCall *call)
Definition: CpCallManager.cpp:545
Definition: CpCallManager.h:158
virtual OsStatus getCalledAddresses(const char *callId, int maxConnections, int &numConnections, UtlString addresses[])=0
Query the list of addresses or handles for the connections in the specified call that were set up as ...
Definition: CpCallManager.h:137
Definition: CpCallManager.h:209
Definition: CpCallManager.h:181
Definition: CpCallManager.h:156
virtual void destroyPlayer(const char *callid, MpStreamPlaylistPlayer *pPlayer)=0
Destroy the media player associated with a call.
virtual void renegotiateCodecsTerminalConnection(const char *callId, const char *addresss, const char *terminalId)=0
Renegotiate the codecs to be use for the sepcified terminal connection.
virtual OsStatus getTerminalConnections(const char *callId, const char *address, int maxTerminalConnections, int &numTerminalConnections, UtlString terminalNames[])=0
Get the list of terminal connection identifiers for the specified call.
virtual void toneStop(const char *callId)=0
Direct the media subsystem to stop playing a DTMF or progress tone.
virtual PtStatus transfer(const char *targetCallId, const char *originalCallId)=0
Consultative transfer.
Definition: CpCallManager.h:208
Definition: CpCallManager.h:218
Definition: CpCallManager.h:184
int SIPX_CONTACT_ID
Type for storing Contact Record identifiers.
Definition: sipXtapi.h:632
int mRtpPortEnd
Definition: CpCallManager.h:819
Definition: CpCallManager.h:205
Definition: CpCallManager.h:201
virtual void yieldFocus(CpCall *call)=0
virtual void unholdTerminalConnection(const char *callId, const char *addresss, const char *terminalId)=0
Convenience method to take the local terminal connection off hold.
Definition: CpCallManager.h:130
virtual PtStatus transfer_blind(const char *callId, const char *transferToUrl, UtlString *targetCallId, UtlString *targetConnectionAddress=NULL)=0
Blind transfer.
OsMutex mManagerMutex
Definition: CpCallManager.h:811
Definition: CpCallManager.h:133
int mNoAnswerTimeout
Definition: CpCallManager.h:827
virtual void toneChannelStop(const char *callId, const char *szRemoteAddress)=0
Direct the media subsystem to stop playing a DTMF or progress tone.
virtual void dropConnection(const char *callId, const char *address)=0
Drop the specifed connection.
Definition: CpCallManager.h:185
Definition: CpCallManager.h:187
int getNewMetaEventId()
For internal use only.
Definition: CpCallManager.cpp:582
Definition: CpCallManager.h:190
Definition: CpCallManager.h:157
Definition: CpCallManager.h:173
virtual void audioChannelPlay(const char *callId, const char *szRemoteAddress, const char *audioUrl, UtlBoolean repeat, UtlBoolean local, UtlBoolean remote, UtlBoolean mixWithMic=false, int downScaling=100)=0
Deprecated, use the player controls.
virtual OsStatus getSipDialog(const char *callId, const char *address, SipDialog &dialog)=0
Get the SIP dialog information for the specified terminal connection.
Definition: CpCallManager.h:142
Definition: CpCallManager.h:162
Definition: CpCallManager.h:135
virtual void limitCodecPreferences(const char *callId, const char *remoteAddr, const int audioBandwidth, const int videoBandwidth, const char *szVideoCodecName)=0
Rebuild codec factory on the fly with new audio codec requirements and one specific video codec...
SIPX_CONTACT_TYPE
SIPX_CONTACT_TYPE is an enumeration of possible address types for use with SIP contacts and SDP conne...
Definition: sipXtapi.h:524
Definition: CpCallManager.h:211
virtual OsStatus getCalls(int maxCalls, int &numCalls, UtlString callIds[])=0
Gets the list of names or identifiers for all of the existing calls.
static int64_t mCallNum
Definition: CpCallManager.h:856
Definition: CpCallManager.h:159
Automatic contact selection; used for API parameters.
Definition: sipXtapi.h:531
virtual void unholdLocalTerminalConnection(const char *callId)=0
Take the specified terminal connection off hold,.
Definition: CpCallManager.h:160
virtual void setMessageWaiting(int flag)
msg waiting flag
Definition: CpCallManager.cpp:558
virtual void appendCall(CpCall *call)
Definition: CpCallManager.cpp:538
UtlString mForwardOnNoAnswer
Definition: CpCallManager.h:828
Definition: CpCallManager.h:155
Definition: CpCallManager.h:170
Definition: CpCallManager.h:149
virtual void audioPlay(const char *callId, const char *audioUrl, UtlBoolean repeat, UtlBoolean local, UtlBoolean remote, UtlBoolean mixWithMic=false, int downScaling=100)=0
Deprecated, use the player controls.
UtlDList mCallList
Definition: CpCallManager.h:850
int mMsgWaitingFlag
Definition: CpCallManager.h:831
Definition: CpCallManager.h:169
int mOfferedTimeOut
Definition: CpCallManager.h:832
Definition: CpCallManager.h:129
virtual UtlBoolean getVoiceQualityReportTarget(UtlString &reportSipUrl)
Get the target sip url for voice quality reports.
Definition: CpCallManager.cpp:594
Definition: CpCallManager.h:143
UtlString mCallIdPrefix
Definition: CpCallManager.h:849
Definition: CpCallManager.h:199
Definition: CpCallManager.h:150
virtual void dialString(const char *url)=0
Deprecated, use connect.
void releaseCallIndex(int callIndex)
Definition: CpCallManager.cpp:639
virtual OsStatus setCodecCPULimitCall(const char *callId, int limit, UtlBoolean bRenegotiate)=0
Sets the CPU codec limit for a call.
Definition: CpCallManager.h:147
Definition: CpCallManager.h:200
Definition: CpCallManager.h:204
Definition: CpCallManager.h:189
Definition: CpCallManager.h:125
virtual void enableIce(UtlBoolean bEnable)
Definition: CpCallManager.cpp:568
Definition: CpCallManager.h:148
Definition: CpCallManager.h:136
EventSubTypes
Definition: CpCallManager.h:104
Definition: CpCallManager.h:183
virtual void setDoNotDisturb(int flag)
do-not-disturb flag
Definition: CpCallManager.cpp:553
virtual void createPlayer(const char *callid, MpStreamPlaylistPlayer **ppPlayer)=0
Create a MpStreamPlaylistPlayer media player associated with.
UtlString mForwardUnconditional
Definition: CpCallManager.h:822
Definition: CpCallManager.h:231
Definition: CpCallManager.h:138
Definition: CpCallManager.h:191
CpCallManager(const char *taskName, const char *callIdPrefix, int rtpPortStart=8766, int rtpPortEnd=-1, const char *localAddress=NULL, const char *publicAddress=NULL, int internalSamplerate=8000)
Default constructor.
Definition: CpCallManager.cpp:48
Definition: CpCallManager.h:124
virtual UtlBoolean isIceEnabled() const
Definition: CpCallManager.cpp:588
virtual OsStatus setInboundCodecCPULimit(int limit)=0
Set the call codec CPU limit for inbound connections in a call.
virtual void setTransferType(int type)=0
Deprecated.
virtual UtlBoolean isTerminalConnectionLocal(const char *callId, const char *address, const char *terminalId)=0
Query whether the specified terminal connection is a local or remote connection.
Definition: CpCallManager.h:117
virtual ~CpCallManager()
Destructor.
Definition: CpCallManager.cpp:111
Definition: CpCallManager.h:114
virtual void limitCodecs(const char *callId, const char *remoteAddr, const char *codecNames)=0
Further limit the set of codecs to use for the call to the given set of codecs The codecs named...
Definition: CpCallManager.h:165
Definition: CpCallManager.h:115
Definition: CpCallManager.h:233
Definition: sipXtapiInternal.h:288
Definition: CpCallManager.h:116
virtual OsStatus getFromField(const char *callId, const char *remoteAddress, UtlString &fromField)=0
Deprecated, use getSession.
virtual UtlBoolean getConnectionState(const char *callId, const char *remoteAddress, int &state)=0
Get the connection state for the specified connection.
Definition: CpCallManager.h:192
Definition: CpCallManager.h:186
Definition: CpCallManager.h:188
Definition: CpCallManager.h:182
int mDoNotDisturbFlag
Definition: CpCallManager.h:830
virtual UtlBoolean getCallState(const char *callId, int &state)=0
Get the state of the identified call.
int mInviteExpireSeconds
Definition: CpCallManager.h:833
int mLineAvailableBehavior
Definition: CpCallManager.h:821
Definition: CpCallManager.h:164
virtual OsStatus getOutboundAddresses(int maxAddressesRequested, int &numAddressesAvailable, UtlString **addresses)=0
maxAddressesRequested is the number of addresses requested if available numAddressesAvailable is the ...
virtual void getNumConnections(const char *callId, int &numConnections)=0
Query the number of connections in the specified call.
virtual void toneStart(const char *callId, int toneId, UtlBoolean local, UtlBoolean remote)=0
Direct the media subsystem to begin playing a DTMF or progress tone.
virtual void unholdAllTerminalConnections(const char *callId)=0
Convenience method to take all of the terminal connections in the specified call off hold...
CallTypes
Definition: CpCallManager.h:215
Definition: CpCallManager.h:108
virtual void getNumTerminalConnections(const char *callId, const char *address, int &numTerminalConnections)=0
Query the number of terminal connections in the specified call.
Definition: CpCallManager.h:111
int mDefaultSampleRate
for flowgraph creation
Definition: CpCallManager.h:836
CallHoldType
Definition: CpCallManager.h:221
virtual void setVoiceQualityReportTarget(const char *szTargetSipUrl)
Set the target sip url for voice quality reports.
Definition: CpCallManager.cpp:574
Definition: CpCallManager.h:179
int mLineBusyBehavior
Definition: CpCallManager.h:824
Definition: CpCallManager.h:177
virtual PtStatus consult(const char *idleTargetCallId, const char *activeOriginalCallId, const char *originalCallControllerAddress, const char *originalCallControllerTerminalId, const char *consultAddressUrl, UtlString &targetCallControllerAddress, UtlString &targetCallConsultAddress)=0
Create a new call and associate it with an existing call.
Definition: CpCallManager.h:112
Definition: CpCallManager.h:207
virtual OsStatus getCodecCPULimitCall(const char *callId, int &cost)=0
Gets the CPU cost for an individual connection within the specified call.
Definition: CpCallManager.h:176
int mRtpPortStart
Definition: CpCallManager.h:818
Definition: CpCallManager.h:128
virtual OsStatus getToField(const char *callId, const char *remoteAddress, UtlString &toField)=0
Deprecated, use getSession.
Definition: CpCallManager.h:151
Definition: CpCall.h:56
virtual void rejectConnection(const char *callId, const char *address, int errorCode=0, const char *errorText="")=0
Reject the incoming connection.
Definition: CpCallManager.h:134
Definition: CpCallManager.h:210
Definition: CpCallManager.h:131
virtual OsStatus getSession(const char *callId, const char *address, SipSession &session)=0
Get the SIP session information for the specified terminal connection.
UtlString mPublicAddress
Definition: CpCallManager.h:817
Definition: CpCallManager.h:229
Definition: CpCallManager.h:153
Value used to signify the default bandwidth level when calling sipxCallConnect, sipxCallAccept, or sipxConferenceAdd.
Definition: sipXtapi.h:203
Definition: CpCallManager.h:175
UtlString mLocalAddress
Definition: CpCallManager.h:816
virtual void setOfferedTimeout(int millisec)
offered time-out for all incoming calls
Definition: CpCallManager.cpp:563
UtlBoolean mbEnableICE
Definition: CpCallManager.h:852
virtual PtStatus connect(const char *callId, const char *toAddress, const char *fromAddress=NULL, const char *desiredConnectionCallId=NULL, SIPX_CONTACT_ID contactId=0, const void *pDisplay=NULL, const void *pSecurity=NULL, const char *locationHeader=NULL, const int bandWidth=AUDIO_CODEC_BW_DEFAULT, SIPX_TRANSPORT_DATA *pTransportData=NULL, const RTP_TRANSPORT rtpTransportOptions=RTP_TRANSPORT_UDP)=0
Initiates a new outbound connection to the specified address.
Definition: CpCallManager.h:107
OsRWMutex mCallListMutex
Definition: CpCallManager.h:812
UtlString mVoiceQualityReportTarget
Definition: CpCallManager.h:853
virtual PtStatus validateAddress(UtlString &address)=0
Definition: CpCallManager.h:203
static void getEventSubTypeString(EventSubTypes type, UtlString &typeString)
Definition: CpCallManager.cpp:117
virtual void getRemoteUserAgent(const char *callId, const char *remoteAddress, UtlString &userAgent)=0
Definition: PtEvent.h:346
virtual void bufferPlay(const char *callId, const void *audiobuf, int bufSize, int type, UtlBoolean repeat, UtlBoolean local, UtlBoolean remote)=0
Deprecated, use the player controls.
Definition: CpCallManager.h:121
virtual void onCallDestroy(CpCall *pCall)=0
UtlString mSipForwardOnBusy
Definition: CpCallManager.h:825
Definition: CpCallManager.h:144
Definition: CpCallManager.h:119
virtual void audioChannelStop(const char *callId, const char *szRemoteAddress)=0
Deprecated, use the player controls.
int mLastMetaEventId
Definition: CpCallManager.h:851
UtlHashBag mCallIndices
Definition: CpCallManager.h:815
virtual int getNumLines()=0
Gets the number of lines made available by line manager.