During my implementation of pjsip realtime using mysql 5.7 I encountered the problem:
“Unable to bind contact 'sip:101@192.168.2.203;transport=UDP;'to AOR ‘101’”
Here are some of my configurations:
/etc/odbc.ini
[asterisk]
Driver = MySQL
Description = MySQL connection to ‘asterisk’ database
Server = localhost
Port = 3306
Database = asterisk
UserName = root
Password = --delete–
Socket = /var/lib/mysql/mysql.sock
/etc/odbcinst.ini
[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib/libmyodbc5.so
Setup=/usr/lib/libodbcmyS.so
Driver64=/usr/lib64/libmyodbc8w.so
Setup64=/usr/lib64/libodbcmyS.so
FileUsage=1
The same problem occurs when I try to create new endpoints and register them via the sip client:
*CLI> – Removed contact ‘sip:101@192.168.73.238;transport=udp’ from AOR ‘101’ due to expiration
– Removed contact ‘sip:101@192.168.73.238;transport=udp’ from AOR ‘101’ due to expiration
– Removed contact ‘sip:101@192.168.73.238;transport=udp’ from AOR ‘101’ due to expiration
– Removed contact ‘sip:101@192.168.73.238;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@192.168.73.238;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@192.168.73.238;transport=udp’ from AOR ‘101’ due to expiration
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.
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
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.