sdesalve / hassio-addons

MIT License
86 stars 21 forks source link

Call not working #43

Closed lapf10 closed 2 years ago

lapf10 commented 2 years ago

Before expose my problem, thanks for your job in this addon.

In my test setup with the versions below, everything work fine Add-on version: 3.5.8 You are running the latest version of this add-on. System: Home Assistant OS 5.9 (amd64 / qemux86-64) Home Assistant Core: 2020.12.2 Home Assistant Supervisor: 2021.10.8 pjsua version 2.9 for Linux-5.4.84/x86_64 initialized

In my production setup with the version below the same configurations are not working Add-on version: 3.5.9 You are running the latest version of this add-on. System: Home Assistant OS 6.6 (amd64 / qemux86-64) Home Assistant Core: 2021.10.7 Home Assistant Supervisor: 2021.10.8 pjsua version 2.11.1 for Linux-5.10.75/x86_64 initialized

The message log on addon is: You have 1 active call Current call id=0 to sip:+****@sip.freevoipdeal.com [CALLING]

00:13:48.300 tsx0x7fa0e7d976d8 .......Temporary failure in sending Request msg INVITE/cseq=21503 (tdta0x7fa0e7d90aa8), will try next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT) 00:13:49.240 pjsua_app.c .Turning sound device -99 -99 OFF 00:14:20.300 pjsua_app.c ....Call 0 is DISCONNECTED [reason=408 (Request Timeout)] No current call 00:14:39.760 timer.c .Dumping timer heap: 00:14:39.760 timer.c . Cur size: 0 entries, max: 3070

But I read your documentation and I use freevoipdeal and for this provider for this error we need do add this line "pjsua_custom_options": "--no-tcp" in config, and I had this line

Can you confirm that can be a incompatibility version?

sdesalve commented 2 years ago

Please post your add-on configuration and full log

lapf10 commented 2 years ago

Addon config

sip_parameters:
  caller_id_uri: sip:xxxxxx@sip.freevoipdeal.com
  realm: '*'
  username: xxxxx
  password: xxxxxxx
pjsua_custom_options: '--no-tcp'

Addon LOG Add-on version: 3.5.9 You are running the latest version of this add-on. System: Home Assistant OS 6.6 (amd64 / qemux86-64) Home Assistant Core: 2021.10.7 Home Assistant Supervisor: 2021.10.8

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0. [cont-init.d] 01-log-level.sh: executing... [cont-init.d] 01-log-level.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [Info] Starting addon... PJSUA_CUSTOM_OPTIONS = '--no-tcp' [Info] Listening for messages via stdin service call... [Info] Received messages {"call_sip_uri": "sip:+351xxxxxxxxx@sip.freevoipdeal.com", "message_tts": "isto"} Converting audio file 'https://xxxxxxxx.duckdns.org:8123/api/tts_proxy/f4e1ecaad27b1b5a9008f69fd921e6986a966b56_pt_-_google_translate.mp3'... Audio succesfully converted... Starting SIP Client and calling 'sip:+351xxxxxxxxx@sip.freevoipdeal.com'... This call will be terminated after '50' seconds. 12:31:00.962 os_core_unix.c !pjlib 2.11.1 for POSIX initialized 12:31:00.963 sip_endpoint.c .Creating endpoint instance... 12:31:00.964 pjlib .select() I/O Queue created (0x7f120fa01100) 12:31:00.964 sip_endpoint.c .Module "mod-msg-print" registered 12:31:00.964 sip_transport.c .Transport manager created. 12:31:00.964 pjsua_core.c .PJSUA state changed: NULL --> CREATED 12:31:00.986 pjsua_core.c .pjsua version 2.11.1 for Linux-5.10.75/x86_64 initialized 12:31:00.995 pjsua_app.c .Turning sound device -99 -99 ON 12:31:00.995 main.c Ready: Success 12:31:01.015 pjsua_app.c .......Call 0 state changed to CALLING

Account list: [ 0] : does not register Online status: Online *[ 1] sip:xxxxxxxxx@sip.freevoipdeal.com: does not register Online status: Online Buddy list: [ 1] <?> sip:+351xxxxxxxxxx@sip.freevoipdeal.com +=============================================================================+ Call Commands: Buddy, IM & Presence: Account:
m Make new call +b Add new buddy . +a Add new accnt
M Make multiple calls -b Delete buddy -a Delete accnt.
a Answer call i Send IM !a Modify accnt.
h Hangup call (ha=all) s Subscribe presence rr (Re-)register
H Hold call u Unsubscribe presence ru Unregister
v re-inVite (release hold) t ToGgle Online status > Cycle next ac.
U send UPDATE T Set online status < Cycle prev ac.
],[ Select next/prev call +--------------------------+-------------------+
x Xfer call Media Commands: Status & Config:
X Xfer with Replaces
# Send RFC 2833 DTMF cl List ports d Dump status
* Send DTMF with INFO cc Connect port dd Dump detailed
dq Dump curr. call quality cd Disconnect port dc Dump config
V Adjust audio Volume f Save config
S Send arbitrary REQUEST Cp Codec priorities

+-----------------------------------------------------------------------------+ | q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type | +=============================================================================+ You have 1 active call Current call id=0 to sip:+351xxxxxxxxx@sip.freevoipdeal.com [CALLING] 12:31:01.057 tsx0x7f120f8706d8 .......Temporary failure in sending Request msg INVITE/cseq=27571 (tdta0x7f120f869aa8), will try next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT) 12:31:01.995 pjsua_app.c .Turning sound device -99 -99 OFF 12:31:33.057 pjsua_app.c ....Call 0 is DISCONNECTED [reason=408 (Request Timeout)] No current call 12:31:52.512 timer.c .Dumping timer heap: 12:31:52.512 timer.c . Cur size: 0 entries, max: 3070 [Info] Call ended... [Info] Listening for messages via stdin service call...

I made de update of Home Assistant in my test setup and the unique difference is the version off addon In test setup is 3.5.8 and in main setup is 3.5.9

Is it possible downgrade version to 3.5.8?

Thanks for your help

sdesalve commented 2 years ago

configuration have leading spaces like this?

sip_parameters:
  caller_id_uri: 'sip:username_or_phonenumber@sip.freevoipdeal.com'
  realm: '*'
  username: 'username'
  password: 'password'
pjsua_custom_options: '--no-tcp'

eg:

   ...
    - service: hassio.addon_stdin
      data_template:
        addon: local_dss_voip
        input: {"call_sip_uri":"sip:+393334455667@sipserver.com","message_tts":"Write here your message"}
   ...
lapf10 commented 2 years ago

I made de downgrade to version 3.5.8 and everything works. so it mean that exist some problem with version 3.5.9 thanks

sdesalve commented 2 years ago

Only difference from 3.5.8 and 3.5.8 is the new base image...

https://github.com/sdesalve/hassio-addons/commit/dca669bdfabfaf011e658d5b350c43a2689ea1c8

Have you ever tried to uninstall 3.5.9, restarted hassio and reinstall it?

Anyway if it works now it's ok...