Skip to content

Commit f6f8e84

Browse files
committed
Fix crash on outgoing calls.
1 parent 4d9f2a0 commit f6f8e84

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ha-sip/src/call.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,11 +506,11 @@ def send_dtmf(self, digits: str, method: DtmfMethod = 'in_band') -> None:
506506
self.sendDtmf(dtmf_prm)
507507

508508
def get_callback_ids(self) -> tuple[str, List[str]]:
509-
call_info = self.get_call_info()
510509
if self.uri_to_call:
511510
# On outgoing calls we use the uri_to_call, as other info is not available yet
512511
parsed_caller = self.parse_caller(self.uri_to_call)
513-
return self.uri_to_call, [x for x in [parsed_caller, call_info['call_id']] if x is not None]
512+
return self.uri_to_call, [x for x in [parsed_caller] if x is not None]
513+
call_info = self.get_call_info()
514514
return call_info['remote_uri'], [x for x in [call_info['parsed_caller'], call_info['call_id']] if x is not None]
515515

516516
def get_call_info(self) -> webhook.CallInfo:

0 commit comments

Comments
 (0)