SRV lookup for PJSIP channel driver

Hi all,

My SIP provider requires using DNS SRV lookup as it balances the load between several SIP servers.
The option to enable or disable SRV lookup is available In an “old” chan_sip driver. However, I did not manage find it in a “new” chan_pjsip driver.
Is SRV lookup supported by chan_pjsip? If “yes”, how can I enable or disable it?

Thanks in advance.

According to the asterisk wiki here https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Wizard SRV records are not currently supported I suggest you use chan_sip for the carrier trunk and pjsip for the end points/devices. Pjsip is still behind on feature parity with chan_sip in some areas.

Jason

That wiki is slightly outdated. This is supported in asterisk 14

http://blogs.asterisk.org/2016/04/20/pjsip-dns-support/

Thank you Andrew

So I’ve got a question about this. I built a SRV record and the system was able to identify the IPs (in order), as expected, but it can’t pass a call (receives a call though) - for outbound, it always considers the trunks unavailable. I make it an A RECORD, and it starts passing outbound calls - remove it so the SRV RECORD is all that’s left, and outbound fails… I was thinking, maybe in order to make it truly use SRV, you’d put something else in for the PORT (since the port is normally derived from the SRV record). Has anyone gotten this working in FPBX 14 with Asterisk 14, and if so, what needed to be done to make it work?

Thanks.

Endpoint: IO–VI_PJSIP Unavailable 0 of inf
Aor: IO–VI_PJSIP 0
Contact: IO–VI_PJSIP/sip:trk-c1-alpha-diod-gen.gog ebb9bfa8a6 Unavail 0.000
Transport: 0.0.0.0-udp udp 0 0 0.0.0.0:5060
Identify: IO–VI_PJSIP/IO–VI_PJSIP
Match: 64.136.174.30/32
Match: 64.136.173.22/32
Match: 209.166.128.200/32
Match: 192.240.151.100/32
Match: 64.136.173.31/32
Match: 64.136.174.20/32
Match: 209.166.154.70/32

-- Executing [s@macro-dialout-trunk:23] GotoIf("PJSIP/1602-00000023", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:24] Dial("PJSIP/1602-00000023", "PJSIP/18005585456@IO--VI_PJSIP,300,T") in 

new stack
[2017-11-20 17:43:52] ERROR[20076]: res_pjsip.c:3106 ast_sip_create_dialog_uac: Endpoint ‘IO–VI_PJSIP’: Could not
create dialog to invalid URI ‘IO–VI_PJSIP’. Is endpoint registered and reachable?
[2017-11-20 17:43:52] ERROR[20076]: chan_pjsip.c:2178 request: Failed to create outgoing session to endpoint ‘IO–V
I_PJSIP’
[2017-11-20 17:43:52] WARNING[31614][C-0000001d]: app_dial.c:2525 dial_exec_full: Unable to create channel of type
’PJSIP’ (cause 3 - No route to destination)