These parameters are only an example and you might need to change it based on your local setup to work properly.



sip.conf example:


[general]
nat=force_rport,comedia
externip=(your Server Public IP:Port)
localnet=If your Switchbaord in Behind a NAT add the local IP:Mask - 192.168.0.0/255.255.0.0)
callcounter=yes
busylevel=2
qualify=yes
sendrpid=pai
trustrpid=yes
canreinvite=no
sipreinvite=no
allowguest=no
alwaysauthreject=yes
language=en
dtmfmode=rfc2833
tcpenable=yes



[Megacall-SIP Trunk]
type=peer
insecure=invite,port
host=185.106.240.227
fromdomain=(your Server Public IP)
disallow=all
allow=alaw,ulaw
context=from_megacall




Firewall


Signalling: Make sure you allow ALL traffic from the following IP Addresses: 

185.106.240.227


RTP: We recommend allowing all traffic from any IP on Port Range 10000-20000. 



DNS SERVER


Asterisk does not support DNS SERVER lookups for inbound calls. If you also have virtual phone number with your SIP Trunk service please add the following line to the "sip_general_custom.conf" file:

srvlookup=no