Luca Bertoncello
2015-Jun-08 06:47 UTC
[asterisk-users] Almost solved: using my Asterisk from Internet
Hi again, list! I know, I'm really annoying the list... :) Well, maybe I got my Asterisk at home ("wrt" on the previous E-Mails) to accept my mobile phone from Internet. It was a problem with the network and the firewall. Now I can log my mobile phone in my Asterisk in and the phone is REACHABLE. Wow! Got it! If I call a phone at home using my cellphone it works and the quality is perfect! If a phone at home call my cellphone, however, the quality on my cellphone is very poor, but on the other phone is perfect... I think, it is something by the codecs, but I don't know what... Here what I did (following this article: http://www.linuxjournal.com/article/9399): sip.conf: localnet=192.168.200.0/255.255.255.0 localnet=192.168.20.0/255.255.255.0 externhost=mypc.noip.com externrefresh=180 rtp.conf: rtpstart=10000 rtpend=10100 users.conf: [00491773333333] fullname = 00491773333333 secret = MYSECRET dahdichan = 1 hassip = yes hasiax = no hash323 = no hasmanager = no callwaiting = no context = default host = dynamic dtmfmode=rfc2833 canreinvite=no sendrpid=pai type=friend nat=yes qualify=yes qualifyfreq=60 avpf=no force_avp=no icesupport=no encryption=no callgrouppickupgroupdial=SIP/00491773333333 And on my Firewall: /sbin/iptables -t nat -A PREROUTING -i ppp0 -p udp -m udp --dport 10000:10100 -j DNAT --to-destination 192.168.20.120 /sbin/iptables -t nat -A PREROUTING -i ppp0 -p udp -m udp --dport 5060 -j DNAT --to-destination 192.168.20.120 Any idea, what can be wrong now? Thanks Luca Bertoncello (lucabert at lucabert.de)
A J Stiles
2015-Jun-08 08:45 UTC
[asterisk-users] Almost solved: using my Asterisk from Internet
On Monday 08 Jun 2015, Luca Bertoncello wrote:> Hi again, list! > > I know, I'm really annoying the list... :)Everyone has to start somewhere; and at least you aren't asking hundreds of questions in one go, including some which come under the heading of "Don't even think about trying to set this up until you have got X working", then ignoring every answer you received and doing something totally different. That's "annoying the list".> If I call a phone at home using my cellphone it works and the quality > is perfect! > If a phone at home call my cellphone, however, the quality on my > cellphone is very poor, but on the other phone is perfect... > > I think, it is something by the codecs, but I don't know what...Codecs would be the first thing I would be looking at. The "native" codec used by the PSTN throughout Europe is G.711 A-law, or just alaw for short; and if you are making a system which connects with the PSTN, there is rarely a good reason to use anything else; since something, somewhere -- and most probably *your* Asterisk server -- is going to wind up having to translate from one codec to another. That is going to (1) take a finite amount of time and (2) introduce distortion. Try, in the top section of your sip.conf file, disallow=all allow=alaw And that ought to fix it. If in any doubt, add NoOp() statements at strategic points within your dialplan so as to show the value of the channel variable ${SIP_CODEC} . -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .
Luca Bertoncello
2015-Jun-08 08:53 UTC
[asterisk-users] Almost solved: using my Asterisk from Internet
Zitat von A J Stiles <asterisk_list at earthshod.co.uk>:>> If I call a phone at home using my cellphone it works and the quality >> is perfect! >> If a phone at home call my cellphone, however, the quality on my >> cellphone is very poor, but on the other phone is perfect... >> >> I think, it is something by the codecs, but I don't know what... > > Codecs would be the first thing I would be looking at.Me too... :)> The "native" codec used by the PSTN throughout Europe is G.711 A-law, or just > alaw for short; and if you are making a system which connects with the PSTN, > there is rarely a good reason to use anything else; since something, > somewhereWell, PSTN (and ISDN) in Germany will be shutted down in short... That's why I'm experimenting with Asterisk now... :)> -- and most probably *your* Asterisk server -- is going to wind up having to > translate from one codec to another. That is going to (1) take a finite > amount of time and (2) introduce distortion. > > Try, in the top section of your sip.conf file, > > disallow=all > allow=alaw > > And that ought to fix it.I wanted to write the list again, since I maybe got it just adding "allow=all" for the user... I'll try your configuration this evening, too and report to the list... I'm very happy, that now I can login in my Asterisk at home and I don't need another Asterisk on a separate server. Firewall can be very difficult to setup, sometimes, for a SysAdmin as I be, too... :( Regards Luca Bertoncello (lucabert at lucabert.de)