Call processing concepts
All sessions are completely independent, and they may even be executed on different hardware. At the same time, all calls within the same session can be connected with each other.
Every call that is made to the Voximplant Cloud (from PSTN, the Web SDK, etc.) initiates a new session. Here's the relationship between calls and sessions (in this example we make calls from the Web SDK to PSTN) :
These are the following classes available in this JS scenario:
- VoxEngine – namespace representing a session.
- Call - objects of this class wrap calls, and are created automatically when an outgoing call is created or an incoming call arrives.
- Net - namespace containing helper functions to work with HTTP and send e-mails
- Crypto - namespace containing functions to compute SHA1 and MD5 digests
- Logger - namespace with functions for logging
A call control session is terminated:
- When the VoxEngine.terminate() function is called
- When the execution time limit is reached (your JS code shouldn't block since all operations are asynchronous)
- When a session has no calls in it for 1 minute