"srvlookup" flag equivalent of sip.conf in pjsip.conf

Recently, I have moved from chan_sip to res_pjsip. Also, I do not rely on public internet for DNS resolution instead do DNS resolution through /etc/hosts.

Earlier in chan_sip, I was using “srvlookup=false” in sip.conf and with that asterisk directly take dns values from /etc/hosts file rather than doing run time dns lookup and all endpoints (trunks) come up online within a second. I have a large list of endpoints (trunks 100+) which are not publicly resolvable

But after moving from chan_sip to res_pjsip, I am not able to find such flag in pjsip.conf.

Please help me with equivalent of “srvlookup” flag in PJSIP.conf

There is no equivalent. It always does SRV and NAPTR lookups. You’d either need to do a DNS arrangement such that the lookups fail immediately, modify the code, or use IP addresses.

Could you please help me with the beginning point of DNS lookup in the code. So that I can accordingly modify the code as per the requirement.

The resolution callback logic is contained in the resolver file[1].

[1] asterisk/pjsip_resolver.c at master · asterisk/asterisk · GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.