Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remaining Asterisk errors #23

Open
TECH7Fox opened this issue Jan 4, 2022 · 33 comments
Open

Fix remaining Asterisk errors #23

TECH7Fox opened this issue Jan 4, 2022 · 33 comments
Labels
enhancement New feature or request

Comments

@TECH7Fox
Copy link
Owner

TECH7Fox commented Jan 4, 2022

There are still some errors when starting Asterisk. Maybe we can fix some.

[Jan  4 19:19:15] WARNING[301]: loader.c:2381 load_modules: Some non-required modules failed to load.
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: res_timing_dahdi declined to load.
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: Failed to resolve dependencies for res_stir_shaken
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: res_stir_shaken declined to load.
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: res_pjsip_transport_websocket declined to load.
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: cel_sqlite3_custom declined to load.
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: cdr_sqlite3_custom declined to load.
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: Failed to resolve dependencies for res_http_media_cache
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: res_http_media_cache declined to load.
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: Failed to resolve dependencies for res_pjsip_stir_shaken
[Jan  4 19:19:15] ERROR[301]: loader.c:2396 load_modules: res_pjsip_stir_shaken declined to load.
[Jan  4 19:19:15] WARNING[385]: chan_sip.c:35461 deprecation_notice: chan_sip has no official maintainer and is deprecated.  Migration to
[Jan  4 19:19:15] WARNING[385]: chan_sip.c:35462 deprecation_notice: chan_pjsip is recommended.  See guides at the Asterisk Wiki:
[Jan  4 19:19:15] WARNING[385]: chan_sip.c:35463 deprecation_notice: https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip
[Jan  4 19:19:15] WARNING[385]: chan_sip.c:35464 deprecation_notice: https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip
@TECH7Fox TECH7Fox added the enhancement New feature or request label Jan 4, 2022
@TECH7Fox
Copy link
Owner Author

TECH7Fox commented Jan 21, 2022

ERROR[387]: codec_dahdi.c:813 find_transcoders: Failed to open /dev/dahdi/transcode: No such file or directory

@TimpP-Spb
Copy link

Hi, I have same error when I start Astersk

@felipecrs
Copy link
Collaborator

Most of them will probably be fixed with #17. But I have some others not mentioned here:

[Feb 18 01:29:15] ERROR[682][C-00000002]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("svaiup7tq184.invalid", "(null)", ...): Name does not resolve
[Feb 18 01:29:15] WARNING[682][C-00000002]: chan_sip.c:16938 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : 'svaiup7tq184.invalid'
[Feb 18 01:29:15] ERROR[682][C-00000002]: netsock2.c:96 ast_sockaddr_stringify_fmt: getnameinfo(): Unrecognized address family or invalid length
[Feb 18 01:29:45] WARNING[675]: res_http_websocket.c:559 ws_safe_read: Web socket closed abruptly
[Feb 18 01:29:45] WARNING[683]: res_http_websocket.c:559 ws_safe_read: Web socket closed abruptly
[Feb 18 01:29:47] ERROR[687]: iostream.c:552 ast_iostream_close: SSL_shutdown() failed: error:00000006:lib(0):func(0):EVP lib, Unknown

@nanosonde
Copy link
Contributor

nanosonde commented Mar 7, 2022

It seems that this one is not so easy to fix:

[Mar  7 14:52:58] ERROR[558]: res_pjsip/config_system.c:267 system_create_resolver_and_set_nameservers: There are no local system nameservers configured, resorting to system resolution
[Mar  7 14:52:58] ERROR[558]: res_pjsip/config_system.c:267 system_create_resolver_and_set_nameservers: There are no local system nameservers configured, resorting to system resolution

Seems to be an issue if the used libc does not provide a certain functionality.
See here: openwrt/telephony#516

What does Alpine use?

A few of the remaining error that are nt related to the chan_sip<>chan_pjsip issue could be solved by removing some modules that are not needed under normal circumstances.

[modules]
autoload=yes
noload => chan_alsa.so
noload => chan_console.so
noload => chan_dahdi.so
noload => chan_skinny.so
noload => codec_dahdi.so
noload => res_hep.so
noload => res_hep_pjsip.so
noload => res_hep_rtcp.so
noload => res_phoneprov.so
noload => res_pjsip_phoneprov_provider.so
noload => res_smdi.so
noload => res_timing_dahdi.so
noload => res_stir_shaken.so
noload => res_pjsip_stir_shaken.so
noload => res_http_media_cache.so
noload => cdr_sqlite3_custom.so
noload => app_voicemail_imap.so
noload => app_voicemail_odbc.so
noload => cel_custom.so
noload => cel_adaptive_odbc.so
noload => cel_manager.so
noload => cel_pgsql.so
noload => cel_sqlite3_custom.so
noload => cel_tds.so
noload => cel_radius.so

@nanosonde
Copy link
Contributor

Again concerning the nameserver error message.
The HA addon docker base images really musl as C library.
So asterisk is affected by this issue.

See here: https://github.com/hassio-addons/addon-base/blob/main/base/Dockerfile#L32

@felipecrs
Copy link
Collaborator

Interesting, is there an alternative to musl?

@nanosonde
Copy link
Contributor

Interesting, is there an alternative to musl?

Yes. The normal glibc. However, we cannot use Alpine then. And this means we cannot use the Alpine-based addon base images from Home Assistant. Do the Home Assistant people also provide Debian-based base images?

@felipecrs
Copy link
Collaborator

Yes, https://github.com/hassio-addons/addon-debian-base.

@nanosonde
Copy link
Contributor

So we should consider using a Debian Base image then.

What we should not do under all circumctances is this: glibc-based Alpine with a mixture of two C libraries.
See: https://ariadne.space/2021/08/26/there-is-no-such-thing-as-a-glibc-based-alpine-image/

@felipecrs
Copy link
Collaborator

felipecrs commented Mar 8, 2022

Alright, I'm fine either case. We will just have to install Python in the Debian image. Should not be a problem anyway.

@nanosonde
Copy link
Contributor

Yes, however Bullseye (Debian 11 [stable]) only comes with Asterisk 16.
Asterisk 18 is the latest LTS.

Maybe we should consider integrating this:
https://github.com/brian32768/docker-build-asterisk

@nanosonde
Copy link
Contributor

Gives us more control on the features we really need in the addon as most modules are probably not needed for the use-case described here.

@felipecrs
Copy link
Collaborator

Interesting... how do we put this in this repo? Copying and pasting? Using git submodule?

@nanosonde
Copy link
Contributor

I would suggest to copy and paste the relevant stuff from the Dockerfile and copy the the build_asterisk.sh script.
Looking at the build script, it does the standard stuff.
Furthermore it is also suitbale for cross-compilation (see BUILD_NATIVE) and enables the OPUS codec.

@felipecrs
Copy link
Collaborator

We cannot copy, unless the author adds a license in the repo. I will open an issue there.

@nanosonde
Copy link
Contributor

As this is standard stuff I would just recreate it.
The commands needed to compile asterisk with the various options are also documented on the asterisk documentation page itself. So there is nothing really new invented here.

@nanosonde
Copy link
Contributor

@felipecrs
Lets use this build script.
Its published under MIT license.

https://github.com/andrius/asterisk/blob/master/debian/18-current/build-asterisk.sh

looks familiar, hm? 😉

@felipecrs
Copy link
Collaborator

@nanosonde that's awesome!! And yes. Very familiar lol

@felipecrs
Copy link
Collaborator

felipecrs commented Mar 17, 2022

[Mar 17 17:23:14] WARNING[476]: res_phoneprov.c:1233 get_defaults: Unable to find a valid server address or name.
[...]
[Mar 17 17:23:14] NOTICE[476]: res_smdi.c:1424 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener.

@nanosonde
Copy link
Contributor

nanosonde commented Mar 17, 2022

Damn. Slipped through.
Could be disabled by default.

@felipecrs
Copy link
Collaborator

[Mar 17 17:27:37] ERROR[476]: ari/config.c:312 process_config: No configured users for ARI

Also.

@CedricAndry
Copy link

Hello,
I still have these errors and warning when starting Asterisk 20.5.0 in Docker container based on Alpine (https://registry.hub.docker.com/r/andrius/asterisk), hosted on a Synology NAS (network HOST) :

ERROR[1]: loader.c:2524 load_modules: Failed to resolve dependencies for res_stir_shaken
ERROR[105]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("asterisk", "(null)", ...): Name does not resolve
ERROR[105]: ari/config.c:312 process_config: No configured users for ARI
ERROR[106]: res_pjsip/config_system.c:267 system_create_resolver_and_set_nameservers: There are no local system nameservers

WARNING[105]: res_phoneprov.c:1249 get_defaults: Unable to find a valid server address or name.

Any idea if it will be solved?
Does these errors prevent Asterisk from working properly?

@felipecrs
Copy link
Collaborator

felipecrs commented Nov 1, 2023

@CedricAndry I am confused. Are you reporting issues for someone else's image?

And as far as I can tell they do not prevent Asterisk from working.

@CedricAndry
Copy link

CedricAndry commented Nov 2, 2023

@felipecrs , yes, I am really sorry, I made a mistake.

Thanks for your answer by the way!

Maybe can I afford another question : it is normal that there is no socket opened waiting on the default port (5060) when I launched a command netstat -a | grep 5060 ?

@felipecrs
Copy link
Collaborator

@CedricAndry
Copy link

Ok, thanks! I will try it!

@WalidDevRes
Copy link

Hello, i'm trying to install astrisk but i have the same error how you resolv it ?

Dec 14 15:29:36 tp asterisk[61765]: [Dec 14 15:29:36] ERROR[61765]: loader.c:2524 load_modules: res_timing_dahdi declined to load.
Dec 14 15:29:36 tp asterisk[61765]: [Dec 14 15:29:36] ERROR[61765]: loader.c:2524 load_modules: cdr_sqlite3_custom declined to load.
Dec 14 15:29:36 tp asterisk[61765]: [Dec 14 15:29:36] ERROR[61765]: loader.c:2524 load_modules: cel_tds declined to load.
Dec 14 15:29:36 tp asterisk[61765]: [Dec 14 15:29:36] ERROR[61765]: loader.c:2524 load_modules: cdr_tds declined to load.
Dec 14 15:29:36 tp asterisk[61765]: [Dec 14 15:29:36] ERROR[61765]: loader.c:2524 load_modules: cel_sqlite3_custom declined to load.
Dec 14 15:29:36 tp asterisk[61765]: [Dec 14 15:29:36] ERROR[61765]: loader.c:2524 load_modules: cdr_pgsql declined to load.

@felipecrs
Copy link
Collaborator

These errors are not blocking. Isn't it working for you?

@WalidDevRes
Copy link

Yeah it bloking the starting of the service
systemctl restart asterisk

root@tp:/usr/src/asterisk-20.5.0# systemctl restart asterisk
Job for asterisk.service failed because a timeout was exceeded.
See "systemctl status asterisk.service" and "journalctl -xe" for details.
root@tp:/usr/src/asterisk-20.5.0#

journalctl -xe

root@tp:/usr/src/asterisk-20.5.0# journalctl -xe
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] NOTICE[62291]: chan_dahdi.c:19587 process_dahdi: Ignoring any changes to 'userbase' (on reload) at line 23.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] NOTICE[62291]: chan_dahdi.c:19587 process_dahdi: Ignoring any changes to 'vmsecret' (on reload) at line 31.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] NOTICE[62291]: chan_dahdi.c:19587 process_dahdi: Ignoring any changes to 'hassip' (on reload) at line 35.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] NOTICE[62291]: chan_dahdi.c:19587 process_dahdi: Ignoring any changes to 'hasiax' (on reload) at line 39.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] NOTICE[62291]: chan_dahdi.c:19587 process_dahdi: Ignoring any changes to 'hasmanager' (on reload) at line 47.
Dec 14 15:38:43 tp asterisk[62291]: Cannot connect to server socket err = No such file or directory
Dec 14 15:38:43 tp asterisk[62291]: Cannot connect to server request channel
Dec 14 15:38:43 tp asterisk[62291]: jack server is not running or cannot be started
Dec 14 15:38:43 tp asterisk[62291]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 14 15:38:43 tp asterisk[62291]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 14 15:38:43 tp asterisk[62291]: Cannot connect to server socket err = No such file or directory
Dec 14 15:38:43 tp asterisk[62291]: Cannot connect to server request channel
Dec 14 15:38:43 tp asterisk[62291]: jack server is not running or cannot be started
Dec 14 15:38:43 tp asterisk[62291]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 14 15:38:43 tp asterisk[62291]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 14 15:38:43 tp asterisk[62291]: ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
Dec 14 15:38:43 tp asterisk[62291]: ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
Dec 14 15:38:43 tp asterisk[62291]: ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Dec 14 15:38:43 tp asterisk[62291]: ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Dec 14 15:38:43 tp asterisk[62291]: ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
Dec 14 15:38:43 tp asterisk[62291]: ALSA lib setup.c:547:(add_elem) Cannot obtain info for CTL elem (MIXER,'IEC958 Playback Default',0,0,0): No such file or directory
Dec 14 15:38:43 tp asterisk[62291]: ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Dec 14 15:38:43 tp asterisk[62291]: ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Dec 14 15:38:43 tp asterisk[62291]: Cannot connect to server socket err = No such file or directory
Dec 14 15:38:43 tp asterisk[62291]: Cannot connect to server request channel
Dec 14 15:38:43 tp asterisk[62291]: jack server is not running or cannot be started
Dec 14 15:38:43 tp asterisk[62291]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 14 15:38:43 tp asterisk[62291]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] ERROR[62291]: ari/config.c:312 process_config: No configured users for ARI
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] NOTICE[62291]: confbridge/conf_config_parser.c:2386 verify_default_profiles: Adding default_menu menu to app_confbridge
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] NOTICE[62291]: cel_custom.c:92 load_config: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] NOTICE[62291]: cel_tds.c:447 tds_load_module: cel_tds has no global category, nothing to configure.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] WARNING[62291]: cel_tds.c:552 load_module: cel_tds module had config problems; declining load
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] WARNING[62291]: cel_pgsql.c:463 process_my_load_module: CEL pgsql config file missing global section.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] NOTICE[62291]: cdr_pgsql.c:541 config_module: cdr_pgsql configuration contains no global section, skipping module load.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] ERROR[62291]: codec_dahdi.c:813 find_transcoders: Failed to open /dev/dahdi/transcode: No such file or directory
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] WARNING[62291]: loader.c:2409 load_modules: Some non-required modules failed to load.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] WARNING[62291]: loader.c:2503 load_modules: Module 'res_adsi' has been loaded but may be removed in a future release.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] WARNING[62291]: loader.c:2503 load_modules: Module 'app_getcpeid' has been loaded but may be removed in a future release.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] WARNING[62291]: loader.c:2503 load_modules: Module 'app_adsiprog' has been loaded but may be removed in a future release.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] ERROR[62291]: loader.c:2524 load_modules: res_timing_dahdi declined to load.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] ERROR[62291]: loader.c:2524 load_modules: cdr_sqlite3_custom declined to load.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] ERROR[62291]: loader.c:2524 load_modules: cel_tds declined to load.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] ERROR[62291]: loader.c:2524 load_modules: cdr_tds declined to load.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] ERROR[62291]: loader.c:2524 load_modules: cel_sqlite3_custom declined to load.
Dec 14 15:38:43 tp asterisk[62291]: [Dec 14 15:38:43] ERROR[62291]: loader.c:2524 load_modules: cdr_pgsql declined to load.
Dec 14 15:38:43 tp asterisk[62291]: Asterisk Ready.
lines 1306-1352/1352 (END)

@felipecrs
Copy link
Collaborator

systemctl? Are we still talking about the Asterisk add-on for Home Assistant?

@WalidDevRes
Copy link

i'm doing a asterisk server for my home assitance it just for learn about voip

@felipecrs
Copy link
Collaborator

If you are not using the add-on then you are posting your question in the wrong place. And sorry, I don't have any idea to help with your problem.

@WalidDevRes
Copy link

Thanks you for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants