Asterisk PJSIP Error Not registering bla bla

Hey, I tried using asterisk with GoTrunk with chan_sip but it is not supported anymore, so I tried using PJSIP but look at what its doing when I’m trying to login with my softphone

res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘REGISTER’ from ‘sip:202@164.92.241.91’ failed for ‘81.65.133.166:33916’ (callid: 110164YjljMTNmMzAyNTg5MjJmMTZiMzkyNDFlODJkNmQwMTI) - No matching endpoint found

It means what it says. There’s no matching endpoint, in this case it would be named “202”.

wdym? sorry first time using Asterisk, what does matching endpoint mean? like, my softphone logins are invalid?

It means that it is looking for a configured endpoint in pjsip.conf called “202” and not finding one.

;=====CONFIGURE 2 EXTENSIONS FOR USE WITH SIP PHONE=====
[202]
type=endpoint
transport=transport-udp
context=from-internal
callerid= +44203xxxxxxx<+44203xxxxxxx> ; optional to set custom CID on Extension
disallow=all
allow=all
auth=202
aor=202
[202]
type=auth
auth_type=userpass
password=HIDDEN BUT I PUTTED SAME ON SOFTPHONE
username=HIDDEN BUT I PUTTED SAME ON SOFTPHONE
[202]
type=aor
mac_contacts=5

isn’t this good?

PS : I got this from gotrunk official website, it told me to put this in pjsip.conf

@jcolp please…

Please don’t tag me. I’ll respond if I have something to add and when I can. In this case I was outside on my bicycle, as it’s after my work hours.

Ensure that the endpoint actually exists by looking at “pjsip show endpoints”. If not then check to see if it failed to load for some reason by looking at logs when Asterisk starts.

Should only allow the specific codecs you want to use.

Should be max_contacts

Should be aors. I guess the last two will break registration.

It may be easier to additionally configure a FreePBX VM. You get valid PJSIP configurations with minimal input. Sometimes this may not be sufficient, but it is definitely a good starting point.

For local phone devices, I would start from the first example in

https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Configuration+Examples

However, in general it is a bad idea to rely on cook book solutions without understanding them. Most of the chan_sip examples I see here are very badly done.

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