code: public boolean validateChannel(final Channel channel)
      {
  
          boolean ret = false;
          final SetVarAction var = new SetVarAction(channel, "testState", "1");
  
          ManagerResponse response = null;
          try
          {
              AsteriskPBX pbx = (AsteriskPBX) PBXFactory.getActivePBX();
              response = pbx.sendAction(var, 500);
          }
          catch (final Exception e)
          {
              ActivityHelper.logger.debug(e, e);
              ActivityHelper.logger.error("getVariable: " + e);
          }
          if ((response != null) && (response.getAttribute("Response").compareToIgnoreCase("success") == 0))
          {
              ret = true;
          }
  
          return ret;
  
      }
docs: /*
  Attempt to set a variable on the channel to see if it's up.
  @param channel the channel which is to be tested.