Pjsip realtime with mysql5.7

During my implementation of pjsip realtime using mysql 5.7 I encountered the problem:
“Unable to bind contact 'sip:101@;transport=UDP;'to AOR ‘101’”

Here are some of my configurations:

Driver = MySQL
Description = MySQL connection to ‘asterisk’ database
Server = localhost
Port = 3306
Database = asterisk
UserName = root
Password = --delete–
Socket = /var/lib/mysql/mysql.sock

Description=ODBC for MySQL

[MySQL ODBC 8.0 Unicode Driver]

[MySQL ODBC 8.0 ANSI Driver]

Can anyone help me?

The relevant configuration is the chan_pjsip configuration.

I suspect you have exceed the number of allowed contacts.

I have tried to adjust the mac_contact in the ps_endpoints table to 10, but still the same problem.

For more information:
– Removed contact ‘sip:101@;transport=udp’ from AOR ‘101’ due to expiration

Are you also getting task processor warnings? It looks like one reason would be a sorcery allocation failure.

Incidentally, please provide complete messages. They normally include the source file and line number of the code that generated the message.

The same problem occurs when I try to create new endpoints and register them via the sip client:

*CLI> – Removed contact ‘sip:101@;transport=udp’ from AOR ‘101’ due to expiration
– Removed contact ‘sip:101@;transport=udp’ from AOR ‘101’ due to expiration
– Removed contact ‘sip:101@;transport=udp’ from AOR ‘101’ due to expiration
– Removed contact ‘sip:101@;transport=udp’ from AOR ‘101’ due to expiration
[Dec 4 08:17:41] WARNING[10372]: db.c:348 ast_db_put: Couldn’t execute statement: SQL logic error or missing database
[Dec 4 08:17:41] ERROR[10372]: res_pjsip_registrar.c:864 register_aor_core: Unable to bind contact ‘sip:104@;transport=udp’ to AOR ‘104’
[Dec 4 08:17:41] WARNING[10372]: res_pjsip_pubsub.c:3353 pubsub_on_rx_publish_request: No registered publish handler for event presence from 104
– Removed contact ‘sip:101@;transport=udp’ from AOR ‘101’ due to expiration

how can i get more information about this issue

The contact is being saved in the local Sqlite3 astdb database. This is failing. You can look at console output at startup to see if it complains about the astdb, or see if external sqlite3 tools say that the database is fine. Permissions could also prevent it from being opened and used.

Thank you for your reply @jcolp

Starting the service with astetisk -vvvvvvc, the output does not contain astdb related information

I have two environments and everything is working fine in my test environment, but the production environment has this problem. The only difference in the operation is that the production environment’s mysql database is generated by exporting the test environment’s database, while the test environment’s mysql database is generated by alembic migration

It is not using MySQL to store contacts. This is configured in sorcery.conf for doing so with PJSIP.

ok,Many thanks

Also I would like to ask, my server is not networked, so I can’t configure it through asterisk-18.8.0/contrib/scripts/install_prereq script, is there any way to make sure that all dependencies are installed successfully?

You can read the script and look at the dependencies, but what over all dependencies are required are completely dependent on what you are doing with Asterisk.

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