Contents
SIP Monitoring
This feature allows customers to get SIP messages, SDP content, and negotiated codec name for the currently active session.
Changes in the SDK for OS X
The following methods have been added to the GSSessionService:
/**
Session service protocol
*/
@protocol GSSessionService <NSObject>
...
/**
Gets codec name for active or held session.
@param sessionId active or held session ID.
@returns the code name.
*/
- (NSString*) getCodecNameForSessionId:(int) sessionId;
/**
Gets last remote offer or answer SDP for active or held session.
@param sessionId active or held session ID.
@returns SDP content.
*/
- (NSString*) getRemoteSDPForSessionId:(int) sessionId;
/**
Gets specific SIP message from history by its position index.
@param sessionId active or released session ID.
@param index position in SIP history.
@returns SIP message content.
*/
- (NSString*) getSIPMessageForSessionId:(int) sessionId
byIndex:(int) index;
/**
Gets specific SIP message from history by its name.
@param sessionId active or released session ID.
@param name SIP message name.
@returns SIP message content.
*/
- (NSString*) getSIPMessageForSessionId:(int) sessionId
byName:(NSString*) name;
Changes in the SDK for .NET
The following methods have been added to the ICallControl interface:
public interface class ICallControl {
...
String^ GetCodecName (int sessionId);
String^ GetRemoteSDP (int sessionId);
String^ GetSIPMessage(int sessionId, int index);
String^ GetSIPMessage(int sessionId, String^ name);
}
Description of Changes
All methods gets integer session ID (of the session queried) as the first parameter, which is the same ID as used in all session-related methods and which should be taken from session object by retrieving:
- property "callId" in SDK for OS X (note that, for historical reasons, property named "sessionId" holds different value - namely, the value of SIP header Call-ID for given session)
- property "SessionIntId" in SDK for .NET
Return value is a string representation of requested value, as described below, or empty string if the operation cannot be performed of requested data is not available.
Getting codec name
Corresponding method returns canonical name of currently negotiated codec for given session (e.g. "pcmu/8000" or "opus/48000/2")
Getting remote SDP content
Corresponding method returns last remote SDP received for given session as text
Getting SIP messages
Two methods are provided to obtain specific SIP message for given session, using either:
- message index (starting from 1) in the sequence of all SIP messages sent or received for this session,
- SIP message name, to get the last SIP message for this session with matching name
For the second approach, name parameter may be either SIP method (e.g. "INVITE" or "BYE"), SIP response code as string (e.g. "200") or special name "1xx" that matches any provisional response. In addition, the value may be prefixed with "<<" (to consider only incoming message) or "">>" (for outgoing messages only). For example:
- "INVITE" = last INVITE message (sent or received)
- "<<INVITE" = last incoming INVITE
- ">>ACK" = last ACK sent by endpoint
Return value includes full text of SIP message, including all headers and message body, or empty string if the requested message cannot be found.