When I using static my configuration is working perfectly but when I am changing it to realtime with mysql db somehow it is not showing >pjsip show endpoints
For tables I have used alembic and tables created succesfully
When I am trying to register it is not registering and giving me the error
[Sep 13 06:13:06] NOTICE[61437]: res_pjsip/pjsip_distributor.c:508 log_failed_request: Request ‘REGISTER’ from ‘sip:101@192.168.2.116’ failed for ‘192.168.2.214:61945’ (callid: 4d133de913a845d7a86dfda1b7d9b007) - No matching endpoint found
What else I have missed the point ? Please suggest
Have you checked the console output to see if there’s anything of note? Is ODBC also configured on the system? How does your setup compare to the wiki[1]?
Your ODBC does not appear to be connecting. This is usually because it is not configured properly. I don’t have much experience in that area, but that’s where you should focus your efforts.
I don’t use ODBC so I’d suggest trying to narrow things down further. Compare again your configuration between the wiki (which is known to work) and yours. Turn on debug in logger.conf and use core set debug 9 to see if ODBC is being queried for things.
I don’t have troubleshooting steps. The log messages in debug generally tell what is happening in a bit of detail, based on what is there you can determine what is going on.
Hi,
Kindly share the troubleshooting steps,i have done everything possible i can and even recompiled asterisk 2 times but all in vain. I am still getting the error as:
[Oct 17 06:11:26] WARNING[3620]: res_odbc.c:946 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
[asterisk-connector]
Description = MySQL connection to ‘asterisk’ database
Driver = MySQL
Database = asterisk
Server = localhost
Port = 3306
Socket = /var/lib/mysql/mysql.sock
If you follow those it should result in a working setup.You’ll want to test to make sure you have a working connection outside of Asterisk. The wiki will tell you how to do that, as well as other debugging steps.
Looking at your configuration though a couple things might be causing your problem. First it looks like you have a couple of environment variables set telling where to find the odbc configuration. Those appear to point to another location for the files than the one you showed:
/usr/local/etc/ vs /etc
Second in your res_odbc.conf file you have the following:
dsn => asterisk
But based on your odbc.ini configuration I believe it should be (the odbc section name):
Hi ,
Thanks for the response,the files /usr/local/etc/ vs /etc are different as in my system ODBCDataSources got stored in /usr/local/etc and i got it fixed by pointing to this location. I got the pointer from your reply,let me see. Thanks anyway.
Hi ,
Your pointer did help me to pull the correct DSN,that was an error. Also,a minor name change in .so file replaced with 64 bit was libmyodbc5a.so.It now picks up the correct DSN.
Now ODBC DSN Settings
Name: asterisk
DSN: asterisk
Number of active connections: 1 (out of 200)