[asterisk-commits] pcadach: branch pcadach/chan_h323-live r43325 - /team/pcadach/chan_h323-live/...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Sep 20 06:23:53 MST 2006


Author: pcadach
Date: Wed Sep 20 08:23:53 2006
New Revision: 43325

URL: http://svn.digium.com/view/asterisk?rev=43325&view=rev
Log:
Fix framing parameters

Modified:
    team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp

Modified: team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp?rev=43325&r1=43324&r2=43325&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp (original)
+++ team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp Wed Sep 20 08:23:53 2006
@@ -415,7 +415,7 @@
 {
 	cap.SetTag(H245_AudioCapability::e_gsmFullRate);
 	H245_GSMAudioCapability & gsm = cap;
-	gsm.m_audioUnitSize = packetSize;
+	gsm.m_audioUnitSize = packetSize * 33;
 	gsm.m_comfortNoise = comfortNoise;
 	gsm.m_scrambled = scrambled;
 	return TRUE;
@@ -427,7 +427,7 @@
 	if (cap.GetTag() != H245_AudioCapability::e_gsmFullRate)
 		return FALSE;
 	const H245_GSMAudioCapability & gsm = cap;
-	packetSize = gsm.m_audioUnitSize;
+	packetSize = (gsm.m_audioUnitSize + 32) / 33;
 	comfortNoise = gsm.m_comfortNoise;
 	scrambled = gsm.m_scrambled;
 
@@ -1555,6 +1555,8 @@
 						format = ast_codec_pref_getsize(&prefs, ast_codec);
 						if ((ast_codec == AST_FORMAT_ALAW) || (ast_codec == AST_FORMAT_ULAW)) {
 							ms = remoteCapabilities[i].GetTxFramesInPacket();
+							if (ms > 60)
+								ms = format.cur_ms;
 						} else
 							ms = remoteCapabilities[i].GetTxFramesInPacket() * format.inc_ms;
 						ast_codec_pref_setsize(&prefs, ast_codec, ms);



More information about the asterisk-commits mailing list