Today I noticed one thing in my Asterisk (version 13.29 and 16.7):
My scenario is: I have PJSIP with realtime using ODBC on Postgres.
When I create a new endpoint in my database and register it, all the other endpoints that were registered in the server become unreachable, like this example output in asterisk’s console:
(endpoints 1001 and 1002 were already registered, then I created the endpoint 1003 and registered it)
[Mar 3 17:50:11] -- Added contact 'sip:1003@172.16.16.25:5060;transport=UDP;rinstance=e9faec14588ce7c9' to AOR '1003' with expiration of 3600 seconds
[Mar 3 17:50:11] == Endpoint 1001 is now Unreachable
[Mar 3 17:50:11] == Endpoint 1002 is now Unreachable
[Mar 3 17:50:21] == Endpoint 1003 is now Reachable
[Mar 3 17:50:21] -- Contact 1003/sip:1003@172.16.16.25:5060;transport=UDP;rinstance=e9faec14588ce7c9 is now Reachable. RTT: 11.752 msec
It only happens when I register a recently created endpoint. If I register a endpoint that was already registered before nothing abnornal happens.
Obs: The unreachable endpoints are not deleted from the table “ps_contacts”, and even show when I type “pjsip show contacts”. But if I try to make a call to them, I receive the message that they are unavaiable.
I’ve already have the logs of “debug level 99” and “pjsip set logger on”, but I didn’t found anything different on them, if needed I will post them here.
Changed it, restarted asterisk and registered a new endpoint, the same behavior happened, all the other endpoints became unreachable. Do I have to configure anything specific for AstDB?
I tried to configure a new endpoint entirely from pjsip.conf file, followed by a “pjsip reload” and registering this new endpoint, by doing so no other endpoint became unreachable. So now I am certanly that the error is in my database (but the contacts are still on the database).
I will post my database structure (it was created with alembic, but I have some custom columns on the ps_endpoints table), and in the meantime I will recompile asterisk with the changes of [1] described by @jcolp
I know of noone actively working on the issue, and the individual did not publish the change with some feedback I provided up for code review. It therefore needs someone to take it through the process, make changes, etc.