📄 sipxtapi.h
字号:
* little endian. * * @param hCall Handle to a call. Call handles are obtained either by * invoking sipxCallCreate or passed to your application through * a listener interface. Audio can only be played in the context * of a call. * @param szBuffer Pointer to the audio data to be played. * @param bufSize Length, in bytes, of the audio data. * @param bufType The audio encoding format for the data as specified * by the SIPX_AUDIO_DATA_FORMAT enumerations. Currently * only RAW_PCM_16 is supported. * @param bRepeat True if the audio is supposed to be played repeatedly * @param bLocal True if the audio is to be rendered locally. * @param bRemote True if the audio is to be rendered by the remote endpoint. */SIPXTAPI_API SIPX_RESULT sipxCallPlayBufferStart(const SIPX_CALL hCall, const char* szBuffer, const int bufSize, const int bufType, const bool bRepeat, const bool bLocal, const bool bRemote) ;/** * Stop playing the audio started with sipxCallPlayBufferStart * * @param hCall Handle to a call. Call handles are obtained either by * invoking sipxCallCreate or passed to your application through * a listener interface. Audio can only be played and stopped * in the context of a call. */SIPXTAPI_API SIPX_RESULT sipxCallPlayBufferStop(const SIPX_CALL hCall) ; /** * Set a media property on the media interface connection associated with the * given call. The property names may be media subsystem specific. This may * be used to set stream specific properties assocated with a call. * * Note: the application should be aware of when the media interface connection * is created. A media connection is not created until after the call has been * initiated. * * @param hCall Handle to a call (and implied assocated media connection). * @param szPropertyName name of the media connection specific property to set. * @param szPropertyValue new value to set on the media connection specific property. */SIPXTAPI_API SIPX_RESULT sipxCallSetMediaProperty(const SIPX_CALL hCall, const char* szPropertyName, const char* szPropertyValue);/** * Subscribe for NOTIFY events which may be published by the other end-point of the Call. * * @param hCall The call handle of the call associated with the subscription. * @param szEventType A string representing the type of event that can be published. * @param szAcceptType A string representing the types of NOTIFY events that this client will accept. * @param phSub Pointer to a subscription handle whose value is set by this funtion. * @param bRemoteContactIsGruu indicates whether the Contact for the remote * side of the call can be assumed to be a Globally Routable Unique URI * (GRUU). Normally one cannot assume that a contact is a GRUU and the * To or From address for the remote side is assumed to be an Address Of * Record (AOR) that is globally routable. */ SIPXTAPI_API SIPX_RESULT sipxCallSubscribe(const SIPX_CALL hCall, const char* szEventType, const char* szAcceptType, SIPX_SUB* phSub, bool bRemoteContactIsGruu = false);/** * Unsubscribe from previously subscribed NOTIFY events. * * @param hSub The subscription handle obtained from the call to sipXCallSubscribe. */ SIPXTAPI_API SIPX_RESULT sipxCallUnsubscribe(const SIPX_SUB hSub) ;/** * Sends an INFO event to the other end-point(s) on a Call. * * @param phInfo Pointer to an INFO message handle, whose value is set by this method. * @param hCall Handle to a call. Call handles are obtained either by * invoking sipxCallCreate or passed to your application through * a listener interface. * @param szContentType String representation of the INFO content type * @param szContent Pointer to the INFO messasge's content * @param nContentLength Size of the INFO content */SIPXTAPI_API SIPX_RESULT sipxCallSendInfo(SIPX_INFO* phInfo, const SIPX_CALL hCall, const char* szContentType, const char* szContent, const size_t nContentLength);/** * Blind transfer the specified call to another party. Monitor the * TRANSFER state events for details on the transfer attempt. If the * call is not already on hold, the party will be placed on hold. * * @param hCall Handle to a call. Call handles are obtained either by * invoking sipxCallCreate or passed to your application through * a listener interface. * @param szAddress SIP url identifing the transfer target (who the call * identified by hCall will be transfered to). * * @see SIPX_CALLSTATE_EVENT * @see SIPX_CALLSTATE_CAUSE */SIPXTAPI_API SIPX_RESULT sipxCallBlindTransfer(const SIPX_CALL hCall, const char* szAddress) ;/** * Transfer the source call to the target call. This method can be used * to implement consultative transfer (transfer initiator can speak with * the transfer target prior to transferring. If you wish to consult * privately, create a new call to the transfer target. If you wish * consult and allow the source (transferee) to participant in the * converstation, create a conference and then transfer one leg to * another. * * If not already on hold, parties are placed on hold as part of the * transfer operation. * * @param hSourceCall Handle to the source call (transferee). * @param hTargetCall Handle to the target call (transfer target). * * @see SIPX_CALLSTATE_EVENT * @see SIPX_CALLSTATE_CAUSE */SIPXTAPI_API SIPX_RESULT sipxCallTransfer(const SIPX_CALL hSourceCall, const SIPX_CALL hTargetCall) ;//@}/** @name Publishing Methods *///@{/** * Creates a publishing context, which perfoms the processing necessary * to accept SUBSCRIBE requests, and to publish NOTIFY messages to subscribers. * The resource may be specific to a single call, conference or global * to this user agent. The naming of the resource ID determines the scope. * * @param hInst Instance pointer obtained by sipxInitialize. * @param phPub Pointer to a publisher handle - this method modifies the value * to refer to the newly created publishing context. * @param szResourceId The resourceId to the state information being * published. This must match the request URI of the incoming * SUBSCRIBE request (only the user ID, host and port are significant * in matching the request URI). Examples: fred\@10.0.0.1:5555, * sip:conference1\@192.160.0.1, sip:kate\@example.com * @param szEventType A string representing the type of event that can be * published. * @param szContentType String representation of the content type being * published. * @param pContent Pointer to the NOTIFY message's body content. * @param nContentLength Size of the content to be published. * * @return If the resource already has a a publisher created for the given * event type, SIPX_RESULT_INVALID_ARGS is returned. */SIPXTAPI_API SIPX_RESULT sipxPublisherCreate(const SIPX_INST hInst, SIPX_PUB* phPub, const char* szResourceId, const char* szEventType, const char* szContentType, const char* pContent, const size_t nContentLength);/** * Tears down the publishing context. Any existing subscriptions * are sent a final NOTIFY request. If pFinalContent is not NULL and * nContentLength > 0 the given publish state is given otherwise * the final NOTIFY requests are sent with no body or state. * * @param hPub Handle of the publishing context to destroy * (returned from a call to sipxCreatePublisher) * @param szContentType String representation of the content type being * published * @param pFinalContent Pointer to the NOTIFY message's body content * @param nContentLength Size of the content to be published */SIPXTAPI_API SIPX_RESULT sipxPublisherDestroy(const SIPX_PUB hPub, const char* szContentType, const char* pFinalContent, const size_t nContentLength);/** * Publishes an updated state to specific event via NOTIFY to its subscribers. * * @param hPub Handle of the publishing context * (returned from a call to sipxCreatePublisher) * @param szContentType String representation of the content type being * published * @param pContent Pointer to the NOTIFY message's body content * @param nContentLength Size of the content to be published */SIPXTAPI_API SIPX_RESULT sipxPublisherUpdate(const SIPX_PUB hPub, const char* szContentType, const char* pContent, const size_t nContentLength);//@}/** @name Conference Methods *///@{/** * Create a conference handle. Conferences are an association of calls * where the audio media is mixed. sipXtapi supports conferences up to * 4 (CONF_MAX_CONNECTIONS) parties in its default configuration. * * @param hInst Instance pointer obtained by sipxInitialize. * @param phConference Pointer to a conference handle. Upon success, * this value is replaced with a valid conference handle. * Success is determined by the SIPX_RESULT result code. */SIPXTAPI_API SIPX_RESULT sipxConferenceCreate(const SIPX_INST hInst, SIPX_CONF* phConference) ;/** * Join (add) an existing held call into a conference. * * An existing call can be added to a virgin conference without restriction. * Additional calls, must be connected and on remote hold for this operation * to succeed. A remote hold can be accomplished by calling sipxCallHold on * the joining party. The application layer must wait for the * CALLSTATE_CONNECTION_INACTIVE event prior to calling join. No events * are fired as part of the operation and the newly joined call is left on * hold. The application layer should call sipxCallUnhold on the new * participant to finalize the join. * * @param hConf Conference handle obtained by calling sipxConferenceCreate. * @param hCall Call handle of the call to join into the conference. */SIPXTAPI_API SIPX_RESULT sipxConferenceJoin(const SIPX_CONF hConf, const SIPX_CALL hCall) ;/** * Split (remove) a held call from a conference. This method will remove * the specified call from the conference. * * The call must be connected and on remote hold for this operation to * succeed. A remote hold can be accomplished by calling sipxCallHold on * the conference participant or by placing the entire conference on hold * with bridging disabled. The application layer must wait for the * CALLSTATE_CONNECTION_INACTIVE event prior to calling split. No events * are fired as part of the operation and the split call is left on hold. * * @param hConf Handle to a conference. Conference handles are obtained * by invoking sipxConferenceCreate. * @param hCall Call handle of the call that should be removed from the * the conference. */SIPXTAPI_API SIPX_RESULT sipxConferenceSplit(const SIPX_CONF hConf, const SIPX_CALL hCall) ;/** * Add a new party to an existing conference. A connection is automatically * initiated for the specified address. * * @param hConf Handle to a conference. Conference handles are obtained * by invoking sipxConferenceCreate. * @param hLine Line Identity for the outbound call. The line identity * helps defines the "From" caller-id. * @param szAddress SIP url of the conference partipant to add * @param phNewCall Pointer to a call handle to store new call. * @param contactId Id of the desired contact record to use for this call. * The id refers to a Contact Record obtained by a call to * sipxConfigGetLocalContacts. The application can choose a * contact record of type LOCAL, NAT_MAPPED, CONFIG, or RELAY. * The Contact Type allows you to control whether the * user agent and media processing advertises the local address * (e.g. LOCAL contact of 10.1.1.x or * 192.168.x.x), the NAT-derived address to the target party, * or, local contact addresses of other types. * @param pDislay Pointer to an object describing the display object for * rendering remote video. */SIPXTAPI_API SIPX_RESULT sipxConferenceAdd(const SIPX_CONF hConf, const SIPX_LINE hLine, const char* szAddress, SIPX_CALL* phNewCall, SIPX_CONTACT_ID contactId = 0, SIPX_VIDEO_DISPLAY* const pDisplay = NULL);/** * Removes a participant from conference by hanging up on them. * * @param hConf Handle to a conference. Conference handles are obtained * by invoking sipxConferenceCreate. * @param hCall Call handle identifying which call to remove from the * conference by hanging up. */SIPXTAPI_API SIPX_RESULT sipxConferenceRemove(const SIPX_CONF hConf, const SIPX_CALL hCall) ;/** * Gets all of the calls participating in a conference. * * @param hConf Handle to a conference. Conference handles are obtained * by invoking sipxConferenceCreate. * @param calls An array of call handles filled in by the API. * @param iMax The maximum number of call handles to return. * @param nActual The actual number of call handles returned.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -