When the telephony engine places an out bound call, the single media format (codec) that will be used for the call is the media format specified by the MediaFormat parameter.
When the telephony engine receives an in-bound call, one or more media formats (codecs) will be requested by the far end (the initiating side of the call). The telephony engine will determine the lowest bandwidth codec from the list of codecs that is specified in the call's INVITE SIP message.
If you want to initiate and receive calls using a specific set of enabled codecs (more than one codec), please see the SetAudioMediaFormats(Int32, array<VoipMediaEngine..::.MEDIA_FORMAT_AUDIO>[]()[]) API procedure.
Assembly: LMEVoipManaged (in LMEVoipManaged.dll) Version: 6.0.5226.26700
Syntax
C# |
---|
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE SetAudioMediaFormat( int PhoneLine, VoipMediaEngine..::.MEDIA_FORMAT_AUDIO MediaFormat ) |
Visual Basic (Declaration) |
---|
Public Function SetAudioMediaFormat ( _ PhoneLine As Integer, _ MediaFormat As VoipMediaEngine..::.MEDIA_FORMAT_AUDIO _ ) As VoipMediaEngine..::.TELEPHONY_RETURN_VALUE |
Visual C++ |
---|
public: VoipMediaEngine..::.TELEPHONY_RETURN_VALUE SetAudioMediaFormat( int PhoneLine, VoipMediaEngine..::.MEDIA_FORMAT_AUDIO MediaFormat ) |
J# |
---|
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE SetAudioMediaFormat( int PhoneLine, VoipMediaEngine..::.MEDIA_FORMAT_AUDIO MediaFormat ) |
Parameters
- PhoneLine
- Type: System..::.Int32
The zero based phone line to configure.
- MediaFormat
- Type: LanScape..::.VoipMediaEngine..::.MEDIA_FORMAT_AUDIO
The media format the phone line will use. It can be any one of the following enumerated values as specified by the VoipMediaEngine..::.MEDIA_FORMAT_AUDIO data type.
Return Value
If the function succeeds, the return value will be SipSuccess.
If the function fails, the return value will be one of the following values as specified by the VoipMediaEngine..::.TELEPHONY_RETURN_VALUE data type.
Return Value | Description |
---|---|
SipCallFailure |
This value is returned by telephony API procedures to indicate general API failure. This error value is used as a "catch all error". If you receive this error, check to make sure that all parameters specified in the API procedure call are correct. Particularly, verify that pointers to memory regions are valid. This error return value is only used if a mapping to another specific error value does not exist.
(API return value) |
SipBadPhoneLine |
Application software called a telephony API procedure and specified an invalid phone line. Phone lines are numbered starting from zero. This error is most commonly returned when attempting to access phone lines in excess of the max number of lines supported by the telephony engine.
(API return value) |
SipBadAudioDataType |
Indicates that application software attempted to specify an invalid IVR or Audio Output media data type
when calling the OpenRxIvrChannel(VoipMediaEngine, Int32, VoipMediaEngine..::.IVRCALLBACKPROC, Object, Boolean, VoipMediaEngine..::.AUDIO_BANDWIDTH, Int32%, Int32%, Boolean%), SetTxIvrDataType(VoipMediaEngine..::.AUDIO_BANDWIDTH),
GetTxIvrSampleBlockSize(VoipMediaEngine..::.AUDIO_BANDWIDTH, Int32%, Int32%, Boolean%), or the SetAudioOutDataType(VoipMediaEngine..::.AUDIO_BANDWIDTH)
API procedures. Make sure you specify the appropriate VoipMediaEngine..::.AUDIO_BANDWIDTH
parameter when calling these API procedures.
(API return value) |