And this is what I’ve tried in pjsip.conf. sip.conf works perfect, pjsip not so much. What’s in the uri lines in the registration section is just the latest attempt.
Delete :PassWord and /6xxxxxxxx9 from the client URI
Add outbound_auth to the type=registration section.
Add contact_user to the that section.
Replace max_contacts by contact=sip:64.154.41.158
If your sip.conf really works without using either remotesecret or insecure=invite, add auth to your endpoint. It is extremely unusual for a provider to authenticate itself, but, if they prepared to do so, you might as well challenge them.
Then correct your sip.conf:
Delete defaultuser (not useful without defaultdomain and host=dynamic)
Change type to peer (cause an unnecessary reduction in security)
Change canreinvite to directmedia (name has been deprecated, probably for over a decade)
That’s an incoming only line and I get busy when I call it and there is no indication on the console that asterisk saw any notification of the call. Seems like what would happen if it didn’t register at all.
[2023-08-29 19:29:35] ERROR[53633] config_options.c: Could not find option suitable for category '6314098389' named 'auth' at line 116 of
[2023-08-29 19:29:35] ERROR[53633] res_sorcery_config.c: Could not create an object of type 'registration' with id '6314098389' from configuration file 'pjsip.conf'
and pjsip show registrations says no objects found.
Right, because the option is named “outbound_auth” and not “auth”. The configuration is invalid, and seemingly doesn’t match what you provided previously.
Now I’m really confused. David 555 said to do this:
Delete :PassWord and /6xxxxxxxx9 from the client URI
Add outbound_auth to the type=registration section.
Add contact_user to the that section.
Replace max_contacts by contact=sip:64.154.41.158
I did 3 of the things, but outbound auth was already in the registration section. so I left that alone. When I tried changing it to auth it gave an error. Since this is an inbound only line, should it say inbound_auth?
It should not say “inbound_auth”. According to the error message it was “auth” and not “outbound_auth”. This would prevent the configuration from loading. What is the actual current configuration?
[2023-08-29 19:30:39] ERROR[53695] res_pjsip_outbound_registration.c: Client URI or hostname length exceeds pjproject limit or is not a sip(s) uri: '6314098389'
[2023-08-29 19:30:39] ERROR[53695] res_sorcery_config.c: Could not create an object of type 'registration' with id '6314098389' from configuration file 'pjsip.conf'
And yet I still have problems, if I restart Asterisk this works for a minute or two and then stops receiving calls. I added retry_interval=60 with the hope the connection just needed to be kept alive, but that doesn’t seem to have helped. any suggestions
It’s odd, it’s been working fine for 12 years using SIP and with PJSIP it’s suddenly a problem. Any particular PJSIP debug commands I should use. I cant find documentation. What I see or I guess don’t see after setting debug on is any registration attempts by Asterisk. Should it not do something ever retry_interval seconds if I put that in the type=registration section?
Since I see no reason to make t he expiration shorter that necessary I will extend it till it stops working. in sip.conf I had qualify=5500, though I don’t know how or if qualify and expiration are related.