Asterisk DNS problems on VPS running multiple Applications

Hey ! Sorry to bother if this has a rather simple solution but I have been scratching my head for the past days over this error. I already deleted and reinstalled everything but it still doesnt work.

Quick explanation to my setup: I have a VPS where FreePBX is running on (Ubuntu). Requests to the IP Adress of the Server go through a Caddy Docker first and depending on the Domain are sent to apache (Listening on Port 50000) to then show FreePBX GUI.

Here is a screenshot of what the asterisk logs say when applying the configuration and trying to call the SIP Number:

The Inbound call problem isnt that much of a problem right now but I need to figure out where the problem within FreePBX/Asterisk is because if i set up a trunk and then check in SSH ithe Trunk is always “Unavailable”.

This is part of whats happening everytime i apply a configuration:

[2024-03-07 16:26:02] NOTICE[138525] app_queue.c: queuerules.conf has not changed since it was last loaded. Not taking any action.
[2024-03-07 16:26:20] ERROR[138020] res_pjsip.c: Error 320047 'No answer record in the DNS response (PJLIB_UTIL_EDNSNOANSWERREC)' sending OPTIONS request to endpoint Sebastian_trunk
[2024-03-07 16:26:59] WARNING[139152] db.c: AstDB key /TRUNK/1/dialopts does not exist
[2024-03-07 16:26:59] WARNING[139152] db.c: AstDB key /TRUNK/1/dialopts does not exist
[2024-03-07 16:27:02] Asterisk 20.6.0 built by root @ ubuntu on a x86_64 running Linux on 2024-03-07 12:53:33 UTC
[2024-03-07 16:27:02] WARNING[139382] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found and no default driver specified
[2024-03-07 16:27:02] NOTICE[139382] res_odbc.c: Registered ODBC class 'asteriskcdrdb' dsn->[MySQL-asteriskcdrdb]
[2024-03-07 16:27:02] NOTICE[139382] res_config_ldap.c: No directory user found, anonymous binding as default.
[2024-03-07 16:27:02] ERROR[139382] res_config_ldap.c: No directory URL or host found.
[2024-03-07 16:27:02] NOTICE[139382] res_config_ldap.c: Cannot reload LDAP RealTime driver.
[2024-03-07 16:27:02] WARNING[139382] res_config_pgsql.c: PostgreSQL RealTime: Not connected
[2024-03-07 16:27:02] NOTICE[139382] cdr.c: CDR logging disabled.
[2024-03-07 16:27:02] NOTICE[139382] indications.c: Default country for indication tones: us
[2024-03-07 16:27:02] NOTICE[139382] indications.c: Setting default indication country to 'us'
[2024-03-07 16:27:02] NOTICE[138020] res_pjsip/config_transport.c: Transport '0.0.0.0-udp' is not fully reloadable, not reloading: protocol, bind, TLS (everything but certificate and private key if filename is unchanged), TCP, ToS, or C>[2024-03-07 16:27:02] NOTICE[138020] sorcery.c: Type 'system' is not reloadable, maintaining previous values
[2024-03-07 16:27:02] WARNING[139382] res_phoneprov.c: Unable to find a valid server address or name.
[2024-03-07 16:27:02] ERROR[139382] ari/config.c: No configured users for ARI
[2024-03-07 16:27:02] NOTICE[139382] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge
[2024-03-07 16:27:02] NOTICE[139382] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
[2024-03-07 16:27:02] WARNING[139382] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found and no default driver specified
[2024-03-07 16:27:02] WARNING[139382] cel_odbc.c: No such connection 'asteriskcdrdb' in the 'cel' section of cel_odbc.conf.  Check res_odbc.conf.
[2024-03-07 16:27:02] WARNING[139382] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found and no default driver specified
[2024-03-07 16:27:02] WARNING[139382] cdr_adaptive_odbc.c: No such connection 'asteriskcdrdb' in the 'asteriskcdrdb' section of cdr_adaptive_odbc.conf.  Check res_odbc.conf.

There are a lot of more errors and warnings but i guess it all traces back to some DNS problems caused by having multiple applications running on the same server.

Really REALLY glad if someone could help <3

Line 7382 probably means that Asterisk was built without app_macro, which is essential for FreePBX.

If fixing that doesn’t help, I strongly suggest that you set up FreePBX standalone in a VPS (no containers or other applications) and get it fully functional. Then, use that image to test your container-based system.

thx for the reply!

any recommendations on how to get app_macro to work? because i reinstalled freepbx already but it didnt help :confused:

See comment about app_macro here:

Depends on whether he installed FreePBX 16 or 17beta.

it states that its 16

I installed macro and redid everything again but i still get the following errors (and more) when initializing asterisk:

8774	[2024-03-07 19:17:02] WARNING[273741] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found and no default driver specified	
8775	[2024-03-07 19:17:02] NOTICE[273741] res_odbc.c: Registered ODBC class 'asteriskcdrdb' dsn->[MySQL-asteriskcdrdb]	
8776	[2024-03-07 19:17:02] NOTICE[273741] res_config_ldap.c: No directory user found, anonymous binding as default.	
8777	[2024-03-07 19:17:02] ERROR[273741] res_config_ldap.c: No directory URL or host found.	
8778	[2024-03-07 19:17:02] NOTICE[273741] res_config_ldap.c: Cannot reload LDAP RealTime driver.	
8779	[2024-03-07 19:17:02] WARNING[273741] res_config_pgsql.c: PostgreSQL RealTime: Not connected	
8780	[2024-03-07 19:17:02] NOTICE[273741] cdr.c: CDR logging disabled.	
8781	[2024-03-07 19:17:02] NOTICE[273741] indications.c: Default country for indication tones: us	
8782	[2024-03-07 19:17:02] NOTICE[273741] indications.c: Setting default indication country to 'us'	
8783	[2024-03-07 19:17:02] NOTICE[271367] res_pjsip/config_transport.c: Transport '0.0.0.0-udp' is not fully reloadable, not reloading: protocol, bind, TLS (everything but certificate and private key if filename is unchanged), TCP, ToS, or CoS options.	
8784	[2024-03-07 19:17:02] NOTICE[271367] sorcery.c: Type 'system' is not reloadable, maintaining previous values	
8785	[2024-03-07 19:17:02] WARNING[273741] res_phoneprov.c: Unable to find a valid server address or name.	
8786	[2024-03-07 19:17:02] ERROR[273741] ari/config.c: No configured users for ARI	
8787	[2024-03-07 19:17:02] NOTICE[273741] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge	
8788	[2024-03-07 19:17:02] NOTICE[273741] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.	
8789	[2024-03-07 19:17:02] WARNING[273741] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found and no default driver specified	
8790	[2024-03-07 19:17:02] WARNING[273741] cel_odbc.c: No such connection 'asteriskcdrdb' in the 'cel' section of cel_odbc.conf. Check res_odbc.conf.	
8791	[2024-03-07 19:17:02] WARNING[273741] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found and no default driver specified	
8792	[2024-03-07 19:17:02] WARNING[273741] cdr_adaptive_odbc.c: No such connection 'asteriskcdrdb' in the 'asteriskcdrdb' section of cdr_adaptive_odbc.conf. Check res_odbc.conf.

Many errors and warnings on init are normal. What happens on attempted call?

I cant quite remember what I did last night but the macro warnings and co. are fixed. Im getting some new errors but im opening a new thread for them. Thank you!

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