---
title: "addSession:"
framework: avsystemrouting
role: symbol
role_heading: Instance Method
path: "avsystemrouting/avsystemroute-9kkj3/addsession:"
---

# addSession:

Adds a session to the active route.

## Declaration

```occ
- (BOOL) addSession:(AVSystemRouteSession *) session;
```

## Parameters

- `session`: The session to add to this route. The session must be newly created and not already associated with another route or previously stopped.

## Return Value

Return Value true if the route successfully adds the session; false if the route cannot add it (for example, if the session is already associated with another route or if the route is in an invalid state).

## Discussion

Discussion Call this method to register a new AVSystemRouteSession with the route before starting playback or communication. The session must be added to the route before calling its startWithCompletionHandler: method. Adding a session establishes the association between the session and this route, enabling the system to manage the session’s lifecycle and route media appropriately. You can add multiple sessions to a single route to handle different media streams or communication channels. Sessions are single-use. Once a session has been stopped, it cannot be added to a route again. Create a new AVSystemRouteSession for each new playback. note: You must remove sessions when they are no longer needed using removeSession: to release system resources.
