Add asterisk support to the voip integration

Currently the voip integration (Voice over IP - Home Assistant)
Is only supporing Grandstream voip to analog devices.

Voip phones are not supported. This due to new codec (opus) that is used.

Asterisk supports opus and better it can translate other codec to opus and any voip phone can be supported.

And other geek things like trowing llm to the mix and enable call screening…

It took me a long time to understand asterisk. I probably can provide a docker image to test the integration

Thank you for creating this. However i might offer some clarification.

With regards to grandstream support, it seems to only support grandstream ATA adapters that have support for the Opus protocol. For example i have a grandstream HT502 ATA which does not support Opus but the more common HT801/802 do.

Also i dont know if its true that the VOIP integration doesn’t support VOIP phones. Ive been reading that some people have gotten soft phones to work and some other VOIP ‘hard’ phones (all that support OPUS).

The problem here as i see it is that with an asterisk server in the middle (or FreePBX), there is some sort of handshaking or control that isnt working. Just to document the problem from my perspective, i can get it to work for the first call, but after that i have to reset the VOIP integration to get it to work again. otherwise its just a silent call. The assistant listens to my commands on the first and successive calls and does what i ask it to do, but only on the first call can i actually hear the assistant. So to summarize, first call works great, i can hear the assistant and the assistant can hear me. The next call, i cant hear the assistant but the assistant CAN hear me. If i reset the VOIP integration its back to the 1st call where i can hear the assistant again.

Hope this helps.

1 Like

Hi

There is already an Asterisk integration that supports audio and works great: GitHub - TECH7Fox/asterisk-hass-integration: Asterisk integration for Home Assistant

Vincèn

Im not sure this is the asterisk integration we’re looking for here. That integration you mentions seems to create sensors around all connected extensions on the asterisk server. I installed it and that’s what i have found.

What we’re talking about here is a tie-in from asterisk to the voip component so that we can use phones (soft or hard) on an asterisk server to communicate with the HASS assistant. RIght now it sort of works but you hvae to reset the voip integration after every call to be able to hear the assistant

1 Like

Read my post again please. Its about the voip integration. Actually if you use the hacs integration (i also have) and use the asterisk addon (i dont use) and connect to the assistant you would get the same problem.

I want to just add that i recently setup Zoiper VOIP client on my laptop and connected it to the Asterisk PBX and dialed the HASS assistant and same behaviour as using the grandstream. First call works, every call after that is only one way audio.

Next i want to connect the soft client, which supports OPUS, directly to the VOIP integration and see how that goes. I assume this will work. Perhaps i can grab a network trace of the asterisk PBX communicating with the VOIP integration and another trace with the soft client doing the same.

I was able to get the VOIP integration working with Asterisk, I posted a little bit about what I did here Voice over IP Integration - Call from Any SIP Softphone - #38 by jaminh. If you are running on a version after 2024.10 you may run into this issue however 2024.10 breaks VOIP integration · Issue #128372 · home-assistant/core · GitHub.

1 Like

Based on that this looks like a bug. Not a feature request…

The feature is officially add asterisk as a supported software plaform.

The referenced bug affects the supported Grandstream phone as well as the unsupported Asterisk. I think it is still valid to request official support for Asterisk.