Sprachnachricht an FB-Telefon via ha-sip funktioniert nicht

Hallo zusammen,

nachdem ich bereits alle Tipps, die ich im Internet gefunden habe, ausprobiert habe, hoffe ich auf Eure Unterstützung.

Ich kann via ha-sip mein C5 an der Fritzbox anrufen, aber es kommt keine Sprachnachricht an.

Hier meine Einstellungen:

tts-Definition in ha-sip:

engine_id: tts.google_translate_de_de
platform: ""
language: de
voice: ""
debug_print: false


tts-Definition in configuration.yaml:

tts:
  - platform: google_translate
    language: "de"



AKTION:

action: hassio.addon_stdin
data:
  addon: c7744bff_ha-sip
  input:
    command: dial
    number: sip:**611@fritzbox6690
    ring_timeout: 20
    menu:
      message: Dies ist ein Test

Das Telefon klingelt, aber ich hier nur “Stille”. Ich habe auch schon HD-Telefonie ausgeschaltet und mein Mobil-telefon angerufen. Immer nur “Stille”. Über “FHEM” funktioniert die Sprachausgabe ohne Probleme.

Wer hat einen Tipp

Viele Grüße
Jürgen

SIP-Protokoll.txt (3,2 KB)

Probiere mal in der Ha-sip konfig bei tts folgendes:

engine_id: ""
platform: google_translate
language: de
voice: ""
debug_print: false

Hi,

das hat leider keine Änderung gebracht. Die Info im Protokoll ist gleich.

Ich habe jetzt “ring_timeout” auf 60 gesetzt und erhalte dann die Info:

“can not convert text to speach”.

Das war auch meine Vermutung, habe aber keine Ahnung wo ich noch suchen soll.

Über “Media” / “Text-to-speach” kann ich ganz normal Texte als Sprachnachricht über den Browser ausgeben. Hierbei ist es egal ob ich “Google Translate de de” oder “Google Translate en com” auswähle.

Hallo zusammen,

hat hier keiner eine Idee? Hier ein aktuelles Protokoll:

| 10:54:02.561987 [ ] Got "dial" command for sip:**611@fritzbox6690
| &id001
| id: null
| message: Dies ist ein Test
| audio_file: null
| language: de
| action: null
| choices_are_pin: false
| choices: {}
| default_choice:
|   id: null
|   message: Unknown option
|   audio_file: null
|   language: en
|   action: null
|   choices_are_pin: false
|   choices: null
|   default_choice: null
|   timeout_choice: null
|   post_action:
|     action: return
|     level: 1
|   timeout: 300.0
|   parent_menu: *id001
|   cache_audio: false
|   wait_for_audio_to_finish: false
| timeout_choice:
|   id: null
|   message: null
|   audio_file: null
|   language: en
|   action: null
|   choices_are_pin: false
|   choices: null
|   default_choice: null
|   timeout_choice: null
|   post_action:
|     action: hangup
|   timeout: 300.0
|   parent_menu: *id001
|   cache_audio: false
|   wait_for_audio_to_finish: false
| timeout: 300.0
| post_action:
|   action: noop
| parent_menu: null
| cache_audio: false
| wait_for_audio_to_finish: true
| 
| 10:54:02.564955 [1] Registering call with id sip:**611@fritzbox6690
| 10:54:02.564993 [ ] Add to state: sip:**611@fritzbox6690
| 10:54:02.568598 [1] Calling
| 10:54:02.631486 [1] Early
| 10:54:02.631862 [1] onCallMediaState call info state 3
| 10:54:02.632006 [1] Connected media 1
| 10:54:05.859604 [1] Call connecting...
| 10:54:05.860014 [1] onCallMediaState call info state 4
| 10:54:05.860094 [1] Connected media 1
| 10:54:05.860226 [1] Call connected
| 10:54:05.866524 [1] onCallMediaState call info state 5
| 10:54:05.866581 [1] Connected media 1
| 10:54:25.861312 [1] Call is established.
| 10:54:25.861444 [ ] Calling webhook sip_call_webhook_id with data {'event': 'call_established', 'caller': 'sip:**611@fritzbox6690', 'parsed_caller': '**611', 'sip_account': 1, 'call_id': 'f006RCdyNpVDBnhnCYprKXz4kpGMkk3L', 'internal_id': 'sip:**611@fritzbox6690'}
| 10:54:25.873300 [ ] Webhook response 200 b''
| 10:54:25.873518 [1] Playing message: Dies ist ein Test
| 10:54:25.879800 [ ] Error getting tts file 500 b'500: Internal Server Error'
| 10:54:25.880152 [1] No action supplied
| 10:54:28.645421 [1] Playback done.
| 10:54:28.645582 [ ] Calling webhook sip_call_webhook_id with data {'event': 'playback_done', 'sip_account': 1, 'caller': 'sip:**611@fritzbox6690', 'parsed_caller': '**611', 'type': 'message', 'message': 'Dies ist ein Test', 'call_id': 'f006RCdyNpVDBnhnCYprKXz4kpGMkk3L', 'internal_id': 'sip:**611@fritzbox6690'}
| 10:54:28.651212 [ ] Webhook response 200 b''
| 10:54:28.661566 [1] Scheduled post action: noop
10:54:28.664           conference.c !.Remove port failed: Not found (PJ_ENOTFOUND)
10:54:29.972          pjsua_media.c !.......
  [DISCONNECTED] To: sip:**611@fritzbox6690;tag=C32BDC27FF85667E
    Call time: 00h:00m:24s, 1st res in 66 ms, conn in 3295ms
    #0 audio PCMU @8kHz, sendrecv, peer=192.168.250.1:7078
       SRTP status: Not active Crypto-suite: 
       ICE role: Unknown, state: Candidate Gathering, comp_cnt: 2
       RX pt=0, last update:00h:00m:04.087s ago
          total 1.2Kpkt 192.6KB (240.8KB +IP hdr) @avg=63.9Kbps/79.9Kbps
          pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%)
                (msec)    min     avg     max     last    dev
          loss period:   0.000   0.000   0.000   0.000   0.000
          jitter     :   0.000   0.217   1.125   0.250   0.119
       TX pt=0, ptime=20, last update:00h:00m:00.809s ago
          total 208pkt 33.2KB (41.6KB +IP hdr) @avg=11.0Kbps/13.8Kbps
          pkt loss=0 (0.0%), dup=0 (0.0%), reorder=0 (0.0%)
                (msec)    min     avg     max     last    dev 
          loss period:   0.000   0.000   0.000   0.000   0.000
          jitter     :   0.625   0.875   1.250   1.250   0.265
       RTT msec      :   1.342   2.204   3.448   2.471   0.833
| 10:54:29.973104 [1] Call disconnected
| 10:54:29.973191 [ ] Calling webhook sip_call_webhook_id with data {'event': 'call_disconnected', 'caller': 'sip:**611@fritzbox6690', 'parsed_caller': '**611', 'sip_account': 1, 'call_id': 'f006RCdyNpVDBnhnCYprKXz4kpGMkk3L', 'internal_id': 'sip:**611@fritzbox6690'}
| 10:54:29.978207 [ ] Webhook response 200 b''
| 10:54:29.978396 [ ] Remove from state: sip:**611@fritzbox6690

Besonders diese Zeile

| 10:54:25.879800 [ ] Error getting tts file 500 b'500: Internal Server Error'

irritiert mich.

Viele Grüße
Jürgen

probiere mal in der configuration.yaml folgenden Absatz noch zu ergänzen:

tts:
  - platform: google_translate
    cache: true
    cache_dir: /tmp/tts
    time_memory: 57600
    service_name: google_say
  - platform: google_translate
    service_name: google_translate_say
    language: "de"
    cache: true
    cache_dir: /tmp/tts
    time_memory: 57600

Dies hat leider nichts geändert.

| 11:59:19.194803 [1] Playing message: Dies ist ein Test
| 11:59:19.200773 [ ] Error getting tts file 500 b'500: Internal Server Error'
| 11:59:19.201296 [1] No action supplied
| 11:59:21.975770 [1] Playback done.

Ich bin ratlos

Viele Grüße
Jürgen

Zeig jetzt nochmal bitte deine Konfiguration in configuration.yaml und im SIP Addon

Hier die gewünschte Info:

sip_global:
  port: 5060
  log_level: 3
  name_server: fritzbox6690.lan
  cache_dir: /config/audio_cache
  global_options: ""
sip:
  enabled: true
  registrar_uri: sip:fritzbox6690
  id_uri: sip:homeassistant@fritzbox6690
  realm: "*"
  user_name: homeassistant
  password: test1234!
  answer_mode: listen
  settle_time: 20
  incoming_call_file: ""
  options: ""
sip_2:
  enabled: false
  registrar_uri: sip:fritz.box
  id_uri: sip:anotheruser@fritz.box
  realm: "*"
  user_name: anotheruser
  password: secret
  answer_mode: listen
  settle_time: 1
  incoming_call_file: ""
  options: ""
sip_3:
  enabled: false
  registrar_uri: sip:192.168.178.10
  id_uri: ""
  realm: "*"
  user_name: ""
  password: ""
  answer_mode: listen
  settle_time: 1
  incoming_call_file: ""
  options: ""
tts:
  engine_id: tts.google_translate_de_de
  platform: ""
  language: de
  voice: algenib
  debug_print: false
webhook:
  id: sip_call_webhook_id

# TTS-Definition
tts:
  - platform: google_translate
    cache: true
    cache_dir: /tmp/tts
    time_memory: 57600
    service_name: google_say
  - platform: google_translate
    service_name: google_translate_say
    language: "de"
    cache: true
    cache_dir: /tmp/tts
    time_memory: 57600

sieht so aus, als ob du beim tts im Addon auf einen nicht verfügbaren Dienst zugreifst. Probiere in dem Abschnitt mal wie von mir vorher schon geschrieben folgendes:

tts:
  engine_id: ""
  platform: google_translate
  language: de
  voice: ""
  debug_print: false

Ich glaube, es lag daran, dass HA und die Fritzbox in unterschiedlichen VLANs waren. Ich habe jetzt HA ins gleiche VLAN umgezogen und erhalte nun diesen Fehler:

| 13:34:01.684862 [ ] Error getting tts audio: HTTPSConnectionPool(host='homeassistant-test', port=8123): Max retries exceeded with url: /api/tts_proxy/J5lzEhwmKp5b-Ria-47NrA.mp3 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)')))
| 13:34:01.685071 [1] No action supplied

Ich nutze ein selbst signiertes Zertifiakt. Gibt es hierzu auch eine Lösung?

Wenn ich nur http nutze funktioniert es (auch mit meiner ersten Einstellung)

Ich versuche es nun erst einmal mit Let’s Encrypt - Zertifikat.

Was mich wundert, ist die Zeitspanne, die vergeht, bis die Nachricht am telefon ankommt. Das sind ca 20 Sekunden. Ist das normal?

liegt wohl an deinem settle_time: 20. Bei mir steht das auf 1.
Ich habe bei mir in der registrar_uri auch sip:192.168.178.1 drin anstatt den namen der Fritzbox und auch bei name_server nichts drin und im cache_dir auch nicht

Dann werde ich die Parameter auch noch anpassen und testen. Ich bin nun im VLAN wieder zurück und auch da funktioniert es, wenn ich nur http nutze. Es liegt also am Zertifikat.

Vielen Dank für Deine Hilfe.

Nachtrag:

Nachdem ich mit Hilfe dieses Forums auch das Zertifikat auf Let’s Encrypt umgestellt habe, funktioniert die Sprachausgabe auch mit https.

1 „Gefällt mir“