Ok fair enough lets look into the sip route first. For the PBX you can use out of the box asterisk but you need to configure every things via config files (there is asterisk now, but…). Freepbx is what I know so I can speak in freepbx terms and if you have something else you will need to translate. (Understand I have not done this bit myself yet, but I’m putting together the bits)
So from your analog phone you will need an FSX ATA, a grandstream ht801 (1 FSX) or ht813 (1 FXS and 1 FXO) adapter will work. Before I moved to voip.ms I placed the ht813 between the PTSN house line and the phones internallly. This allowed my pbx to intercept incoming calls and drive them to an IVR before the house phone actually rang. I did this to thwart the robo dialers. but back on point. Get this ata connected to your pbx.
Once that’s connected the next step is to follow what I posted in the other tread about connecting your pbx to home assistant, assistant. I just thought of a problem. That sip-ha gateway also uses port 5060, what voip assist is using. Not sure how they will interact.
Back on point, for the sip-ha gateway you will need to create an extension in asterisk. For example lets say you create extension 1000 in freepbx. Once that extension is created go back into the extension page and pick up the auto generated password. The user name will be the extension number.
If you look at the ha-sip github site you will see this section
sip_global:
port: 5060
log_level: 5 # log level of pjsip library
name_server: '' # comma separated list of name servers, must be set if sip server must be resolved via SRV record
sip:
enabled: true
registrar_uri: sip:fritz.box
id_uri: sip:[email protected]
realm: '*'
user_name: homeassistant
password: secure
answer_mode: listen # "listen" or "accept", see below
settle_time: 1 # time to wait for playing the message/actions/etc. after call was established
incoming_call_file: "" # config and menu definition file for incoming calls, see below
The important fields are these
registrar_uri: sip:fritz.box
id_uri: sip:[email protected]
user_name: homeassistant
password: secure
You want to adjust them as
registrar_uri: sip:1000@<freepbx_ip>
id_uri: sip:homeassistant@<ha_ip>
realm: '*'
user_name: 1000
password: <password_from_freepbx_exten>
My confidence level for registrar and id_uri is about 50% I might need to look that bit up.
In the next section on the github site
service: hassio.addon_stdin
data_template:
addon: c7744bff_ha-sip
input:
command: dial
number: sip:**[email protected]
The important value is
number: sip:**[email protected]
So the value could be just the extension number of the phone such as
number: <grandstream_exten_no>
Or the sip_uri of the extension, it depends on how they coded their program
number: sip:<grandstream_exten_no>@<pbx_ip>
The only complication I can see in my mind is if both Assistant and sip-ha are listening on port 5060 then the first service to boot wins that port. Now if we could shift the listening port of either to 5061 then there wouldn’t be a conflict. I see that’s possible with the sip-ha gateway
sip_global:
port: 5060
So in my mind it looks possible.