Failed To Register

line is an optional URI parameter that allows calls from the same IP address to be distinguished. It’s been supported in chan_pjsip for outgoing registrations for a long time, and looks like has it has been recently added to the FreePBX GUI:

https://issues.freepbx.org/browse/FREEPBX-21449

You are simply seeing it being used in the inbound registration direction, where its use should be completely transparent, as even unknown parameters should just be sent, as is, in outgoing requests.

Is your SIP-channel-driver in settings/advanced setting on “both” or non pjsip only? Can you find the new extension at admin / config edit → xxxsip.endpoint.conf. I would try to create a new pjsip endpoint, which may be either listening in port 5160 or on port 5060 is sip settings are “both”.

SIP Channel driver WAS set to ONLY PJSIP when I first set up this sever…when issue of endpoints arose, I enabled BOTH Chan_sip and Chan_pjsip and set my Ports etc accordingly - but that did not fix it…

Yes - the extension 111 does exist in that config file but NOT show when I run pjsip show endpoints or pjsip show contacts. … I copied this from the pjsip.config…
[111]
type=endpoint
aors=111
auth=111-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
allow=
context=from-internal
callerid=Bret Martin <111>

dtmf_mode=rfc4733
direct_media=yes
mailboxes=111@default

mwi_subscribe_replaces_unsolicited=yes
aggregate_mwi=yes
use_avpf=no
rtcp_mux=no
max_audio_streams=1
max_video_streams=1
bundle=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=no
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=yes
refer_blind_progress=yes
rtp_timeout=30
rtp_timeout_hold=300
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord
set_var=CHANNEL(parkinglot)=default

There’s no allowed codecs, which is an invalid configuration for the endpoint. This would result in the endpoint not being loaded, and it would not show up in “pjsip show endpoints”.

OK - I thought the Global setting would take care of it - I left the extensions Allow/Disallow default which is for this extension…
Disallowed Coceds … Blank
Allowed Codecs…yes ( I did not put the “yes” there )

So OK what are the best practice settings for an individual extension… for the Disallowed and Allowed Codecs?
I remember seeing
Disallowed = ALL
Allowed = g729&ulaw&g722

Should I use these ??

It’s unlikely you want to use g729. Most people use g722 and ulaw, as that is widely supported.

Well guess if this don’t beat all !!! I set Disallow to all and Allowed Codecs to g729&g722&ulaw&g711&alaw

We did use g729 on our previous servers - we just kept it since we had the license for it - if it is troublesome, I can disable it.

But - the ext 111 is now registered and the works works just fine !!

Thank you so very much !!

The choice of ulaw or alaw should depend where you are in the world. µ-law is basically the Americas and Japan, and A-law the rest of the world.

I don’t think g711 is recognized; both A-law and µ-law are variants of G.711.

Putting your lowest audio quality codec first and the wide band linear one near the end doesn’t make sense to me

Any idea what this means on pjsip extensions?
92 works, 91 doesn’t. Same config, same yealink-phone. 91 is a newly created extension.

  • Added contact ‘sip:[email protected]:62803;x-ast-orig-host=192.168.50.7:5060’ to AOR ‘92’ with expiration of 3600 seconds
    == Endpoint 92 is now Reachable
    – Contact 92/sip:[email protected]:62803;x-ast-orig-host=192.168.50.7:5060 is now Reachable. RTT: 61.798 msec
    – Removed contact ‘sip:[email protected]:62803;x-ast-orig-host=192.168.50.7:5060’ from AOR ‘92’ due to request
    == Contact 92/sip:[email protected]:62803;x-ast-orig-host=192.168.50.7:5060 has been deleted
    == Endpoint 92 is now Unreachable
    [2022-08-03 22:38:57] NOTICE[47412]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘REGISTER’ from ‘“Arbeitszimmer” sip:[email protected]’ failed for ‘91.22.7.243:62803’ (callid: [email protected]) - Failed to authenticate
    [2022-08-03 22:38:57] NOTICE[47412]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘REGISTER’ from ‘“Arbeitszimmer” sip:[email protected]’ failed for ‘91.22.7.243:62803’ (callid: [email protected]) - Failed to authenticate
    [2022-08-03 22:38:57] NOTICE[47412]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘REGISTER’ from ‘“Arbeitszimmer” sip:[email protected]’ failed for ‘91.22.7.243:62803’ (callid: [email protected]) - Failed to authenticate
    [2022-08-03 22:38:57] NOTICE[47412]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘REGISTER’ from ‘“Arbeitszimmer” sip:[email protected]’ failed for ‘91.22.7.243:62803’ (callid: [email protected]) - Failed to authenticate

(Having two endpoints register with exactly the same address doesn’t seem to be a good idea, even though one is deleted before the attempt to add the other. I don’t think that is why the authentication failed.)

seems not to be the point.
Both endpoints allow for 5 connects at the same time.
I can register at 92 with 3 different hardphones, softphones and whatever on port 5060, 5061.
All comming via NAT (in fact 192.168.50.xxx internal and same routers address 91.22.xxx.yyy)
It work at 92
None is registering at endpoint 91.
In the example above I de-registered at 92, changed the yealink account to 91, put in the new password - and errormessage. not registered.

Uhm. Yes, you can register multiple endpoints from the same IP just fine.

This is two different accounts. 92 is registering fine and removing the existing contact for the new one. That is fine.

91 is failing to authenticate. That could be due to bad configs or passwords.

config for 92 and 91 is identical in pjsip.endpoint.conf, aor.conf and auth.conf PW is cp - paste from admin-gui to yealink gui.
May there be any misconf in settings - advanced settings or in sip-settings? I changed some things after the creation of 92 and before setting up 91, specifically for http.conf because of trying a solution for web-rtc.

You cannot use the same endpoint for a phone and webrtc. If you are trying to do that with 91, that is the problem.

Not if they have the same port as well and don’t use something like a line parameter to disambiguate them. It looks like the contact did include a user, so, if the other side were FreePBX, it wouldn’t be able distinguish the endpoint, but the DIDs would still be different, so a different incoming route could be matched.

I did point out that it was de-registering, so there wasn’t actually a conflict I just felt it was pushing the boundaries a little too much for comfort.

I have to say, that 91 does not have an incomming route until now. But in the first step I just wanted to create a situation, where extensions within the FreePBX can talk to each other and maybe can talk and see each other by using plain asterisk webrtc video conf from PC to PC. Thing is that 20 Zulu licences with UCP are fare to expensive for more or less private use.

What is a line parameter and where do I input such one? Finally the goal for this FreePBX will be to substitute 3 on-premise installations by one cloud-FreePBX where 20 extension shall register shall register from one (external) IP (yealinks behind a local router), 5 from another ext. IP, and further 5 from a third IP. In addition PCs with softphones may come from a 4th IP and maybe some mobile phones register with their providers IP.
Therefore my current private FreePBX will grow to my corporate PBX - once I fullfills the required needs.

You are probably better off ignoring line= unless there is evidence that it is really needed. Simultaneous registrations from the same IP might end up being distinguished by port number.

However, in the immediate context, this is something that would have to be configured on the phones. I noticed one phone configuration screen shot, posted today, seems to have an option to enable them.

I posted a link about using one the other way, from FreePBX, in the last few days, i.e. when you have multiple accounts with the same ITSP, from a single FreePBX box.

At this point we should be looking at the results of pjsip set logger on to see what is happening during the REGISTER process and that the device is sending things properly.

Can you help understanding the logger-on replays?
cent*CLI> pjsip set logger on
PJSIP Logging enabled
<— Transmitting SIP request (466 bytes) to UDP:212.227.124.130:5060 —>
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 217.160.249.134:5060;rport;branch=z9hG4bKPj632e3ab4-6060-4d92-960a-358d95e31daf
From: sip:[email protected];tag=01dba551-973e-4e80-a222-daa2a50c0e54
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: 569f881b-026a-443b-a2ee-d70d71558254
CSeq: 20076 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-16.0.21.8(16.25.0)
Content-Length: 0

<— Received SIP response (419 bytes) from UDP:212.227.124.130:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 217.160.249.134:5060;rport=5060;branch=z9hG4bKPj632e3ab4-6060-4d92-960a-358d95e31daf;received=217.160.249.134
From: sip:[email protected];tag=01dba551-973e-4e80-a222-daa2a50c0e54
To: sip:[email protected];tag=afe348e378f926b4e3bf8536bde083f0.b837fb8e
Call-ID: 569f881b-026a-443b-a2ee-d70d71558254
CSeq: 20076 OPTIONS
Server: UI Kamailio
Content-Length: 0

<— Received SIP request (564 bytes) from UDP:91.34.111.79:62820 —>
REGISTER sip:217.160.249.134 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.7:5060;branch=z9hG4bK2534761546
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected]
Call-ID: [email protected]
CSeq: 1 REGISTER
Contact: sip:[email protected]:5060
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T46S 66.86.0.15
Expires: 3600
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 0

<— Transmitting SIP response (507 bytes) to UDP:91.34.111.79:62820 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.7:5060;rport=62820;received=91.34.111.79;branch=z9hG4bK2534761546
Call-ID: [email protected]
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected];tag=z9hG4bK2534761546
CSeq: 1 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1659629568/5199ab9686c5d05b63e8565a03d05b48”,opaque=“449a79f50720ab61”,algorithm=md5,qop=“auth”
Server: FPBX-16.0.21.8(16.25.0)
Content-Length: 0

<— Received SIP request (830 bytes) from UDP:91.34.111.79:62820 —>
REGISTER sip:217.160.249.134 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.7:5060;branch=z9hG4bK2534820938
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected]
Call-ID: [email protected]
CSeq: 2 REGISTER
Contact: sip:[email protected]:5060
Authorization: Digest username=“91”, realm=“asterisk”, nonce=“1659629568/5199ab9686c5d05b63e8565a03d05b48”, uri=“sip:217.160.249.134”, response=“0ba22a8e9d16f41af20f3e23cb570d7b”, algorithm=MD5, cnonce=“2534880733”, opaque=“449a79f50720ab61”, qop=auth, nc=00000001
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T46S 66.86.0.15
Expires: 3600
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 0

[2022-08-04 18:12:48] NOTICE[47587]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘REGISTER’ from ‘“Arbeitszimmer” sip:[email protected]’ failed for ‘91.34.111.79:62820’ (callid: [email protected]) - Failed to authenticate
<— Transmitting SIP response (507 bytes) to UDP:91.34.111.79:62820 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.7:5060;rport=62820;received=91.34.111.79;branch=z9hG4bK2534820938
Call-ID: [email protected]
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected];tag=z9hG4bK2534820938
CSeq: 2 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1659629568/5199ab9686c5d05b63e8565a03d05b48”,opaque=“5fa53b6e60be85d3”,algorithm=md5,qop=“auth”
Server: FPBX-16.0.21.8(16.25.0)
Content-Length: 0

<— Received SIP request (830 bytes) from UDP:91.34.111.79:62820 —>
REGISTER sip:217.160.249.134 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.7:5060;branch=z9hG4bK2534963118
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected]
Call-ID: [email protected]
CSeq: 3 REGISTER
Contact: sip:[email protected]:5060
Authorization: Digest username=“91”, realm=“asterisk”, nonce=“1659629568/5199ab9686c5d05b63e8565a03d05b48”, uri=“sip:217.160.249.134”, response=“cb55c8e767f406b4f9583b43afecce11”, algorithm=MD5, cnonce=“2535019992”, opaque=“5fa53b6e60be85d3”, qop=auth, nc=00000001
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T46S 66.86.0.15
Expires: 3600
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 0

[2022-08-04 18:12:48] NOTICE[47587]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘REGISTER’ from ‘“Arbeitszimmer” sip:[email protected]’ failed for ‘91.34.111.79:62820’ (callid: [email protected]) - Failed to authenticate
<— Transmitting SIP response (507 bytes) to UDP:91.34.111.79:62820 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.7:5060;rport=62820;received=91.34.111.79;branch=z9hG4bK2534963118
Call-ID: [email protected]
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected];tag=z9hG4bK2534963118
CSeq: 3 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1659629568/5199ab9686c5d05b63e8565a03d05b48”,opaque=“16d516c57dd853bf”,algorithm=md5,qop=“auth”
Server: FPBX-16.0.21.8(16.25.0)
Content-Length: 0

<— Received SIP request (830 bytes) from UDP:91.34.111.79:62820 —>
REGISTER sip:217.160.249.134 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.7:5060;branch=z9hG4bK2535121112
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected]
Call-ID: [email protected]
CSeq: 4 REGISTER
Contact: sip:[email protected]:5060
Authorization: Digest username=“91”, realm=“asterisk”, nonce=“1659629568/5199ab9686c5d05b63e8565a03d05b48”, uri=“sip:217.160.249.134”, response=“388bb539c4f22b40b48ddfcb98df0ffc”, algorithm=MD5, cnonce=“2535186960”, opaque=“16d516c57dd853bf”, qop=auth, nc=00000001
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T46S 66.86.0.15
Expires: 3600
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 0

[2022-08-04 18:12:48] NOTICE[47587]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘REGISTER’ from ‘“Arbeitszimmer” sip:[email protected]’ failed for ‘91.34.111.79:62820’ (callid: [email protected]) - Failed to authenticate
<— Transmitting SIP response (507 bytes) to UDP:91.34.111.79:62820 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.7:5060;rport=62820;received=91.34.111.79;branch=z9hG4bK2535121112
Call-ID: [email protected]
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected];tag=z9hG4bK2535121112
CSeq: 4 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1659629568/5199ab9686c5d05b63e8565a03d05b48”,opaque=“6b123d2c54a170b9”,algorithm=md5,qop=“auth”
Server: FPBX-16.0.21.8(16.25.0)
Content-Length: 0

<— Received SIP request (830 bytes) from UDP:91.34.111.79:62820 —>
REGISTER sip:217.160.249.134 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.7:5060;branch=z9hG4bK2535248424
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected]
Call-ID: [email protected]
CSeq: 5 REGISTER
Contact: sip:[email protected]:5060
Authorization: Digest username=“91”, realm=“asterisk”, nonce=“1659629568/5199ab9686c5d05b63e8565a03d05b48”, uri=“sip:217.160.249.134”, response=“9254189930bebeb82e644b26349b38e7”, algorithm=MD5, cnonce=“2535289666”, opaque=“6b123d2c54a170b9”, qop=auth, nc=00000001
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T46S 66.86.0.15
Expires: 3600
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 0

[2022-08-04 18:12:48] NOTICE[47587]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘REGISTER’ from ‘“Arbeitszimmer” sip:[email protected]’ failed for ‘91.34.111.79:62820’ (callid: [email protected]) - Failed to authenticate
<— Transmitting SIP response (507 bytes) to UDP:91.34.111.79:62820 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.7:5060;rport=62820;received=91.34.111.79;branch=z9hG4bK2535248424
Call-ID: [email protected]
From: “Arbeitszimmer” sip:[email protected];tag=2534665261
To: “Arbeitszimmer” sip:[email protected];tag=z9hG4bK2535248424
CSeq: 5 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1659629568/5199ab9686c5d05b63e8565a03d05b48”,opaque=“126651a850dfec2c”,algorithm=md5,qop=“auth”
Server: FPBX-16.0.21.8(16.25.0)
Content-Length: 0

<— Transmitting SIP request (466 bytes) to UDP:212.227.124.130:5060 —>
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 217.160.249.134:5060;rport;branch=z9hG4bKPj9f81ed34-871e-4ba9-ae1b-3209031aab68
From: sip:[email protected];tag=905e676f-0c53-4291-82a5-8af970eb438d
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: cdac2486-3606-4d79-afaa-d1ff0a99b97a
CSeq: 43788 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-16.0.21.8(16.25.0)
Content-Length: 0

<— Received SIP response (419 bytes) from UDP:212.227.124.130:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 217.160.249.134:5060;rport=5060;branch=z9hG4bKPj9f81ed34-871e-4ba9-ae1b-3209031aab68;received=217.160.249.134
From: sip:[email protected];tag=905e676f-0c53-4291-82a5-8af970eb438d
To: sip:[email protected];tag=afe348e378f926b4e3bf8536bde083f0.95328924
Call-ID: cdac2486-3606-4d79-afaa-d1ff0a99b97a
CSeq: 43788 OPTIONS
Server: UI Kamailio
Content-Length: 0

cent*CLI>