VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
lucabert at lucabert.de Guest
|
Posted: Sun Jun 07, 2015 2:44 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
Hi list!
Since the internal calls work as expected and I can register my Asterisk on
an external provider, I'd like to add a new feature and allow my mobile phone
to connect to my Asterisk and manage calls.
Well, first of all, my Asterisk is NOT direct on Internet available, but
behind a NAT.
So I configured my sip.conf:
localnet=192.168.200.0/24
externhost=myhost.noip.com
externrefresh=180
Then I added the peer in my users.con:
[00491771111111]
fullname = 00491771111111
secret = MYVERYSECRET
type=peer
nat=yes
qualify=yes
qualifyfreq=60
hassip = yes
dahdichan = 1
transport=udp,tcp
callwaiting = no
context = default
host = dynamic
dtmfmode=rfc2833
dial=SIP/00491771111111
and finally "core reload".
On my Gateway I configured the NAT so:
/sbin/iptables -t nat -A PREROUTING -p udp --sport 6060 -j DNAT --to-destination 192.168.200.120:5060
/sbin/iptables -t nat -A PREROUTING -p tcp --sport 6060 -j DNAT --to-destination 192.168.200.120:5060
/sbin/iptables -t nat -A PREROUTING -p udp --dport 6060 -j DNAT --to-destination 192.168.200.120:5060
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 6060 -j DNAT --to-destination 192.168.200.120:5060
Well, the phone connect to the server and I can see it reachable:
OpenWrt*CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
00491771111111/0049177111 192.168.200.3 D N 40702 OK (1768 ms)
Well, now I call the mobile phone from another peer. It rings and I can
answer the call.
Wonderful!
But no word will be sent...
I cannot hear anything on my mobile phone and I cannot transmit a single
word....
I tried to connect my mobile phone to a public VoIP-Provider and it works
as expected, so I'm sure that the problem is on my network, but I can't
find it...
What am I doing wrong?
Thanks a lot
Luca Bertoncello
(lucabert@lucabert.de)
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
Ashwin.Surendran at no... Guest
|
Posted: Sun Jun 07, 2015 2:53 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
Have you tried NAT=force_rport ?
Ashwin
-----Original Message-----
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Luca Bertoncello
Sent: 07 June 2015 11:44
To: Asterisk Users
Subject: [asterisk-users] Curious problem with NAT
Hi list!
Since the internal calls work as expected and I can register my Asterisk on an external provider, I'd like to add a new feature and allow my mobile phone to connect to my Asterisk and manage calls.
Well, first of all, my Asterisk is NOT direct on Internet available, but behind a NAT.
So I configured my sip.conf:
localnet=192.168.200.0/24
externhost=myhost.noip.com
externrefresh=180
Then I added the peer in my users.con:
[00491771111111]
fullname = 00491771111111
secret = MYVERYSECRET
type=peer
nat=yes
qualify=yes
qualifyfreq=60
hassip = yes
dahdichan = 1
transport=udp,tcp
callwaiting = no
context = default
host = dynamic
dtmfmode=rfc2833
dial=SIP/00491771111111
and finally "core reload".
On my Gateway I configured the NAT so:
/sbin/iptables -t nat -A PREROUTING -p udp --sport 6060 -j DNAT --to-destination 192.168.200.120:5060 /sbin/iptables -t nat -A PREROUTING -p tcp --sport 6060 -j DNAT --to-destination 192.168.200.120:5060 /sbin/iptables -t nat -A PREROUTING -p udp --dport 6060 -j DNAT --to-destination 192.168.200.120:5060 /sbin/iptables -t nat -A PREROUTING -p tcp --dport 6060 -j DNAT --to-destination 192.168.200.120:5060
Well, the phone connect to the server and I can see it reachable:
OpenWrt*CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
00491771111111/0049177111 192.168.200.3 D N 40702 OK (1768 ms)
Well, now I call the mobile phone from another peer. It rings and I can answer the call.
Wonderful!
But no word will be sent...
I cannot hear anything on my mobile phone and I cannot transmit a single word....
I tried to connect my mobile phone to a public VoIP-Provider and it works as expected, so I'm sure that the problem is on my network, but I can't find it...
What am I doing wrong?
Thanks a lot
Luca Bertoncello
(lucabert@lucabert.de)
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
This email (and any attachments or hyperlinks within it) may contain information that is confidential, legally privileged or otherwise protected from disclosure. If you are not the intended recipient of this email, you are not entitled to use, disclose, distribute, copy, print, disseminate or rely on this email in any way. If you have received this email in error, please notify the sender immediately by telephone or email and destroy it, and all copies of it. Thank you for your cooperation.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
lucabert at lucabert.de Guest
|
Posted: Sun Jun 07, 2015 2:59 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
Ashwin Surendran <Ashwin.Surendran@now-health.com> schrieb:
Quote: | Have you tried NAT=force_rport ?
|
No, not yet...
I'll try later and report to the list...
Have I to define (in Asterisk or Gateway) the ports?
Thanks
Luca bertoncello
(lucabert@lucabert.de)
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
lucabert at lucabert.de Guest
|
Posted: Sun Jun 07, 2015 3:04 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
Ashwin Surendran <Ashwin.Surendran@now-health.com> schrieb:
Quote: | Have you tried NAT=force_rport ?
|
OK, tried...
I can transmit from my phone (aka: I hear my voice on another phone), but I'm
not able to receive data (aka: I cannot hear what I say on the other phone).
Other suggestion?
Thanks
Luca Bertoncello
(lucabert@lucabert.de)
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
Ashwin.Surendran at no... Guest
|
Posted: Sun Jun 07, 2015 3:35 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
What settings have you got for directmedia?
Could you try
nat=force_rport,comedia
directmedia=no
-Ashwin
-----Original Message-----
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Luca Bertoncello
Sent: 07 June 2015 12:04
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Curious problem with NAT
Ashwin Surendran <Ashwin.Surendran@now-health.com (Ashwin.Surendran@now-health.com)> schrieb:
Quote: | Have you tried NAT=force_rport ?
|
OK, tried...
I can transmit from my phone (aka: I hear my voice on another phone), but I'm not able to receive data (aka: I cannot hear what I say on the other phone).
Other suggestion?
Thanks
Luca Bertoncello
(lucabert@lucabert.de (lucabert@lucabert.de))
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
This email (and any attachments or hyperlinks within it) may contain information that is confidential, legally privileged or otherwise protected from disclosure. If you are not the intended recipient of this email, you are not entitled to use, disclose, distribute, copy, print, disseminate or rely on this email in any way. If you have received this email in error, please notify the sender immediately by telephone or email and destroy it, and all copies of it. Thank you for your cooperation. |
|
Back to top |
|
|
lucabert at lucabert.de Guest
|
Posted: Sun Jun 07, 2015 3:50 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
Ashwin Surendran <Ashwin.Surendran@now-health.com> schrieb:
Quote: | What settings have you got for directmedia?
Could you try
nat=force_rport,comedia
directmedia=no
|
Tried. Peer always unreachable, call not possible...
Other idea?
Thanks
Luca Bertoncello
(lucabert@lucabert.de)
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
stotaro at totarotechn... Guest
|
Posted: Sun Jun 07, 2015 7:46 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
On Sun, Jun 7, 2015 at 4:49 AM, Luca Bertoncello <lucabert@lucabert.de (lucabert@lucabert.de)> wrote:
Quote: | Ashwin Surendran <Ashwin.Surendran@now-health.com (Ashwin.Surendran@now-health.com)> schrieb:
Quote: | What settings have you got for directmedia?
Could you try
nat=force_rport,comedia
directmedia=no
|
Tried. Peer always unreachable, call not possible...
Other idea?
Thanks
Luca Bertoncello
(lucabert@lucabert.de (lucabert@lucabert.de))
|
Are you using the wifi on on the cellphone? The peer IP is showing as 192.168.200.3 which is not a routable address. Unless things have changed, double NAT configurations do not work.
Thanks,
Steve T |
|
Back to top |
|
|
stotaro at totarotechn... Guest
|
Posted: Sun Jun 07, 2015 7:52 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
On Sun, Jun 7, 2015 at 8:46 AM, Steve Totaro <stotaro@totarotechnologies.com (stotaro@totarotechnologies.com)> wrote:
Quote: |
On Sun, Jun 7, 2015 at 4:49 AM, Luca Bertoncello <lucabert@lucabert.de (lucabert@lucabert.de)> wrote:
Quote: | Ashwin Surendran <Ashwin.Surendran@now-health.com (Ashwin.Surendran@now-health.com)> schrieb:
Quote: | What settings have you got for directmedia?
Could you try
nat=force_rport,comedia
directmedia=no
|
Tried. Peer always unreachable, call not possible...
Other idea?
Thanks
Luca Bertoncello
(lucabert@lucabert.de (lucabert@lucabert.de))
|
Are you using the wifi on on the cellphone? The peer IP is showing as 192.168.200.3 which is not a routable address. Unless things have changed, double NAT configurations do not work.
Thanks,
Steve T
|
You could try using your carrier's internet access instead of wifi.
OpenVPN for Android looks like it could work to eliminate your NAT issues as well.
Thanks,
Steve T |
|
Back to top |
|
|
lucabert at lucabert.de Guest
|
Posted: Sun Jun 07, 2015 9:05 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
Zitat von Steve Totaro <stotaro@totarotechnologies.com>:
Quote: | Are you using the wifi on on the cellphone? The peer IP is showing as
192.168.200.3 which is not a routable address. Unless things have changed,
double NAT configurations do not work.
|
Hi Steve,
My Asterisk is behind a NAT, but my cellphone was NOT in NAT, but
direct in Internet.
But maybe my Provider does a NAT, too...
Very strange is, that I have a very poorly audio-quality, if I use my
cellphone in my WLAN and connect to my Asterisk.
With THE SAME USER, but from a PC in the same Network, the audio
quality is perfect.
Any idea?
Thanks
Luca Bertoncello
(lucabert@lucabert.de)
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
webaccounts173 at jgoe... Guest
|
Posted: Sun Jun 07, 2015 9:27 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
Quote: | Very strange is, that I have a very poorly audio-quality, if I use my cellphone in my WLAN and
connect to my Asterisk.
With THE SAME USER, but from a PC in the same Network, the audio quality is perfect.
Any idea?
| Did you check which codecs are active? What does "sip show channelstats" say?
jg
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
stotaro at totarotechn... Guest
|
Posted: Sun Jun 07, 2015 9:45 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
On Sun, Jun 7, 2015 at 10:05 AM, Luca Bertoncello <lucabert@lucabert.de (lucabert@lucabert.de)> wrote:
Quote: | Zitat von Steve Totaro <stotaro@totarotechnologies.com (stotaro@totarotechnologies.com)>:
Quote: | Are you using the wifi on on the cellphone? The peer IP is showing as
192.168.200.3 which is not a routable address. Unless things have changed,
double NAT configurations do not work.
|
Hi Steve,
My Asterisk is behind a NAT, but my cellphone was NOT in NAT, but direct in Internet.
But maybe my Provider does a NAT, too...
Very strange is, that I have a very poorly audio-quality, if I use my cellphone in my WLAN and connect to my Asterisk.
With THE SAME USER, but from a PC in the same Network, the audio quality is perfect.
Any idea?
Thanks
Luca Bertoncello
(lucabert@lucabert.de (lucabert@lucabert.de))
|
Not without seeing some SIP debug output.
Thanks,
Steve T |
|
Back to top |
|
|
lucabert at lucabert.de Guest
|
Posted: Sun Jun 07, 2015 9:52 am Post subject: [asterisk-users] Curious problem with NAT |
|
|
Zitat von Steve Totaro <stotaro@totarotechnologies.com>:
Quote: | Not without seeing some SIP debug output.
|
I'm currently not at home.
If you say me which debug output you wish, I can send them as soon
I'll be back...
Thanks
Luca Bertoncello
(lucabert@lucabert.de)
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|