Can't register trunk

I’m seeing-
[2023-04-05 11:50:48] WARNING[1909] res_pjsip_outbound_registration.c: No response received from ‘sip:holtain.intervoip.co.uk:5060’ on registration attempt to ‘sip:[email protected]:5060’, retrying in ‘60’

And I think it might be because no request is sent as I’m seeing no traffic on port 5060 apart from connections from a Yealink W70B which is why I’m excluding 10.0.0.45

tcpdump -vv -s 4096 port 5060 and not host 10.0.0.45
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 4096 bytes

How is the hostname supposed to be resolved? Does it resolve locally?

dig finds the SRV record-

dig srv _sip._udp.holtain.intervoip.co.uk

; <<>> DiG 9.11.5-P4-5.1+deb10u8-Raspbian <<>> srv _sip._udp.holtain.intervoip.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15165
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 2, ADDITIONAL: 9

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 17530d001a9a588a961ede03642dba1b103f41cea33d7bed (good)
;; QUESTION SECTION:
;_sip._udp.holtain.intervoip.co.uk. IN SRV

;; ANSWER SECTION:
_sip._udp.holtain.intervoip.co.uk. 300 IN SRV 30 0 5060 sip54.intervoip.co.uk.
_sip._udp.holtain.intervoip.co.uk. 300 IN SRV 30 0 5060 sip51.intervoip.co.uk.
_sip._udp.holtain.intervoip.co.uk. 300 IN SRV 30 0 5060 sip56.intervoip.co.uk.
_sip._udp.holtain.intervoip.co.uk. 300 IN SRV 20 0 5060 sip52.intervoip.co.uk.
_sip._udp.holtain.intervoip.co.uk. 300 IN SRV 10 0 5060 sip55.intervoip.co.uk.
_sip._udp.holtain.intervoip.co.uk. 300 IN SRV 30 0 5060 sip53.intervoip.co.uk.

;; AUTHORITY SECTION:
intervoip.co.uk. 1451 IN NS ns1.interdns.co.uk.
intervoip.co.uk. 1451 IN NS ns2.interdns.co.uk.

;; ADDITIONAL SECTION:
sip55.intervoip.co.uk. 1095 IN A 188.240.172.50
sip52.intervoip.co.uk. 1095 IN A 80.209.159.50
sip51.intervoip.co.uk. 1095 IN A 80.209.159.49
sip53.intervoip.co.uk. 1095 IN A 80.209.159.51
sip54.intervoip.co.uk. 1095 IN A 188.240.172.49
sip56.intervoip.co.uk. 1095 IN A 188.240.172.51
ns1.interdns.co.uk. 2729 IN A 83.170.124.44
ns2.interdns.co.uk. 2874 IN A 173.244.219.15

SRV won’t be used if a port is specified. It needs to be “sip:[email protected]

Where?

holtain.intervoip.co.uk doesn’t resolve as either A or SRV records

I don’t work on or use FreePBX, so someone else will have to give a recommendation on how to achieve that in FreePBX. I can just say from an Asterisk perspective what needs to happen.

You’ll need to check with your VoIP provider to see from them what fqdn you should use in that trunk that’s an A record and not an SRV record. If they don’t have a preference maybe you could try using one of the ones that are inside the SRV record?

sip55.intervoip.co.uk. 1095 IN A 188.240.172.50
sip52.intervoip.co.uk. 1095 IN A 80.209.159.50
sip51.intervoip.co.uk. 1095 IN A 80.209.159.49
sip53.intervoip.co.uk. 1095 IN A 80.209.159.51
sip54.intervoip.co.uk. 1095 IN A 188.240.172.49
sip56.intervoip.co.uk. 1095 IN A 188.240.172.51

If with SIP Server Port left blank, you still cannot register, at the Asterisk command prompt type
pjsip set logger on
wait two minutes, paste the Asterisk log showing the failed registration attempt at pastebin.com or similar, and post the link here.

OK I think leaving the port blank has fixed it
[2023-04-06 07:41:18] VERBOSE[8225] res_pjsip/pjsip_options.c: Contact TestCIX/sip:[email protected] is now Reachable. RTT: 69.186 msec

So I take it we’re connected even though I’s still seeing

[2023-04-06 07:41:40] WARNING[8225] res_pjsip_outbound_registration.c: No response received from ‘sip:[email protected]:5060’ on registration attempt to ‘sip:[email protected]’, retrying in ‘60’

Maybe. If Asterisk Info → Registries doesn’t show the trunk as Registered, there is still a problem. On the Advanced tab for the trunk, confirm that Client URI and Server URI are both blank. If that’s not your issue, please paste the Asterisk log for a failed registration (with pjsip logger on), as requested earlier.

OK, operator error at my end when trying to get incoming calls working, now got-

<Registration/ServerURI…> <Auth…> <Status…>

TestCIX/sip:holtain.intervoip.co.uk TestCIX Registered

Objects found: 1

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