sipXcallLib home page


Public Member Functions | Private Member Functions | Private Attributes | List of all members
CallManager Class Reference

#include <CallManager.h>

Inheritance diagram for CallManager:
Inheritance graph
[legend]
Collaboration diagram for CallManager:
Collaboration graph
[legend]

Public Member Functions

 CallManager (UtlBoolean isRequiredUserIdMatch, SipLineMgr *lineMgrTask, UtlBoolean isEarlyMediaFor180Enabled, SdpCodecList *pCodecFactory, int rtpPortStart, int rtpPortEnd, const char *localAddress, const char *publicAddress, SipUserAgent *userAgent, int sipSessionReinviteTimer, PtMGCP *mgcpStackTask, const char *defaultCallExtension, int availableBehavior, const char *unconditionalForwardUrl, int forwardOnNoAnswerSeconds, const char *forwardOnNoAnswerUrl, int busyBehavior, const char *sipForwardOnBusyUrl, OsConfigDb *speedNums, CallTypes phonesetOutgoingCallProtocol, int numDialPlanDigits, int holdType, int offeringDelay, const char *pLocal, int inviteExpireSeconds, int expeditedIpTos, int maxCalls, CpMediaInterfaceFactory *pMediaFactory, int internalSamplerate)
 
virtual ~CallManager ()
 
virtual UtlBoolean handleMessage (OsMsg &eventMessage)
 For internal use only. More...
 
virtual void requestShutdown (void)
 
virtual void setOutboundLine (const char *lineUrl)
 Set the default address for the local connection. More...
 
virtual void setOutboundLineForCall (const char *callId, const char *address, SIPX_CONTACT_TYPE eType=CONTACT_AUTO)
 
virtual void createCall (UtlString *callId, int metaEventId=0, int metaEventType=PtEvent::META_EVENT_NONE, int numMetaEventCalls=0, const char *metaEventCallIds[]=NULL, UtlBoolean assumeFocusIfNoInfocusCall=TRUE)
 Creates a new call with an implicit local connection. More...
 
virtual OsStatus getCalls (int maxCalls, int &numCalls, UtlString callIds[])
 Gets the list of names or identifiers for all of the existing calls. More...
 
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)
 Initiates a new outbound connection to the specified address. More...
 
virtual PtStatus consult (const char *idleTargetCallId, const char *activeOriginalCallId, const char *originalCallControllerAddress, const char *originalCallControllerTerminalId, const char *consultAddressUrl, UtlString &targetCallControllerAddress, UtlString &targetCallConsultAddress)
 Create a new call and associate it with an existing call. More...
 
virtual void drop (const char *callId)
 Drop this call and disconnect all connections associated with it. More...
 
virtual PtStatus transfer_blind (const char *callId, const char *transferToUrl, UtlString *targetCallId, UtlString *targetConnectionAddress=NULL)
 Blind transfer. More...
 
virtual PtStatus transfer (const char *targetCallId, const char *originalCallId)
 Consultative transfer. More...
 
PtStatus transfer (const char *sourceCallId, const char *sourceAddress, const char *targetCallId, const char *targetAddress)
 
virtual PtStatus split (const char *szSourceCallId, const char *szSourceAddress, const char *szTargetCallId)
 
virtual void sendFlowgraphMessage (const char *callId, OsMsg &flowgraphMessage)
 
virtual void toneStart (const char *callId, int toneId, UtlBoolean local, UtlBoolean remote)
 Direct the media subsystem to begin playing a DTMF or progress tone. More...
 
virtual void toneStop (const char *callId)
 Direct the media subsystem to stop playing a DTMF or progress tone. More...
 
virtual void toneChannelStart (const char *callId, const char *szRemoteAddress, int toneId, UtlBoolean local, UtlBoolean remote)
 Direct the media subsystem to begin playing a DTMF or progress tone. More...
 
virtual void toneChannelStop (const char *callId, const char *szRemoteAddress)
 Direct the media subsystem to stop playing a DTMF or progress tone. More...
 
virtual void audioPlay (const char *callId, const char *audioUrl, UtlBoolean repeat, UtlBoolean local, UtlBoolean remote, UtlBoolean mixWithMic=false, int downScaling=100)
 Deprecated, use the player controls. More...
 
virtual void audioStop (const char *callId)
 Deprecated, use the player controls. More...
 
virtual void audioChannelPlay (const char *callId, const char *szRemoteAddress, const char *audioUrl, UtlBoolean repeat, UtlBoolean local, UtlBoolean remote, UtlBoolean mixWithMic=false, int downScaling=100)
 Deprecated, use the player controls. More...
 
virtual void audioChannelStop (const char *callId, const char *szRemoteAddress)
 Deprecated, use the player controls. More...
 
virtual OsStatus audioChannelRecordStart (const char *callId, const char *szRemoteAddress, const char *szFile, const CpMediaInterface::CpAudioFileFormat=CpMediaInterface::CP_WAVE_PCM_16, const UtlBoolean appendToFile=FALSE, const int numChannels=1)
 
virtual OsStatus audioChannelRecordPause (const char *callId, const char *szRemoteAddress)
 Pause a file recording that is already started. More...
 
virtual OsStatus audioChannelRecordResume (const char *callId, const char *szRemoteAddress)
 Resume a file recording that is paused. More...
 
virtual OsStatus audioChannelRecordStop (const char *callId, const char *szRemoteAddress)
 
virtual OsStatus audioChannelRecordBufferStart (const char *callId, const char *szRemoteAddress, const char *pBuffer, const int bufferSize, const int bufferType, const int maxRecordTime, const int maxSilence)
 
virtual OsStatus audioChannelRecordBufferStop (const char *callId, const char *szRemoteAddress)
 
virtual OsStatus setMediaPassThrough (const UtlString &callId, const UtlString &remoteAddress, CpMediaInterface::MEDIA_STREAM_TYPE mediaType, int mediaTypeStreamIndex, const UtlString &mediaRecieveAddress, int rtpPort, int rtcpPort)
 
virtual OsStatus createMediaConnection (const UtlString &callId, int &connectionId)
 
virtual OsStatus setRtpDestination (const UtlString &callId, int connectionId, CpMediaInterface::MEDIA_STREAM_TYPE mediaType, int mediaTypeStreamIndex, const UtlString &mediaRecieveAddress, int rtpPort, int rtcpPort)
 
virtual OsStatus startRtpSend (const UtlString &callId, int connectionId, const SdpCodecList &codecList)
 
virtual OsStatus stopRtpSend (const UtlString &callId, int connectionId)
 
virtual void bufferPlay (const char *callId, const void *audiobuf, int bufSize, int type, UtlBoolean repeat, UtlBoolean local, UtlBoolean remote)
 Deprecated, use the player controls. More...
 
virtual void createPlayer (const char *callid, MpStreamPlaylistPlayer **ppPlayer)
 Create a MpStreamPlaylistPlayer media player associated with. More...
 
virtual void createPlayer (int type, const char *callid, const char *szStream, int flags, MpStreamPlayer **ppPlayer)
 Create a media player associated with the specified call. More...
 
virtual void destroyPlayer (const char *callid, MpStreamPlaylistPlayer *pPlayer)
 Destroy the media player associated with a call. More...
 
virtual void destroyPlayer (int type, const char *callid, MpStreamPlayer *pPlayer)
 Destroy the media player associated with a call. More...
 
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)
 Accept the incoming connection. More...
 
virtual void rejectConnection (const char *callId, const char *address, int errorCode=0, const char *errorText="")
 Reject the incoming connection. More...
 
virtual PtStatus redirectConnection (const char *callId, const char *address, const char *forwardAddressUrl)
 Redirect the incoming connection. More...
 
virtual void dropConnection (const char *callId, const char *address)
 Drop the specifed connection. More...
 
virtual void getNumConnections (const char *callId, int &numConnections)
 Query the number of connections in the specified call. More...
 
virtual OsStatus getConnections (const char *callId, int maxConnections, int &numConnections, UtlString addresses[])
 Query the list of addresses or handles for the connections in the specified call. More...
 
virtual OsStatus getCalledAddresses (const char *callId, int maxConnections, int &numConnections, UtlString addresses[])
 Query the list of addresses or handles for the connections in the specified call that were set up as outbound connections. More...
 
virtual OsStatus getCallingAddresses (const char *callId, int maxConnections, int &numConnections, UtlString addresses[])
 Query the list of addresses or handles for the connections in the specified call that were set up as inbound connections. More...
 
virtual void answerTerminalConnection (const char *callId, const char *address, const char *terminalId, const void *pDisplay=NULL, const void *pSecurity=NULL)
 Answer the incoming terminal connection. More...
 
virtual void holdTerminalConnection (const char *callId, const char *address, const char *terminalId)
 Put the specified terminal connection on hold. More...
 
virtual void holdAllTerminalConnections (const char *callId)
 Convenience method to put all of the terminal connections in the specified call on hold. More...
 
virtual void holdLocalTerminalConnection (const char *callId)
 Convenience method to put the local terminal connection on hold. More...
 
virtual void unholdLocalTerminalConnection (const char *callId)
 Take the specified terminal connection off hold,. More...
 
virtual void unholdAllTerminalConnections (const char *callId)
 Convenience method to take all of the terminal connections in the specified call off hold. More...
 
virtual void unholdTerminalConnection (const char *callId, const char *addresss, const char *terminalId)
 Convenience method to take the local terminal connection off hold. More...
 
virtual void limitCodecs (const char *callId, const char *remoteAddr, const char *codecNames)
 Further limit the set of codecs to use for the call to the given set of codecs The codecs named, must be a subset of those enabled for the call. More...
 
virtual void limitCodecPreferences (const char *callId, const char *remoteAddr, const int audioBandwidth, const int videoBandwidth, const char *szVideoCodecName)
 Rebuild codec factory on the fly with new audio codec requirements and one specific video codec. More...
 
virtual void limitCodecPreferences (const char *callId, const int audioBandwidth, const int videoBandwidth, const char *szVideoCodecName)
 
virtual void silentRemoteHold (const char *callId)
 
virtual void renegotiateCodecsTerminalConnection (const char *callId, const char *addresss, const char *terminalId)
 Renegotiate the codecs to be use for the sepcified terminal connection. More...
 
virtual void renegotiateCodecsAllTerminalConnections (const char *callId)
 Convenience method to renegotiate the codecs for all of the terminal connections in the specified call. More...
 
virtual void getNumTerminalConnections (const char *callId, const char *address, int &numTerminalConnections)
 Query the number of terminal connections in the specified call. More...
 
virtual OsStatus getTerminalConnections (const char *callId, const char *address, int maxTerminalConnections, int &numTerminalConnections, UtlString terminalNames[])
 Get the list of terminal connection identifiers for the specified call. More...
 
virtual UtlBoolean isTerminalConnectionLocal (const char *callId, const char *address, const char *terminalId)
 Query whether the specified terminal connection is a local or remote connection. More...
 
virtual void doGetFocus (CpCall *call)
 
virtual OsStatus getSession (const char *callId, const char *address, SipSession &session)
 Get the SIP session information for the specified terminal connection. More...
 
virtual OsStatus getSipDialog (const char *callId, const char *address, SipDialog &dialog)
 Get the SIP dialog information for the specified terminal connection. More...
 
virtual void unhold (const char *callId)
 Deprecated, use holdAllTerminalConnections. More...
 
virtual void dialString (const char *url)
 Deprecated, use connect. More...
 
virtual UtlBoolean disconnectConnection (const char *callId, const char *addressUrl)
 
virtual void setTransferType (int type)
 Deprecated. More...
 
virtual OsStatus setCodecCPULimitCall (const char *callId, int limit, UtlBoolean bRenegotiate)
 Sets the CPU codec limit for a call. More...
 
virtual OsStatus setInboundCodecCPULimit (int limit)
 Set the call codec CPU limit for inbound connections in a call. More...
 
virtual OsStatus setMicGain (const char *callId, float gain)
 Sets the Mic gain. More...
 
virtual OsStatus setOutputMixWeight (const char *callId, int bridgeOutputIndex, float gain)
 Set gain for all inputs to the given output on bridge. More...
 
virtual void setMaxCalls (int maxCalls)
 
virtual void enableStun (const char *szStunServer, int iStunPort, int iKeepAlivePeriodSecs, OsNotification *pNotification=NULL)
 
virtual void enableTurn (const char *szTurnServer, int iTurnPort, const char *szUsername, const char *szPassword, int iKeepAlivePeriodSecs)
 
virtual UtlBoolean sendInfo (const char *callId, const char *szRemoteAddress, const char *szContentType, const size_t nContenLength, const char *szContent)
 
virtual int getNumLines ()
 Gets the number of lines made available by line manager. More...
 
virtual OsStatus getOutboundAddresses (int maxAddressesRequested, int &numAddressesAvailable, UtlString **addresses)
 maxAddressesRequested is the number of addresses requested if available numAddressesAvailable is the actual number of addresses available. More...
 
virtual UtlBoolean getCallState (const char *callId, int &state)
 Get the state of the identified call. More...
 
virtual UtlBoolean getConnectionState (const char *callId, const char *remoteAddress, int &state)
 Get the connection state for the specified connection. More...
 
virtual UtlBoolean getTermConnectionState (const char *callId, const char *address, const char *terminal, int &state)
 Get the terminal connection state for the specified terminal connection. More...
 
UtlBoolean getNextSipCseq (const char *callId, const char *remoteAddress, int &nextCseq)
 
void printCalls ()
 
void setOutGoingCallType (int callType)
 
int getTransferType ()
 
virtual PtStatus validateAddress (UtlString &address)
 
virtual OsStatus getFromField (const char *callId, const char *remoteAddress, UtlString &fromField)
 Deprecated, use getSession. More...
 
virtual OsStatus getToField (const char *callId, const char *remoteAddress, UtlString &toField)
 Deprecated, use getSession. More...
 
virtual OsStatus getCodecCPUCostCall (const char *callId, int &cost)
 Gets the CPU cost for an individual connection within the specified call. More...
 
virtual OsStatus getCodecCPULimitCall (const char *callId, int &cost)
 Gets the CPU cost for an individual connection within the specified call. More...
 
virtual void getCalls (int &currentCalls, int &maxCalls)
 
virtual OsStatus getLocalContactAddresses (const char *callid, SIPX_CONTACT_ADDRESS addresses[], size_t nMaxAddresses, size_t &nActaulAddresses)
 
virtual CpMediaInterfaceFactory * getMediaInterfaceFactory ()
 
virtual int getMediaConnectionId (const char *szCallId, const char *remoteAddress, void **ppInstData=NULL)
 
virtual UtlBoolean getAudioEnergyLevels (const char *szCallId, const char *szRemoteAddress, int &iInputEnergyLevel, int &iOutputEnergyLevel, int &nContributors, unsigned int *pContributorSRCIds, int *pContributorEngeryLevels)
 
virtual UtlBoolean getAudioEnergyLevels (const char *szCallId, int &iInputEnergyLevel, int &iOutputEnergyLevel)
 
virtual UtlBoolean getAudioRtpSourceIDs (const char *szCallId, const char *szRemoteAddress, unsigned int &uiSendingSSRC, unsigned int &uiReceivingSSRC)
 
virtual void getRemoteUserAgent (const char *callId, const char *remoteAddress, UtlString &userAgent)
 
virtual OsStatus getInviteHeaderValue (const char *callId, const char *remoteAddress, const char *headerName, UtlString &headerValueString, UtlBoolean &inviteIsFromRemote, const int headerInstanceIndex)
 
virtual UtlBoolean canAddConnection (const char *szCallId)
 
int getTotalNumberOutgoingCalls ()
 
int getTotalNumberIncomingCalls ()
 
virtual void onCallDestroy (CpCall *pCall)
 
virtual void yieldFocus (CpCall *call)
 
- Public Member Functions inherited from CpCallManager
 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. More...
 
virtual ~CpCallManager ()
 Destructor. More...
 
virtual void setDoNotDisturb (int flag)
 do-not-disturb flag More...
 
virtual void setMessageWaiting (int flag)
 msg waiting flag More...
 
virtual void setOfferedTimeout (int millisec)
 offered time-out for all incoming calls More...
 
virtual void enableIce (UtlBoolean bEnable)
 
virtual void setVoiceQualityReportTarget (const char *szTargetSipUrl)
 Set the target sip url for voice quality reports. More...
 
virtual UtlBoolean isIceEnabled () const
 
virtual UtlBoolean getVoiceQualityReportTarget (UtlString &reportSipUrl)
 Get the target sip url for voice quality reports. More...
 
virtual void getLocalAddress (UtlString &address)
 Get the configured local address. More...
 
virtual void getNewCallId (UtlString *callId)
 For internal use only. More...
 
void getNewSessionId (UtlString *sessionId)
 For internal use only. More...
 
int getNewMetaEventId ()
 For internal use only. More...
 

Private Member Functions

void pushCall (CpCall *call)
 
CpCallpopCall ()
 
CpCallremoveCall (CpCall *call)
 
int getCallStackSize ()
 
UtlBoolean changeCallFocus (CpCall *callToTakeFocus)
 
CpCallfindHandlingCall (const char *callId)
 
CpCallfindHandlingCall (int callIndex)
 
CpCallfindHandlingCall (const OsMsg &eventMessage)
 
CpCallfindFirstQueuedCall ()
 
void getCodecs (int &numCodecs, SdpCodec **&codecArray)
 
void addHistoryEvent (const char *messageLogString)
 
void doHold ()
 
OsStatus doCreateCall (const char *callId, int metaEventId=0, int metaEventType=PtEvent::META_EVENT_NONE, int numMetaEventCalls=0, const char *metaEventCallIds[]=NULL, UtlBoolean assumeFocusIfNoInfocusCall=TRUE)
 
void doConnect (const char *callId, const char *addressUrl, const char *szDesiredConnectionCallId, 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 *pTransport=NULL, const RtpTransportOptions rtpTransportOptions=RTP_TRANSPORT_UDP)
 
void doEnableStun (const UtlString &szStunServer, int iServerPort, int iKeepAlivePeriodSecs, OsNotification *pNotification)
 
void doEnableTurn (const UtlString &turnServer, int iTurnPort, const UtlString &turnUsername, const UtlString &szTurnPassword, int iKeepAlivePeriodSecs)
 
 CallManager (const CallManager &rCallManager)
 
CallManageroperator= (const CallManager &rhs)
 

Private Attributes

UtlString mOutboundLine
 
UtlBoolean dialing
 
UtlBoolean mOffHook
 
UtlBoolean speakerOn
 
UtlBoolean flashPending
 
SipUserAgent * sipUserAgent
 
int mSipSessionReinviteTimer
 
CpCallinfocusCall
 
UtlSList callStack
 
UtlString mDialString
 
int mOutGoingCallType
 
PtMGCP * mpMgcpStackTask
 
int mNumDialPlanDigits
 
int mHoldType
 
SdpCodecList * mpCodecFactory
 
int mTransferType
 
UtlString mLocale
 
int mMessageEventCount
 
int mnTotalIncomingCalls
 
int mnTotalOutgoingCalls
 
int mExpeditedIpTos
 
UtlString mCallManagerHistory [CP_CALL_HISTORY_LENGTH]
 
UtlBoolean mIsEarlyMediaFor180
 
SipLineMgr * mpLineMgrTask
 
UtlBoolean mIsRequredUserIdMatch
 
volatile int mMaxCalls
 
UtlString mStunServer
 
int mStunPort
 
int mStunKeepAlivePeriodSecs
 
UtlString mTurnServer
 
int mTurnPort
 
UtlString mTurnUsername
 
UtlString mTurnPassword
 
int mTurnKeepAlivePeriodSecs
 
CpMediaInterfaceFactory * mpMediaFactory
 

Additional Inherited Members

- Public Types inherited from CpCallManager
enum  EventSubTypes {
  CP_UNSPECIFIED = SipMessage::NET_UNSPECIFIED, CP_SIP_MESSAGE = SipMessage::NET_SIP_MESSAGE, CP_CALL_EXITED, CP_DIAL_STRING,
  CP_FOCUS_CALL, CP_HOLD_CALL, CP_OFF_HOLD_CALL, CP_DEQUEUED_CALL,
  CP_MGCP_MESSAGE, CP_MGCP_CAPS_MESSAGE, CP_YIELD_FOCUS, CP_GET_FOCUS,
  CP_CREATE_CALL, CP_GET_CALLS, CP_CONNECT, CP_SINGLE_CALL_TRANSFER,
  CP_BLIND_TRANSFER, CP_CONSULT_TRANSFER, CP_TRANSFER_CONNECTION, CP_TRANSFER_CONNECTION_STATUS,
  CP_TRANSFEREE_CONNECTION, CP_TRANSFEREE_CONNECTION_STATUS, CP_DROP, CP_DROP_CONNECTION,
  CP_FORCE_DROP_CONNECTION, CP_ANSWER_CONNECTION, CP_ACCEPT_CONNECTION, CP_REJECT_CONNECTION,
  CP_REDIRECT_CONNECTION, CP_GET_NUM_CONNECTIONS, CP_GET_CONNECTIONS, CP_GET_CALLED_ADDRESSES,
  CP_GET_CALLING_ADDRESSES, CP_START_TONE_TERM_CONNECTION, CP_STOP_TONE_TERM_CONNECTION, CP_PLAY_AUDIO_TERM_CONNECTION,
  CP_STOP_AUDIO_TERM_CONNECTION, CP_GET_NUM_TERM_CONNECTIONS, CP_GET_TERM_CONNECTIONS, CP_IS_LOCAL_TERM_CONNECTION,
  CP_HOLD_TERM_CONNECTION, CP_UNHOLD_TERM_CONNECTION, CP_UNHOLD_LOCAL_TERM_CONNECTION, CP_HOLD_LOCAL_TERM_CONNECTION,
  CP_OFFERING_EXPIRED, CP_RINGING_EXPIRED, CP_GET_CALLSTATE, CP_GET_CONNECTIONSTATE,
  CP_GET_TERMINALCONNECTIONSTATE, CP_GET_SESSION, CP_HOLD_ALL_TERM_CONNECTIONS, CP_UNHOLD_ALL_TERM_CONNECTIONS,
  CP_CANCEL_TIMER, CP_GET_NEXT_CSEQ, CP_PLAY_BUFFER_TERM_CONNECTION, CP_CREATE_PLAYER,
  CP_DESTROY_PLAYER, CP_CREATE_PLAYLIST_PLAYER, CP_DESTROY_PLAYLIST_PLAYER, CP_CREATE_QUEUE_PLAYER,
  CP_DESTROY_QUEUE_PLAYER, CP_RENEGOTIATE_CODECS_CONNECTION, CP_RENEGOTIATE_CODECS_ALL_CONNECTIONS, CP_SET_CODEC_CPU_LIMIT,
  CP_GET_CODEC_CPU_COST, CP_GET_CODEC_CPU_LIMIT, CP_SET_INBOUND_CODEC_CPU_LIMIT, CP_SET_OUTBOUND_LINE,
  CP_GET_LOCAL_CONTACTS, CP_OUTGOING_INFO, CP_GET_MEDIA_CONNECTION_ID, CP_ENABLE_STUN,
  CP_ENABLE_TURN, CP_GET_CAN_ADD_PARTY, CP_SPLIT_CONNECTION, CP_JOIN_CONNECTION,
  CP_CONSULT_TRANSFER_ADDRESS, CP_START_TONE_CONNECTION, CP_STOP_TONE_CONNECTION, CP_PLAY_AUDIO_CONNECTION,
  CP_STOP_AUDIO_CONNECTION, CP_TRANSFER_OTHER_PARTY_HOLD, CP_TRANSFER_OTHER_PARTY_JOIN, CP_TRANSFER_OTHER_PARTY_UNHOLD,
  CP_GET_MEDIA_ENERGY_LEVELS, CP_GET_CALL_MEDIA_ENERGY_LEVELS, CP_GET_MEDIA_RTP_SOURCE_IDS, CP_RECORD_AUDIO_CONNECTION_START,
  CP_RECORD_AUDIO_CONNECTION_PAUSE, CP_RECORD_AUDIO_CONNECTION_RESUME, CP_RECORD_AUDIO_CONNECTION_STOP, CP_RECORD_BUFFER_AUDIO_CONNECTION_START,
  CP_RECORD_BUFFER_AUDIO_CONNECTION_STOP, CP_LIMIT_CODEC_PREFERENCES, CP_SILENT_REMOTE_HOLD, CP_GET_USERAGENT,
  CP_FLOWGRAPH_MESSAGE, CP_SET_MIC_GAIN, CP_SET_MEDIA_PASS_THROUGH, CP_CREATE_MEDIA_CONNECTION,
  CP_SET_RTP_DESTINATION, CP_START_RTP_SEND, CP_STOP_RTP_SEND, CP_LIMIT_CODECS,
  CP_SET_OUTPUT_MIX_WEIGHT, CP_GET_INVITE_HEADER_VALUE
}
 
enum  CallTypes { SIP_CALL = 0, MGCP_CALL }
 
enum  CallHoldType { NEAR_END_HOLD = 0, FAR_END_HOLD }
 
enum  CpStatus {
  CP_SUCCESS = 0, CP_FAILED, CP_INVALID_IP_ADDRESS, CP_INVALID_SIP_DIRECTORY_SERVER,
  CP_INVALID_SIP_URL
}
 
- Static Public Member Functions inherited from CpCallManager
static void getEventSubTypeString (EventSubTypes type, UtlString &typeString)
 
static void getNewCallId (const char *callIdPrefix, UtlString *callId)
 Generate a new Call-Id with the specified prefix. More...
 
- Protected Member Functions inherited from CpCallManager
virtual CpCallfindCall (const char *callId)
 
int aquireCallIndex ()
 
void releaseCallIndex (int callIndex)
 
virtual void appendCall (CpCall *call)
 
- Protected Attributes inherited from CpCallManager
OsMutex mManagerMutex
 
OsRWMutex mCallListMutex
 
UtlHashBag mCallIndices
 
UtlString mLocalAddress
 
UtlString mPublicAddress
 
int mRtpPortStart
 
int mRtpPortEnd
 
int mLineAvailableBehavior
 
UtlString mForwardUnconditional
 
int mLineBusyBehavior
 
UtlString mSipForwardOnBusy
 
int mNoAnswerTimeout
 
UtlString mForwardOnNoAnswer
 
int mDoNotDisturbFlag
 
int mMsgWaitingFlag
 
int mOfferedTimeOut
 
int mInviteExpireSeconds
 
int mDefaultSampleRate
 for flowgraph creation More...
 
- Static Protected Attributes inherited from CpCallManager
static OsMutex mCallNumMutex
 

Constructor & Destructor Documentation

CallManager ( UtlBoolean  isRequiredUserIdMatch,
SipLineMgr *  lineMgrTask,
UtlBoolean  isEarlyMediaFor180Enabled,
SdpCodecList *  pCodecFactory,
int  rtpPortStart,
int  rtpPortEnd,
const char *  localAddress,
const char *  publicAddress,
SipUserAgent *  userAgent,
int  sipSessionReinviteTimer,
PtMGCP *  mgcpStackTask,
const char *  defaultCallExtension,
int  availableBehavior,
const char *  unconditionalForwardUrl,
int  forwardOnNoAnswerSeconds,
const char *  forwardOnNoAnswerUrl,
int  busyBehavior,
const char *  sipForwardOnBusyUrl,
OsConfigDb *  speedNums,
CallTypes  phonesetOutgoingCallProtocol,
int  numDialPlanDigits,
int  holdType,
int  offeringDelay,
const char *  pLocal,
int  inviteExpireSeconds,
int  expeditedIpTos,
int  maxCalls,
CpMediaInterfaceFactory *  pMediaFactory,
int  internalSamplerate 
)
~CallManager ( )
virtual
CallManager ( const CallManager rCallManager)
private

Member Function Documentation

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 
)
virtual

Accept the incoming connection.

Progress the connection from the OFFERING state to the RINGING state. This causes a SIP 180 Ringing provisional response to be sent.

Implements CpCallManager.

void addHistoryEvent ( const char *  messageLogString)
private
void answerTerminalConnection ( const char *  callId,
const char *  address,
const char *  terminalId,
const void *  pDisplay = NULL,
const void *  pSecurity = NULL 
)
virtual

Answer the incoming terminal connection.

Progress the connection from the OFFERING or RINGING state to the ESTABLISHED state and also creating the terminal connection (with SIP a 200 OK response is sent).

Implements CpCallManager.

void audioChannelPlay ( const char *  callId,
const char *  szRemoteAddress,
const char *  audioUrl,
UtlBoolean  repeat,
UtlBoolean  local,
UtlBoolean  remote,
UtlBoolean  mixWithMic = false,
int  downScaling = 100 
)
virtual

Deprecated, use the player controls.

Direct the media subsystem to play audio from an external source accessed via a URL.

Implements CpCallManager.

OsStatus audioChannelRecordBufferStart ( const char *  callId,
const char *  szRemoteAddress,
const char *  pBuffer,
const int  bufferSize,
const int  bufferType,
const int  maxRecordTime,
const int  maxSilence 
)
virtual
OsStatus audioChannelRecordBufferStop ( const char *  callId,
const char *  szRemoteAddress 
)
virtual
OsStatus audioChannelRecordPause ( const char *  callId,
const char *  szRemoteAddress 
)
virtual

Pause a file recording that is already started.

OsStatus audioChannelRecordResume ( const char *  callId,
const char *  szRemoteAddress 
)
virtual

Resume a file recording that is paused.

OsStatus audioChannelRecordStart ( const char *  callId,
const char *  szRemoteAddress,
const char *  szFile,
const CpMediaInterface::CpAudioFileFormat  recordFormat = CpMediaInterface::CP_WAVE_PCM_16,
const UtlBoolean  appendToFile = FALSE,
const int  numChannels = 1 
)
virtual

OsStatus audioChannelRecordStop ( const char *  callId,
const char *  szRemoteAddress 
)
virtual
void audioChannelStop ( const char *  callId,
const char *  szRemoteAddress 
)
virtual

Deprecated, use the player controls.

Direct the media subsystem to stop playing audio

Implements CpCallManager.

void audioPlay ( const char *  callId,
const char *  audioUrl,
UtlBoolean  repeat,
UtlBoolean  local,
UtlBoolean  remote,
UtlBoolean  mixWithMic = false,
int  downScaling = 100 
)
virtual

Deprecated, use the player controls.

Direct the media subsystem to play audio from an external source accessed via a URL.

Implements CpCallManager.

void audioStop ( const char *  callId)
virtual

Deprecated, use the player controls.

Direct the media subsystem to stop playing audio.

Implements CpCallManager.

void bufferPlay ( const char *  callId,
const void *  audiobuf,
int  bufSize,
int  type,
UtlBoolean  repeat,
UtlBoolean  local,
UtlBoolean  remote 
)
virtual

Deprecated, use the player controls.

Direct the media subsystem to play audio from a data buffer.

Implements CpCallManager.

UtlBoolean canAddConnection ( const char *  szCallId)
virtual
UtlBoolean changeCallFocus ( CpCall callToTakeFocus)
private
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 
)
virtual

Initiates a new outbound connection to the specified address.

This may be invoked multiple times on a call to create bridged conference.

Implements CpCallManager.

PtStatus consult ( const char *  idleTargetCallId,
const char *  activeOriginalCallId,
const char *  originalCallControllerAddress,
const char *  originalCallControllerTerminalId,
const char *  consultAddressUrl,
UtlString &  targetCallControllerAddress,
UtlString &  targetCallConsultAddress 
)
virtual

Create a new call and associate it with an existing call.

This is usually done to create the consultative call as a precursor to performing a transfer.

Implements CpCallManager.

void createCall ( UtlString *  callId,
int  metaEventId = 0,
int  metaEventType = PtEvent::META_EVENT_NONE,
int  numMetaEventCalls = 0,
const char *  callIds[] = NULL,
UtlBoolean  assumeFocusIfNoInfocusCall = TRUE 
)
virtual

Creates a new call with an implicit local connection.

Implements CpCallManager.

OsStatus createMediaConnection ( const UtlString &  callId,
int &  connectionId 
)
virtual
void createPlayer ( const char *  callid,
MpStreamPlaylistPlayer **  ppPlayer 
)
virtual

Create a MpStreamPlaylistPlayer media player associated with.

the specified call. The media player can subsequently be used to play media such as streamed audio to the connections (local and remote) in this call. The streamed audio source can be a set on one or more audio URLs that correspond to audio snippets that the player will stream in a concatenated set.

Implements CpCallManager.

void createPlayer ( int  type,
const char *  callid,
const char *  szStream,
int  flags,
MpStreamPlayer **  ppPlayer 
)
virtual

Create a media player associated with the specified call.

The media player can subsequently be used to play media such as streamed audio to the connections (local and remote) in this call. The streamed audio source can be a single audio URL or a set of URLs that correspond to audio snippets that the player will stream in a concatenated set. Currently two types of media players are supported:

1) A simple player that buffers some of the media and then starts playing a single media source (URL or stream).
2) A queued player that supports two buffered play lists where there is one active play list that can be played, paused or stopped. The active buffer list can be changed on the fly and sources can be added to either buffer list. The effect of this player is similar to graphical double buffering where one buffer can be filling while the other is playing.

Implements CpCallManager.

void destroyPlayer ( const char *  callid,
MpStreamPlaylistPlayer *  pPlayer 
)
virtual

Destroy the media player associated with a call.

Implements CpCallManager.

void destroyPlayer ( int  type,
const char *  callid,
MpStreamPlayer *  pPlayer 
)
virtual

Destroy the media player associated with a call.

Implements CpCallManager.

void dialString ( const char *  url)
virtual

Deprecated, use connect.

Implements CpCallManager.

UtlBoolean disconnectConnection ( const char *  callId,
const char *  addressUrl 
)
virtual

Implements CpCallManager.

void doConnect ( const char *  callId,
const char *  addressUrl,
const char *  szDesiredConnectionCallId,
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 pTransport = NULL,
const RtpTransportOptions  rtpTransportOptions = RTP_TRANSPORT_UDP 
)
private
OsStatus doCreateCall ( const char *  callId,
int  metaEventId = 0,
int  metaEventType = PtEvent::META_EVENT_NONE,
int  numMetaEventCalls = 0,
const char *  metaEventCallIds[] = NULL,
UtlBoolean  assumeFocusIfNoInfocusCall = TRUE 
)
private
void doEnableStun ( const UtlString &  szStunServer,
int  iServerPort,
int  iKeepAlivePeriodSecs,
OsNotification *  pNotification 
)
private
void doEnableTurn ( const UtlString &  turnServer,
int  iTurnPort,
const UtlString &  turnUsername,
const UtlString &  szTurnPassword,
int  iKeepAlivePeriodSecs 
)
private
void doGetFocus ( CpCall call)
virtual

Implements CpCallManager.

void doHold ( )
private
void drop ( const char *  callId)
virtual

Drop this call and disconnect all connections associated with it.

Implements CpCallManager.

void dropConnection ( const char *  callId,
const char *  address 
)
virtual

Drop the specifed connection.

The approriate disconnect signal is sent (e.g. with SIP BYE or CANCEL). The connection state progresses to disconnected and the connection is removed.

Implements CpCallManager.

void enableStun ( const char *  szStunServer,
int  iStunPort,
int  iKeepAlivePeriodSecs,
OsNotification *  pNotification = NULL 
)
virtual
void enableTurn ( const char *  szTurnServer,
int  iTurnPort,
const char *  szUsername,
const char *  szPassword,
int  iKeepAlivePeriodSecs 
)
virtual
CpCall * findFirstQueuedCall ( )
private
CpCall * findHandlingCall ( const char *  callId)
private
CpCall * findHandlingCall ( int  callIndex)
private
CpCall * findHandlingCall ( const OsMsg &  eventMessage)
private
UtlBoolean getAudioEnergyLevels ( const char *  szCallId,
const char *  szRemoteAddress,
int &  iInputEnergyLevel,
int &  iOutputEnergyLevel,
int &  nContributors,
unsigned int *  pContributorSRCIds,
int *  pContributorEngeryLevels 
)
virtual
UtlBoolean getAudioEnergyLevels ( const char *  szCallId,
int &  iInputEnergyLevel,
int &  iOutputEnergyLevel 
)
virtual
UtlBoolean getAudioRtpSourceIDs ( const char *  szCallId,
const char *  szRemoteAddress,
unsigned int &  uiSendingSSRC,
unsigned int &  uiReceivingSSRC 
)
virtual
OsStatus getCalledAddresses ( const char *  callId,
int  maxConnections,
int &  numConnections,
UtlString  addresses[] 
)
virtual

Query the list of addresses or handles for the connections in the specified call that were set up as outbound connections.

Implements CpCallManager.

OsStatus getCallingAddresses ( const char *  callId,
int  maxConnections,
int &  numConnections,
UtlString  addresses[] 
)
virtual

Query the list of addresses or handles for the connections in the specified call that were set up as inbound connections.

Implements CpCallManager.

OsStatus getCalls ( int  maxCalls,
int &  numCalls,
UtlString  callIds[] 
)
virtual

Gets the list of names or identifiers for all of the existing calls.

Note: Do not assume that the callIds returned are the same as those used in the signalling world (e.g. SIP call-id for a connection may not be the same as the callId used to represent the call or connections)

Implements CpCallManager.

void getCalls ( int &  currentCalls,
int &  maxCalls 
)
virtual
int getCallStackSize ( )
private
UtlBoolean getCallState ( const char *  callId,
int &  state 
)
virtual

Get the state of the identified call.

Implements CpCallManager.

OsStatus getCodecCPUCostCall ( const char *  callId,
int &  cost 
)
virtual

Gets the CPU cost for an individual connection within the specified call.

This cost represents the current CPU cost for codec processing for the connection. However, the actual CPU usage may be less depending on whether the connection is on hold, the other party is silent, etc.

Implements CpCallManager.

OsStatus getCodecCPULimitCall ( const char *  callId,
int &  cost 
)
virtual

Gets the CPU cost for an individual connection within the specified call.

This cost represents the maximum expected CPU cost for codec processing for the connection. However, the actual CPU usage may be less depending on whether the connection is on hold, the other party is silent, etc.

Implements CpCallManager.

void getCodecs ( int &  numCodecs,
SdpCodec **&  codecArray 
)
private
OsStatus getConnections ( const char *  callId,
int  maxConnections,
int &  numConnections,
UtlString  addresses[] 
)
virtual

Query the list of addresses or handles for the connections in the specified call.

Implements CpCallManager.

UtlBoolean getConnectionState ( const char *  callId,
const char *  remoteAddress,
int &  state 
)
virtual

Get the connection state for the specified connection.

Note: one should generally avoid polling of the state as many race conditions occur. The best way to get the state is to create a listener that recieves state change notification events.

Implements CpCallManager.

OsStatus getFromField ( const char *  callId,
const char *  remoteAddress,
UtlString &  fromField 
)
virtual

Deprecated, use getSession.

Implements CpCallManager.

OsStatus getInviteHeaderValue ( const char *  callId,
const char *  remoteAddress,
const char *  headerName,
UtlString &  headerValueString,
UtlBoolean &  inviteIsFromRemote,
const int  headerInstanceIndex 
)
virtual
OsStatus getLocalContactAddresses ( const char *  callid,
SIPX_CONTACT_ADDRESS  addresses[],
size_t  nMaxAddresses,
size_t &  nActaulAddresses 
)
virtual
int getMediaConnectionId ( const char *  szCallId,
const char *  remoteAddress,
void **  ppInstData = NULL 
)
virtual
CpMediaInterfaceFactory * getMediaInterfaceFactory ( )
virtual
UtlBoolean getNextSipCseq ( const char *  callId,
const char *  remoteAddress,
int &  nextCseq 
)
void getNumConnections ( const char *  callId,
int &  numConnections 
)
virtual

Query the number of connections in the specified call.

Implements CpCallManager.

int getNumLines ( )
virtual

Gets the number of lines made available by line manager.

Implements CpCallManager.

void getNumTerminalConnections ( const char *  callId,
const char *  address,
int &  numTerminalConnections 
)
virtual

Query the number of terminal connections in the specified call.

Implements CpCallManager.

OsStatus getOutboundAddresses ( int  maxAddressesRequested,
int &  numAddressesAvailable,
UtlString **  addresses 
)
virtual

maxAddressesRequested is the number of addresses requested if available numAddressesAvailable is the actual number of addresses available.

"addresses" is a pre-allocated array of size maxAddressesRequested

Implements CpCallManager.

void getRemoteUserAgent ( const char *  callId,
const char *  remoteAddress,
UtlString &  userAgent 
)
virtual

Implements CpCallManager.

OsStatus getSession ( const char *  callId,
const char *  address,
SipSession &  session 
)
virtual

Get the SIP session information for the specified terminal connection.

Implements CpCallManager.

OsStatus getSipDialog ( const char *  callId,
const char *  address,
SipDialog &  dialog 
)
virtual

Get the SIP dialog information for the specified terminal connection.

Implements CpCallManager.

UtlBoolean getTermConnectionState ( const char *  callId,
const char *  address,
const char *  terminal,
int &  state 
)
virtual

Get the terminal connection state for the specified terminal connection.

Note: one should generally avoid polling of the state as many race conditions occur. The best way to get the state is to create a listener that recieves state change notification events.

Implements CpCallManager.

OsStatus getTerminalConnections ( const char *  callId,
const char *  address,
int  maxTerminalConnections,
int &  numTerminalConnections,
UtlString  terminalNames[] 
)
virtual

Get the list of terminal connection identifiers for the specified call.

Implements CpCallManager.

OsStatus getToField ( const char *  callId,
const char *  remoteAddress,
UtlString &  toField 
)
virtual

Deprecated, use getSession.

Implements CpCallManager.

int getTotalNumberIncomingCalls ( )
inline
int getTotalNumberOutgoingCalls ( )
inline
int getTransferType ( )
UtlBoolean handleMessage ( OsMsg &  eventMessage)
virtual

For internal use only.

Implements CpCallManager.

void holdAllTerminalConnections ( const char *  callId)
virtual

Convenience method to put all of the terminal connections in the specified call on hold.

Implements CpCallManager.

void holdLocalTerminalConnection ( const char *  callId)
virtual

Convenience method to put the local terminal connection on hold.

Implements CpCallManager.

void holdTerminalConnection ( const char *  callId,
const char *  address,
const char *  terminalId 
)
virtual

Put the specified terminal connection on hold.

Change the terminal connection state from TALKING to HELD. (With SIP a re-INVITE message is sent with SDP indicating no media should be sent.)

Implements CpCallManager.

UtlBoolean isTerminalConnectionLocal ( const char *  callId,
const char *  address,
const char *  terminalId 
)
virtual

Query whether the specified terminal connection is a local or remote connection.

Implements CpCallManager.

void limitCodecPreferences ( const char *  callId,
const char *  remoteAddr,
const int  audioBandwidth,
const int  videoBandwidth,
const char *  szVideoCodecName 
)
virtual

Rebuild codec factory on the fly with new audio codec requirements and one specific video codec.

Implements CpCallManager.

void limitCodecPreferences ( const char *  callId,
const int  audioBandwidth,
const int  videoBandwidth,
const char *  szVideoCodecName 
)
virtual
void limitCodecs ( const char *  callId,
const char *  remoteAddr,
const char *  codecNames 
)
virtual

Further limit the set of codecs to use for the call to the given set of codecs The codecs named, must be a subset of those enabled for the call.

Implements CpCallManager.

void onCallDestroy ( CpCall pCall)
virtual

Implements CpCallManager.

CallManager & operator= ( const CallManager rhs)
private
CpCall * popCall ( )
private
void printCalls ( )
void pushCall ( CpCall call)
privatevirtual

Reimplemented from CpCallManager.

PtStatus redirectConnection ( const char *  callId,
const char *  address,
const char *  forwardAddressUrl 
)
virtual

Redirect the incoming connection.

Progress the connection from the OFFERING state to the FAILED state. This causes a SIP 302 Moved Temporarily response to be sent with the specified contact URI.

Implements CpCallManager.

void rejectConnection ( const char *  callId,
const char *  address,
int  errorCode = 0,
const char *  errorText = "" 
)
virtual

Reject the incoming connection.

Progress the connection from the OFFERING state to the FAILED state with the cause of busy. With SIP this causes a 486 Busy Here response to be sent.

Implements CpCallManager.

CpCall * removeCall ( CpCall call)
private
void renegotiateCodecsAllTerminalConnections ( const char *  callId)
virtual

Convenience method to renegotiate the codecs for all of the terminal connections in the specified call.

Implements CpCallManager.

void renegotiateCodecsTerminalConnection ( const char *  callId,
const char *  addresss,
const char *  terminalId 
)
virtual

Renegotiate the codecs to be use for the sepcified terminal connection.

This is typically performed after a capabilities change for the terminal connection (for example, addition or removal of a codec type). (Sends a SIP re-INVITE.)

Implements CpCallManager.

void requestShutdown ( void  )
virtual
void sendFlowgraphMessage ( const char *  callId,
OsMsg &  flowgraphMessage 
)
virtual
UtlBoolean sendInfo ( const char *  callId,
const char *  szRemoteAddress,
const char *  szContentType,
const size_t  nContenLength,
const char *  szContent 
)
virtual
OsStatus setCodecCPULimitCall ( const char *  callId,
int  limit,
UtlBoolean  bRenegotiate 
)
virtual

Sets the CPU codec limit for a call.

Each connection within the call may only use codecs whose CPU requirements are less than or equal to the specified limit.

Implements CpCallManager.

OsStatus setInboundCodecCPULimit ( int  limit)
virtual

Set the call codec CPU limit for inbound connections in a call.

Implements CpCallManager.

void setMaxCalls ( int  maxCalls)
virtual
OsStatus setMediaPassThrough ( const UtlString &  callId,
const UtlString &  remoteAddress,
CpMediaInterface::MEDIA_STREAM_TYPE  mediaType,
int  mediaTypeStreamIndex,
const UtlString &  mediaRecieveAddress,
int  rtpPort,
int  rtcpPort 
)
virtual
OsStatus setMicGain ( const char *  callId,
float  gain 
)
virtual

Sets the Mic gain.

Implements CpCallManager.

void setOutboundLine ( const char *  lineUrl)
virtual

Set the default address for the local connection.

This is used to set the calling ID information when making an outbound call.

Implements CpCallManager.

void setOutboundLineForCall ( const char *  callId,
const char *  address,
SIPX_CONTACT_TYPE  eType = CONTACT_AUTO 
)
virtual

Implements CpCallManager.

void setOutGoingCallType ( int  callType)
OsStatus setOutputMixWeight ( const char *  callId,
int  bridgeOutputIndex,
float  gain 
)
virtual

Set gain for all inputs to the given output on bridge.

OsStatus setRtpDestination ( const UtlString &  callId,
int  connectionId,
CpMediaInterface::MEDIA_STREAM_TYPE  mediaType,
int  mediaTypeStreamIndex,
const UtlString &  mediaRecieveAddress,
int  rtpPort,
int  rtcpPort 
)
virtual
void setTransferType ( int  type)
virtual

Deprecated.

Implements CpCallManager.

void silentRemoteHold ( const char *  callId)
virtual
PtStatus split ( const char *  szSourceCallId,
const char *  szSourceAddress,
const char *  szTargetCallId 
)
virtual
OsStatus startRtpSend ( const UtlString &  callId,
int  connectionId,
const SdpCodecList &  codecList 
)
virtual
OsStatus stopRtpSend ( const UtlString &  callId,
int  connectionId 
)
virtual
void toneChannelStart ( const char *  callId,
const char *  szRemoteAddress,
int  toneId,
UtlBoolean  local,
UtlBoolean  remote 
)
virtual

Direct the media subsystem to begin playing a DTMF or progress tone.

Implements CpCallManager.

void toneChannelStop ( const char *  callId,
const char *  szRemoteAddress 
)
virtual

Direct the media subsystem to stop playing a DTMF or progress tone.

Implements CpCallManager.

void toneStart ( const char *  callId,
int  toneId,
UtlBoolean  local,
UtlBoolean  remote 
)
virtual

Direct the media subsystem to begin playing a DTMF or progress tone.

Implements CpCallManager.

void toneStop ( const char *  callId)
virtual

Direct the media subsystem to stop playing a DTMF or progress tone.

Implements CpCallManager.

PtStatus transfer ( const char *  targetCallId,
const char *  originalCallId 
)
virtual

Consultative transfer.

This transfer method is used to perform the transfer after completing a consultative call. The consultative call must be created using the consult() method The couple targetCallId & targetConnectionAddress define the transfer target connection in the resulting new transfer target call

Implements CpCallManager.

PtStatus transfer ( const char *  sourceCallId,
const char *  sourceAddress,
const char *  targetCallId,
const char *  targetAddress 
)
PtStatus transfer_blind ( const char *  callId,
const char *  transferToUrl,
UtlString *  targetCallId,
UtlString *  targetConnectionAddress = NULL 
)
virtual

Blind transfer.

Implements CpCallManager.

void unhold ( const char *  callId)
virtual

Deprecated, use holdAllTerminalConnections.

Implements CpCallManager.

void unholdAllTerminalConnections ( const char *  callId)
virtual

Convenience method to take all of the terminal connections in the specified call off hold.

Implements CpCallManager.

void unholdLocalTerminalConnection ( const char *  callId)
virtual

Take the specified terminal connection off hold,.

Change the terminal connection state from HELD to TALKING. (With SIP a re-INVITE message is sent with SDP indicating media should be sent.)

Implements CpCallManager.

void unholdTerminalConnection ( const char *  callId,
const char *  addresss,
const char *  terminalId 
)
virtual

Convenience method to take the local terminal connection off hold.

Implements CpCallManager.

PtStatus validateAddress ( UtlString &  address)
virtual

Implements CpCallManager.

void yieldFocus ( CpCall call)
virtual

Implements CpCallManager.

Member Data Documentation

UtlSList callStack
private
UtlBoolean dialing
private
UtlBoolean flashPending
private
CpCall* infocusCall
private
UtlString mCallManagerHistory[CP_CALL_HISTORY_LENGTH]
private
UtlString mDialString
private
int mExpeditedIpTos
private
int mHoldType
private
UtlBoolean mIsEarlyMediaFor180
private
UtlBoolean mIsRequredUserIdMatch
private
UtlString mLocale
private
volatile int mMaxCalls
private
int mMessageEventCount
private
int mnTotalIncomingCalls
private
int mnTotalOutgoingCalls
private
int mNumDialPlanDigits
private
UtlBoolean mOffHook
private
UtlString mOutboundLine
private
int mOutGoingCallType
private
SdpCodecList* mpCodecFactory
private
SipLineMgr* mpLineMgrTask
private
CpMediaInterfaceFactory* mpMediaFactory
private
PtMGCP* mpMgcpStackTask
private
int mSipSessionReinviteTimer
private
int mStunKeepAlivePeriodSecs
private
int mStunPort
private
UtlString mStunServer
private
int mTransferType
private
int mTurnKeepAlivePeriodSecs
private
UtlString mTurnPassword
private
int mTurnPort
private
UtlString mTurnServer
private
UtlString mTurnUsername
private
SipUserAgent* sipUserAgent
private
UtlBoolean speakerOn
private