sdesalve / hassio-addons

MIT License
86 stars 21 forks source link

no audio on call – https-issue? (yes I read the other issues about PJSUA_CUSTOM_OPTIONS) #86

Closed Privatecoder closed 11 months ago

Privatecoder commented 11 months ago

HA: 2023.10.5 (supervised) PLATTFORM: arm HA-IP: 192.168.100.11 FB-IP: 192.168.100.1

I do also have https with a domain (my.internal.tld) configured via LetsEncrypt (and also set as internal and external Home Assistant URL) and its IP is resolved internally to 192.168.100.11. I also checked if the container itself is resolving to the tld's internal IP – which it does – and also tested downloading the converted mp3 via the fqdn-url from within the container via wget – which also works.

Current settings:

sip_parameters:
  caller_id_uri: sip:h24-dss-ha@192.168.100.1
  realm: "*"
  username: h24-dss-ha
  password: mysecret
pjsua_custom_options: "--no-tcp --ip-addr=192.168.100.11"

1) Call goes through but no audio is played.

2) Audio is converted, the file is created and can be listened to via https://my.internal.tld:8123/api/tts_proxy/42929ef05eedb8664c0615df8206790cb7264162_de_-_google_translate.mp3 (as written above I can also wget-download the file with the above URL from within the container.

However tts base_url has not been set in configuration.yaml as it has been deprecated and removed.

Logs:

[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri":"sip:**620@192.168.100.1:5060","message_tts":"Der Ofen ist aus"}
Converting audio file 'https://my.internal.tld:8123/api/tts_proxy/42929ef05eedb8664c0615df8206790cb7264162_de_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:**620@192.168.100.1:5060'...
This call will be terminated after '50' seconds.

4) I read the other issues and tested pjsua_custom_options with and without --no-tcp and / or --ip-addr=192.168.100.11.

As my HA instance is NOT reachable via its IP over http but only https and the certificate is NOT valid for its IP but only for the fqdn maybe that is the issue (as the FB might not be able to access the https-url)?

Privatecoder commented 11 months ago

I also tested enabling http access via IP and modifying the internal Home Assistant URL to its IP (with port) which does not work either (can hear audio through the url but not on the phone)..

Converting audio file 'http://192.168.100.11:8123/api/tts_proxy/42929ef05eedb8664c0615df8206790cb7264162_de_-_google_translate.mp3'...
Audio succesfully converted...

again with

[Info] Starting addon...
PJSUA_CUSTOM_OPTIONS = '--no-tcp --ip-addr=192.168.100.11'

(testing with and without --no-tcp)

sdesalve commented 11 months ago

base_url is related to TTS generation, you don't need because your audio is created...

--no-tcp is needed for SIP server when get 408 error but your call is placed correctly...

seems to be related NAT rules. you're right using--ip-addr parameter

What kind of VoIP server do you have? What addon you have? Have you tried other version?

Might you need to set proxy or stun parameter Please post full addon log

sdesalve commented 11 months ago

Have you resolved or nothing? Screenshot_2023-10-26-14-42-10-008_com google android gm-edit