From 266ebdc223a5855fcf8d1fdaf8a3fc8ad117f1e6 Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Thu, 15 Nov 2007 13:15:07 +0000 Subject: [PATCH] 1. Fix establishing alaw call 2. Fix of noticed nat problem --- .../communicator/impl/media/MediaControl.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/net/java/sip/communicator/impl/media/MediaControl.java b/src/net/java/sip/communicator/impl/media/MediaControl.java index 9854ea053..0b2c2cba7 100644 --- a/src/net/java/sip/communicator/impl/media/MediaControl.java +++ b/src/net/java/sip/communicator/impl/media/MediaControl.java @@ -496,16 +496,19 @@ private void initProcessor(DataSource dataSource) , ex); } - //Changing buffer size. The default buffer size (for javasound) - //is 125 milliseconds - 1/8 sec. On MacOS this leeds to exception and + // 1. Changing buffer size. The default buffer size (for javasound) + // is 125 milliseconds - 1/8 sec. On MacOS this leeds to exception and // no audio capture. 30 value of buffer fix the problem and is ok // when using some pstn gateways + // 2. Changing to 60. When it is 30 there are some issues + // with asterisk and nat(we don't start to send stream and so + // asterisk rtp part doesn't notice that we are behind nat) Control ctl = (Control) dataSource.getControl("javax.media.control.BufferControl"); if(ctl != null) { - ((BufferControl)ctl).setBufferLength(30);//buffers in + ((BufferControl)ctl).setBufferLength(60);//buffers in } sourceProcessor = Manager.createProcessor(dataSource); @@ -1128,9 +1131,11 @@ private void registerCustomCodecs() // formats available when the supported encodings arrays are generated // in initProcessor(). In other JMF implementations this might not be // needed, but should do no harm. - RTPManager rtpManager = RTPManager.newInstance(); - CallSessionImpl.registerCustomCodecFormats(rtpManager); - rtpManager.dispose(); + + //Commented as it fails to load alaw codec +// RTPManager rtpManager = RTPManager.newInstance(); +// CallSessionImpl.registerCustomCodecFormats(rtpManager); +// rtpManager.dispose(); }