@vgroup/dialbox 0.3.40 → 0.3.42

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.
@@ -1632,6 +1632,9 @@ class TwilioService {
1632
1632
  return this.http.get(environment.apiUrl + '/utilities/softphone/check/countryCode/' + dialledNo, httpOptions);
1633
1633
  }
1634
1634
  addIncomingParticipant(participantId, conferenceId) {
1635
+ const httpOptions = {
1636
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }),
1637
+ };
1635
1638
  return this.http.get(`${environment.apiUrl}/utilities/ext/add/incoming/participant/${participantId}/${conferenceId}`);
1636
1639
  }
1637
1640
  connect(data) {
@@ -2003,9 +2006,11 @@ class IncomingCallComponent {
2003
2006
  this.extensionService.getRemoveParticipants(this.incomingCallData.participantId, this.incomingCallData.conferenceId).toPromise();
2004
2007
  }
2005
2008
  async add(data) {
2006
- let device = await this.twilioService.connect('');
2007
- console.log(device, 'callConnect');
2008
- if (data?.status == 'ringing') {
2009
+ if (data?.status != 'ringing') {
2010
+ let device = await this.twilioService.connect('');
2011
+ console.log(device, 'callConnect');
2012
+ }
2013
+ else if (data?.status == 'ringing') {
2009
2014
  this.twilioService.addIncomingParticipant(data?.id, this.twilioService.conferenceCallInfo.conferenceId).subscribe((data) => {
2010
2015
  console.log(data, 'bhhhhhhhhhhhhhhhhhhh');
2011
2016
  });