pyst2 icon indicating copy to clipboard operation
pyst2 copied to clipboard

manager-.hostname is always the host running the code, not the server we are connected to

Open TrevorPH opened this issue 6 years ago • 1 comments

When using manager = asterisk.manager.Manager() then manager.hostname is always set to the hostname of the machine running the python code. Am I alone in expecting that this should really be the hostname of the client we're talking to instead?

TrevorPH avatar Oct 13 '19 13:10 TrevorPH

Well, this makes it work how I think it probably should work. I cannot see any point in having it tell me what the hostname of the machine running the pyst2 code is. If I do want to know that then there are already ways to do that. What I want it to tell me is the remote hostname of the connected asterisk manager that this asterisk.manager.Manager() is connected to and the patch attached makes it do that though I am unsure about setting it to "Unconnected" in _init though it is accurate (otherwise it also shows up as the pyst2 code machine when the manager isn't connected)

pyst2-manager-hostname.patch.txt

TrevorPH avatar Oct 14 '19 22:10 TrevorPH