Asterisk 16 and NAPTR/SRV


#1

Hi!

Does someone know whether chan_sip’s support works, or whether pjsip should be preferred?

I have a SIP trunk with configuration data that don’t simply map to A records, so I basically need to (theoretically) evaluate NAPTR and then the SRV records. I’ve set srvlookup to yes and the pcap traces do show _sip._tcp… requests and answers, but the line does not register. When I do the lookup by hand and update /etc/hosts, everything works as expected.

I am using a small php script that evaluates whatever the NAPTR request returns and updates the hosts file with the server that has the highest priority. It works, takes only a few lines of code, but it feels like a primitive hack.


#2

The chan_sip module has no support for NAPTR, and has basic SRV support (it is resolved at load or reload time only).

The chan_pjsip module has both NAPTR and SRV support, and resolution occurs at use time (when a request needs to be sent) so balancing also occurs. It also has tests in our testsuite to verify functionality.


#3

Thank you for the fast reply. It also means, that I finally have to get familiar with pjsip…