Question: Hi I need some information on how to implement Voip (RTP) audio conference. I need an algorithm description. Can someone point me to relevant resource on web.

Answer: 
If your developing MVC You should have an input class and an output class (**I/O**), you should create a function called redirect within the output class and build the new url from your base url like so:

```
public function redirect($controller,$method = "index",$args = array())
{
    global $core; /* Guess Obviously */

    $location = $core->config->base_url . "/" . $controller . "/" . $method . "/" . implode("/",$args);

    /*
        * Use @header to redirect the page:
    */
    header("Location: " . $location);
    exit;
}

```

This way within your controller you can simply use the input class do your redirect for you.

```
class MyController extends BaseController
{
    public function login()
    {
        if($this->library->session->exists("user_logged_in") === false)
        {
            $this->library->output->redirect("MyController","login",array("from:login"));
        }
    }
    /*
       ..More Here
    */
}

```
```
header("Location: http://domain.com/folder/page.html", 301);
exit();

```

This code must be the first output of the script. You can not perform redirection after generating any output to the client. Once you have sent the redirection to the client, you can exit the script because any additional output generated would not be seen by the user.