Call Us Today! 877.742.2583




Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add CS_NONE to state table

About

A channel (a call) will go through many different states during its lifetime. Here we will describe the different states that a channel might find itself in, and what each of those states mean.

 


Expand
titleClick here to expand Table of Contents


Panel
borderColorlightgray
bgColor#f7f7f7
borderWidth1
borderStyledotted

Table of Contents
maxLevel3
outlinetrue
indent1em
excludeAbout
stylenone
excludeAbout
printablefalse


States

From switch_types.h:

State

(Channel-State)

State Number

(Channel-State-Number)

Description
CS_NEW

0

Channel is newly created.
CS_INIT1Channel has been initialized.
CS_ROUTING2

Channel is looking for an extension to execute.

CS_SOFT_EXECUTE3Channel is ready to execute from 3rd party control.
CS_EXECUTE4Channel is executing its dialplan.
CS_EXCHANGE_MEDIA5Channel is exchanging media with another channel.
CS_PARK6Channel is accepting media awaiting commands.
CS_CONSUME_MEDIA7Channel is consuming all media and dropping it.
CS_HIBERNATE8Channel is in a sleep state.
CS_RESET9Channel is in a reset state.
CS_HANGUP10Channel is flagged for hangup and ready to end. Media will now end, and no further call routing will occur.
CS_REPORTING11The channel is already hung up, media is already down, and now it's time to do any sort of reporting processes such as CDR logging.
CS_DESTROY12Channel is ready to be destroyed and out of the state machine. Memory pools are returned to the core and utilized memory from the channel is freed.
CS_NONE13

Status
colourYellow
titleTODO
 What does this do? In the source, it simply calls C's abort().

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 be then removed from a channel.

See Also