⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpcallmanager.h

📁 基于sipfoundy 公司开发的sipx协议API
💻 H
📖 第 1 页 / 共 3 页
字号:
    //! Creates a new call with an implicit local 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;    //! 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)     */    virtual OsStatus getCalls(int maxCalls, int& numCalls,                               UtlString callIds[]) = 0;    //! Initiates a new outbound connection to the specified address.    /*! This may be invoked multiple times on a call to create     * bridged conference.     */    virtual PtStatus connect(const char* callId,                             const char* toAddress,                             const char* fromAddress = NULL,                             const char* desiredConnectionCallId = NULL,                             CONTACT_ID contactId = 0,                             const void* pDisplay = NULL) = 0;    //! 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.     */    virtual PtStatus consult(const char* idleTargetCallId,                             const char* activeOriginalCallId,                             const char* originalCallControllerAddress,                             const char* originalCallControllerTerminalId,                             const char* consultAddressUrl,                             UtlString& targetCallControllerAddress,                             UtlString& targetCallConsultAddress) = 0;    //! Blind transfer    virtual PtStatus transfer_blind(const char* callId,                                    const char* transferToUrl,                                    UtlString* targetCallId,                                    UtlString* targetConnectionAddress = NULL,                                    bool       remoteHoldBeforeTransfer = false) = 0;    //! Consultative transfer    /*! This transfer method is used to perform the transfer after     * completing a consultative call. The consultative call must     * be created using the \e consult() method     * The couple \a targetCallId & \a targetConnectionAddress define     * the transfer target connection in the resulting new transfer     * target call     */    virtual PtStatus transfer(const char* targetCallId,                              const char* originalCallId) = 0;    //! Drop this call and disconnect all connections associated with it.    virtual void drop(const char* callId) = 0;    //! Direct the media subsystem to begin playing a DTMF or progress tone.    virtual void toneStart(const char* callId,                           int toneId,                           UtlBoolean local,                           UtlBoolean remote) = 0;    //! Direct the media subsystem to stop playing a DTMF or progress tone.    virtual void toneStop(const char* callId) = 0;    //! Deprecated, use the player controls    /*! Direct the media subsystem to play audio from an external source     * accessed via a URL.     */    virtual void audioPlay(const char* callId,                           const char* audioUrl,                           UtlBoolean repeat,                           UtlBoolean local,                           UtlBoolean remote) = 0;    //! Deprecated, use the player controls    /*! Direct the media subsystem to play audio from a data buffer.     */    virtual void bufferPlay(const char* callId,                            int audiobuf,                            int bufSize,                            int type,                            UtlBoolean repeat,                            UtlBoolean local,                            UtlBoolean remote) = 0;    //! Deprecated, use the player controls    /*! Direct the media subsystem to stop playing audio.     */    virtual void audioStop(const char* callId) = 0;    //! For internal use    virtual void stopPremiumSound(const char* callId) = 0;    //: Set a media property on the media interface for the given call    /*     * Media interfaces that wish to interoperate should implement the following properties     * and values:     *     * Property Name                  Property Values     * =======================        ===============     * "audioInput1.muteState"        "true", "false" for systems that may have a microphone for each conference or 2-way call     * "audioInput1.device"           same value as szDevice in sipxAudioSetCallInputDevice     * "audioOutput1.deviceType"      "speaker", "ringer" same as sipxAudioEnableSpeaker, but for specific conference or 2-way call     * "audioOutput1.ringerDevice"    same value as szDevice in sipxAudioSetRingerOutputDevice      * "audioOutput1.speakerDevice"   same values as szDevice in sipxAudioSetCallOutputDevice     * "audioOutput1.volume"          string value of iLevel in sipxAudioSetVolume     */    virtual OsStatus setCallMediaProperty(const char* callId,                                          const char* propertyName,                                          const char* propertyValue) = 0;#ifndef EXCLUDE_STREAMING    //! 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.     */    virtual void createPlayer(const char* callid,                              MpStreamPlaylistPlayer** ppPlayer) = 0 ;    //! 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:     * \par     * 1) A simple player that buffers some of the media and then     * starts playing a single media source (URL or stream).     * \par     * 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.     */    virtual void createPlayer(int type,                              const char* callid,                              const char* szStream,                              int flags,                              MpStreamPlayer** ppPlayer) = 0 ;    //! Destroy the media player associated with a call.    virtual void destroyPlayer(const char* callid,                               MpStreamPlaylistPlayer* pPlayer) = 0 ;    //! Destroy the media player associated with a call.    virtual void destroyPlayer(int type,                               const char* callid,                               MpStreamPlayer* pPlayer) = 0 ;#endif  //   #ifndef EXCLUDE_STREAMING    //!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.     */    virtual OsStatus setCodecCPULimitCall(const char* callId,                                          int limit,                                          UtlBoolean bRenegotiate) = 0 ;    //! Set the call codec CPU limit for inbound connections in a call.    virtual OsStatus setInboundCodecCPULimit(int limit) = 0 ;    //@{    //! 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.     */    virtual void acceptConnection(const char* callId,                                  const char* address,                                  CONTACT_TYPE contactType = AUTO,                                  const void* hWnd = NULL) = 0;    virtual void setOutboundLineForCall(const char* callId,                                         const char* address,                                         CONTACT_TYPE eType = AUTO) = 0;    //! 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.     */    virtual void rejectConnection(const char* callId,                                  const char* address) = 0;    //! 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.     */    virtual PtStatus redirectConnection(const char* callId,                                        const char* address,                                        const char* forwardAddressUrl) = 0;    //! 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.     */    virtual void dropConnection(const char* callId,                                const char* address) = 0;    //! Query the number of connections in the specified call.    virtual void getNumConnections(const char* callId,                                    int& numConnections) = 0;    //! Query the list of addresses or handles for the connections    //! in the specified call.    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 that were set up as outbound connections.    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 inbound connections.    virtual OsStatus getCallingAddresses(const char* callId,                                         int maxConnections,                                         int& numConnections,                                         UtlString addresses[]) = 0;    //: Set a media property on the media connection for the given call    /*     * @param callId - call id string for the conference or SIP dialog     * @param remoteAddress - address on the remote leg of the connection on which to set property     * @param propertyName string id for the property to set     * @param propertyValue for the new value of the property     */    virtual OsStatus setConnectionMediaProperty(const char* callId,                                                  const char* remoteAddress,                                                  const char* propertyName,                                                  const char* propertyValue) = 0;    //@}    /** @name Call & Terminal Connection Operations     * This set of methods perform operations on calls and     * terminal connections.     */    //@{    //! 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).     */    virtual void answerTerminalConnection(const char* callId,                                          const char* address,                                          const char* terminalId,                                          const void* pDisplay = NULL) = 0;    //! 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.)      */    virtual void holdTerminalConnection(const char* callId,                                        const char* address,                                        const char* terminalId) = 0;    //! Convenience method to put all of the terminal connections in    //! the specified call on hold.    virtual void holdAllTerminalConnections(const char* callId) = 0;    //! Convenience method to put the local terminal connection on hold.    virtual void holdLocalTerminalConnection(const char* callId) = 0;    //! 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.)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -