Most of the asterisk plugins on nagiosexchange are corrupt.
So i wrote a little script to test if the status of the service. Works also for me.
if echo "$t" |grep -q running; then
echo "OK - $service service is running."
echo "Critical - $service service is stopped."