PJSIP trunk lost connectivity

It’s been a while and I am currently having this problem. It started out as described at the beginning of this chain of messages. I was able to minimize the problem by going into connectivity/trunks//pjsip settings/advanced and setting permanent auth rejection to “NO” and setting Max Retries to “1000000” which seems to be the max value. I still lose the trunk occasionally, and I see multiple errors in my log:

“res_pjsip_outbound_registration.c: Temporal response ‘401’ received from ‘sip::5060’ on registration attempt to ‘sip:P1498070639@:5060’, retrying in ‘60’”.

I have also turned on “pjsip set logger on”, but haven’t had another Temporal error in the last couple of hours and haven’t had the occasional total failure where it goes down permanently which I normally just reboot the system to resolve. I can see the time that it failed by going to the log at my provider, which helps. And I can see “Temporal” errors in the log.

I’ve heard that I can resolve this by switching back to chansip rather than pjsip. but thought I’d play with it, since it’s a small non-critical system.