InnovateAsterisk / Browser-Phone

A fully featured browser based WebRTC SIP phone for Asterisk
https://www.innovateasterisk.com
GNU Affero General Public License v3.0
508 stars 250 forks source link

doesn't display answer or reject button after second retry on queue calls #249

Open edimondi opened 2 years ago

edimondi commented 2 years ago

hi, today i realize that after 15 seconds if not answering the calls it doesn't show again the display to answer or reject but i need to click LINE 1 so that it can display the answer and reject button. This is queue call and agent timeout is 15 seconds so when it tries to dial again the same agent it doesn't display the answer and reject button. after 15 sec ringing not showing in display .

InnovateAsterisk commented 2 years ago

What if you select Line 1 from the list on the left?

edimondi commented 2 years ago

if i select Line 1 than it shows the answer reject button

InnovateAsterisk commented 2 years ago

Can you send a Browser Console output of this.

It may be that the Queue is sending something else to the phone when the call is canceled, and the browser phone is failing, tears down the call, but the system thinks there is a call in place, so this is why it doesn't automatically show the call answer screen.

Also confirm that; when a call is answered, they talk a bit and the call is hung up, and the next call comes through, the behaviour is correct.

edimondi commented 2 years ago

sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:00 GMT+0200 (Central European Summer Time) | sip.Invitation | Invitation.progress sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:00 GMT+0200 (Central European Summer Time) | sip.invite-dialog | INVITE dialog 1d20fbf1-32e7-494f-a898-25d248db3bfaptukl268od08923fcf-a3ab-47b8-83c4-c0e8cf3fa860 constructed phone.js:1647 New Incoming Call! Demo 199 <199> phone.js:1650 Current Call Count: 0 phone.js:7730 Selecting Line : 2 phone.js:1907 Audio: media/Ringtone_1.mp3 phone.js:2170 Call canceled by remote party before answer sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:15 GMT+0200 (Central European Summer Time) | sip.Invitation | Invitation.reject sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:15 GMT+0200 (Central European Summer Time) | sip.Invitation | Session 1d20fbf1-32e7-494f-a898-25d248db3bfa08923fcf-a3ab-47b8-83c4-c0e8cf3fa860 transitioned to state Terminated phone.js:4416 New CDR {CdrId: '1650535755402762', ItemType: 'CDR', ItemDate: '2022-04-21 10:09:00 UTC', CallAnswer: null, CallEnd: '2022-04-21 10:09:15 UTC', …} phone.js:4617 Last Activity for Demo 199 is now: 2022-04-21 10:09:15 UTC phone.js:4602 Set Missed badge for Demo 199 to: 1 sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:15 GMT+0200 (Central European Summer Time) | sip.Invitation | Session 1d20fbf1-32e7-494f-a898-25d248db3bfa08923fcf-a3ab-47b8-83c4-c0e8cf3fa860 in state Terminated is being disposed sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:15 GMT+0200 (Central European Summer Time) | sip.invite-dialog | INVITE dialog 1d20fbf1-32e7-494f-a898-25d248db3bfaptukl268od08923fcf-a3ab-47b8-83c4-c0e8cf3fa860 destroyed sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:16 GMT+0200 (Central European Summer Time) | sip.Invitation | Invitation.progress sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:16 GMT+0200 (Central European Summer Time) | sip.invite-dialog | INVITE dialog 6c28816b-091f-4c6c-9488-e0c8a98a0436btk19r4qf6cf41ed9f-6815-4a19-b530-8b20dfa90482 constructed phone.js:1647 New Incoming Call! Demo 199 <199> phone.js:1650 Current Call Count: 0 phone.js:7730 Selecting Line : 3 phone.js:1907 Audio: media/Ringtone_1.mp3 phone.js:8045 Closing Line: 2 phone.js:8027 Selecting previously selected buddy... null phone.js:2170 Call canceled by remote party before answer sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:22 GMT+0200 (Central European Summer Time) | sip.Invitation | Invitation.reject sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:22 GMT+0200 (Central European Summer Time) | sip.Invitation | Session 6c28816b-091f-4c6c-9488-e0c8a98a0436cf41ed9f-6815-4a19-b530-8b20dfa90482 transitioned to state Terminated phone.js:4416 New CDR {CdrId: '165053576286029A', ItemType: 'CDR', ItemDate: '2022-04-21 10:09:16 UTC', CallAnswer: null, CallEnd: '2022-04-21 10:09:22 UTC', …} phone.js:4617 Last Activity for Demo 199 is now: 2022-04-21 10:09:22 UTC phone.js:4602 Set Missed badge for Demo 199 to: 2 sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:22 GMT+0200 (Central European Summer Time) | sip.Invitation | Session 6c28816b-091f-4c6c-9488-e0c8a98a0436cf41ed9f-6815-4a19-b530-8b20dfa90482 in state Terminated is being disposed sip-0.20.0.min.js:2 Thu Apr 21 2022 12:09:22 GMT+0200 (Central European Summer Time) | sip.invite-dialog | INVITE dialog 6c28816b-091f-4c6c-9488-e0c8a98a0436btk19r4qf6cf41ed9f-6815-4a19-b530-8b20dfa90482 destroyed phone.js:8045 Closing Line: 3 phone.js:8027 Selecting previously selected buddy... null

When the new calls come in its always correct its showing the answer reject button

edimondi commented 2 years ago

maybe its because its not selecting the same line but its increasing the line selection, i am not sure

InnovateAsterisk commented 2 years ago

I'm not able to re-create it, but i see that:

phone.js:1647 New Incoming Call! Demo 199 <199>
phone.js:1650 Current Call Count: 0
phone.js:7730 Selecting Line : 3
phone.js:1907 Audio: media/Ringtone_1.mp3
phone.js:8045 Closing Line: 2

Line 3 is selected first, then the Line 2 is closed. But at the same time, the call count does confirm 0 in each case - this is something the UI will used to display the call answer window.

This check could be skipped, ill have to double check the implications of this.