Added support for different version of Asterisk.