Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
I'm working on a SIP softphone but I got the following problem and I have no idea how to solve it:

During an audio call, PMCA codec is used primarily. How to setup codec priority to achieve PCMU will be used during the call?

I use Windows 7, C# (Visual Studio), Ozaki C# SIP library and the following type of codecs: PCMA, PCMU, iLBC.

I hope that one of the community have any idea. Thank you very much for any help.
C#

Posted
Comments
NikoJarvi 30-Jan-15 1:38am    
Hello,

Use this code:

var preferredPayloadTypes = new List<CodecPayloadType>() { CodecPayloadType.PCMU, CodecPayloadType.PCMA, CodecPayloadType.iLBC };
var channelConfig = new MediaChannelConfig(preferredPayloadTypes);
call.Media.SetChannelConfig(CodecMediaType.Audio, channelConfig);


The program will use the first codec in the list primarily.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900