Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/sipjs-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class SipJsCard extends LitElement {
<ha-icon-button
class="accept-btn"
.label=${"Accept Call"}
@click="${this._answer}"
@click="${()=> this._answer()}"
><ha-icon icon="hass:phone"></ha-icon>
</ha-icon-button>
</div>
Expand Down Expand Up @@ -606,8 +606,8 @@ class SipJsCard extends LitElement {
this._call(number, camera);
}

async _answer() {
this.sipPhoneSession?.answer();
private _answer() {
this.sipPhoneSession?.answer(this.sipCallOptions);
}

async _hangup() {
Expand Down Expand Up @@ -932,6 +932,7 @@ class SipJsCard extends LitElement {
});

this.openPopup();

if (this.config.auto_answer) {
this.sipPhoneSession.answer(this.sipCallOptions);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"es2017",
"DOM"
],
"types": []
"types": ["node"]
},
"include": [
"**/*.ts"
Expand Down