The setup is behind the NAT and not sure if the above files are configured properly for the NAT. The customer is encountering call-drops so that is the main issue we are trying to solve.
My questions are:
Any settings in the sip.conf(related to NAT) will affect my VoIP system even though I only configured the pjsip.conf and I want to use only the pjsip.conf?
If I configure Nat settings in the sip.conf, will it help in call dropping issue even though I am using pjsip.conf?
I think sip.conf configuration will only affect devices using chan_sip.so , and also why just dont disble the chan_sip.so from your module configuration,
Also on the endpoint section this fix my nat issues
direct_media=no
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes ; necessary if endpoint does not know/register public ip:p
Also if you read the sample configuration file you will see an example for transport under nat
UDP transport behind NAT
;
;[transport-udp-nat]
;type=transport
;protocol=udp
;bind=0.0.0.0
;local_net=192.0.2.0/24
;external_media_address=203.0.113.1
;external_signaling_address=203.0.113.
Of course, settings in sip.conf affect only endpoints using chan_sip, whereas settings in chan_pjsip affect only endpoints using chan_pjsip.
However, your configuration files are conflicting with each other: both tell their channel drivers to listen on UDP/5060, but which one is actually taking it?
As you are using PJSIP, I suggest temporarily unloading “old” SIP: module unload chan_sip
Regarding NAT itself, it depends on whether it has opeartional SIP ALG or not.
If “yes”, you should NOT manually provide external addresses in pjsip.conf - ALG will discover them.
If “no”, you SHOULD provide them as shown in the example:
I have all the settings related to the NAT as you mentioned in the comments other than “rtp_symmetric=yes”. Can you explain what is the use of that?
Also, currently I am using the TCP as you can see from my file, should I switch to the UDP? I was using the UDP but was having issue with incoming calls so switched to TCP and it helped solving that problem.
@Pentium-5
What is SIP ALG? If I am unloading the SIP channel (Chan_sip) and going to use the pjsip channel only, should I add the external addresses or not? Note: currently we add the external addresses to all the customer.
ALG stands for “Application Layer Gateway”. This feature can be enabled on a network equipment (more specifically, on a device doing NAT) to translate IP addresses inside IP packets (i.e. in SIP and SDP messages) along with translating IP headers from private to public addresses and backwards.