Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Luca Bertoncello

Zitat von Steve Totaro :


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
(lucab...@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


Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Steve Totaro
On Sun, Jun 7, 2015 at 10:05 AM, Luca Bertoncello 
wrote:

> Zitat von Steve Totaro :
>
>  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
> (lucab...@lucabert.de)
>
>
>
>
Not without seeing some SIP debug output.

Thanks,
Steve T
-- 
_
-- 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

Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread jg


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


Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Luca Bertoncello

Zitat von Steve Totaro :


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
(lucab...@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


Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Steve Totaro
On Sun, Jun 7, 2015 at 8:46 AM, Steve Totaro  wrote:

>
>
> On Sun, Jun 7, 2015 at 4:49 AM, Luca Bertoncello 
> wrote:
>
>> Ashwin Surendran  schrieb:
>>
>> > 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
>> (lucab...@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
-- 
_
-- 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

Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Steve Totaro
On Sun, Jun 7, 2015 at 4:49 AM, Luca Bertoncello 
wrote:

> Ashwin Surendran  schrieb:
>
> > 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
> (lucab...@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
-- 
_
-- 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

Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Luca Bertoncello
Ashwin Surendran  schrieb:

> 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
(lucab...@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


Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Ashwin Surendran
What settings have you got for directmedia?



Could you try



nat=force_rport,comedia

directmedia=no



-Ashwin



-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@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 
mailto:ashwin.surend...@now-health.com>> 
schrieb:



> 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

(lucab...@lucabert.de<mailto:lucab...@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

Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Luca Bertoncello
Ashwin Surendran  schrieb:

> 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
(lucab...@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


Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Luca Bertoncello
Ashwin Surendran  schrieb:

> 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
(lucab...@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


Re: [asterisk-users] Curious problem with NAT

2015-06-07 Thread Ashwin Surendran
Have you tried NAT=force_rport ?

Ashwin

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@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:

[0049177111]
fullname = 0049177111
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/0049177111

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 HostDyn 
Forcerport ACL Port Status
0049177111/0049177111 192.168.200.3D   N
 40702OK (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
(lucab...@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


[asterisk-users] Curious problem with NAT

2015-06-07 Thread Luca Bertoncello
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:

[0049177111]
fullname = 0049177111
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/0049177111

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 HostDyn 
Forcerport ACL Port Status 
0049177111/0049177111 192.168.200.3D   N
 40702OK (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
(lucab...@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