Nice plug-in but 2 issues in code

That’s nice check, but I have issues with channel check and g729.

That’s diff of fix if needed:
135c135
CHANNELS=`/bin/echo -e “Action: loginrnUsername: ${AMIUSER}rnSecret: ${AMIPASS}rnEvents: offrnrnAction: Commandrncommand: Core Show ChannelsrnrnAction: Logoffrnrn” | /bin/netcat ${REMOTEHOST} ${AMIPORT} | awk ‘/active channels/ {print $1}’|tr -d “r”`
294c294
MAXLICTEST=`/bin/echo -e “Action: loginrnUsername: ${AMIUSER}rnSecret: ${AMIPASS}rnEvents: offrnrnAction: Commandrncommand: show g729rnrnAction: Logoffrnrn” | /bin/netcat ${REMOTEHOST} ${AMIPORT} | awk ‘/encoders/ {print $4}’`
302c302
ONUSE=`/bin/echo -e “Action: loginrnUsername: ${AMIUSER}rnSecret: ${AMIPASS}rnEvents: offrnrnAction: Commandrncommand: show g729rnrnAction: Logoffrnrn” | /bin/netcat ${REMOTEHOST} ${AMIPORT} | awk ‘/encoders/ {print substr($1, 1, match($1, “/”) -1)}’`