-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only one way communication #13
Comments
I had some problems with ordinary SIP client (Linphone, to be exact) when I was behind NAT. The connection was cancelled after ca. 30 s. They disappeared when I forwarded port UDP 5060 on my router. Can you try some other SIP client from the same machine and confirm whether it works? After that, I would set log level to |
problems with NAT was my first thougt. So I tried mumsi, asterisk, murmur an mumble in the following environment:
all PCs in the same Class-C Network. I tried mumsi on physical Machine1 under VBoxVM with CentOS7.2,and also with CentOS5.11 and also on bare metal with CentOS5.11. (LAN) in every case I had the same problem. On my phone I can always hear what others are talking (without a break). But my own speech is transported for a few seconds (less than 10s) then it stops, after a few seconds (most often more than 10s) speech ist transported, then it stops and so on. The mumble client shows a "red mouth" for a few seconds, then "black", a few seconds later "red" again an so on. SIP Client, I use Linphone too, works perfect. Also phoner on Windows works perfect. So next I will attach a logfile on Monday |
which version of pjsip is used by mumsi? |
Excerpt from log
I'm using Version 2.4.5 |
Can you attach log with |
I made more tests and I now know what the problem is. murmur.ini
It seems mumsi has problems with limited bandwith. After removing the bandwith limit the communication is working fine. Is it possible to limit the bandwith using mumsi? |
The problem with SIP is that it transmits voice constantly, even when people are not talking (you can see that mumsi icon in Mumble client is always active during SIP call). To enable this, noise gate has to be implemented. I assumed that voice frame is sent every 20 ms to Murmur. You can experiment with different frame lengths changing I'm currently at work, so I cannot test it now. |
Why not set the Opus encoder bitrate? http://www.opus-codec.org/docs/html_api/group__encoderctls.html If I understand it correctly, mumsi doesn't have a bitrate setting. But I think it could be hardcoded in mumlib as a workaround. https://github.com/slomkowski/mumlib/search?utf8=%E2%9C%93&q=opus_encoder_ctl&type=Code |
AFAIK Mumble defines only one valid bitrate for Opus: 48 kHz (https://github.com/mumble-voip/mumble/blob/13e494c60beb20748eeb8be126b27e1226d168c8/src/mumble/Audio.h#L43). |
Samplerate and bitrate are two different things. Mumble defines only one valid Opus supports:
|
Oops, my bad. The only thing I set for Opus encoder is disabling variable bitrate which is identical with original client. I haven't given it any second thought. Are you willing to perform some experiments which will determine the acceptable bitrate in your setup? |
yes, I'm really willing to perform some experiment to determine an acceptable bitrate. |
You may modify Mumlib in following manner:
error = opus_encoder_ctl(encoder, OPUS_SET_BITRATE(BITRATE));
if (error != OPUS_OK) {
throw AudioException((boost::format("failed to set encoder bitrate to %d: %s") % BITRATE % opus_strerror(error)).str());
} You can experiment with different I measured bitrate in default configuration on my machine (Murmur and mumsi on localhost, SIP from external provider) using following command:
Trafic from mumsi to Murmur was ca 64 kB/s. In Mumble client you can set the bitrate to as low as 8 kB/s, but I cannot say how it affects the sound quality. |
Thanks fpr the help. I tested with multible Bitrates. wir BITRATE=16000 iftop show me about 20kb/s transmission to murmur. So we have the effect "one way communication" continue. There ist longer "speaking" and shorter dropouts than with 64kb/s. Reducing Bitrate to 8000 make no differenc in transferrate. mumsi is ongoing with a transmission on about 20kb/s. So is there another place in the code where I have to change something for reducing bitrate to 8000kb/s. If we set bandwith to 16000 in murmur, mumble sets own transmission to 8000kb/s. so this ist what I want do do with mumsi. (automatic not needed). |
Besides the raw Opus audio data (which is 8 kb/s), there is also the protocol overhead which depends on the frame length. 60 ms: 7.8 kb/s overhead see https://wiki.mumble.info/wiki/FAQ/English#What_are_the_bandwidth_requirements.3F If you set the frame length to 60 ms, it might be working (8kb/s + 7.8 kb/s = 15.8 kb/s). I guess the mumble client automatically adjusts bitrate and frame length. |
ok I will try this, but where and how to set the frame length?. |
see the comment from slomkowski: |
@pzi42: did you achieve any results? |
@streaps, @slomkowski thank you for your perfect help. mumsi is now working in the expected way. |
Sorry for the late answer, wrote it, let my browser open and did some other things. So I forgot to send it. |
mumsi seems running now without any problems. It seems. After a view seconds the communication from sip to murmur is dead. Communication from murmur to sip is functional. On my phone I can hear everything. My speech isn't avail on the murmur side. Waiting a few second an I'm back, speaking is possible. A few seconds more and I'm gone.
Any idea why I got this behaviour?
The text was updated successfully, but these errors were encountered: