working vanilla asterisk configuration
pjsip.conf
[homeassistant]
type=endpoint
transport=transport-udp
context=mycontext
allow=opus
aors=homeassistant
[homeassistant]
type=aor
contact=sip:[email protected]:5060
I needed to install asterisk-opus for my voip phone to make a translation between ulaw and opus.
If you want to connect to multiple different languages. you can create an additional IP address on your asterisk server. and explicit use those IP addresses for the home assistant connection,
get the dockers running with the additional language.
https://hub.docker.com/r/rhasspy/wyoming-whisper
https://hub.docker.com/r/rhasspy/wyoming-piper
edit /etc/network/interfaces where enp1s0 is the interface
notice no hotplug but auto
auto enp1s0:0
iface enp1s0:0 inet dhcp
auto enp1s0:1
iface enp1s0:1 inet static
address 192.168.5.8
netmask 255.255.255.0
pjsip.conf
[transport-HA-nl]
type=transport
protocol=udp
bind=192.168.5.43:5062
[transport-HA-en]
type=transport
protocol=udp
bind=192.168.5.8:5062
[homeassistant-nl]
type=endpoint
transport=transport-HA-nl
context=mycontext
allow=opus
aors=homeassistant-nl
[homeassistant-nl]
type=aor
contact=sip:[email protected]:5060
[homeassistant-en]
type=endpoint
transport=transport-HA-en
context=mycontext
allow=opus;
aors=homeassistant-en
[homeassistant-en]
type=aor
contact=sip:[email protected]:5060
extentions.conf
exten => 4020,1,Log(NOTICE,home assistant nl)
exten => 4020,n,Dial(PJSIP/homeassistant-nl,20)
exten => 4020,n,Hangup()
exten => 4021,1,Log(NOTICE,home assistant en)
exten => 4021,n,Dial(PJSIP/homeassistant-en,20)
exten => 4021,n,Hangup()