C# Class SIPSorcery.SoftPhone.AudioChannel

Mostra file Open project: sipsorcery/sipsorcery Class Usage Examples

Public Properties

Property Type Description
SupportedAudioTypes List

Public Methods

Method Description
AudioChannel ( ) : System
AudioSampleReceived ( byte sample, int offset ) : void

Event handler for receiving an RTP packet containing and audio payload from the remote end of the VoIP call.

Close ( ) : void

Called when the audo channel is no longer required, such as when the VoIP call using it has terminated, and all resources can be shutdown and closed.

GetMediaAnnouncement ( ) : SDPMediaAnnouncement

Gets the media announcement to include in the SDP payload for a call.

GetSDP ( bool usePublicIP ) : SDP

Gets an SDP packet that can be used by VoIP clients to negotiate an audio connection. The SDP will only offer PCMU since that's all I've gotten around to handling.

SetRemoteRTPEndPoint ( IPEndPoint remoteEndPoint ) : void

Allows an arbitrary block of bytes to be sent on the RTP channel. This is mainly used for the Gingle client which needs to send a STUN binding request to the Google Voice gateway.

Sets the remote end point for the RTP channel. This will be set from the SDP packet received from the remote end of the VoIP call.

StartRecording ( ) : void

Private Methods

Method Description
AudioSampleAvailable ( object sender, NAudio.Wave.WaveInEventArgs e ) : void

Event handler for receiving an audio sample that is ready for encoding, packaging into RTP and sending to the remote end of the VoIP call.

RTPChannelSampleAvailable ( object sender, NAudio.Wave.WaveInEventArgs e ) : void

Event handler for receiving an audio sample that is ready for encoding, packaging into RTP and sending to the remote end of the VoIP call.

RTPChannelSampleReceived ( RTPFrame rtpFrame ) : void

Event handler for receiving an RTP frmae from the remote end of the VoIP call.

Method Details

AudioChannel() public method

public AudioChannel ( ) : System
return System

AudioSampleReceived() public method

Event handler for receiving an RTP packet containing and audio payload from the remote end of the VoIP call.
public AudioSampleReceived ( byte sample, int offset ) : void
sample byte The audio sample.
offset int The offset in the sample that the audio starts.
return void

Close() public method

Called when the audo channel is no longer required, such as when the VoIP call using it has terminated, and all resources can be shutdown and closed.
public Close ( ) : void
return void

GetMediaAnnouncement() public method

Gets the media announcement to include in the SDP payload for a call.
public GetMediaAnnouncement ( ) : SDPMediaAnnouncement
return SIPSorcery.Net.SDPMediaAnnouncement

GetSDP() public method

Gets an SDP packet that can be used by VoIP clients to negotiate an audio connection. The SDP will only offer PCMU since that's all I've gotten around to handling.
public GetSDP ( bool usePublicIP ) : SDP
usePublicIP bool If true and the public IP address is available from the STUN client then /// the public IP address will be used in the SDP otherwise the hsot machine's default IPv4 address will /// be used.
return SIPSorcery.Net.SDP

SetRemoteRTPEndPoint() public method

Allows an arbitrary block of bytes to be sent on the RTP channel. This is mainly used for the Gingle client which needs to send a STUN binding request to the Google Voice gateway. Sets the remote end point for the RTP channel. This will be set from the SDP packet received from the remote end of the VoIP call.
public SetRemoteRTPEndPoint ( IPEndPoint remoteEndPoint ) : void
remoteEndPoint System.Net.IPEndPoint The remote end point to send RTP to.
return void

StartRecording() public method

public StartRecording ( ) : void
return void

Property Details

SupportedAudioTypes public_oe property

public List SupportedAudioTypes
return List