Currently, I am able to establish SIP communication between a mobile phone and a PC within the same (private) network by means of Asterisk. My sip.conf file contains something like the following:
Now, I want to replicate this experiment by having both devices in different networks, so it is expected to deal with the public network and, therefore, NAT. The scenario I prepared is as follows:
The call receiver, which is a PC also having the Asterisk server, is in the same private network as the caller, which is a mobile phone. Optionally, the mobile phone is connected to the data network so both devices are indeed in different networks.
I added the following under the [general] tab in the sip.conf file:
As well as the following under each user tab, i.e., [ste] and [steand]:
When trying to make a call, I see that the caller is not registered and it seems that Asterisk sees nothing. To make such a call, I set the public IP 220.127.116.11 for Asterisk.
As I am also using PJSIP, I also tried by modifying the pjsip.conf file as follows:
This way, I also fixed “transport=transport-udp-nat” under each user tab, i.e., [ste] and [steand]. Nevertheless, when reloading the SIP configuration at Asterisk, I get the following message: chan_sip.c:32405 reload_config: ‘transport-udp-nat’ is not a valid transport type. if no other is specified, udp will be used.
In summary I am not able to make it work. Any help will be really appreciated.
Thank you very much in advance.