pyst2 icon indicating copy to clipboard operation
pyst2 copied to clipboard

send_action - result

Open Revent opened this issue 9 years ago • 4 comments

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?

Revent avatar Feb 02 '17 09:02 Revent

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.

Hex4919 avatar Jul 06 '21 12:07 Hex4919

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 avatar May 26 '23 15:05 joshuaboniface

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 avatar May 26 '23 16:05 joshuaboniface

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.

joshuaboniface avatar May 26 '23 16:05 joshuaboniface