code now tested with all asterisk versions, swift5
revamp asterisk version detection
misc updates for asterisk < 1.8
Merge pull request #5 from jkister/master

code fixed and tested on all asterisk versions