When using Asterisk for routing calls to home assistant additional attributes from the SIP INVITE message are needed to distinguish between the actual endpoints calling home asssistant, otherwise all calls appear to be coming from the Asterisk server. This makes it impossible to do area aware voice commands from the phones calling through Asterisk.
To solve this my plan is to check the SIP INVITE message to see if the user-agent header contains “Asterisk” to determine whether or not an Asterisk server is being used. If it is the “from” header will be parsed to determine the endpoint the call came from and include it in the CallInfo object. When the VOIP integration creates the device if the endpoint in the CallInfo object is not None it will include it in the “voip_id”, for example “@”.
Can you be more clear on what integration you would like to add what feature to, or is this actually a ‘share your project’ where you are sharing with the community how you solved this particular problem?
This is for the VOIP integration for voice commands. This is a feature I would like to add to provide the ability to distinguish which phone is being used to call and give a command when an Asterisk server is being used. I included a description of what I thought could be changed in the voip_utils and voip integration code to provide this functionality, not providing a ‘share your project’ description of something that is already supported.