csipsimple 出现单通情况

 今天在测试voip电话时,突然打不通了和windows端也不通,boss发怒了.

 经过排查,发现设置G729编码

//设置G729编码
prefs.setCodecPriority("g729/8000/1", SipConfigManager.CODEC_NB, "240");
prefs.setCodecPriority("g729/8000/1", SipConfigManager.CODEC_WB, "240");

 

在SipConfigManager类中取设置的值

public static String getCodecKey(String codecName, String type) {
String[] codecParts = codecName.split("/");
String preferenceKey = null;
if(codecParts.length >=2 ) {

//设置值时,设置了声道设置,却没有取用.

return "codec_" + codecParts[0].toLowerCase() + "_" + codecParts[1] +"_" + type;
}
return preferenceKey;
}

 

修改为:

public static String getCodecKey(String codecName, String type) {
String[] codecParts = codecName.split("/");
String preferenceKey = null;
if(codecParts.length >=2 ) {


return "codec_" + codecParts[0].toLowerCase() + "_" + codecParts[1] + "_"+codecParts[2]+"_" + type;
}
return preferenceKey;
}

posted @ 2015-02-03 21:31  散散客  阅读(250)  评论(0编辑  收藏  举报