diff --git a/ha-sip/CHANGELOG.md b/ha-sip/CHANGELOG.md index f0dac22..8fa217e 100644 --- a/ha-sip/CHANGELOG.md +++ b/ha-sip/CHANGELOG.md @@ -2,6 +2,9 @@ If you find ha-sip useful, consider starring ⭐ the [GitHub repo](https://github.com/arnonym/ha-plugins)! +# 5.4.1 +- Fix crash for outgoing calls + ## 5.4 - Allow templating of messages in `incoming_call_file` or from MQTT (thanks nbe95@github for implementing this!) - Add option to extract SIP headers and receive them in webhooks diff --git a/ha-sip/config.json b/ha-sip/config.json index 91f9da1..7a349b7 100644 --- a/ha-sip/config.json +++ b/ha-sip/config.json @@ -1,6 +1,6 @@ { "name": "ha-sip", - "version": "5.4", + "version": "5.4.1", "slug": "ha-sip", "url": "https://github.com/arnonym/ha-plugins", "description": "Home-Assistant SIP Gateway", diff --git a/ha-sip/src/call.py b/ha-sip/src/call.py index 35b5555..c86c4fe 100644 --- a/ha-sip/src/call.py +++ b/ha-sip/src/call.py @@ -506,11 +506,11 @@ def send_dtmf(self, digits: str, method: DtmfMethod = 'in_band') -> None: self.sendDtmf(dtmf_prm) def get_callback_ids(self) -> tuple[str, List[str]]: - call_info = self.get_call_info() if self.uri_to_call: # On outgoing calls we use the uri_to_call, as other info is not available yet parsed_caller = self.parse_caller(self.uri_to_call) - return self.uri_to_call, [x for x in [parsed_caller, call_info['call_id']] if x is not None] + return self.uri_to_call, [x for x in [parsed_caller] if x is not None] + call_info = self.get_call_info() return call_info['remote_uri'], [x for x in [call_info['parsed_caller'], call_info['call_id']] if x is not None] def get_call_info(self) -> webhook.CallInfo: