REGISTER 405 Method not allowed

Fresh install of pure asterisk v. 19.3.3 with basic-pbx samples, my client fail to register, but I cannot figure out why.

2022/05/11 10:27:34.310483 10.7.208.110:45618 -> 10.7.208.110:5060
REGISTER sip:10.7.208.110 SIP/2.0
Via: SIP/2.0/TCP 10.7.208.110:45618;alias;branch=z9hG4bK.l3SmH9XEj;rport
From: <sip:ACC6BC73A990@10.7.208.110>;tag=DjuBX3j8s
To: sip:ACC6BC73A990@10.7.208.110
CSeq: 22 REGISTER
Call-ID: u2byQiJN61
Max-Forwards: 70
Supported: replaces, outbound, gruu
Accept: application/sdp
Accept: text/plain
Accept: application/vnd.gsma.rcs-ft-http+xml
Contact: <sip:ACC6BC73A990@10.7.208.110:45618;transport=tcp>;+sip.instance="<urn:uuid:a71d6c7b-0ad4-4e9f-92b5-e4524392d891>";+org.linphone.specs=
phemeral/1.1,groupchat/1.1"
Expires: 600
User-Agent: Linphone Desktop/4.4.0 (tec1) Debian GNU/Linux 11 (bullseye), Qt 5.12.12 LinphoneCore/5.1.19
Content-Length: 0


2022/05/11 10:27:34.350286 10.7.208.110:5060 -> 10.7.208.110:45618
SIP/2.0 405 Method not allowed
Via: SIP/2.0/TCP 10.7.208.110:45618;alias;branch=z9hG4bK.l3SmH9XEj;rport
From: <sip:ACC6BC73A990@10.7.208.110>;tag=DjuBX3j8s
To: <sip:ACC6BC73A990@10.7.208.110>;tag=XEr7-
Call-ID: u2byQiJN61
CSeq: 22 REGISTER
Allow: INVITE, CANCEL, ACK, BYE, SUBSCRIBE, NOTIFY, MESSAGE, OPTIONS, INFO
Content-Length: 0


2022/05/11 10:28:34.388138 10.7.208.110:45618 -> 10.7.208.110:5060
REGISTER sip:10.7.208.110 SIP/2.0
Via: SIP/2.0/TCP 10.7.208.110:45618;alias;branch=z9hG4bK.TXWYVSEP3;rport
From: <sip:ACC6BC73A990@10.7.208.110>;tag=DjuBX3j8s
To: sip:ACC6BC73A990@10.7.208.110
CSeq: 23 REGISTER
Call-ID: u2byQiJN61
Max-Forwards: 70
Supported: replaces, outbound, gruu
Accept: application/sdp
Accept: text/plain
Accept: application/vnd.gsma.rcs-ft-http+xml
Contact: <sip:ACC6BC73A990@10.7.208.110:45618;transport=tcp>;+sip.instance="<urn:uuid:a71d6c7b-0ad4-4e9f-92b5-e4524392d891>";+org.linphone.specs=
phemeral/1.1,groupchat/1.1"
Expires: 600
User-Agent: Linphone Desktop/4.4.0 (tec1) Debian GNU/Linux 11 (bullseye), Qt 5.12.12 LinphoneCore/5.1.19

Looks to me as though Asterisk is not involved at all and you are trying to register the phone on itself.

PS if Asterisk had been involved, we would have wanted the verbose logs from Asterisk itself, and to know which channel driver was in use (although proper logging would have revealed that. However, in this case, there will be nothing for Asterisk to log, as it won’t have seen the request.)

Not at all, simply asterisk is running (and listening on port 5060) on the same machine of the client.
I’m using sngrep, can you please point me out to how to get the log you need?
Thanks

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

Is Asterisk bound to 5060/TCP as well as 5060/UDP? Did the bind succeed?

chan_sip has a hard-coded Allow line, so couldn’t produce the response you are seeing. chan_pjsip may or may not have it hard coded, but there is more than REGISTER missing, and the order is not the normal order.

chan_pjsip also generates a rather long To tag, which is not consistent with the short one in your trace.

Unless you deliberately configure it without a user agent, Asterisk would add a Server line.

I’ve started out from:
http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-19.3.3.tar.gz

But now I see there’s a 19.4xxx.
I’m using pjsip as chan_sip has been removed.
I’ve just copied the samples to avoid mistakes, it’s like the developer packed it up, no customizations.

Everything is commented out in pjsip.conf.sample, so I’d expect chan_pjsip to refuse to load, until you customised it.

I’m using this one from “basic-pbx”

That configuration only supports connectivity using UDP. Your endpoint is using TCP. It is not connecting to Asterisk.

thank you, I’ve edited the connecion on the client, but no luck:


2022/05/11 14:44:36.778629 10.7.208.110:5060 -> 10.7.208.110:5060
REGISTER sip:10.7.208.110 SIP/2.0
Via: SIP/2.0/UDP 10.7.208.110:5060;branch=z9hG4bK.C7bayK7X~;rport
From: <sip:ACC6BC73A990@10.7.208.110>;tag=24xJG3drU
To: sip:ACC6BC73A990@10.7.208.110
CSeq: 21 REGISTER
Call-ID: id4eXRvQn6
Max-Forwards: 70
Supported: replaces, outbound, gruu
Accept: application/sdp
Accept: text/plain
Accept: application/vnd.gsma.rcs-ft-http+xml
Contact: <sip:ACC6BC73A990@10.7.208.110;transport=udp>;+sip.instance="<urn:uuid:a71d6c7b-0ad4-4e9f-92b5-e4524392d891>";+org.linphone.specs="ephem
al/1.1,groupchat/1.1"
Expires: 600
User-Agent: Linphone Desktop/4.4.0 (tec1) Debian GNU/Linux 11 (bullseye), Qt 5.12.12 LinphoneCore/5.1.19


2022/05/11 14:44:36.812256 10.7.208.110:5060 -> 10.7.208.110:5060
SIP/2.0 405 Method not allowed
Via: SIP/2.0/UDP 10.7.208.110:5060;branch=z9hG4bK.C7bayK7X~;rport
From: <sip:ACC6BC73A990@10.7.208.110>;tag=24xJG3drU
To: <sip:ACC6BC73A990@10.7.208.110>;tag=KF7M5
Call-ID: id4eXRvQn6
CSeq: 21 REGISTER
Allow: INVITE, CANCEL, ACK, BYE, SUBSCRIBE, NOTIFY, MESSAGE, OPTIONS, INFO

It’s registering to itself, not to Asterisk. You have to ensure that different ports are used if running things on the same system.