@vgroup/dialbox 0.4.158 → 0.4.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/call-progress/call-progress.component.mjs +165 -168
- package/esm2020/lib/dialbox.component.mjs +3 -3
- package/fesm2015/vgroup-dialbox.mjs +156 -156
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +166 -169
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +0 -2
- package/package.json +1 -1
|
@@ -1783,11 +1783,11 @@ class CallProgressComponent {
|
|
|
1783
1783
|
this.isConcurrentIncoming = true;
|
|
1784
1784
|
this.incomingCallDiv = true;
|
|
1785
1785
|
// Add to list if not present
|
|
1786
|
-
const exists = (this.newIncomingCallsList || []).some((c) => c?.parameters?.CallSid === incoming?.parameters?.CallSid);
|
|
1787
|
-
if (!exists) {
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
}
|
|
1786
|
+
// const exists = (this.newIncomingCallsList || []).some((c: any) => c?.parameters?.CallSid === incoming?.parameters?.CallSid);
|
|
1787
|
+
// if (!exists) {
|
|
1788
|
+
// this.newIncomingCallsList = [...(this.newIncomingCallsList || []), incoming];
|
|
1789
|
+
// this.incomingCallsNewInfo.emit(this.newIncomingCallsList);
|
|
1790
|
+
// }
|
|
1791
1791
|
this.cdr.detectChanges();
|
|
1792
1792
|
// }
|
|
1793
1793
|
});
|
|
@@ -1831,66 +1831,84 @@ class CallProgressComponent {
|
|
|
1831
1831
|
// try {
|
|
1832
1832
|
if (this.newIncomingCallsList?.length) {
|
|
1833
1833
|
// Check if there's an active ongoing call
|
|
1834
|
-
this.
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
}
|
|
1858
|
-
else if (index != -1 && res.isLeft) {
|
|
1859
|
-
if (this.currentCallList[index]?.id == this.currentCall?.id) {
|
|
1860
|
-
this.currentCallList.splice(index, 1);
|
|
1861
|
-
this.currentCall = this.currentCallList.length > 0 ? this.currentCallList[0] : {};
|
|
1862
|
-
if (this.currentCall?.isHold && !this.currentCall?.isConference) {
|
|
1863
|
-
await this.onholdOrUnholdParticipant({
|
|
1864
|
-
participantId: [this.currentCall?.participantId],
|
|
1865
|
-
conferenceId: this.conferenceId,
|
|
1866
|
-
hold: false,
|
|
1867
|
-
conference: this.currentCall?.isConference
|
|
1868
|
-
});
|
|
1869
|
-
// this.currentCallList[0].isHold = false;
|
|
1834
|
+
this.newIncomingCallsList.forEach((callInfo, i) => {
|
|
1835
|
+
this.conferenceId = i == 0 ? this.newIncomingCallsList[i].conferenceId : this.conferenceId;
|
|
1836
|
+
this.newIncomingCallsList[i].participants.forEach(async (res) => {
|
|
1837
|
+
if (this.currentCallList.length > 0) {
|
|
1838
|
+
let index = this.currentCallList.findIndex((item) => item.id == res.id);
|
|
1839
|
+
if (index == -1 && !res.isLeft) {
|
|
1840
|
+
this.currentCallList.push({
|
|
1841
|
+
...res,
|
|
1842
|
+
img: 'assets/images/user.jpg',
|
|
1843
|
+
isIncomingCall: res.direction == "incoming-call",
|
|
1844
|
+
isHold: res.isHold,
|
|
1845
|
+
isMute: false,
|
|
1846
|
+
isConference: res.isConference,
|
|
1847
|
+
isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true,
|
|
1848
|
+
dial: true,
|
|
1849
|
+
phone: res.direction == "incoming-call" ? res?.from : res?.to,
|
|
1850
|
+
participantId: res.id,
|
|
1851
|
+
name: res.name || res?.fromName || res?.toName,
|
|
1852
|
+
time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()),
|
|
1853
|
+
});
|
|
1854
|
+
if (this.showContactsPanel) {
|
|
1855
|
+
this.getAllParticipants(this.twilioService.conferenceCallInfo.conferenceSid);
|
|
1856
|
+
this.applyFilter();
|
|
1870
1857
|
}
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1858
|
+
}
|
|
1859
|
+
else if (index != -1 && res.isLeft) {
|
|
1860
|
+
if (this.currentCallList[index]?.id == this.currentCall?.id) {
|
|
1861
|
+
this.currentCallList.splice(index, 1);
|
|
1862
|
+
this.currentCall = this.currentCallList.length > 0 ? this.currentCallList[0] : {};
|
|
1863
|
+
if (this.currentCall?.isHold && !this.currentCall?.isConference) {
|
|
1874
1864
|
await this.onholdOrUnholdParticipant({
|
|
1875
|
-
participantId:
|
|
1876
|
-
conferenceId: this.conferenceId,
|
|
1865
|
+
participantId: [this.currentCall?.participantId],
|
|
1866
|
+
conferenceId: this.currentCall?.conferenceId,
|
|
1877
1867
|
hold: false,
|
|
1878
1868
|
conference: this.currentCall?.isConference
|
|
1879
1869
|
});
|
|
1880
|
-
this.
|
|
1870
|
+
// this.currentCallList[0].isHold = false;
|
|
1871
|
+
}
|
|
1872
|
+
else if (this.currentCall?.isHold && this.currentCall?.isConference) {
|
|
1873
|
+
let conferenceCalllist = this.currentCallList.filter((item) => item.isConference);
|
|
1874
|
+
if (conferenceCalllist.length > 0) {
|
|
1875
|
+
await this.onholdOrUnholdParticipant({
|
|
1876
|
+
participantId: conferenceCalllist.map((item) => item.participantId),
|
|
1877
|
+
conferenceId: conferenceCalllist[0]?.conferenceId,
|
|
1878
|
+
hold: false,
|
|
1879
|
+
conference: this.currentCall?.isConference
|
|
1880
|
+
});
|
|
1881
|
+
this.isConferenceCallHold = false;
|
|
1882
|
+
}
|
|
1881
1883
|
}
|
|
1882
1884
|
}
|
|
1885
|
+
else {
|
|
1886
|
+
this.currentCallList.splice(index, 1);
|
|
1887
|
+
}
|
|
1888
|
+
if (this.showContactsPanel) {
|
|
1889
|
+
this.getAllParticipants(this.twilioService.conferenceCallInfo.conferenceSid);
|
|
1890
|
+
this.applyFilter();
|
|
1891
|
+
}
|
|
1883
1892
|
}
|
|
1884
|
-
else {
|
|
1885
|
-
this.currentCallList
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1893
|
+
else if (index != -1) {
|
|
1894
|
+
this.currentCallList[index] = {
|
|
1895
|
+
...res,
|
|
1896
|
+
img: 'assets/images/user.jpg',
|
|
1897
|
+
isIncomingCall: res.direction == "incoming-call",
|
|
1898
|
+
isHold: res.isHold,
|
|
1899
|
+
isMute: false,
|
|
1900
|
+
isConference: res.isConference,
|
|
1901
|
+
isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true,
|
|
1902
|
+
dial: true,
|
|
1903
|
+
phone: res.direction == "incoming-call" ? res?.from : res?.to,
|
|
1904
|
+
participantId: res.id,
|
|
1905
|
+
name: res.name || res?.fromName || res?.toName,
|
|
1906
|
+
time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()),
|
|
1907
|
+
};
|
|
1890
1908
|
}
|
|
1891
1909
|
}
|
|
1892
|
-
else if (
|
|
1893
|
-
this.currentCallList
|
|
1910
|
+
else if (!res.isLeft) {
|
|
1911
|
+
this.currentCallList.push({
|
|
1894
1912
|
...res,
|
|
1895
1913
|
img: 'assets/images/user.jpg',
|
|
1896
1914
|
isIncomingCall: res.direction == "incoming-call",
|
|
@@ -1903,72 +1921,56 @@ class CallProgressComponent {
|
|
|
1903
1921
|
participantId: res.id,
|
|
1904
1922
|
name: res.name || res?.fromName || res?.toName,
|
|
1905
1923
|
time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()),
|
|
1906
|
-
};
|
|
1924
|
+
});
|
|
1925
|
+
this.timer = '00:00';
|
|
1926
|
+
this.startTimer();
|
|
1907
1927
|
}
|
|
1928
|
+
});
|
|
1929
|
+
let currentCall = this.currentCallList.find((item) => item.isAcceptCall && !item.isHold);
|
|
1930
|
+
if (currentCall?.id) {
|
|
1931
|
+
this.currentCall = currentCall;
|
|
1908
1932
|
}
|
|
1909
|
-
|
|
1910
|
-
this.currentCallList.
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
isMute: false,
|
|
1916
|
-
isConference: res.isConference,
|
|
1917
|
-
isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true,
|
|
1918
|
-
dial: true,
|
|
1919
|
-
phone: res.direction == "incoming-call" ? res?.from : res?.to,
|
|
1920
|
-
participantId: res.id,
|
|
1921
|
-
name: res.name || res?.fromName || res?.toName,
|
|
1922
|
-
time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()),
|
|
1923
|
-
});
|
|
1924
|
-
this.timer = '00:00';
|
|
1925
|
-
this.startTimer();
|
|
1926
|
-
}
|
|
1927
|
-
});
|
|
1928
|
-
let currentCall = this.currentCallList.find((item) => item.isAcceptCall && !item.isHold);
|
|
1929
|
-
if (currentCall?.id) {
|
|
1930
|
-
this.currentCall = currentCall;
|
|
1931
|
-
}
|
|
1932
|
-
if (this.selectedUserInfo?.participantId) {
|
|
1933
|
-
let selectedUser = this.currentCallList.find((item) => item.id == this.selectedUserInfo.participantId);
|
|
1934
|
-
if (selectedUser) {
|
|
1935
|
-
selectedUser.IsUserInfoShow = true;
|
|
1936
|
-
this.selectedUserInfo = selectedUser;
|
|
1937
|
-
this.checkTextHeight();
|
|
1938
|
-
}
|
|
1939
|
-
else {
|
|
1940
|
-
let incomingCall = this.currentCallList.find((item) => item?.businessNumber);
|
|
1941
|
-
if (incomingCall?.participantId) {
|
|
1942
|
-
this.selectedUserInfo = incomingCall;
|
|
1943
|
-
if (this.isClickExpand) {
|
|
1944
|
-
this.checkTextHeight();
|
|
1945
|
-
}
|
|
1933
|
+
if (this.selectedUserInfo?.participantId) {
|
|
1934
|
+
let selectedUser = this.currentCallList.find((item) => item.id == this.selectedUserInfo.participantId);
|
|
1935
|
+
if (selectedUser) {
|
|
1936
|
+
selectedUser.IsUserInfoShow = true;
|
|
1937
|
+
this.selectedUserInfo = selectedUser;
|
|
1938
|
+
this.checkTextHeight();
|
|
1946
1939
|
}
|
|
1947
1940
|
else {
|
|
1948
|
-
this.
|
|
1949
|
-
|
|
1941
|
+
let incomingCall = this.currentCallList.find((item) => item?.businessNumber);
|
|
1942
|
+
if (incomingCall?.participantId) {
|
|
1943
|
+
this.selectedUserInfo = incomingCall;
|
|
1944
|
+
if (this.isClickExpand) {
|
|
1945
|
+
this.checkTextHeight();
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
else {
|
|
1949
|
+
this.selectedUserInfo = {};
|
|
1950
|
+
this.isClickExpand = false;
|
|
1951
|
+
}
|
|
1950
1952
|
}
|
|
1951
1953
|
}
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1954
|
+
else {
|
|
1955
|
+
let resIndex = this.currentCallList.findIndex((item) => !!item?.businessNumber);
|
|
1956
|
+
if (resIndex > -1) {
|
|
1957
|
+
this.isClickExpand = true;
|
|
1958
|
+
this.currentCallList[resIndex].IsUserInfoShow = true;
|
|
1959
|
+
this.selectedUserInfo = this.currentCallList[resIndex];
|
|
1960
|
+
this.checkTextHeight();
|
|
1961
|
+
}
|
|
1960
1962
|
}
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1963
|
+
this.cdr.detectChanges();
|
|
1964
|
+
let incomingData = this.currentCallList.find((res) => res.isIncomingCall && !res.isAcceptCall);
|
|
1965
|
+
if (incomingData?.id && !this.isRinging) {
|
|
1966
|
+
this.isRinging = this.incomeingCallSocketService.play();
|
|
1967
|
+
}
|
|
1968
|
+
else if (!incomingData?.id && this.isRinging) {
|
|
1969
|
+
this.isRinging = this.incomeingCallSocketService.pause();
|
|
1970
|
+
}
|
|
1971
|
+
console.log(this.isRinging, incomingData);
|
|
1972
|
+
console.log('currentCallList', this.currentCallList);
|
|
1973
|
+
});
|
|
1972
1974
|
}
|
|
1973
1975
|
else if (!this.newIncomingCallsList?.length) {
|
|
1974
1976
|
console.log('test null');
|
|
@@ -1990,9 +1992,6 @@ class CallProgressComponent {
|
|
|
1990
1992
|
this.stopTimer();
|
|
1991
1993
|
this.endCallEvent.emit();
|
|
1992
1994
|
}
|
|
1993
|
-
// } catch (e) {
|
|
1994
|
-
// console.log(e);
|
|
1995
|
-
// }
|
|
1996
1995
|
}
|
|
1997
1996
|
// if(changes['conferenceCallInfo']?.currentValue && this.conferenceCallInfo && changes['conferenceCallInfo']?.previousValue?.conferenceSid != changes['conferenceCallInfo']?.currentValue?.conferenceSid) {
|
|
1998
1997
|
// this.isConference = true
|
|
@@ -2136,7 +2135,7 @@ class CallProgressComponent {
|
|
|
2136
2135
|
from: callData?.from,
|
|
2137
2136
|
route: "OUTGOING",
|
|
2138
2137
|
participantNumber: callData?.phone,
|
|
2139
|
-
conferenceId: this.conferenceId,
|
|
2138
|
+
conferenceId: this.conferenceId || response?.callauth?.id,
|
|
2140
2139
|
userId: this.userId || localStorage.getItem('userId'),
|
|
2141
2140
|
proxy: '',
|
|
2142
2141
|
countrycode: '',
|
|
@@ -2167,7 +2166,7 @@ class CallProgressComponent {
|
|
|
2167
2166
|
console.log(c, 'dsdsdsdsdsdsadsa');
|
|
2168
2167
|
this.onholdOrUnholdParticipant({
|
|
2169
2168
|
participantId: [c.participantId],
|
|
2170
|
-
conferenceId:
|
|
2169
|
+
conferenceId: c?.conferenceId,
|
|
2171
2170
|
hold: !c.hold,
|
|
2172
2171
|
conference: c.isConference
|
|
2173
2172
|
});
|
|
@@ -2177,7 +2176,7 @@ class CallProgressComponent {
|
|
|
2177
2176
|
async onEndCall(c, isAllCallEnd) {
|
|
2178
2177
|
console.log(c, 'dsdsdsdsdsdsadsa');
|
|
2179
2178
|
let participantId = isAllCallEnd ? 'all' : c.participantId || c.participantId;
|
|
2180
|
-
let res = await this.getRemoveParticipants(participantId,
|
|
2179
|
+
let res = await this.getRemoveParticipants(participantId, c?.conferenceId);
|
|
2181
2180
|
if (res?.status == 201 && res?.message == 'participant already left') {
|
|
2182
2181
|
// this.currentCallList = this.currentCallList.filter((item: any) => item.participantId !== c.participantId);
|
|
2183
2182
|
// this.currentCall = this.currentCallList.length > 0 ? this.currentCallList[0] : null;
|
|
@@ -2375,7 +2374,7 @@ class CallProgressComponent {
|
|
|
2375
2374
|
// this.currentCall = this.currentCallList[0];
|
|
2376
2375
|
await this.onholdOrUnholdParticipant({
|
|
2377
2376
|
participantId: [this.currentCall?.participantId],
|
|
2378
|
-
conferenceId: this.conferenceId,
|
|
2377
|
+
conferenceId: this.currentCall?.conferenceId,
|
|
2379
2378
|
hold: false,
|
|
2380
2379
|
isConference: this.currentCall?.isConference
|
|
2381
2380
|
});
|
|
@@ -2495,7 +2494,7 @@ class CallProgressComponent {
|
|
|
2495
2494
|
// res.isHold = true;
|
|
2496
2495
|
this.onholdOrUnholdParticipant({
|
|
2497
2496
|
participantId: [res.participantId],
|
|
2498
|
-
conferenceId:
|
|
2497
|
+
conferenceId: res?.conferenceId,
|
|
2499
2498
|
hold: true,
|
|
2500
2499
|
conference: res.isConference
|
|
2501
2500
|
});
|
|
@@ -2510,7 +2509,7 @@ class CallProgressComponent {
|
|
|
2510
2509
|
// }
|
|
2511
2510
|
await this.onholdOrUnholdParticipant({
|
|
2512
2511
|
participantId: this.currentCall?.isIncomingCall ? [this.currentCall?.id] : [this.currentCall?.participantId],
|
|
2513
|
-
conferenceId:
|
|
2512
|
+
conferenceId: data?.conferenceId,
|
|
2514
2513
|
hold: true,
|
|
2515
2514
|
conference: this.currentCall?.isConference
|
|
2516
2515
|
});
|
|
@@ -2578,14 +2577,14 @@ class CallProgressComponent {
|
|
|
2578
2577
|
from: this.callData?.from ? this.callData?.from : this.selectedCallerId?.number,
|
|
2579
2578
|
route: "OUTGOING",
|
|
2580
2579
|
participantNumber: phoneNumber,
|
|
2581
|
-
conferenceId: this.conferenceId,
|
|
2580
|
+
conferenceId: this.currentCall?.conferenceId,
|
|
2582
2581
|
userId: this.userId,
|
|
2583
2582
|
proxy: '',
|
|
2584
2583
|
countrycode: '',
|
|
2585
2584
|
});
|
|
2586
2585
|
this.onholdOrUnholdParticipant({
|
|
2587
2586
|
participantId: [data?.participantId],
|
|
2588
|
-
conferenceId: this.conferenceId,
|
|
2587
|
+
conferenceId: this.currentCall?.conferenceId,
|
|
2589
2588
|
hold: false,
|
|
2590
2589
|
conference: true
|
|
2591
2590
|
});
|
|
@@ -2617,7 +2616,7 @@ class CallProgressComponent {
|
|
|
2617
2616
|
// c.isHold = true;
|
|
2618
2617
|
await this.onholdOrUnholdParticipant({
|
|
2619
2618
|
participantId: [c?.participantId],
|
|
2620
|
-
conferenceId:
|
|
2619
|
+
conferenceId: c.conferenceId,
|
|
2621
2620
|
hold: true,
|
|
2622
2621
|
conference: c?.isConference
|
|
2623
2622
|
});
|
|
@@ -2639,18 +2638,18 @@ class CallProgressComponent {
|
|
|
2639
2638
|
// this.call['callInfo'] = JSON.parse(JSON.stringify(this.callData));
|
|
2640
2639
|
// Get the conference ID from the current call or use the stored one
|
|
2641
2640
|
// const conferenceId = this.conferenceId;
|
|
2642
|
-
if (!this.conferenceId) {
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
}
|
|
2641
|
+
// if (!this.conferenceId) {
|
|
2642
|
+
// console.error("No conferenceId found for active call");
|
|
2643
|
+
// swal("Error", "Cannot add participant: conference not found", "error");
|
|
2644
|
+
// this.showRingAnimation = false;
|
|
2645
|
+
// return;
|
|
2646
|
+
// }
|
|
2648
2647
|
// Add participant to the conference
|
|
2649
2648
|
let data = await this.addParticipantToCall({
|
|
2650
2649
|
from: this.callData?.from || this.selectedCallerId?.number,
|
|
2651
2650
|
route: "OUTGOING",
|
|
2652
2651
|
participantNumber: phoneNumber,
|
|
2653
|
-
conferenceId: this.conferenceId,
|
|
2652
|
+
conferenceId: this.currentCall?.conferenceId,
|
|
2654
2653
|
userId: this.userId,
|
|
2655
2654
|
proxy: '',
|
|
2656
2655
|
countrycode: '',
|
|
@@ -2771,7 +2770,7 @@ class CallProgressComponent {
|
|
|
2771
2770
|
// c.isHold = true;
|
|
2772
2771
|
await this.onholdOrUnholdParticipant({
|
|
2773
2772
|
participantId: [c?.participantId],
|
|
2774
|
-
conferenceId:
|
|
2773
|
+
conferenceId: c.conferenceId,
|
|
2775
2774
|
hold: true,
|
|
2776
2775
|
conference: c?.isConference
|
|
2777
2776
|
});
|
|
@@ -2780,7 +2779,7 @@ class CallProgressComponent {
|
|
|
2780
2779
|
// c.isHold = false;
|
|
2781
2780
|
await this.onholdOrUnholdParticipant({
|
|
2782
2781
|
participantId: [c?.participantId],
|
|
2783
|
-
conferenceId:
|
|
2782
|
+
conferenceId: c.conferenceId,
|
|
2784
2783
|
hold: false,
|
|
2785
2784
|
conference: c?.isConference
|
|
2786
2785
|
});
|
|
@@ -2796,7 +2795,7 @@ class CallProgressComponent {
|
|
|
2796
2795
|
// c.isHold = false;
|
|
2797
2796
|
await this.onholdOrUnholdParticipant({
|
|
2798
2797
|
participantId: [c?.participantId],
|
|
2799
|
-
conferenceId:
|
|
2798
|
+
conferenceId: c.conferenceId,
|
|
2800
2799
|
hold: false,
|
|
2801
2800
|
conference: c?.isConference
|
|
2802
2801
|
});
|
|
@@ -2805,7 +2804,7 @@ class CallProgressComponent {
|
|
|
2805
2804
|
// c.isHold = true;
|
|
2806
2805
|
await this.onholdOrUnholdParticipant({
|
|
2807
2806
|
participantId: [c?.participantId],
|
|
2808
|
-
conferenceId:
|
|
2807
|
+
conferenceId: c.conferenceId,
|
|
2809
2808
|
hold: true,
|
|
2810
2809
|
conference: c?.isConference
|
|
2811
2810
|
});
|
|
@@ -2819,7 +2818,7 @@ class CallProgressComponent {
|
|
|
2819
2818
|
// c.isHold = true;
|
|
2820
2819
|
await this.onholdOrUnholdParticipant({
|
|
2821
2820
|
participantId: [c?.participantId],
|
|
2822
|
-
conferenceId:
|
|
2821
|
+
conferenceId: c.conferenceId,
|
|
2823
2822
|
hold: true,
|
|
2824
2823
|
conference: c?.isConference
|
|
2825
2824
|
});
|
|
@@ -2828,7 +2827,7 @@ class CallProgressComponent {
|
|
|
2828
2827
|
// c.isHold = false;
|
|
2829
2828
|
await this.onholdOrUnholdParticipant({
|
|
2830
2829
|
participantId: [c?.participantId],
|
|
2831
|
-
conferenceId:
|
|
2830
|
+
conferenceId: c.conferenceId,
|
|
2832
2831
|
hold: false,
|
|
2833
2832
|
conference: c?.isConference
|
|
2834
2833
|
});
|
|
@@ -2882,7 +2881,7 @@ class CallProgressComponent {
|
|
|
2882
2881
|
// c.isHold = false;
|
|
2883
2882
|
await this.onholdOrUnholdParticipant({
|
|
2884
2883
|
participantId: [c?.participantId],
|
|
2885
|
-
conferenceId:
|
|
2884
|
+
conferenceId: c.conferenceId,
|
|
2886
2885
|
hold: false,
|
|
2887
2886
|
conference: true
|
|
2888
2887
|
});
|
|
@@ -2969,24 +2968,22 @@ class CallProgressComponent {
|
|
|
2969
2968
|
// console.error('Error starting recording', error);
|
|
2970
2969
|
// });
|
|
2971
2970
|
// }
|
|
2972
|
-
rejectConcurrentCall(incomingCall) {
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
this.cdr.detectChanges();
|
|
2989
|
-
}
|
|
2971
|
+
// rejectConcurrentCall(incomingCall: any) {
|
|
2972
|
+
// if (!incomingCall) return;
|
|
2973
|
+
// if (incomingCall.reject) {
|
|
2974
|
+
// incomingCall.reject();
|
|
2975
|
+
// }
|
|
2976
|
+
// if (incomingCall.disconnect) incomingCall.disconnect();
|
|
2977
|
+
// // Remove from list
|
|
2978
|
+
// this.newIncomingCallsList = (this.newIncomingCallsList || []).filter((c: any) => c?.parameters?.CallSid !== incomingCall?.parameters?.CallSid);
|
|
2979
|
+
// this.incomingCallsNewInfo.emit(this.newIncomingCallsList);
|
|
2980
|
+
// // If no more incoming, hide banner
|
|
2981
|
+
// if (!this.newIncomingCallsList || this.newIncomingCallsList.length === 0) {
|
|
2982
|
+
// this.isConcurrentIncoming = false;
|
|
2983
|
+
// this.incomingCallDiv = false;
|
|
2984
|
+
// }
|
|
2985
|
+
// this.cdr.detectChanges();
|
|
2986
|
+
// }
|
|
2990
2987
|
onCallInputs(num) {
|
|
2991
2988
|
try {
|
|
2992
2989
|
if (Number.isInteger(num) || num == '+' || num == '*' || num == '#') {
|
|
@@ -3077,7 +3074,7 @@ class CallProgressComponent {
|
|
|
3077
3074
|
// return;
|
|
3078
3075
|
// }
|
|
3079
3076
|
let payload = {
|
|
3080
|
-
"conferenceId": this.conferenceId,
|
|
3077
|
+
"conferenceId": this.currentCall?.conferenceId,
|
|
3081
3078
|
};
|
|
3082
3079
|
this.extensionService.getCallRecording(payload).subscribe(response => {
|
|
3083
3080
|
this.isRecording = true;
|
|
@@ -3099,7 +3096,7 @@ class CallProgressComponent {
|
|
|
3099
3096
|
}
|
|
3100
3097
|
}
|
|
3101
3098
|
pauseRecording() {
|
|
3102
|
-
this.extensionService.pauseOrResumeRecording(this.conferenceId, 'pause').subscribe(response => {
|
|
3099
|
+
this.extensionService.pauseOrResumeRecording(this.currentCall?.conferenceId, 'pause').subscribe(response => {
|
|
3103
3100
|
this.stopRecordingTimer();
|
|
3104
3101
|
this.isPaused = true;
|
|
3105
3102
|
}, (error) => {
|
|
@@ -3111,7 +3108,7 @@ class CallProgressComponent {
|
|
|
3111
3108
|
// if (!this.incomingRecordCall && !this.recordCall) {
|
|
3112
3109
|
// return; // Skip if recording is not enabled
|
|
3113
3110
|
// }
|
|
3114
|
-
this.extensionService.pauseOrResumeRecording(this.conferenceId, 'resume').subscribe(response => {
|
|
3111
|
+
this.extensionService.pauseOrResumeRecording(this.currentCall?.conferenceId, 'resume').subscribe(response => {
|
|
3115
3112
|
this.isPaused = false;
|
|
3116
3113
|
this.startTimer1();
|
|
3117
3114
|
}, error => {
|
|
@@ -3192,11 +3189,11 @@ class CallProgressComponent {
|
|
|
3192
3189
|
console.error('Error starting recording', error);
|
|
3193
3190
|
});
|
|
3194
3191
|
}
|
|
3195
|
-
incomingCallsNewList(data) {
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
}
|
|
3192
|
+
// incomingCallsNewList(data: any) {
|
|
3193
|
+
// console.log(data, 'newIncomingCallsListOUR')
|
|
3194
|
+
// this.newIncomingCallsList = data;
|
|
3195
|
+
// this.incomingCallsNewInfo.emit(this.newIncomingCallsList);
|
|
3196
|
+
// }
|
|
3200
3197
|
selectedIncomingCallInfo(data) {
|
|
3201
3198
|
this.selectedIncomingCall = data;
|
|
3202
3199
|
}
|
|
@@ -3236,7 +3233,7 @@ class CallProgressComponent {
|
|
|
3236
3233
|
ipCountry: '',
|
|
3237
3234
|
callStatus: 'answered',
|
|
3238
3235
|
deviceId: this.deviceId,
|
|
3239
|
-
conferenceId: this.conferenceId || data.conferenceId || 'no'
|
|
3236
|
+
conferenceId: this.currentCall?.conferenceId || data.conferenceId || 'no'
|
|
3240
3237
|
};
|
|
3241
3238
|
this.extensionService.setIncomingCallStatus(payload).subscribe((res) => {
|
|
3242
3239
|
console.log(res);
|
|
@@ -3597,9 +3594,9 @@ class DialboxComponent {
|
|
|
3597
3594
|
// console.log("WS Event Received:", incomingCallData);
|
|
3598
3595
|
// console.log("WS Event Received:", incomingCallData.data);
|
|
3599
3596
|
this.twilioService.conferenceCallInfo = incomingCallData;
|
|
3600
|
-
if (!!incomingCallData
|
|
3597
|
+
if (!!incomingCallData?.length) {
|
|
3601
3598
|
// this.incomingCallsList = incomingCallData.participants.filter((item: any) => !item.isLeft) || [];
|
|
3602
|
-
this.incomingCallsList = incomingCallData
|
|
3599
|
+
this.incomingCallsList = incomingCallData || [];
|
|
3603
3600
|
this.isCallInProgress = true;
|
|
3604
3601
|
this.isDialpadHidden = false;
|
|
3605
3602
|
this.isIncomingCallnotification = false;
|