Thanks for your responses.
I have been digging into the problem and now I'm going to try to explain what I've found.
First of all, in response to Vikas, I've checked the CPU performance and with an audio/video call the CPU usage is around 70%. I've made an audio call only, and the CPU usage is 30%...but the audio cuts are still there, none improvements.
In response to Henrik, a loopback call generates lots of echo and I can't check the audio cuts without hurting my ears with the echo. Please, tell me what do you want to check with the loopback call to think about how to check it by other way.
In response to aaroncry. Well, this is maybe relevant information also to everyone. I am using VP8 codec for video and PCMU for audio. In relation to use debug build...yes, I use that. Tomorrow I am going to check this just in case.
So...reading more carefully logs and exceptions, I noticed some new information:
In set-top-box side, I have a lot of warnings like this:
Warning(webrtcvideoengine.cc:1554): webrtc: Audio overrun
Warning(webrtcvideoengine.cc:1554): webrtc: Audio underrun
The trace log is full of this kind of messages, only in the set-top-box side.
Otherwise, in mobile side, I noticed I have an Error:
Error(webrtcvideoengine.cc:1550): webrtc: (acm_receiver.cc:161): "AcmReceiver::SetExtraDelay" failed: delay_ms=3249
Error(webrtcvideoengine.cc:1550): webrtc: SetMinimumPlayoutDelay() failed to set min playout delay (error=10027)
Error(webrtcvideoengine.cc:1550): webrtc: (vie_sync_module.cc:165): Error setting voice delay.
This error is weird... It just happen while makes a call between the set-top-box and a mobile device. If the call is between mobiles, this error never appears. The error appears arround one minute after init the call, and it start when the delay is over 750ms. The error appears only in the mobiles, not in the set-top-box.
Digging into this problem, I've found this issue:
with similar audio problems, so I've tried to use their solution, that it's the same as Ben said..and I've got some improvements.
Using that configuration the audio from set-top-box to mobile seems to work nice, otherwise, in the other direction, from mobile to set-top-box continues with the audio cuts.
In relation with the "Warnings" and "Errors". With that configuracion the error does not appear anymore, and the warning just show "audio underrun", the "audio overrrun" has dissappear.
I don't know exactly what this constants mean and how it work, so I'm going to dig into the code to know what I'm modifying when I change these constants.
Hope this new information help to solve this.
I really apreciate your responses. Thanks.
Jorge.