Call Us Today! 877.742.2583




Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

About

A description of how FreeSWITCH processes a typical call.

 

 

 

Life Cycle of a Call-Simple.png




Call States

Routing

The routing state hunts through the dial plan module. When it finds a condition test that returns true it builds a to-do list with name–value pairs, including lists of variables to set and dialplan applications to execute later such as "bridge".

Execute

The execute state performs the instructions found in the routing stage. The name–value pairs are parsed and executed.

Hangup

The hangup state either transfers the call back to the routing state, if there is a name–value pair that requests it, or else it will hang up the call.

Channel States

A channel (representing a call leg) will go occupy many different states during its lifetime. The table below lists the different states that a channel can occupy, and what each of those states means.

Channel StateDescription
CS_NEWChannel is newly created.
CS_INITChannel has been initialized.
CS_ROUTINGChannel is hunting through a dialplan for an extension to execute.
CS_SOFT_EXECUTEChannel is ready to execute from 3rd party control.
CS_EXECUTEChannel is executing its dialplan instructions.
CS_EXCHANGE_MEDIAChannel is exchanging media with another channel.
CS_PARKChannel is accepting media awaiting commands.
CS_CONSUME_MEDIAChannel is consuming all media and dropping it.
CS_HIBERNATEChannel is in a sleep state.
CS_RESETChannel is in a reset state.
CS_HANGUPChannel is flagged for hangup and ready to end. Media will now end, and no further call routing will occur.
CS_REPORTINGThe channel is already hung up, media has already ended, and now it's time to do any sort of reporting processes such as CDR logging.
CS_DESTROYChannel is ready to be destroyed and out of the state machine. Memory utilized by the channel is freed and memory pools are returned to the core.

State Handlers

Custom state handlers can be added to the channels either globally or on a per-channel basis. This will allow you to do your own custom reporting or clean up your own dynamically created objects, for example. Custom handlers can also then be removed from a channel.

Sample Bridged Call

Freeswitch-call-sample.png

See Also

 

  • No labels