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

📄 cpcallmanager.h

📁 基于sipfoundy 公司开发的sipx协议API
💻 H
📖 第 1 页 / 共 3 页
字号:
     */    virtual void unholdLocalTerminalConnection(const char* callId) = 0;    //! Convenience method to take all of the terminal connections in    //! the specified call off hold.    virtual void unholdAllTerminalConnections(const char* callId) = 0;    //! Convenience method to take the local terminal connection off hold.    virtual void unholdTerminalConnection(const char* callId,                                          const char* addresss,                                          const char* terminalId) = 0;    //! 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.)     */    virtual void renegotiateCodecsTerminalConnection(const char* callId,                                                     const char* addresss,                                                     const char* terminalId) = 0;    //! Convenience method to renegotiate the codecs for all of the terminal    //! connections in the specified call.    virtual void renegotiateCodecsAllTerminalConnections(const char* callId) = 0 ;    //! Change the identity used in SIP PAssertedIdentity header for INVITEs sent    /*! Set the SIP AOR which used in the SIP PAssertedIdentity header for     * INVITE requests send from this side.  The callId and remoteAddress     * identity the SIP dialog to which the local identity is to be changed.     * signalNow TRUE indicates that a SIP reINVITE should be forced to occur now     * as opposed when the next reINVITE occurs during a on/off hold operation.     *     * This method is used to change the identity when some local operation      * occurs that does not get reflected in the SIP signalling.  Setting     * the PAssertedIdentity allows the signalling to indicate the the     * identity change has occurred.     */    virtual UtlBoolean setLocalPAssertedIdentity(const char* callId,                                                  const char* remoteAddress,                                                 const char* newPAssertedId,                                                 const UtlBoolean signalNow) = 0;    //! Query the number of terminal connections in the specified call.        virtual void getNumTerminalConnections(const char* callId,                                           const char* address,                                           int& numTerminalConnections) = 0;    //! Get the list of terminal connection identifiers for the specified call.        virtual OsStatus getTerminalConnections(const char* callId,                                            const char* address,                                            int maxTerminalConnections,                                            int& numTerminalConnections,                                            UtlString terminalNames[]) = 0;    //! Query whether the specified terminal connection is a local or remote connection.    virtual UtlBoolean isTerminalConnectionLocal(const char* callId,                                                const char* address,                                                const char* terminalId) = 0;    //! Get the SIP session information for the specified terminal connection.    virtual OsStatus getSession(const char* callId,                                const char* address,                                SipSession& session) = 0;    //! Get the SIP dialog information for the specified terminal connection.    virtual OsStatus getSipDialog(const char* callId,                                  const char* address,                                  SipDialog& dialog) = 0;    //! Get the SipConnection for the specified terminal connection.    virtual OsStatus getInvite(const char* callId,                               const char* address,                               SipMessage& invite) = 0;    //! Send a SIP request in the context of the dialog of the given call/session    /*! The response gets queued to the optional response message queue     */    virtual UtlBoolean sendInDialog(const char* callId,                                    const char* address,                                    SipMessage& request,                                    OsMsgQ* responseQueue = NULL,                                    void* requestListenerData = NULL) = 0;    //@}#ifndef DOXYGEN_SHOULD_SKIP_THIS    /** @name Stimulus based operations DEPRECATED DO NOT USE     */    //@{    //! Deprecated, use holdAllTerminalConnections    virtual void unhold(const char* callId) = 0;    //! Deprecated, use connect    virtual void dialString(const char* url) = 0;    //@}#endif // DOXYGEN_SHOULD_SKIP_THIS        //! address forwarding        virtual void setAddressForwarding(int size, PtAddressForwarding *pForwards);        virtual void cancelAddressForwarding(int size, PtAddressForwarding *pForwards);        //! do-not-disturb flag        virtual void setDoNotDisturb(int flag);        //! msg waiting flag        virtual void setMessageWaiting(int flag);        //! offered time-out for all incoming calls    /*! If a call is not accepted within this timeout period     * it is automatically rejected.     */        virtual void setOfferedTimeout(int millisec);        virtual UtlBoolean disconnectConnection(const char* callId,                                           const char* addressUrl) = 0;    //! Deprecated    virtual void setTransferType(int type) = 0;    virtual void setDelayInDeleteCall(int delayInDeleteCall) = 0;    //: Set the number of seconds to delay in deleting the call    virtual int getDelayInDeleteCall() = 0;    //: Get the number of seconds to delay in deleting the call/* ============================ ACCESSORS ================================= */   /**    * Gets the number of lines made available by line manager.    */   virtual int getNumLines() = 0;  /**   * 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   */   virtual OsStatus getOutboundAddresses(int maxAddressesRequested,                                       int& numAddressesAvailable, UtlString** addresses) = 0;    //! Get the state of the identified call.        virtual UtlBoolean getCallState(const char* callId,                                   int& state) = 0;    //! 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.     */        virtual UtlBoolean getConnectionState(const char* callId,                                                                                const char* remoteAddress,                                                                                int& state) = 0;    //! 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.     */        virtual UtlBoolean getTermConnectionState(const char* callId,                                                                                        const char* address,                                                                                        const char* terminal,                                                                                        int& state) = 0;    /** @name Diagnostic methods for internal use     */    //@{    virtual void startCallStateLog() = 0;    virtual void stopCallStateLog() = 0;    virtual void clearCallStateLog() = 0;    virtual void logCallState(const char* message,                                                                const char* eventId,                                                                const char* cause) = 0;    virtual void getCallStateLog(UtlString& logData) = 0;    //@}    virtual PtStatus validateAddress(UtlString& address) = 0;    //! Deprecated, use getSession        virtual OsStatus getFromField(const char* callId,                                  const char* remoteAddress,                                  UtlString& fromField) = 0;    //! Deprecated, use getSession        virtual OsStatus getToField(const char* callId,                                const char* remoteAddress,                                UtlString& toField) = 0;    //! 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.     */    virtual OsStatus getCodecCPUCostCall(const char* callId,                                         int& cost) = 0;    //! 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.     */    virtual OsStatus getCodecCPULimitCall(const char* callId,                                          int& cost) = 0;    //! Deprecated, use getDtmfEvent        virtual void addToneListener(const char* callId,                                 int pListener) = 0;/* ============================ INQUIRY =================================== */    UtlBoolean isCallStateLoggingEnabled();#ifndef DOXYGEN_SHOULD_SKIP_THIS/* //////////////////////////// PROTECTED ///////////////////////////////// */protected:    /*! Note: you better put a lock with the mCallListMutex around what ever     * you do with call as this method only locks to retrieve.  There is     * nothing that prevents the call from being deleted out from under you.     */    virtual CpCall* findCall(const char* callId);    int aquireCallIndex();    void releaseCallIndex(int callIndex);    virtual void pushCall(CpCall* call);    virtual void appendCall(CpCall* call);    OsMutex mManagerMutex;    OsRWMutex mCallListMutex;    // Mutex to protect mCallNum.    static OsMutex mCallNumMutex;    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;  // The PHONESET_CP_RINGING_EXPIRE_SECONDS parameter,                              // it is used to set the ringing expired timer if there                              // is no Expires header field from an incoming INVITE    OsRWMutex mAddressForwardMutex;        int mAddressForwardingCnt;        PtAddressForwarding *mpAddressForwards;        UtlBoolean mCallStateLogEnabled;        // If true, the call state log is written to the log file        // automatically whenever it gets too large.        UtlBoolean mCallStateLogAutoWrite;    UtlString mCallStateLog;/* //////////////////////////// PRIVATE /////////////////////////////////// */private:    //! Maximum number of request messages    static const int CALLMANAGER_MAX_REQUEST_MSGS;    //! Copy constructor    CpCallManager(const CpCallManager& rCpCallManager);    //! Assignment operator    CpCallManager& operator=(const CpCallManager& rhs);    UtlString mCallIdPrefix;    UtlDList mCallList;    int mLastMetaEventId;    // Every CallManager shares the same call counter for generating Call-IDs.    static INT64 mCallNum;#endif // DOXYGEN_SHOULD_SKIP_THIS};/* ============================ INLINE METHODS ============================ */#endif  // _CpCallManager_h_

⌨️ 快捷键说明

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