Anföngerprobleme II

Konfigurationsdiskussionen bei Asterisk direkt

Moderatoren: rainer, Tim

Antworten
ChristofArn
Anfänger
Beiträge: 6
Registriert: So 9. Jul 2017, 15:49

Anföngerprobleme II

Beitrag von ChristofArn »

Ich verfüge über mittlere Linux-Kenntnisse und möchte als Kunst-Projekt einen ziemlich eigenwilligen Telefonbeantworter bauen. Als Technologie habe ich mir Asterisk ausgewählt. Bis jetzt gemacht ist:
- Internet-Root-Server angemietet mit Ubuntu 16.4 :)
- Asterisk aus den Paketquellen installiert :)
- Drei conf-Files erstellt und eingerichtet: asterisk.conf, modules.conf, sip.conf.
Ergebnis: Ich komme auf das CLI, wenn ich meine modules.conf lösche. :( Meine sip.conf bewirkt offenbar nicht, dass sich asterisk bei meinem sipgate-Konto anmeldet und Anrufe entgegen nehmen kann. :( Das möchte in nun als nächstes erreichen.

Ich nehme an, ich mache viele Anfängerfehler. Gibt es jemanden, den ich in Berlin mal treffen könnte in einem Café mit Wlan, für eine Stunde, um mal die ersten Dinge zum Laufen zu bringen? :)
ChristofArn
Anfänger
Beiträge: 6
Registriert: So 9. Jul 2017, 15:49

Update: Anföngerprobleme II

Beitrag von ChristofArn »

Die drei conf-Files asterisk.conf, modules.conf und sip.conf habe ich um ein viertes ergänzt: indications.conf.
Nun komme ich auch mit modules.conf auf die CLI! :D

Meine modules.conf lautet (wie in http://www.asteriskdocs.org/en/3rd_Edit ... figuration als erster Schritt vorgeschlagen):

Code: Alles auswählen

; The modules.conf file, used to define which modules Asterisk should load (or
; not load).
;
[modules]
autoload=yes
Wenn ich nun in der CLI eingebe:

Code: Alles auswählen

module show
erhalte ich die Meldung

Code: Alles auswählen

0 modules loaded
:(

PS: Im Ordner /usr/lib/asterisk/modules/ habe viele Module, die geladen werden könnten, aber offenbar nicht geladen werden :(

Kann mir jemand weiterhelfen?
Benutzeravatar
Tim
Administrator
Beiträge: 160
Registriert: Sa 1. Nov 2008, 00:02
Wohnort: Freilassing / Oberbayern / Deutschland
Kontaktdaten:

Re: Anföngerprobleme II

Beitrag von Tim »

Hallo,
hast du in /etc/asterisk alle Konfigurationsdateien oder nur die drei von dir genannten?
Dipl.-Ing. Tim Grünberg
dCAP zertifiziert seit 2007

Debian Jessie x86_64
Asterisk 13.5.0
Deutsche Telekom All IP Anschluss
SNOM 370, SNOM M3 & Grandstream GXP2000

AMD Athlon II X4 605e -- 16 GB DDR3 RAM -- 2 TB SATA2 HDD Space
ChristofArn
Anfänger
Beiträge: 6
Registriert: So 9. Jul 2017, 15:49

Re: Anföngerprobleme II

Beitrag von ChristofArn »

Ich habe in /etc/astrisk folgende Dateien:
asterisk.conf indications.conf modules.conf sip.conf

Inzwischen habe ich festgestellt, dass asterisk doch abstürzt, wenn ich in modules.conf autoload=yes drin habe.
Mache ich diese Zeile raus, und stattdessen load => app_url.so rein, so komme ich auf die CLI, kann die geladenen module erfragen und kriege dann gemeldet, dass dieses Modul geladen ist.

Ich vermute mal, dass es mindestens ein Modul gibt, das asterisk zum Absturz bringt, wenn es geladen wird. Oder gibt es noch eine andere Erklärung?

Um herauszufinden, ob und wenn ja welches Modul asterisk zum Absturz bringt, habe ich auf der CLI manuell alle 304 Module geladen, die ich in /usr/lib/asterisk/modules/ gerfunden habe, geladen. Von diesen konnten 232 Module geladen werden. Die anderen erzeugten die Fehlermeldung "Unable to load module XY". Nur: Abgestürzt ist asterisk dabe nicht! Und: sipgate.de meldet, dass asterisk sich dort bei meiner Telefonnummer angemeldet hat - das funktioniert.
Was ich immer noch nicht verstehe: Warum führt die modules.conf zu einem Absturz, wenn dort autoload=yes drinsteht?
Benutzeravatar
Tim
Administrator
Beiträge: 160
Registriert: Sa 1. Nov 2008, 00:02
Wohnort: Freilassing / Oberbayern / Deutschland
Kontaktdaten:

Re: Anföngerprobleme II

Beitrag von Tim »

Hallo,

im Konfigurationsverzeichnis sollten eigentlich deutlich mehr Dateien vorhanden sein, zumindest noch eine asterisk.conf, eine extensions.conf bzw. extensions.ael.

Irgendwo liegen vermutlich die example-Konfigurationsdateien von dem Paket, welches du installiert hast, von denen die ein oder andere mit rein muss, damit der Asterisk überhaupt sauber läuft.

Ich habe bei mir autload=yes aktiv, allerdings habe ich ein paar Ausnahmen mit noload= defniert:

noload => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
noload => app_intercom.so
noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so
noload => chan_alsa.so

Gruß
Tim
Dipl.-Ing. Tim Grünberg
dCAP zertifiziert seit 2007

Debian Jessie x86_64
Asterisk 13.5.0
Deutsche Telekom All IP Anschluss
SNOM 370, SNOM M3 & Grandstream GXP2000

AMD Athlon II X4 605e -- 16 GB DDR3 RAM -- 2 TB SATA2 HDD Space
ChristofArn
Anfänger
Beiträge: 6
Registriert: So 9. Jul 2017, 15:49

Re: Anföngerprobleme II

Beitrag von ChristofArn »

Danke für die Hilfe!

Nun habe ich einfach die Beispiel-extensions.conf unverändert in Verwendung.

Eine asterisk.conf hatte ich schon, die scheint zu funktionieren.

Meine modules.conf sieht nun so aus:

Code: Alles auswählen

[modules]

autoload=yes

noload => chan_oss.so

noload => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
noload => app_intercom.so
noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so
noload => chan_capi.so
noload => cdr_sqlite.so
noload => res_config_odbc.so
noload => res_config_pgsql.so

; These conflict with app_directory.so and each other.
noload => app_directory_odbc.so


;load => res_musiconhold.so
;
; Module names listed in "global" section will have symbols globally
; exported to modules loaded after them.
;
[global]
Mit dieser stürzt asterisk nun wieder ab. Die Fehlemeldungen sind so, wenn ich ihn starte:

Code: Alles auswählen

Asterisk 13.1.0~dfsg-1.1ubuntu4.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Running as user 'asterisk'
Running under group 'asterisk'
[ Initializing Custom Configuration Options ]
Unable to load config file 'stasis.conf'
Could not load Stasis configuration; using defaults
Unable to load config file 'features.conf'
Could not load features config; using defaults
Unable to load config file 'acl.conf'
Unable to load config file 'cdr.conf'
Failed to process CDR configuration; using defaults
CDR simple logging enabled.
Unable to load config file 'udptl.conf'
Could not load udptl config; using defaults
Unable to load config file 'cel.conf'
Failed to process CEL configuration; using defaults
Unable to open AMI configuration manager.conf, or configuration is invalid.
Could not find valid ccss.conf file. Using cc_max_requests default
Could not find valid ccss.conf file. Using cc_[state]_devstate defaults
301 modules will be loaded.
Error loading module 'res_pjsip_publish_asterisk.so': /usr/lib/asterisk/modules/res_pjsip_publish_asterisk.so: undefined symbol: ast_sip_register_publish_handler
Error loading module 'res_calendar_caldav.so': /usr/lib/asterisk/modules/res_calendar_caldav.so: undefined symbol: ast_calendar_event_container_alloc
Error loading module 'res_pjsip_diversion.so': /usr/lib/asterisk/modules/res_pjsip_diversion.so: undefined symbol: ast_copy_pj_str
Error loading module 'res_pjsip_transport_websocket.so': /usr/lib/asterisk/modules/res_pjsip_transport_websocket.so: undefined symbol: ast_sip_create_serializer
Error loading module 'app_speech_utils.so': /usr/lib/asterisk/modules/app_speech_utils.so: undefined symbol: ast_speech_dtmf
Error loading module 'res_stasis_recording.so': /usr/lib/asterisk/modules/res_stasis_recording.so: undefined symbol: stasis_app_control_publish
Error loading module 'res_pjsip_header_funcs.so': /usr/lib/asterisk/modules/res_pjsip_header_funcs.so: undefined symbol: ast_sip_session_register_supplement
Error loading module 'res_hep_pjsip.so': /usr/lib/asterisk/modules/res_hep_pjsip.so: undefined symbol: ast_copy_pj_str
Error loading module 'res_pjsip_endpoint_identifier_user.so': /usr/lib/asterisk/modules/res_pjsip_endpoint_identifier_user.so: undefined symbol: ast_copy_pj_str
Error loading module 'res_ari_endpoints.so': /usr/lib/asterisk/modules/res_ari_endpoints.so: undefined symbol: stasis_app_ref
Error loading module 'res_pjsip_mwi_body_generator.so': /usr/lib/asterisk/modules/res_pjsip_mwi_body_generator.so: undefined symbol: ast_sip_get_pjsip_endpoint
Error loading module 'cel_odbc.so': /usr/lib/asterisk/modules/cel_odbc.so: undefined symbol: SQLColumns
Error loading module 'app_stasis.so': /usr/lib/asterisk/modules/app_stasis.so: undefined symbol: stasis_app_exec
Error loading module 'res_calendar_icalendar.so': /usr/lib/asterisk/modules/res_calendar_icalendar.so: undefined symbol: ast_calendar_register
Error loading module 'res_calendar_exchange.so': /usr/lib/asterisk/modules/res_calendar_exchange.so: undefined symbol: ast_calendar_register
Error loading module 'res_pjsip_dialog_info_body_generator.so': /usr/lib/asterisk/modules/res_pjsip_dialog_info_body_generator.so: undefined symbol: ast_sip_presence_xml_create_node
Error loading module 'res_pjsip_t38.so': /usr/lib/asterisk/modules/res_pjsip_t38.so: undefined symbol: ast_sip_session_resume_reinvite
Error loading module 'res_agi.so': /usr/lib/asterisk/modules/res_agi.so: undefined symbol: ast_speech_change
Error loading module 'cdr_adaptive_odbc.so': /usr/lib/asterisk/modules/cdr_adaptive_odbc.so: undefined symbol: SQLColumns
Error loading module 'res_pjsip_messaging.so': /usr/lib/asterisk/modules/res_pjsip_messaging.so: undefined symbol: ast_sip_default_outbound_endpoint
Error loading module 'res_pjsip_logger.so': /usr/lib/asterisk/modules/res_pjsip_logger.so: undefined symbol: ast_sip_get_pjsip_endpoint
Error loading module 'res_monitor.so': /usr/lib/asterisk/modules/res_monitor.so: undefined symbol: __ast_beep_stop
Error loading module 'res_ari_asterisk.so': /usr/lib/asterisk/modules/res_ari_asterisk.so: undefined symbol: stasis_app_ref
Error loading module 'res_pjsip_session.so': /usr/lib/asterisk/modules/res_pjsip_session.so: undefined symbol: ast_sip_location_retrieve_contact_from_aor_list
Error loading module 'res_pjsip_nat.so': /usr/lib/asterisk/modules/res_pjsip_nat.so: undefined symbol: ast_sip_session_register_supplement
Error loading module 'res_ari_bridges.so': /usr/lib/asterisk/modules/res_ari_bridges.so: undefined symbol: stasis_app_control_add_role
Error loading module 'chan_pjsip.so': /usr/lib/asterisk/modules/chan_pjsip.so: undefined symbol: ast_sip_create_request
Error loading module 'res_pjsip_notify.so': /usr/lib/asterisk/modules/res_pjsip_notify.so: undefined symbol: ast_sip_default_outbound_endpoint
Error loading module 'res_ari_applications.so': /usr/lib/asterisk/modules/res_ari_applications.so: undefined symbol: stasis_app_ref
Error loading module 'res_stasis_answer.so': /usr/lib/asterisk/modules/res_stasis_answer.so: undefined symbol: stasis_app_send_command
Error loading module 'res_pjsip_pidf_digium_body_supplement.so': /usr/lib/asterisk/modules/res_pjsip_pidf_digium_body_supplement.so: undefined symbol: ast_sip_presence_xml_create_node
Error loading module 'cdr_odbc.so': /usr/lib/asterisk/modules/cdr_odbc.so: undefined symbol: SQLRowCount
Error loading module 'res_stasis_playback.so': /usr/lib/asterisk/modules/res_stasis_playback.so: undefined symbol: stasis_app_control_publish
Error loading module 'res_pjsip_path.so': /usr/lib/asterisk/modules/res_pjsip_path.so: undefined symbol: ast_sip_session_register_supplement
Error loading module 'res_ari_playbacks.so': /usr/lib/asterisk/modules/res_ari_playbacks.so: undefined symbol: stasis_app_playback_to_json
Error loading module 'res_pjsip_pidf_eyebeam_body_supplement.so': /usr/lib/asterisk/modules/res_pjsip_pidf_eyebeam_body_supplement.so: undefined symbol: ast_sip_pubsub_register_body_supplement
Error loading module 'res_pjsip_phoneprov_provider.so': /usr/lib/asterisk/modules/res_pjsip_phoneprov_provider.so: undefined symbol: ast_phoneprov_std_variable_lookup
Error loading module 'res_pjsip_mwi.so': /usr/lib/asterisk/modules/res_pjsip_mwi.so: undefined symbol: ast_sip_pubsub_generate_body_content
Error loading module 'res_pjsip_refer.so': /usr/lib/asterisk/modules/res_pjsip_refer.so: undefined symbol: ast_sip_session_register_supplement
Error loading module 'res_pjsip_exten_state.so': /usr/lib/asterisk/modules/res_pjsip_exten_state.so: undefined symbol: ast_sip_subscription_get_remote_uri
Error loading module 'res_pjsip_caller_id.so': /usr/lib/asterisk/modules/res_pjsip_caller_id.so: undefined symbol: ast_sip_session_register_supplement
Error loading module 'res_ari_channels.so': /usr/lib/asterisk/modules/res_ari_channels.so: undefined symbol: stasis_app_control_silence_start
Error loading module 'res_ari_events.so': /usr/lib/asterisk/modules/res_ari_events.so: undefined symbol: ast_ari_websocket_session_create
Error loading module 'res_pjsip_dtmf_info.so': /usr/lib/asterisk/modules/res_pjsip_dtmf_info.so: undefined symbol: ast_sip_session_register_supplement
Error loading module 'res_fax_spandsp.so': /usr/lib/asterisk/modules/res_fax_spandsp.so: undefined symbol: ast_fax_state_to_str
Error loading module 'res_stasis_device_state.so': /usr/lib/asterisk/modules/res_stasis_device_state.so: undefined symbol: stasis_app_unregister_event_source
Error loading module 'res_ari_sounds.so': /usr/lib/asterisk/modules/res_ari_sounds.so: undefined symbol: stasis_app_ref
Error loading module 'func_odbc.so': /usr/lib/asterisk/modules/func_odbc.so: undefined symbol: SQLRowCount
Error loading module 'res_ari_recordings.so': /usr/lib/asterisk/modules/res_ari_recordings.so: undefined symbol: stasis_app_stored_recording_copy
Error loading module 'res_ari_mailboxes.so': /usr/lib/asterisk/modules/res_ari_mailboxes.so: undefined symbol: stasis_app_mailbox_to_json
Error loading module 'res_pjsip_one_touch_record_info.so': /usr/lib/asterisk/modules/res_pjsip_one_touch_record_info.so: undefined symbol: ast_sip_session_register_supplement
Error loading module 'res_pjsip_rfc3326.so': /usr/lib/asterisk/modules/res_pjsip_rfc3326.so: undefined symbol: ast_sip_session_register_supplement
Error loading module 'res_pjsip_send_to_voicemail.so': /usr/lib/asterisk/modules/res_pjsip_send_to_voicemail.so: undefined symbol: ast_sip_session_register_supplement
Error loading module 'res_ari_device_states.so': /usr/lib/asterisk/modules/res_ari_device_states.so: undefined symbol: stasis_app_device_state_to_json
Error loading module 'res_pjsip_sdp_rtp.so': /usr/lib/asterisk/modules/res_pjsip_sdp_rtp.so: undefined symbol: ast_sip_session_register_sdp_handler
Unable to load config file 'statsd.conf'
Unable to load config file res_odbc.conf
12:25:22.027 os_core_unix.c !pjlib 2.1 for POSIX initialized
Unable to load config file 'pjsip.conf'
Unable to load config file 'pjsip.conf'
Unable to load config file 'pjsip.conf'
Unable to load config file 'pjsip.conf'
Unable to load config file 'pjsip.conf'
Unable to load config file 'pjsip.conf'
Unable to load config file 'pjsip.conf'
Unable to load config file 'pjsip.conf'
Unable to load config file 'xmpp.conf'
Unable to load config file 'pjsip.conf'
Unable to load config file 'pjsip.conf'
Unable to load config smdi.conf: SMDI disabled
No SMDI interfaces are available to listen on, not starting SMDI listener.
Unable to load config file 'pjsip.conf'
Unable to load config res_stun_monitor.conf
Unable to load config phoneprov.conf
Unable to load provisioning profiles.
Unable to load config file 'hep.conf'
Unable to load config file 'ari.conf'
Configuration file 'res_fax.conf' not found, using default options.
Unable to load config calendar.conf
Error loading extensions.lua: cannot open '/etc/asterisk/extensions.lua' for reading: No such file or directory
Error loading module 'res_pjsip_diversion.so': /usr/lib/asterisk/modules/res_pjsip_diversion.so: undefined symbol: ast_sip_session_register_supplement
Module 'res_pjsip_diversion.so' could not be loaded.
Error loading module 'res_pjsip_transport_websocket.so': /usr/lib/asterisk/modules/res_pjsip_transport_websocket.so: undefined symbol: ast_sip_session_register_supplement
Module 'res_pjsip_transport_websocket.so' could not be loaded.
Error loading module 'res_pjsip_header_funcs.so': /usr/lib/asterisk/modules/res_pjsip_header_funcs.so: undefined symbol: ast_sip_session_register_supplement
Module 'res_pjsip_header_funcs.so' could not be loaded.
Error loading module 'res_hep_pjsip.so': /usr/lib/asterisk/modules/res_hep_pjsip.so: undefined symbol: ast_sip_dialog_get_session
Module 'res_hep_pjsip.so' could not be loaded.
Error loading module 'res_pjsip_t38.so': /usr/lib/asterisk/modules/res_pjsip_t38.so: undefined symbol: ast_sip_session_resume_reinvite
Module 'res_pjsip_t38.so' could not be loaded.
Error loading module 'res_pjsip_messaging.so': /usr/lib/asterisk/modules/res_pjsip_messaging.so: undefined symbol: ast_sip_session_register_supplement
Module 'res_pjsip_messaging.so' could not be loaded.
Error loading module 'res_ari_bridges.so': /usr/lib/asterisk/modules/res_ari_bridges.so: undefined symbol: stasis_app_playback_to_json
Module 'res_ari_bridges.so' could not be loaded.
Error loading module 'res_ari_mailboxes.so': /usr/lib/asterisk/modules/res_ari_mailboxes.so: undefined symbol: stasis_app_mailbox_to_json
Module 'res_ari_mailboxes.so' could not be loaded.
Unable to load config file 'res_parking.conf'
Cannot load configuration file: res_ldap.conf
Cannot load LDAP RealTime driver.
Missing config file 'res_config_sqlite3.conf'
Unable to load res_config_sqlite.conf
Unable to load config file 'pjsip.conf'
No music on hold classes configured, disabling music on hold.
user_data is NULL
user_data is NULL
user_data is NULL
Unable to register SDP handler for audio stream type
user_data is NULL
user_data is NULL
Ich glaube eher nicht, dass es mit der extension.conf zu tun hat, weil ich ja in der CLI Module laden kann - nur sobald autoload für die Module eingeschaltet ist, stürzt asterisk ab.

Was könnte ich als nähstes versuchen?
ChristofArn
Anfänger
Beiträge: 6
Registriert: So 9. Jul 2017, 15:49

Re: Anföngerprobleme II

Beitrag von ChristofArn »

Ich habe nun asterisk, so wie ich es aus den Paketquellen installiert hatte, deinstalliert und es anschliessend aus den Quellen installiert. (https://wiki.asterisk.org/wiki/display/ ... rom+Source) Jetzt funktioniert es - kein Problem mit autoload in modules.conf! (Nach einigen zu überwindenden Schwierigkeiten, z.B. hatte die Installationsroutine offenbar keinen Benutzer "asterisk" eingerichtet, was Folgeprobleme mit sich brachte.)
Man müsste das eigentlich dem Maintainer des Ubuntu-Pakets asterisk melden - nur scheint es ohnehin nicht empfohlen zu werden, aus dem Repository zu installieren - warum eigentlich?
Benutzeravatar
Tim
Administrator
Beiträge: 160
Registriert: Sa 1. Nov 2008, 00:02
Wohnort: Freilassing / Oberbayern / Deutschland
Kontaktdaten:

Re: Anföngerprobleme II

Beitrag von Tim »

Ich installiere bei mir immer aus den Quellen, normalerweise sind die Maintainer aber daran interessiert, dass ihre Pakete auch funktionieren.

Die Installation aus den Quellen hat den Vorteil, dass man die neueste Version hat, hat aber den Nachteil, dass man relativ viel selber einbauen muss, wie z.B. die entsprechenden Benutzer und Berechtigungen, sowie ein Start-Script für den "Autostart" nach einem Neustart des Systems.
Dipl.-Ing. Tim Grünberg
dCAP zertifiziert seit 2007

Debian Jessie x86_64
Asterisk 13.5.0
Deutsche Telekom All IP Anschluss
SNOM 370, SNOM M3 & Grandstream GXP2000

AMD Athlon II X4 605e -- 16 GB DDR3 RAM -- 2 TB SATA2 HDD Space
ChristofArn
Anfänger
Beiträge: 6
Registriert: So 9. Jul 2017, 15:49

Re: Anföngerprobleme II

Beitrag von ChristofArn »

Fehlende Nutzer und Rechte kann ein mittelprächtiger Linuxer einigermassen selbst reparieren. Wenn die Installation aus den Quellen in einem frisch installierten Ubuntu 16.04 (LTS!) dazu führt, dass ein einfaches, allgemein empfohlenes "autoload=yes" zum Absturz des Asterisk-Servers führt, ist offenbar nicht nur für mich, sondern auch für die Leute, die hier in diesem Forum sind, Ende der Fahnenstange. Weder ich noch sonst jemand in diesem Forum hatte eine Idee, wie man das nun selbst reparieren könnte. Bei Dir funktioniert die Installation aus den Quellen aber gut?
(Das Start-Skript für den Autostart nach einem Neustart des Systems wurde übrigens durch die Installationsroutinen bei der Installation aus den Quellen automatisch erstellt und eingerichtet.)
Antworten