FreePBX / Random loss of audio ...
-
@BraswellJay said in FreePBX / Random loss of audio ...:
I didn't think the STUN server would play into this particular call test since it was extension to extension on the same network segment and never had to exit the WAN interface on the router.
It doesn't. The PBX has a public IP though, that it is advertising in the logs.
-
@scottalanmiller said in FreePBX / Random loss of audio ...:
@BraswellJay said in FreePBX / Random loss of audio ...:
It did seem to be the codec, in this particular instance at least. I changed Zoiper to only allow G.711a/u and that seemed to fix the issue. I'm going to do some more testing tomorrow and verify.
That's a first. What was it set to choose first before? And what is your server set to accept?
It is strange. This image shows my current codecs. The two left columns are from Zoiper and the rightmost from FreePBX. Yesterday when I was having the issue, all of the codecs from Zoiper were in the selected codec list. When I moved all but G.711 a/mu over to the available but not selected then all of my issues cleared up.
How does the SIP negotiation work for selecting codec? Is the client or the server the master when determining which one to use?
-
@BraswellJay said in FreePBX / Random loss of audio ...:
How does the SIP negotiation work for selecting codec? Is the client or the server the master when determining which one to use?
That's a setting in your SIP settings on the PBX. It can be either party, depending on configuration.
-
The codec you probably want on both is Opus. Since you paid for that in your Gold package on Zoiper.
-
@BraswellJay said in FreePBX / Random loss of audio ...:
@scottalanmiller said in FreePBX / Random loss of audio ...:
@BraswellJay said in FreePBX / Random loss of audio ...:
It did seem to be the codec, in this particular instance at least. I changed Zoiper to only allow G.711a/u and that seemed to fix the issue. I'm going to do some more testing tomorrow and verify.
That's a first. What was it set to choose first before? And what is your server set to accept?
It is strange. This image shows my current codecs. The two left columns are from Zoiper and the rightmost from FreePBX. Yesterday when I was having the issue, all of the codecs from Zoiper were in the selected codec list. When I moved all but G.711 a/mu over to the available but not selected then all of my issues cleared up.
How does the SIP negotiation work for selecting codec? Is the client or the server the master when determining which one to use?
The PBX is always the master.
I recommend that you never leave a PBX default to all the codecs like that.
Reduce it to the fewest possible. Typically only ULAW and OPUS unless you are outside the US. Then ALAW instead of ULAW is common.
Adding G722 is required for video or "HD" audio.
Also your SIP trunk has CODEC settings. Your provider may only use certain ones.
-
@scottalanmiller said in FreePBX / Random loss of audio ...:
The codec you probably want on both is Opus. Since you paid for that in your Gold package on Zoiper.
I didn't pay for Zoiper. I downloaded the client from their site and when it starts it offers me to upgrade to Pro or something like that but I just choose the option that says continue with a free account. This is Zoiper5. I did just install it yesterday right before I started testing so perhaps they are letting me use that as a trial but will go away? Not sure, but I haven't paid for it for sure.
-
@BraswellJay said in FreePBX / Random loss of audio ...:
@scottalanmiller said in FreePBX / Random loss of audio ...:
The codec you probably want on both is Opus. Since you paid for that in your Gold package on Zoiper.
I didn't pay for Zoiper. I downloaded the client from their site and when it starts it offers me to upgrade to Pro or something like that but I just choose the option that says continue with a free account. This is Zoiper5. I did just install it yesterday right before I started testing so perhaps they are letting me use that as a trial but will go away? Not sure, but I haven't paid for it for sure.
ZoIPer 5 is not allowed for commercial use.
-
When I was trying out FreePBX, I was using linphone and it worked a lot better.
https://www.linphone.org/ -
@black3dynamite said in FreePBX / Random loss of audio ...:
When I was trying out FreePBX, I was using linphone and it worked a lot better.
https://www.linphone.org/So I was going to switch to linphone. After installing I had same problem with it that I had yesterday with Zoiper, no audio. Checked codecs and all seems ok so doesn't appear to be the same issue.
Checked a SIP message trace from the Asterisk CLI and noticed the following :
From Linphone message trace, in one of the SIP messages I see:
Peer audio RTP is at port xxx.xxx.xxx.150:7078
This is the WAN IP (x'd out) of my router.
When I compare that to one I had taken when I was using the Zoiper client (that had no audio issues) I see the corresponding :
Peer audio RTP is at port 192.168.2.57:8000
This is the LAN IP of the machine the zoiper client was installed on.
I'm thinking that for the linphone client somehow the RTP stream is being sent to the router instead of back to the machine the client is on thus no audio. Is that a correct interpretation of what I'm seeing here?
I don't see anything obvious that's different about the extension setups in FreePBX for each. The setting that I thought might control this on a per extension basis was NAT Mode but that is set to No for both types of clients.
I don't see anything in the Linphone setup that would make me think I can control that from the application. I had thought that if all my extensions resided on the same LAN subnet that I wouldn't need to worry about any of the RTP traffic going to the router like that but perhaps I'm mistaken.
-
@BraswellJay what Did you put in the client for SIP server? The FQDN? What does the FQDN resolve as? The internal IP or your public IP?
-
@JaredBusch said in FreePBX / Random loss of audio ...:
@BraswellJay what Did you put in the client for SIP server? The FQDN? What does the FQDN resolve as? The internal IP or your public IP?
Did not use the FQDN, just the IP address.
192.168.2.248 is the FreePBX server and 201 is the assigned extension.
-
@BraswellJay this is what my setup look like in Linphone on my iPhone.
Is the STUN server getting used on yours? That would make the call go out and back again.
-
@JaredBusch said in FreePBX / Random loss of audio ...:
@BraswellJay this is what my setup look like in Linphone on my iPhone.
Is the STUN server getting used on yours? That would make the call go out and back again.
No, there is no STUN server configured.
When I get a chance this afternoon I may configure one and see if that at least resolves the issue, though I didn't think I needed STUN for this particular use case.
Thanks
-
@BraswellJay said in FreePBX / Random loss of audio ...:
though I didn't think I needed STUN for this particular use case.
Correct you do not.
-
@BraswellJay said in FreePBX / Random loss of audio ...:
When I get a chance this afternoon I may configure one and see if that at least resolves the issue, though I didn't think I needed STUN for this particular use case.
So I haven't totally found root cause but it appears to be an issue with my windows profile on the machine I was running Linphone on.
I installed Linphone app on my phone and everything worked perfectly.
Installed desktop app on a spare laptop and everything worked perfectly.
Logged in as different user on original machine and everything worked perfectly.
Logged back in as myself on original machine and no go.I only need this for some testing. Once we get set up we'll be using Yealink phones so I may not look anymore since I can use my phone for the testing.
Thanks to all for the help.