@vgroup/dialbox 0.6.3-0.20 → 0.6.3-0.21
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.
|
@@ -1839,90 +1839,91 @@ class CallProgressComponent {
|
|
|
1839
1839
|
if (res?.to == 'c2c_softphone_client') {
|
|
1840
1840
|
this.hostnumber = res;
|
|
1841
1841
|
}
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
if (this.currentCallList?.length > 0) {
|
|
1847
|
-
let index = this.currentCallList.findIndex((item) => item?.id == res?.id);
|
|
1848
|
-
if (index == -1 && !res.isLeft) {
|
|
1849
|
-
this.currentCallList.push({
|
|
1850
|
-
...res,
|
|
1851
|
-
img: res?.direction == "incoming-call" ? res?.toImage : res?.fromImage || contact?.image || 'assets/images/user.jpg',
|
|
1852
|
-
isIncomingCall: res?.direction == "incoming-call",
|
|
1853
|
-
isHold: res?.isHold,
|
|
1854
|
-
isConferenceHold: ourNumberInfo?.isHold || false,
|
|
1855
|
-
isMute: false,
|
|
1856
|
-
isConference: res?.isConference,
|
|
1857
|
-
isAcceptCall: res?.direction == "incoming-call" ? this.getStatus(res) : true,
|
|
1858
|
-
dial: true,
|
|
1859
|
-
phone: res?.direction == "incoming-call" ? res?.from : res?.to,
|
|
1860
|
-
participantId: res?.id,
|
|
1861
|
-
conferenceSid: callInfo?.conferenceSid,
|
|
1862
|
-
name: res?.name || res?.fromName || res?.toName,
|
|
1863
|
-
time: this.getTimeDifference(res?.joinedAt || new Date().toUTCString()),
|
|
1864
|
-
});
|
|
1865
|
-
if (this.showContactsPanel) {
|
|
1866
|
-
this.getAllParticipants(this.currentCall?.conferenceSid);
|
|
1867
|
-
this.applyFilter();
|
|
1868
|
-
}
|
|
1842
|
+
else {
|
|
1843
|
+
let contact = {};
|
|
1844
|
+
if (this.contacts?.length) {
|
|
1845
|
+
contact = this.contacts.find((resData) => resData?.numbersList[0]?.number == (res?.direction == "incoming-call" ? res?.from : res?.to));
|
|
1869
1846
|
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
this.
|
|
1847
|
+
if (this.currentCallList?.length > 0) {
|
|
1848
|
+
let index = this.currentCallList.findIndex((item) => item?.id == res?.id);
|
|
1849
|
+
if (index == -1 && !res.isLeft) {
|
|
1850
|
+
this.currentCallList.push({
|
|
1851
|
+
...res,
|
|
1852
|
+
img: res?.direction == "incoming-call" ? res?.toImage : res?.fromImage || contact?.image || 'assets/images/user.jpg',
|
|
1853
|
+
isIncomingCall: res?.direction == "incoming-call",
|
|
1854
|
+
isHold: res?.isHold,
|
|
1855
|
+
isConferenceHold: ourNumberInfo?.isHold || false,
|
|
1856
|
+
isMute: false,
|
|
1857
|
+
isConference: res?.isConference,
|
|
1858
|
+
isAcceptCall: res?.direction == "incoming-call" ? this.getStatus(res) : true,
|
|
1859
|
+
dial: true,
|
|
1860
|
+
phone: res?.direction == "incoming-call" ? res?.from : res?.to,
|
|
1861
|
+
participantId: res?.id,
|
|
1862
|
+
conferenceSid: callInfo?.conferenceSid,
|
|
1863
|
+
name: res?.name || res?.fromName || res?.toName,
|
|
1864
|
+
time: this.getTimeDifference(res?.joinedAt || new Date().toUTCString()),
|
|
1865
|
+
});
|
|
1866
|
+
if (this.showContactsPanel) {
|
|
1867
|
+
this.getAllParticipants(this.currentCall?.conferenceSid);
|
|
1868
|
+
this.applyFilter();
|
|
1869
|
+
}
|
|
1874
1870
|
}
|
|
1875
|
-
else {
|
|
1876
|
-
this.currentCallList
|
|
1871
|
+
else if (index != -1 && res?.isLeft) {
|
|
1872
|
+
if (this.currentCallList[index]?.id == this.currentCall?.id) {
|
|
1873
|
+
this.currentCallList.splice(index, 1);
|
|
1874
|
+
this.currentCall = this.currentCallList?.length > 0 ? this.currentCallList[0] : {};
|
|
1875
|
+
}
|
|
1876
|
+
else {
|
|
1877
|
+
this.currentCallList.splice(index, 1);
|
|
1878
|
+
}
|
|
1879
|
+
if (this.showContactsPanel) {
|
|
1880
|
+
this.getAllParticipants(this.currentCall?.conferenceSid);
|
|
1881
|
+
this.applyFilter();
|
|
1882
|
+
}
|
|
1877
1883
|
}
|
|
1878
|
-
if (
|
|
1879
|
-
this.
|
|
1880
|
-
|
|
1884
|
+
else if (index != -1) {
|
|
1885
|
+
this.currentCallList[index] = {
|
|
1886
|
+
...res,
|
|
1887
|
+
img: res?.direction == "incoming-call" ? res?.toImage : res?.fromImage || contact?.image || 'assets/images/user.jpg',
|
|
1888
|
+
isIncomingCall: res?.direction == "incoming-call",
|
|
1889
|
+
isHold: res?.isHold,
|
|
1890
|
+
isConferenceHold: ourNumberInfo?.isHold || false,
|
|
1891
|
+
isMute: res?.isMute,
|
|
1892
|
+
isConference: res?.isConference,
|
|
1893
|
+
isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true,
|
|
1894
|
+
dial: true,
|
|
1895
|
+
phone: res?.direction == "incoming-call" ? res?.from : res?.to,
|
|
1896
|
+
participantId: res?.id,
|
|
1897
|
+
conferenceSid: callInfo?.conferenceSid,
|
|
1898
|
+
name: res?.name || res?.fromName || res?.toName,
|
|
1899
|
+
time: this.getTimeDifference(res?.joinedAt || new Date().toUTCString()),
|
|
1900
|
+
};
|
|
1881
1901
|
}
|
|
1882
1902
|
}
|
|
1883
|
-
else if (
|
|
1884
|
-
this.currentCallList
|
|
1903
|
+
else if (!res.isLeft) {
|
|
1904
|
+
this.currentCallList.push({
|
|
1885
1905
|
...res,
|
|
1886
|
-
img: res
|
|
1887
|
-
isIncomingCall: res
|
|
1906
|
+
img: res.direction == "incoming-call" ? res?.toImage : res?.fromImage || contact?.image || 'assets/images/user.jpg',
|
|
1907
|
+
isIncomingCall: res.direction == "incoming-call",
|
|
1888
1908
|
isHold: res?.isHold,
|
|
1889
|
-
isConferenceHold:
|
|
1909
|
+
isConferenceHold: ourNumberInfo?.isHold || false,
|
|
1890
1910
|
isMute: res?.isMute,
|
|
1891
|
-
isConference: res
|
|
1911
|
+
isConference: res.isConference,
|
|
1892
1912
|
isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true,
|
|
1893
1913
|
dial: true,
|
|
1894
|
-
phone: res
|
|
1895
|
-
participantId: res
|
|
1914
|
+
phone: res.direction == "incoming-call" ? res?.from : res?.to,
|
|
1915
|
+
participantId: res.id,
|
|
1896
1916
|
conferenceSid: callInfo?.conferenceSid,
|
|
1897
1917
|
name: res?.name || res?.fromName || res?.toName,
|
|
1898
1918
|
time: this.getTimeDifference(res?.joinedAt || new Date().toUTCString()),
|
|
1899
|
-
};
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
img: res.direction == "incoming-call" ? res?.toImage : res?.fromImage || contact?.image || 'assets/images/user.jpg',
|
|
1906
|
-
isIncomingCall: res.direction == "incoming-call",
|
|
1907
|
-
isHold: res?.isHold,
|
|
1908
|
-
isConferenceHold: res?.isConferenceHold,
|
|
1909
|
-
isMute: res?.isMute,
|
|
1910
|
-
isConference: res.isConference,
|
|
1911
|
-
isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true,
|
|
1912
|
-
dial: true,
|
|
1913
|
-
phone: res.direction == "incoming-call" ? res?.from : res?.to,
|
|
1914
|
-
participantId: res.id,
|
|
1915
|
-
conferenceSid: callInfo?.conferenceSid,
|
|
1916
|
-
name: res?.name || res?.fromName || res?.toName,
|
|
1917
|
-
time: this.getTimeDifference(res?.joinedAt || new Date().toUTCString()),
|
|
1918
|
-
});
|
|
1919
|
-
if (this.currentCallList?.length == 1) {
|
|
1920
|
-
this.currentCall = this.currentCallList[0];
|
|
1919
|
+
});
|
|
1920
|
+
if (this.currentCallList?.length == 1) {
|
|
1921
|
+
this.currentCall = this.currentCallList[0];
|
|
1922
|
+
}
|
|
1923
|
+
this.timer = '00:00';
|
|
1924
|
+
this.startTimer();
|
|
1921
1925
|
}
|
|
1922
|
-
this.timer = '00:00';
|
|
1923
|
-
this.startTimer();
|
|
1924
1926
|
}
|
|
1925
|
-
// }
|
|
1926
1927
|
});
|
|
1927
1928
|
this.leftParticipent[callInfo?.conferenceId] = [...new Map(callInfo?.participants.filter((item) => item?.isLeft === true).map((item) => [item?.direction == 'outgoing-call' ? item?.to || 'Unknown' : item?.from, item])).values()
|
|
1928
1929
|
];
|
|
@@ -2636,52 +2637,32 @@ class CallProgressComponent {
|
|
|
2636
2637
|
if (callInfo) {
|
|
2637
2638
|
ourNumberInfo = callInfo.participants.find((resData) => ((this.deviceNumberList.includes(resData?.from) && resData?.to == 'c2c_softphone_client') || (this.deviceNumberList.includes(resData?.to))) && !resData?.isLeft);
|
|
2638
2639
|
}
|
|
2639
|
-
let selfInfo = this.allParticipentList.find((resData) => (this.deviceNumberList.includes(resData?.from) && resData?.to == 'c2c_softphone_client') || (this.deviceNumberList.includes(resData?.to)));
|
|
2640
|
-
console.log(selfInfo, 'selfInfo');
|
|
2641
|
-
await this.onholdOrUnholdParticipant({
|
|
2642
|
-
participantId: [selfInfo?.participantId],
|
|
2643
|
-
conferenceId: this.currentCall?.conferenceId,
|
|
2644
|
-
hold: true,
|
|
2645
|
-
mute: this.currentCall?.mute || false,
|
|
2646
|
-
conference: this.currentCall?.isConference || false
|
|
2647
|
-
});
|
|
2648
2640
|
if (participentList?.length) {
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
this.newIncomingCallsList.forEach((resData) => {
|
|
2657
|
-
if (resData?.participantId) {
|
|
2658
|
-
participentList.push(resData?.participantId);
|
|
2659
|
-
}
|
|
2641
|
+
console.log(ourNumberInfo, 'selfInfo');
|
|
2642
|
+
await this.onholdOrUnholdParticipant({
|
|
2643
|
+
participantId: [ourNumberInfo?.participantId],
|
|
2644
|
+
conferenceId: ourNumberInfo?.conferenceId,
|
|
2645
|
+
hold: true,
|
|
2646
|
+
mute: ourNumberInfo?.mute || false,
|
|
2647
|
+
conference: ourNumberInfo?.isConference || false
|
|
2660
2648
|
});
|
|
2661
|
-
|
|
2662
|
-
this.isConferenceCallHold = true;
|
|
2663
|
-
}
|
|
2649
|
+
this.isConferenceCallHold = true;
|
|
2664
2650
|
this.startCall(callData, isNewConference);
|
|
2665
2651
|
}
|
|
2666
2652
|
else {
|
|
2667
2653
|
this.startCall(callData, isNewConference);
|
|
2668
2654
|
}
|
|
2669
2655
|
this.searchText = '';
|
|
2670
|
-
// }
|
|
2671
2656
|
}
|
|
2672
2657
|
else {
|
|
2673
2658
|
this.searchText = '';
|
|
2659
|
+
this.isConference = true;
|
|
2674
2660
|
this.callContact(number, true);
|
|
2675
2661
|
}
|
|
2676
|
-
// this.callInitiated.emit({ ...this.callData });
|
|
2677
2662
|
return true;
|
|
2678
2663
|
}
|
|
2679
2664
|
catch (e) {
|
|
2680
|
-
// console.error('Error in initiateCall:', e);
|
|
2681
|
-
// this.isLoadershow = false;
|
|
2682
2665
|
this.showDialAlert('Failed to initiate call. Please try again.');
|
|
2683
|
-
// console.log('dd11')
|
|
2684
|
-
// this.isCallInProgress = false;
|
|
2685
2666
|
return false;
|
|
2686
2667
|
}
|
|
2687
2668
|
}
|
|
@@ -3139,11 +3120,6 @@ class CallProgressComponent {
|
|
|
3139
3120
|
(c?.middleName || '').toLowerCase().includes(text) || (c?.fullName || '').toLowerCase().includes(text) ||
|
|
3140
3121
|
(c?.numbersList[0]?.number || '').toLowerCase().includes(text) || (c?.numbersList[1]?.number || '').toLowerCase().includes(text);
|
|
3141
3122
|
});
|
|
3142
|
-
// this.filteredParticipentList = this.allParticipentList.filter((c: any) => {
|
|
3143
|
-
// const name = (c.direction == 'outgoing-call' ? (c?.toName || '') : (c?.fromName || '')).toLowerCase();
|
|
3144
|
-
// const number = (c.direction == 'outgoing-call' ? ( c?.to || '') : (c?.from || '')).toLowerCase();
|
|
3145
|
-
// return name.includes(text) || number.includes(text);
|
|
3146
|
-
// });
|
|
3147
3123
|
this.filteredList.forEach((c) => {
|
|
3148
3124
|
let index = this.currentCallList.findIndex((cc) => cc?.phone == c?.numbersList[0]?.number || cc?.phone == c?.numbersList[1]?.number);
|
|
3149
3125
|
if (index > -1) {
|