public function originate($endpoint = NULL, $channel_id = NULL, $data = NULL, $variables = NULL)
        {
            try {

                $inputParser = new parsing_helper();


                if (is_null($endpoint))
                    throw new Exception("End point not provided or is null", 503);

                $originateData = array();
                $originateData['endpoint'] = $endpoint;

                if (!is_null($data))
                    $originateData = array_merge($originateData, $inputParser->parseRequestData($data));

                if (!is_null($variables))
                    $originateData['variables'] = $inputParser->parseRequestData($variables);

                $uri = (is_null($channel_id)) ? "/channels" : "/channels/" . $channel_id;
                $result = $this->pestObject->post($uri, $originateData);

                return $result;

            } catch (Pest_NotFound $e) {
                $this->phpariObject->lasterror = $e->getMessage();
                $this->phpariObject->lasttrace = $e->getTraceAsString();

                return FALSE;
            } catch (Pest_BadRequest $e) {
                $this->phpariObject->lasterror = $e->getMessage();
                $this->phpariObject->lasttrace = $e->getTraceAsString();

                return FALSE;
            } catch (Exception $e) {
                $this->phpariObject->lasterror = $e->getMessage();
                $this->phpariObject->lasttrace = $e->getTraceAsString();

                return FALSE;
            }


        }