PJSIP and NAT in Virtualbox (NAT network)

Hello,
I’m working with a testing machine in Virtualbox with Asterisk 20.
I’ve a problem with NAT, and after read the wiki (Configuring res_pjsip to work through NAT - Asterisk Project - Asterisk Project Wiki) I can’t do it to work correctly.
If I change the vm network connection to bridge adapter, all works perfectly, but if I change it to NAT network (not NAT), and I configure in port forwarding:
UDP 127.0.0.2 in port 50600 (host) to my local vm IP (for example 10.10.10.10/8) in the 5060 UDP, all requests to 127.0.0.2 in the 50600 UDP will be forwarded to my virtualized Asterisk 20 in the 10.10.10.10:5060.
I can configure softphones (or hardphones) and connect without problems with my virtualized Asterisk 20.
The problem is that the audio, DTMF, hangup, ecc, don’t work (but in the same LAN all work perfectly), then, I’ve a NAT problem.
As I said I read the wiki, but I think a VirtualBox NAT network is different, because it map ip-port in the host to ip-port virtualized, then, i think it’s a problem.
That’s my transport configuration:

[transport-udp-nat]
type = transport
protocol = udp
bind = 0.0.0.0
; NAT settings  
local_net = 10.0.0.0/8
external_media_address = 127.0.0.2:50600
external_signaling_address = 127.0.0.2:50600

And don’t work because the external IP it’s really a loopback IP, then I can’t know if it’s possible to do it and how.
Regards

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.