Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QueueMemberStatusEvent InCall Status Not Updating #255

Open
gertdreyer opened this issue May 26, 2021 · 9 comments
Open

QueueMemberStatusEvent InCall Status Not Updating #255

gertdreyer opened this issue May 26, 2021 · 9 comments
Labels
Asterisk issue Not a problem with AsterNET, but with Asterisk, nothing we can do here.

Comments

@gertdreyer
Copy link
Contributor

When subscribing to QueueMemberStatusEvent to the InCall Status is never updated and stays false. It can be observed that the other data changes.

Versions:
Asterisk 16.5.1
.NetCore 3.1

Events are subscribed to with:

manager.QueueMemberStatus += queueMemberUpdate;

Event Handler:

  private static void queueMemberUpdate(object sender, QueueMemberStatusEvent e)
        {
            if (e.InCall)
            {
            }
        }
@Deantwo
Copy link
Collaborator

Deantwo commented May 27, 2021

In your queues.cfg config file, have you set eventmemberstatus = yes on the queue? If you don't, the QueueMemberStatusEvent event will not be raised.

Edit: Nevermind. That option was removed in Asterisk version 12. [1]

@Deantwo
Copy link
Collaborator

Deantwo commented May 27, 2021

Which version of AsterNET are you using?

@Deantwo
Copy link
Collaborator

Deantwo commented May 27, 2021

AsterNET doesn't do anything special with the InCall value, it just takes the value given by Asterisk.

The Asterisk documentation doesn't seem to mention anything special about it.
https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_QueueMemberStatus

Is InCall always false or does it just never change from the initial value? What have you observed it as?

I have never used the InCall boolean value myself. I just use the Status integer value to get the status of the member.

@Deantwo Deantwo added the not enough information Need more information about the issue. label May 27, 2021
@gertdreyer
Copy link
Contributor Author

Originally we were on the latest NuGet version (v1.3.0) however we are currently using the master branch (c23d932).

Ultimately we succeeded with the InCall status. On the master branch it was available on the QueueMemberEvent. There was a small bug in the version determining regex. On our Asterisk 16 install the version result was prefixed with "Output: "

@gertdreyer
Copy link
Contributor Author

Pull request #256 contains the improvement on the regex.

@gertdreyer
Copy link
Contributor Author

gertdreyer commented Jun 1, 2021

This is still not resolved as the working approach is not optimal as we can only determine InCall from the QueueMemberEvent which requires a QueueStatusAction. This is thus a polling approach and not a Subscription Approach. However I believe it may be an Asterisk/PJSIP issue as the ManagerReader never has a QueueMemberEvent with an InCall property that is true. I will attempt this on a Asterisk 18 install in the next two weeks.

@Deantwo Deantwo added Asterisk issue Not a problem with AsterNET, but with Asterisk, nothing we can do here. and removed not enough information Need more information about the issue. labels Jun 1, 2021
@Deantwo
Copy link
Collaborator

Deantwo commented Jun 1, 2021

This is still not resolved as the working approach is not optimal as we can only determine InCall from the QueueMemberEvent which requires a QueueStatusAction. This is thus a polling approach and not a Subscription Approach.

Like I said, you can use Status to determine if the member is in a call. That is what I use in my application.

However I believe it may be an Asterisk/PJSIP issue as the ManagerReader never has a QueueMemberEvent with an InCall property that is true. I will attempt this on a Asterisk 18 install in the next two weeks.

Yeah if it also doesn't work with the newest Asterisk version, I would suggest filing a bug report with Asterisk.

But I don't have the resources right now to check the exact messages that Asterisk is sending to AsterNET, so I don't know if InCall is even transmitted or updated in the events.

@gertdreyer
Copy link
Contributor Author

We are using Status as well but that only reports Interface state (InUse, NotInUse, etc) and reflects the same status across queues. Our use case is a bit more specific as we have users that are members to multiple queues and we wish to be able to identify on which queue the member is currently in a call.

From my debugging I am quite sure this asterisk version never transmits updates to InCall on this event.
Will update once I was able to test on newer asterisk and either resolve the issue or lodge a bug with them.

@Deantwo
Copy link
Collaborator

Deantwo commented Jun 2, 2021

We are using Status as well but that only reports Interface state (InUse, NotInUse, etc) and reflects the same status across queues. Our use case is a bit more specific as we have users that are members to multiple queues and we wish to be able to identify on which queue the member is currently in a call.

I am not sure that is even possible. But people on the Asterisk forums know more about it than me.

I at least don't think that is what InCall is used to identify. I assume it is just a quick alterative to checking Status or maybe an old backward compatible version of it. Ringinuse seem to be the same.
But I don't know the history of Asterisk, so I can't tell you why these assumingly redundant values exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Asterisk issue Not a problem with AsterNET, but with Asterisk, nothing we can do here.
Projects
None yet
Development

No branches or pull requests

2 participants