Luca Bertoncello
2020-Jun-22 18:09 UTC
[asterisk-users] Voice broken during calls (again...)
Am 22.06.2020 um 17:41 schrieb Marek Greško: Hi> try pinging your sip peer ip address following way: > > ping -n -M do -s 1300 -i 0.1 -c 100 ${ipaddress} > > Post several lines and the statistics.root at bpi:/etc/asterisk# ping -n -M do -s 1300 -i 0.1 -c 100 tel.t-online.de PING tel.t-online.de (217.0.128.133) 1300(1328) bytes of data. 1308 bytes from 217.0.128.133: icmp_seq=1 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=2 ttl=57 time=17.9 ms 1308 bytes from 217.0.128.133: icmp_seq=3 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=4 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=5 ttl=57 time=18.1 ms 1308 bytes from 217.0.128.133: icmp_seq=6 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=7 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=8 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=9 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=10 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=11 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=12 ttl=57 time=17.7 ms 1308 bytes from 217.0.128.133: icmp_seq=13 ttl=57 time=17.8 ms 1308 bytes from 217.0.128.133: icmp_seq=14 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=15 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=16 ttl=57 time=17.9 ms 1308 bytes from 217.0.128.133: icmp_seq=17 ttl=57 time=18.2 ms 1308 bytes from 217.0.128.133: icmp_seq=18 ttl=57 time=17.9 ms 1308 bytes from 217.0.128.133: icmp_seq=19 ttl=57 time=18.4 ms 1308 bytes from 217.0.128.133: icmp_seq=20 ttl=57 time=17.9 ms 1308 bytes from 217.0.128.133: icmp_seq=21 ttl=57 time=18.2 ms 1308 bytes from 217.0.128.133: icmp_seq=22 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=23 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=24 ttl=57 time=17.8 ms 1308 bytes from 217.0.128.133: icmp_seq=25 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=26 ttl=57 time=18.1 ms 1308 bytes from 217.0.128.133: icmp_seq=27 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=28 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=29 ttl=57 time=18.1 ms 1308 bytes from 217.0.128.133: icmp_seq=30 ttl=57 time=17.9 ms 1308 bytes from 217.0.128.133: icmp_seq=31 ttl=57 time=18.3 ms 1308 bytes from 217.0.128.133: icmp_seq=32 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=33 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=34 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=35 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=36 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=37 ttl=57 time=18.1 ms 1308 bytes from 217.0.128.133: icmp_seq=38 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=39 ttl=57 time=18.0 ms 1308 bytes from 217.0.128.133: icmp_seq=40 ttl=57 time=17.9 ms 1308 bytes from 217.0.128.133: icmp_seq=41 ttl=57 time=17.9 ms 1308 bytes from 217.0.128.133: icmp_seq=42 ttl=57 time=18.1 ms 1308 bytes from 217.0.128.133: icmp_seq=43 ttl=57 time=18.1 ms 1308 bytes from 217.0.128.133: icmp_seq=44 ttl=57 time=18.1 ms 1308 bytes from 217.0.128.133: icmp_seq=45 ttl=57 time=17.9 ms 1308 bytes from 217.0.128.133: icmp_seq=46 ttl=57 time=18.1 ms ^C --- tel.t-online.de ping statistics --- 46 packets transmitted, 46 received, 0% packet loss, time 4527ms rtt min/avg/max/mdev = 17.784/18.058/18.454/0.190 ms, pipe 2 But now I made a test with a friend of mine, and I think the results are very interesting... So, we configured his mobile phone (Android) to use my Asterisk as peer. We created also a VoIP account on the phone. The phone was *NOT* in my WLAN. The friend called my phone (Thomson ST2022 in local LAN). This was a VoIP call inside Asterisk (two peers speaking together). Deutsche Telekom was *NOT* used now! I can hear very good the friend, without "broken voice", but *he* just hear "like a robot with sore throat" and can't understand any word... The same if I call ihm from my phone (via VoIP). I tried to call my wife's phone from my phone (both in the LAN, both Thomson ST2022). Excellent quality in both direction. Last test: I configured my Android phone and added a VoIP-account on my Asterisk, so now I have my Android as peer in my Asterisk. Then I called my friend's phone (also logged in my Asterisk). First test was with my mobile phone in my WLAN and his phone via LTE. Terrible quality on his side (he hear me very bad), good quality on my side (I hear ihm good). Second test with *both my phone and my friend's phone* via LTE: excellent quality in both directions. Conclusion (maybe!): it can *not* be a problem in the DSL connection and *maybe* it is not a problem in the communication with the Server of Deutsche Telekom, since I have many problems to communicate between two peers in local Asterisk if one is over LTE and the other in local LAN (but curiously *not* if both peers are in local LAN or both via LTE). Ergo: this *must* be a problem in my Asterisk... So the questions: 1) can someone confirm or contradict my conclusions? 2) assuming are my conclusions correct, can someone suggest me where can I search the problem? Thanks a lot Luca Bertoncello (lucabert at lucabert.de)
Luca Bertoncello
2020-Jun-23 06:43 UTC
[asterisk-users] Voice broken during calls (again...)
Am 22.06.2020 20:09, schrieb Luca Bertoncello: A couple of other ideas...> Conclusion (maybe!): it can *not* be a problem in the DSL connection > and > *maybe* it is not a problem in the communication with the Server of > Deutsche Telekom, since I have many problems to communicate between two > peers in local Asterisk if one is over LTE and the other in local LAN > (but curiously *not* if both peers are in local LAN or both via LTE).I think, the problem with bad quality and broken voice just happens if the peers are in different LANs, since if I call my wife's phone (VLAN "phone") using my mobile phone via SIP (in VLAN "intlan") the quality is bad, but if I call her using my phone in VLAN "phone" or if both peers use SIP via LTE the quality is very good... Could you suggest me something to restrict the problem? Currently, I think the problem can be: 1) on Asterisk 2) on my Gateway/Firewall At home I have many VLANs, that normally *not* communicate together (some exceptions are of course implemented). The phones don't reach the Internet via NAT (VLAN "phone" has no routing in Internet). The mobile phones are in VLAN "intlan", with routing in Internet. Any idea? Thanks Luca Bertoncello (lucabert at lucabert.de)
Luca Bertoncello
2020-Jun-23 07:06 UTC
[asterisk-users] Voice broken during calls (again...)
Am 23.06.2020 08:43, schrieb Luca Bertoncello: And another thing, I discovered right now...> Could you suggest me something to restrict the problem? > Currently, I think the problem can be: > > 1) on Asterisk > 2) on my Gateway/FirewallA couple of years ago I added this entry in my firewall: /sbin/iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu since I had the problem downloading data from an Internet site using my tablet. I found this site explaining that: https://lartc.org/howto/lartc.cookbook.mtu-mss.html I really forgot this entry, but now I checked all entries in my Firewall, and I see it, with my remark... Now, the last line of the HowTo: -------------------------------- # iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 128 This sets the MSS of passing SYN packets to 128. Use this if you have VoIP with tiny packets, and huge http packets which are causing chopping in your voice calls. -------------------------------- Could it be the problem? Right now I'm not at home, so I cannot test it, but maybe I can add an entry like: iptables -A FORWARD -p tcp -m multiport --ports 5060,<my high port for SIP> --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 128 and change the previous entry like: iptables -A FORWARD -p tcp -i intlan0 --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu to limit the behaviour on the internal LAN... Your opinion? Thanks a lot! Luca Bertoncello (lucabert at lucabert.de)