/**
  * Eases the creation of Call_task_status by setting some properties.
  * 
  * @access public
  * @static
  * 
  * @param int $code
  *   Call Task Status code
  * @param string $msg
  *   Call Task Status Message.
  * 
  * @throws Exception
  *   If the given code is not valid.
  * 
  * @return Call_task_entity
  */
 static function create($code, $msg)
 {
     $ct = new Call_task_status(array());
     $ct->set_code($code);
     $ct->message = $msg;
     $ct->created = Mongo_db::date();
     $ct->author = current_user()->uid;
     return $ct;
 }