@vgroup/dialbox 0.0.12 → 0.0.13
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.
|
@@ -2143,16 +2143,31 @@ class DialboxComponent {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
}
|
|
2145
2145
|
});
|
|
2146
|
-
//
|
|
2147
|
-
const sub2 = this.twilioService.currentCall.subscribe(incomingCallData => {
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2146
|
+
// Handle incoming call
|
|
2147
|
+
const sub2 = this.twilioService.currentCall.subscribe((incomingCallData) => {
|
|
2148
|
+
if (incomingCallData) {
|
|
2149
|
+
console.log('Incoming call received:', incomingCallData);
|
|
2150
|
+
this.isCallInProgress = true;
|
|
2151
|
+
this.isDialpadHidden = false;
|
|
2152
|
+
// Update call data for the UI
|
|
2153
|
+
this.callData = {
|
|
2154
|
+
...this.callData,
|
|
2155
|
+
phone: incomingCallData.parameters.From,
|
|
2156
|
+
name: incomingCallData.customParameters?.get('name') || 'Unknown Caller',
|
|
2157
|
+
img: incomingCallData.customParameters?.get('image') || 'assets/images/user.jpg',
|
|
2158
|
+
isIncomingCall: true,
|
|
2159
|
+
extNum: incomingCallData.parameters.To || ''
|
|
2160
|
+
};
|
|
2161
|
+
// Add to incoming calls list if not already present
|
|
2162
|
+
const callSid = incomingCallData.parameters.CallSid;
|
|
2163
|
+
const existingCall = this.incomingCallsList.find((call) => call.parameters.CallSid === callSid);
|
|
2164
|
+
if (!existingCall) {
|
|
2165
|
+
this.incomingCallsList.push(incomingCallData);
|
|
2166
|
+
this.incomingCallsNewInfoEvent.emit(this.incomingCallsList);
|
|
2167
|
+
}
|
|
2168
|
+
// Notify parent component about the incoming call
|
|
2169
|
+
this.incomingCallInitiated.emit();
|
|
2170
|
+
}
|
|
2156
2171
|
if (incomingCallData) {
|
|
2157
2172
|
if (this.isCallInProgress) {
|
|
2158
2173
|
this.newIncomingCalls.push(incomingCallData);
|
|
@@ -3080,20 +3095,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3080
3095
|
|
|
3081
3096
|
/*
|
|
3082
3097
|
* Public API Surface of dialbox
|
|
3083
|
-
*/
|
|
3084
|
-
// export * from './lib/components/dialpad/dialpad.component';
|
|
3085
|
-
// export * from './lib/components/dial-button/dial-button.component';
|
|
3086
|
-
// // Services
|
|
3087
|
-
// export * from './lib/components/services/dialer.service';
|
|
3088
|
-
// export * from './lib/components/services/call-handler.service';
|
|
3089
|
-
// // Models
|
|
3090
|
-
// export * from './lib/components/models/call.interface';
|
|
3091
|
-
// export * from './lib/components/models/dialer-options.interface';
|
|
3092
|
-
// // Utils
|
|
3093
|
-
// export * from './lib/components/utils/phone-validator.util';
|
|
3094
|
-
// export * from './lib/components/utils/format-phone.util';
|
|
3095
|
-
// // Module
|
|
3096
|
-
// export * from './lib/dialbox.module';
|
|
3098
|
+
*/
|
|
3097
3099
|
|
|
3098
3100
|
/**
|
|
3099
3101
|
* Generated bundle index. Do not edit.
|