Skip to content

Commit

Permalink
make call obj in callListener, muteToggle and holdToggle consitent (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ExoAbhishek authored Sep 23, 2024
1 parent 1304a22 commit 30df377
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
12 changes: 6 additions & 6 deletions output/ExotelWebPhoneSDK.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "exotel-ip-calling-crm-websdk",
"version": "1.1.3",
"version": "1.1.4",
"description": "Exotel's crm websdk for IP calling integration",
"main": "output/ExotelCRMWebSDK.js",
"scripts": {
Expand Down
15 changes: 8 additions & 7 deletions src/ExotelWebPhoneSDK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ export default class ExotelWebPhoneSDK {
) => {
this.#call = this.#exWebClient.getCall();
callObj.callFromNumber = this.#exWebClient.callFromNumber;
console.info(this.#call?.callDetails());
this._softPhoneCallListenerCallback(eventType, callObj);
const callDetails = callObj.callDetails();
callDetails.callFromNumber = this.#exWebClient.callFromNumber;
this._softPhoneCallListenerCallback(eventType, callDetails);
}

RegisterEventCallBack = (state: string, sipInfo: SIPAccountInfo) => {
Expand Down Expand Up @@ -175,16 +176,16 @@ export default class ExotelWebPhoneSDK {
this.#call?.HoldToggle();
this._softPhoneCallListenerCallback(
"holdtoggle",
this.#call?.callDetails()
{ ...this.#call?.callDetails(), callFromNumber: this.#exWebClient.callFromNumber}
);
}

ToggleMute = () => {
this.#call.Mute();
this._softPhoneCallListenerCallback(
"mutetoggle",
this.#call?.callDetails()
);
this._softPhoneCallListenerCallback("mutetoggle", {
...this.#call?.callDetails(),
callFromNumber: this.#exWebClient.callFromNumber,
});
}

SendDTMF = (digit: string) => {
Expand Down

0 comments on commit 30df377

Please sign in to comment.