Asterisk User or Peer and Friend creation behind the NAT
Here is the simple Asterisk friend or Peer and user configuration behind the NAT.
Add the following line of code in sip.conf file to create a user behind the NAT.
1 2 3 4 5 6 7 8 9 10 |
[Venkatesh] type=friend host=dynamic secret=mysupersecret context=mycontext nat=force_rport,comedia qualify=yes disallow=all allow=speex allow=ulaw |
Note: Qualify parameter set to yes, it will send periodically sends OPTIONS messages to keep the NAT connection open between the Client and Asterisk Server.