core icon indicating copy to clipboard operation
core copied to clipboard

Voip intergration only beeps once.

Open Bram-diederik opened this issue 1 year ago • 1 comments

The problem

The voip assistant integration only beeps once. Actions are run but totally no feedback is given after the 1st call. For every integration once.

It beebs again once after a reboot.

What version of Home Assistant Core has the issue?

core-2024.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Voip integration

Link to integration documentation on our website

https://www.home-assistant.io/integrations/voip/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Bram-diederik avatar Oct 15 '24 20:10 Bram-diederik

Hey there @balloob, @synesthesiam, mind taking a look at this issue as it has been labeled with an integration (voip) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of voip can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign voip Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


voip documentation voip source (message by IssueLinks)

home-assistant[bot] avatar Oct 15 '24 20:10 home-assistant[bot]

What VoIP hardware are you using? I'm using the Grandstream HT802 and am not seeing any problems.

synesthesiam avatar Oct 17 '24 14:10 synesthesiam

I use asterisk. Worked since intoduced. (Config is somewhere at the forum edit https://community.home-assistant.io/t/voice-over-ip-and-asterisk-multiple-languages-possible/568061?u=daft) A user trying to connect with freepbx (asterisk under water) i help on discord has the same issue.

I dont mind create some asterisk docker or vm setup for you to test with. If you use asterisk you can use any voip phone.

And i use the integration with LLM for call screening in my voicemail

Bram-diederik avatar Oct 17 '24 15:10 Bram-diederik

I am also using the voip with asterisk and have the same issue

menne386 avatar Oct 20 '24 14:10 menne386

I've never used asterisk. Can you please post any logs from when you have a call fail?

synesthesiam avatar Oct 21 '24 14:10 synesthesiam

error_log-1.txt

I tried several voice commands.

I now have the same issue with the fellow i tried to help on discord. I dont get any speech into home assistant.

I revered my hass for voicemail call screening back to Core 2024.9.1. That works again.

Bram-diederik avatar Oct 21 '24 14:10 Bram-diederik

home-assistant_voip_2024-10-21T15-18-48.059Z.log

In this attached log i did the following:

  1. reload the voip integration

  2. enable debug logging

  3. place 1 successful call: (this one fully works)

  4. try another call: (now there is no beep indicating listening, command is executed, but no feedback is heard)

  5. click on end debug logging

(Note the voip_utils.error.RtpError: Expected payload type 107, got 101 errors around line 1191)

menne386 avatar Oct 21 '24 15:10 menne386

home-assistant_voip_2024-10-21T15-18-48.059Z.log

In this attached log i did the following:

  1. reload the voip integration
  2. enable debug logging
  3. place 1 successful call: (this one fully works)
  4. try another call: (now there is no beep indicating listening, command is executed, but no feedback is heard)
  5. click on end debug logging

(Note the voip_utils.error.RtpError: Expected payload type 107, got 101 errors around line 1191)

I expected this to be my outcome but i dont have any stt detection anymore. So there are two bugs. (Bugs in tester point of view it could be the same line of code)

Bram-diederik avatar Oct 21 '24 15:10 Bram-diederik

home-assistant_voip_2024-10-21T15-18-48.059Z.log In this attached log i did the following:

  1. reload the voip integration
  2. enable debug logging
  3. place 1 successful call: (this one fully works)
  4. try another call: (now there is no beep indicating listening, command is executed, but no feedback is heard)
  5. click on end debug logging

(Note the voip_utils.error.RtpError: Expected payload type 107, got 101 errors around line 1191)

I expected this to be my outcome but i dont have any stt detection anymore. So there are two bugs. (Bugs in tester point of view it could be the same line of code)

I see, so to recap: reloading your voip integration does not give you 1 valid beep conversation?

In that case, then yes: could be 2 issues.

We do share the stt-stream-failed errors i see....

menne386 avatar Oct 21 '24 17:10 menne386

Same thing is happening to me, using a snom D735 on 3CX.

theNetworkChuck avatar Oct 22 '24 21:10 theNetworkChuck

I've never used asterisk. Can you please post any logs from when you have a call fail?

This should not be your problem as a developer but an issue for the (none existing) QA department.

Do you want a asterisk test environment? (Home assistant voip) <-> asterisk <-> (any sip (soft) phone)

Bram-diederik avatar Oct 23 '24 10:10 Bram-diederik

alias: Fix phone assist
description: ""
triggers:
  - trigger: state
    entity_id:
      - sensor.104_connected_line
    from: "200"
conditions: []
actions:
  - action: homeassistant.disable_config_entry
    metadata: {}
    data:
      config_entry_id: 01JATARG94Z2GFTCBFBZN30PM3
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - action: homeassistant.enable_config_entry
    metadata: {}
    data:
      config_entry_id: 01JATARG94Z2GFTCBFBZN30PM3
mode: single

I've written this automation, to reset the voip integration after each call as a massively ugly work-around. Depends on the spook integration (https://spook.boo/integrations)

200 is my asterisk home-assistant line, 104 is my grandstream connected phone. So if 104's connected line changes from 200 to any other line, disable the voice over ip integration, wait 1 second, then re-enable the voip integration.

Obviously you'll need to plug in your own config entry ID. (can be done from GUI)

EDIT: forgot to mention, you also need the asterisk integration

menne386 avatar Oct 23 '24 11:10 menne386

Thanks for this information on building an automation to help. Ive hit this problem too. Freepbx and grandstream ht-502.

Can you tell me, using spook how did you get this sensor : sensor.104_connected_line? I have spook installed but i cant figure out how you got that. THank you

u8915055 avatar Oct 29 '24 06:10 u8915055

Hi!

Thanks for this information on building an automation to help. Ive hit this problem too. Freepbx and grandstream ht-502.

Can you tell me, using spook how did you get this sensor : sensor.104_connected_line? I have spook installed but i cant figure out how you got that. THank you

The sensor.104_connected_line is from the asterisk integration. 104 might be different for you, for me it is the phonenumber that the grandstream is connected to.

https://github.com/TECH7Fox/asterisk-hass-addons

menne386 avatar Oct 30 '24 15:10 menne386

Ah ok, i am running freepbx on a completely separate box so that would explain why i dont see that sensor.. i may get rid of freepbx and just use plain asterisk as the addon to achieve this.. Thanks for your quick response.

u8915055 avatar Oct 31 '24 02:10 u8915055

Same issue here with asterisk (I thought I was going crazy :smile:).

chatziko avatar Nov 01 '24 16:11 chatziko

Same issue here with asterisk (I thought I was going crazy 😄).

only the beep or isnt it working at all. since the update it does not work at all at my side. after i filed this bug. what is your asterisk configuration?

Bram-diederik avatar Nov 01 '24 23:11 Bram-diederik

only the beep or isnt it working at all

First time I connect via askerisk audio works both ways (I get the beep and the replies). After that audio works only one way (HA gets my voice and executes the commands, but I don't get any audio from it back, until I reload the Voip integration).

If I connect via a softphone directly, audio works both ways in every call. Also if I connect via asterisk and then directly via softphone, the direct call still works although the asterisk doesn't.

I connect via PJSIP, here's a simple pjsip.conf that worked:

[homeassistant]
type = aor
contact = sip:<ha-ip>:5060

[homeassistant]
type = endpoint
context = from-external
disallow = all
allow = opus
aors = homeassistant
direct_media = no

Then from extensions.conf I connect via Dial(PJSIP/homeassistant/,60).

Btw I know very little about asterisk, just experimenting with it.

chatziko avatar Nov 02 '24 08:11 chatziko

only the beep or isnt it working at all

First time I connect via askerisk audio works both ways (I get the beep and the replies). After that audio works only one way (HA gets my voice and executes the commands, but I don't get any audio from it back, until I reload the Voip integration).

[...]

oke, i double checked. the commands work. only no feedback. thanks

Bram-diederik avatar Nov 02 '24 08:11 Bram-diederik

I created a feature request to get asterisk offically supported https://community.home-assistant.io/t/add-asterisk-support-to-the-voip-integration/791436

Bram-diederik avatar Nov 06 '24 22:11 Bram-diederik

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.