VoIP degradation of quality
-
I currently have an Asterisk Raspberry Pi box doing my VoIP behind of pfsense, incoming calls come in fine and all but what I do notice is the stuttering and clarity of the call degrades. More os, others, while talking to have remarked that my voice tends to degrade to that of a robot over time.
"Firewall Optimization Option" is set to Conservative in pfsense and I'm not port forward or anything else.
On the Asterisk side registrations are set to 120s and my trunk with freephoneline.ca is set up as follows:
context=from-trunk host=voip.freephoneline.ca username= secret= type=friend insecure=port,invite dtmfmode=auto disallow=all allow=ulaw&g729 fromdomain=voip.freephoneline.ca canreinvite=no qualify=yes nat=yes
Any random thoughts on what could be going on here?
-
If the signalling and data flow are working and the only problem is poor call quality, you may have a local contention issue that can be solved by traffic shaping. Is it always the same poor quality, or does it randomly change between good & bad? What kind of link do you have, and how saturated is it? If you have a fast link with lots of spare bandwidth, it might be your VoIP provider is oversubscribing their trunks. I use smokeping to monitor how busy my VoIP provider's designated IP address is. Regular packet loss is a clue that that IP might be too busy.
-
@KOM:
If the signalling and data flow are working and the only problem is poor call quality, you may have a local contention issue that can be solved by traffic shaping. Is it always the same poor quality, or does it randomly change between good & bad? What kind of link do you have, and how saturated is it? If you have a fast link with lots of spare bandwidth, it might be your VoIP provider is oversubscribing their trunks. I use smokeping to monitor how busy my VoIP provider's designated IP address is. Regular packet loss is a clue that that IP might be too busy.
It randomly changes on me. I've got a 30Mbps connection and I'm not saturating my link. I'd put money on the VoIP provider being the culprit. Never heard of smokeping, difficult to use?
-
Never heard of smokeping, difficult to use?
https://oss.oetiker.ch/smokeping/
You can install it on your pi as its already in the repo. You only need to edit the General and Targets files in /etc/smokeping/config.d
-
Just a note though, that some larger VoIP services may use a single hostname, then rotate servers using SRV records under that hostname. In fact, the hostname that could be used could point to their website, but the SRV records within could point to their VoIP servers elsewhere, not even in the same physical location. That makes monitoring a bit harder.
If it's not your bandwidth that is the issue, other potential issues could be the audio format being used for the call - check your Pi's CPU usage during the call; it may be having to convert audio formats and could be falling behind over time - or issues on your provider's end. Try setting up a phone, SIP client, or ATA to point directly to your provider and see if it happens there as well.
-
@virgiliomi:
If it's not your bandwidth that is the issue, other potential issues could be the audio format being used for the call - check your Pi's CPU usage during the call; it may be having to convert audio formats and could be falling behind over time - or issues on your provider's end. Try setting up a phone, SIP client, or ATA to point directly to your provider and see if it happens there as well.
You could be on to something, I realize that I tend to experience the issue more so from my softphone on my desktop than I do with my other extensions which are on separate ATAs. Will try other softphone software and monitor the pi's cpu, and see. Thanks.
-
It could be the codec that your softphone is using. If you can change the codec order in the softphone, or change it to use the same codec that your ATAs are using, that might be a big help to keep the Pi from having to transcode the audio data.
-
First of all make a clean test, without Asterisk & pfSense, with ATA or softphone on PC directly connected to ISP.
Make sure g729 is not used.
Then put pfSense back in line and test again, then add Asterisk and test again. -
I've now encounter a much greater issue. I've just changed internet provider and now I'm no longer able to login into my voip service. Asterisk just reports:
[2017-12-07 15:31:21] NOTICE[1851] chan_sip.c: -- Registration for 'XXXX@voip.freephoneline.ca' timed out, trying again (Attempt #4) Retransmission timeout reached on transmission 54c74f50662fbd7743d6187a76a22e8a@127.0.1.1 for seqno 103 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions Packet timed out after 31999ms with no response
Ping voip.freephoneline.ca seems to be up and telnet voip.freephoneline.ca 5060 does not connect (I would assume it should?)
I also tried to run my Asterisk box via my vpn to PIA and still see the same issue, I don't thinks it's my provider blocking ports…
It was working well prior to the change of provider, not sure what could have happened. Any suggestion on how I could troubleshoot this? I don't think this is an issue with the voip service as I've checked their forums and I don't see an outage.
-
Any suggestion on how I could troubleshoot this?
Better to ask at Asterisk forum as there is no evidence that pfSense is guilty.
General advise - forget about generic Asterisk log and check your SIP signalling.