h1. Call Handling Handling incoming call - is the process of reaction to inbound call indication. This can involve message playback, collecting user input, etc. Typically following sequence is executed when call flows through the system: 1. Call incomes into the box. 2. A corresponding technology channel is created (for example, SIP). 3.*Smartswitch* consults its RAM (dynamic memory) configuration to find corresponding peer entry. This involves checking IP addresses, secret verification, etc. 4. If call originator is authorized to dial in and peer entry is found, *Smartswitch* starts executing [[Call Handler]] for the corresponding peer. This involves playing prompts, collecting user input, checking money balance, dialling outbound peers, bridging calls together, etc. 5. Every time call handler executes [[Dial]] commands, a corresponding technology channel is created. 6. Every time channel is destroyed (when the particular call leg finishes), a CDR is posted to the [[Billing]]. 7. [[Billing]] posts CDR to storage engine (database) and updates money balances. The above sequence is thread-safe. Thus there can be lots (up to several hundreds) of simultaneous call flows. [[Обработка вызова|Русский перевод]]