Sangoma Vega50 and pjsip errors

Hi everyone,

I have just completed my first install of freepbx (14) after having used elastix for a few years. I have setup 4 sip trunks to our existing elastix pbx on small sites, and these look to be registered OK when I check with “sip show peers”

The main problem I am having is trying to get a Sangoma Vega50 ISDN gateway registered to my new freepbx. I have followed the guide on the wiki, and although it looks OK to me when I look at “sip show peers” - when I look at the status on the WebUI of the Vega50, it shows as not registered.

I am seeing lots of errors relating to pjsip appearing in asterisk console -

[2017-08-11 16:15:17] NOTICE[34102]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘10.17.87.250:5060’ (callid: [email protected]) - Failed to authenticate

But now I also see every 30 seconds or so, pjsip errors appearing in relation to my other trunks (although they are different errors - no matching endpoint

[2017-08-11 16:15:04] NOTICE[19484]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘OPTIONS’ from ‘“Unknown” sip:[email protected]’ failed for ‘192.168.71.253:5060’ (callid: [email protected]:5060) - No matching endpoint found

I have so far been unable to find anything helpful searching the internet, so I am hoping that someone here can explain why I am getting these pjsip endpoint errors for my trunk and more importantly why my Sangoma Vega50 is not registering. This is not currently in production obviously, so I do not have a line connected to it to verify if I can actually place a call - I am just assuming that I cannot as it doesn’t appear to be registered with my freepbx.

Thanks,
Gerry

The “no matching endpoint” error usually points to a problem with a PJSIP/Chan-SIP port confusion. Make sure you are pointing everything at the right port numbers.

Everything is standard, port 5060 for sip and from what I read pjsip also uses port 5060 or sometimes 5160?

Do I need to change port for my sip trunk registrations, if my phones are registering to pjsip on port 5060? I am not familiar with pjsip at all, so at the moment it is confusing me a little. I can’t actually see what port the pjsip extensions are registering on - “pjsip show endpoints” does not give me the information.

Thanks,
Gerry

If you are using Chan-SIP and PJ-SIP, they have to be on different ports. There are several schemes in use, depending on when your Distro was released, but 5060 and 5160 are both common ports for SIP (as a protocol).

You can set the ports to whatever you want in your SIP configuration tabs - a common suggestion is to change them all away from 5060 to keep the script kiddies off your server. Regardless of the port numbers you choose, the ports for the two channel drivers must be different.

Your SIP and PJSIP bind ports are as defined in Settings, Asterisk SIP Settings. You can determine definitively what ports are in use for each driver from bash:

[[email protected] ~]# asterisk -x "pjsip show transports" | grep udp
Transport:  0.0.0.0-udp               udp      0      0  0.0.0.0:5160

[[email protected] ~]# asterisk -x "sip show settings" | grep "UDP Bindaddress"
  UDP Bindaddress:        0.0.0.0:5060
1 Like

Thanks for the tips, but I am still stuck on this - nothing I do gets the Samgoma Vega50 to register - and I have had 2 colleagues who are also very familiar with asterisk looking at it with me today.

We have diabled chan-sip driver and just used chan_pjsip, we have done the opposite and just used chan_sip. We have tried random ports, disabled firewall on freepbx and pretty much everything we can think of. The Vega50 has been factory reset several times - but always the same result, freepbx looks ok but the Vegas50 shows no registration, and then in asterisk console we see:

[2017-08-13 11:04:11] NOTICE[3888]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘10.17.87.250:5160’ (callid: [email protected]) - Failed to authenticate

Any other suggestions appreciated, this one is driving me crazy :slight_smile: