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 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.


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

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?


Endpoint: IO–VI_PJSIP Unavailable 0 of inf
Contact: IO–VI_PJSIP/sip:trk-c1-alpha-diod-gen.gog ebb9bfa8a6 Unavail 0.000
Transport: udp 0 0

-- Executing [[email protected]:23] GotoIf("PJSIP/1602-00000023", "0?customtrunk") in new stack
-- Executing [[email protected]:24] Dial("PJSIP/1602-00000023", "PJSIP/[email protected]_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
[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)