Closed alejandrozf closed 5 years ago
Hi, I'm currently using pyst2 against asterisk 16.2 and I can't reproduce this issue. Can you please follow through and detail the problem with some example code?
Hi, here some steps to reproduce it. (Tested with a docker image of Asterisk 16.3.0, but should be the same result for all Asterisk>=14 versions, you can change the docker image in docker-compose file.)
git clone https://gitlab.com/alejandrozf/asterisk-docker cd asterisk-docker docker-compose up -d sh containers-cp-conf.sh docker exec -it asterisk bash apt update && apt-get install -y git python-pip
pip install -e git+https://github.com/rdegges/pyst2/#egg=pyst2
edit example file in "src/pyst2/examples/show_channels.py", changing 'core show channels concise' to 'database show' (1)
python src/pyst2/examples/show_channels.py
it will print: " Success
"
But if you try with my PR:
pip uninstall pyst2 rm -rf src/pyst2/ pip install -e git+https://github.com/alejandrozf/pyst2/@issue-46#egg=pyst2 edit again the example file (step 1)
python src/pyst2/examples/show_channels.py
it will print: " Success Output: /dundi/secret : GLytBMFmkmEAEWdXhl3XbA== Output: /dundi/secretexpiry : 1560959612 Output: /pbx/UUID : 0b58c466-cfe5-4778-9339-6057a35ca351 Output: 3 results found.
"
I'm using Asterisk 14.3.1 and have the same problem here
The data outputs from Asterisk>=14 managers are not well parsed. Asterisk changed this output since 14 releases. Now the parsing is supporting data output in Asterisk<13 but for Asterisk>=14 versions data ManagerMsg parse() returns '' See Upgrading to Asterisk14