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

send_action - result #33

Open
Revent opened this issue Feb 2, 2017 · 4 comments
Open

send_action - result #33

Revent opened this issue Feb 2, 2017 · 4 comments

Comments

@Revent
Copy link
Contributor

Revent commented Feb 2, 2017

class MyManager(asterisk.manager.Manager):

    def queuestatus(self):
        cdict = {"Action": "QueueStatus"}
        response = self.send_action(cdict)
        return response

in response.data raw output, why not dict?
and how parse this output?
why in response.headers hasn't events?
why events not in events thread?

@Hex4919
Copy link

Hex4919 commented Jul 6, 2021

Same Problem here. Did you find a solution?
Got nothing in events and I dont know how to parse the response, if the data is in there.

@joshuaboniface
Copy link

Running into this bug too.

The data is there, it's in response.data, in raw form, rather than being parsed as a ManagerMsg into the callback.

I'm doing some digging into it and will hope to have a PR soon.

@joshuaboniface
Copy link

I believe the fix for this is altering this conditional:

https://github.com/jfernandz/pyst2/blob/develop/asterisk/manager.py#L340

to not have and not wait_for_marker. The responses from my Asterisk 20.1 server don't seem to send END COMMAND, so I assume this conditional is a workaround for inconsistent behaviour in older versions of Asterisk.

@joshuaboniface
Copy link

Confirmed that changing this does indeed fix QueueStatus responses, and so far doesn't seem to negatively affect any other commands that I'm using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants