Dear community,
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:
[general]
type=global
context=local_test
callevents=yes
notifyhold=yes
allowoverlap=no
udpbindaddr=0.0.0.0
…
[ste]
type=friend
secret=ste
host=dynamic
context=local_test
[steand]
type=friend
secret=steand
host=dynamic
context=local_test
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:
port=5060
bindaddr=0.0.0.0:5060
externip=83.48.67.242
localnet=192.168.5.0
localmask=255.255.255.0
As well as the following under each user tab, i.e., [ste] and [steand]:
nat=force_rport,comedia
ice_support=yes
-
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 83.48.67.242 for Asterisk.
-
As I am also using PJSIP, I also tried by modifying the pjsip.conf file as follows:
[transport-udp-nat]
type=transport
protocol=udp
bind=0.0.0.0:5060
local_net=192.168.5.0/24
external_media_address=83.48.67.242
external_signaling_address=83.48.67.242
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.