this is exactlly what i’m looking for. I would like to have like an entitiy in the VOIP integration, to ring the phone. The hook is already detected. So I asume that this would not a big deal for the creator. Did you manage to start a new topic/request this feature?
Maybe this is completely off-topic… I will try nevertheless. I have a VoIP phone in the house of my mum and I would like to use it as an alarm clock to wake her up because her hearing is very bad. Would it be possible to ring the voip phone from HA???
If you find a solution for this, please let me know. I’m interested in the exact same feature. Maybe we should contact the developer
I tried to build a call flow app for the 3CX pbx that is hosting the phone, but I can’t get it to work… For now I just send her a notification to her iPhone through HA. But it would be so much better if I could call her VoIP phone.
For years I have used Home Assistant and various pbx systems, e.g. 3cx, freepbx, VitalPBX which was good until they limited the extensions to only 10?? Now I have built MikoPBX, which is made by Russian developers and is free to use, no restrictions, but you get paid support and add-ons.
VitalPBX had support for Home Assistant, I would like the same for the MikoPBX system. I just got the Goip adapter working. Or it would also be good if someone developed support for Home assistant in the Goip adapter.
Any of you guys figured out an easier way to broadcasting TTS generated from HA on your SIP phones? Thanks!
hey @gravyflex did you ever find a solution for this? I’m in the same boat as you… I can issue voice commands and they work great, but all I ever hear is buzzing.
Exactly the same here. DP750, voice commands work, but I hear only buzzing.
Thanks for posting this! I was really surprised to see such a specific device mentioned on the docs rather than showing that anything with SIP URI dialing can call into it.
I was able to get one or two calls to go through before realizing I had to ‘allow calls’ on the VoIP device in the Integration, but ran into an issue after enabling that:
- Experiencing dead air on the SIP call, but it connects and shows the call timer.
- I used tcpdump on haos after installing it through the SSH add-on, and pulled it into wireshark.
- Capture from haos shows the RTP being received, but nothing being sent out.
- I believe that since the capture is on the interface level, there might be some sort of firewall blocking the RTP from coming in or out of the homeassistant application on the server.
Has anyone run into this, or at least familiar enough with HAOS to know where to look for an internal firewall or allowing a port range being blocked?
Thanks!
ok, I am SO CLOSE to getting this to work. But something is wrong with authentication.
System: Latest version of HASS running on a synology in a container using CORE.
3cx local running on a windows server, latest version.
No trunk to the outside world - used as an intercom only.
A trunk to HASS:
- default route is to my extension
- random main trunk number
- set to do not require authentication, and the HASS ip:5060
- autodiscover off
- only the opus codec defined
- transport protocol any
type or paste code here
I then have HA-SIP set up with:
Port 5061
log level 5
name server: (IP of my DNS)
Cache dir: /tmp/audio_cache (this does exist)
sip
enabled: true
registrar_uri: sip:Mydomain.ny.3cx.us
id_uri: sip:[email protected]
realm: "*"
username: {what do I put here from 3cx? I've tried email, sip address, just the extension in quotes etc}
password: What password do I use here- the same one as for the user above?
answer_mode: listen
Settle_time: 1
incoming_call_file: ""
Whenever I try to fire up HA-sip I get:
22:54:46.025 sip_auth_client.c ...Digest algorithm is "MD5"
22:54:46.026 pjsua_core.c ....TX 746 bytes Request msg REGISTER/cseq=27779 (tdta0x7f73d51866f8) to UDP 192.168.2.245:5060:
REGISTER sip:Mydomain.ny.3cx.us SIP/2.0
Via: SIP/2.0/UDP 192.168.2.205:5061;rport;branch=z9hG4bKPjjL-cJJaBmLU0EGsymSi5jylMs8IS-i98
Max-Forwards: 70
From: <sip:[email protected]>;tag=G7gkrPKq6D0j-IkExHjKBCLUAoqlShEk
To: <sip:[email protected]>
Call-ID: C8.FMaXbVVW9la-Xv1ScsNMjTfpmLb9I
CSeq: 27779 REGISTER
Contact: <sip:[email protected]:5061;ob>;+sip.ice
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Proxy-Authorization: Digest username="sip:[email protected]", realm="3CXPhoneSystem", nonce="Deleted for security reasons - there is a hash here", uri="sip:Mydomain.ny.3cx.us", response="5208265f5b91b7c267c85cf59f908ec5", algorithm=MD5
Content-Length: 0
--end msg--
22:54:46.128 pjsua_core.c .RX 334 bytes Response msg 403/REGISTER/cseq=27779 (rdata0x7f73d5367038) from UDP 192.168.2.245:5060:
SIP/2.0 403 Invalid credentials
Via: SIP/2.0/UDP 192.168.2.205:5061;rport=5061;branch=z9hG4bKPjjL-cJJaBmLU0EGsymSi5jylMs8IS-i98
To: <sip:[email protected]>;tag=c8050e7d
From: <sip:[email protected]>;tag=G7gkrPKq6D0j-IkExHjKBCLUAoqlShEk
Call-ID: C8.FMaXbVVW9la-Xv1ScsNMjTfpmLb9I
CSeq: 27779 REGISTER
Content-Length: 0
--end msg--
22:54:46.131 pjsua_acc.c ....SIP registration failed, status=403 (Invalid credentials)
| 22:54:46.131924 [1] OnRegState: 403 Invalid credentials
22:54:46.902 pjsua_aud.c Closing sound device after idle for 1 second(s)
22:54:46.902 pjsua_aud.c .Closing null sound device..
Any clues as to what I’m doing wrong? I feel like I am SO CLOSE.
*
Has anyone found a way to set a fixed rtp port?
Rtp port is chosen randomly and thus a lot of ports need to be unblocked on the firewall
Ok, I now have ha-sip registring the extension successfully. However whenever I write a script to send a message I get a not an object error. I can’t seem to make the examples that use nested objects to work at all (IE the format:
addon:
input:
command: play_message
number: sip:number
etc
I am consistently getting a couple of weird statuses/messages:
this one: SIP outbound status for acc 0 is not active
and this one: Error: Not an object:
Here is the script that will save but doesn’t work with a “not an object” error:
alias: Send Lee a test message
sequence:
- sequence:
- action: hassio.addon_stdin
metadata: {}
data:
addon: c7744bff_ha-sip
input: >
{ "command":"play_message", "number":"sip:[email protected]",
"message":"This is a test messsage", "cache_audio": true,
"wait_for_audio_to_finish": true }
- action: hassio.addon_stdin
metadata: {}
data:
addon: c7744bff_ha-sip
input: |
{
"command": "dial",
"number": "sip:[email protected]",
"webhook_to_call_after_call_was_established": "hasip_web_call_established",
"webhook_to_call": "hasip_web_listen_in",
"ring_timeout": "hasip_web_no_answer",
"call_established": "hasip_web_call_answered",
"entered_menu": "hasip_web_entered_menu",
"timeout": "hasip_web_message_timeout",
"dtmf_digit": "hasip_web_digit_dialed",
"call_disconnected": "hasip_web_hung_up",
"playback_done": "hasip_web_playback_complete",
"ring_timeout": 15,
"sip_account": 1,
"message": "This is a different message"
}
description: ""
icon: mdi:phone
both of these calls fail (one uses the dial command, the other the play message command - and yes I tried doing each individually first)
0:57:02.234 pjsua_acc.c ....SIP outbound status for acc 0 is not active
10:57:02.234 pjsua_acc.c ....sip:[email protected]: registration success, status=200 (OK), will re-register in 300 seconds
10:57:02.234 pjsua_acc.c ....Keep-alive timer started for acc 0, destination:192.168.2.245:5060, interval:14s
| 10:57:02.234763 [1] OnRegState: 200 OK
| 10:57:53.913152 [ ] Error: Not an object: { "command":"play_message", "number":"sip:[email protected]", "message":"This is a test messsage", "cache_audio": true, "wait_for_audio_to_finish": true }
| 10:57:54.203629 [ ] Error: Not an object: {
"command": "dial",
"number": "sip:[email protected]",
"webhook_to_call_after_call_was_established": "hasip_web_call_established",
"webhook_to_call": "hasip_web_listen_in",
"ring_timeout": "hasip_web_no_answer",
"call_established": "hasip_web_call_answered",
"entered_menu": "hasip_web_entered_menu",
"timeout": "hasip_web_message_timeout",
"dtmf_digit": "hasip_web_digit_dialed",
"call_disconnected": "hasip_web_hung_up",
"playback_done": "hasip_web_playback_complete",
"ring_timeout": 15,
"sip_account": 1,
"message": "This is a different message"
}```
Maybe this is a dumb question but are you guys successfully running a PBX only successful when on the local area network (LAN). I have 3CX running on someone else’s server in another city.
I have success when plugging a corded phone into the Grandstream HT801 after proper configurations. However, I’m also trying to run this off a landline into the Grandstream HT801 without success.
I would prefer to have Home Assistant Voice Over IP setup and receiving calls using my 3CX SIP into the Grandstream HT801. Is this possible?
Have you tried the offhook auto-dail function of grandstream? Just let it dial your local HA IP and you have the best of both worlds.
On a different note, I have a PBX (3cx) set-up calling into VoIP assist and I am getting the following error
My settings on 3cx are very straighforward (and based on the BigHomie approach):
- provider: generic SIP trunk, IP-based
- port: 5060
- Registrar: ip-ha
- Codec: OPUS
Any ideas? I know the rest is working (using the Grandstream route)
This thread goes back a long time, wondering though if anyone noticed that the VOIP integration stopped working? I just tried to set this up last month using a Grandstream HT801V2 and no luck getting it to work. The voice assistant works fine from the HA App on my phone but all I get are the acknowlegement chimes. The command does not work and no voice response. I get a voice on the HT801V2 when the configuration is not turned on in HA telling me so, but with it activated nothing.
On a separate note, I would like to use an old VOIP phone (SNOM 300) with voice assistant but it does not support OPUS so am I out of luck?
Would you be able to get either a packet capture with tcpdump or enable debug logging on voip_utils and post what is being sent in the “From” header?
Are you able to see how long the speech to text step is taking in the assist debugging section? It seems like there is an issue with timeout handling with 2 seconds being the timeout for STT.
Oef, not that advanced over here. How can I do that? ssh into HA and then tcpdump command which what parameters?
Yeah, sorry, if you are up for learning I can try to describe how I would do it. Start by connecting to HA with ssh, then find out what your network interface is called with the ifconfig command. There might be a few listed so you want the one associated with the IP address you use to connect to HA. Once you have that I would run tcpdump with something like:
tcpdump -i <iface name> 'udp port 5060'
You might want to write that out to a file by adding ‘-w ’. You can then read it with ‘tcpdump -r -A’.