How asterisk/asterisk works
Asterisk is a PBX and telephony middleware platform. A call typically enters through SIP or PSTN channel drivers, becomes an internal channel, executes dialplan applications, and is bridged into RTP or hardware media. Applications also provide queues, conferencing, voicemail, parking, and transfers. State and call records are published through Stasis, CDR/CEL, and the Manager interface. The graph emphasizes documented capabilities and sampled runtime modules; many additional channel and application modules exist but are not individually expanded here.
Components 24
Signaling
- PJSIP Channel
channels/chan_pjsip.c - DAHDI Channel
channels/chan_dahdi.c
Call Control
- Channel Core
main/channelstorage.c - Channel Storage
main/channelstorage_cpp_map_name_id.cc - Dialplan Apps
apps/app_dial.c - Call Bridging
bridges/bridge_simple.c
Media
- RTP Engine
main/rtp_engine.c - RTP API
include/asterisk/rtp_engine.h - Audio Codecs
codecs/codec_ulaw.c - Media Formats
formats/format_wav.c
Applications
- Call Queues
apps/app_queue.c - Conferences
apps/app_confbridge.c - Conference Events
apps/confbridge/confbridge_manager.c - Voicemail
apps/app_voicemail.c - Call Parking
res/parking/parking_manager.c
Events and Records
- Stasis Events
res/stasis/app.c - CDR Records
cdr/cdr_manager.c - CEL Events
cel/cel_manager.c - Presence Manager
res/res_manager_presencestate.c - Device Manager
res/res_manager_devicestate.c - Manager API
res/res_manager_devicestate.c
Other components
- SIP Endpoint
- PSTN Device
- Manager Client
Connections 30
- SIP Endpoint → PJSIP Channel: signals
- PSTN Device → DAHDI Channel: signals
- PJSIP Channel → Channel Core: creates channels
- DAHDI Channel → Channel Core: creates channels
- Channel Core → Channel Storage: indexes channels
- Channel Core → Dialplan Apps: dispatches apps
- Dialplan Apps → Call Bridging: controls calls
- Dialplan Apps → Call Queues: starts queues
- Dialplan Apps → Conferences: starts conferences
- Dialplan Apps → Voicemail: runs voicemail
- Dialplan Apps → Call Parking: parks calls
- Conferences → Call Bridging: joins bridge
- PJSIP Channel → RTP Engine: uses media
- Call Bridging → RTP Engine: bridges media
- RTP Engine → RTP API: uses API
- RTP Engine → Audio Codecs: maps payloads
- RTP Engine → Media Formats: handles formats
- RTP Engine → SIP Endpoint: sends RTP
- Channel Core → Stasis Events: publishes state
- Conference Events → Stasis Events: publishes events
- Call Parking → Stasis Events: publishes events
- Channel Core → CDR Records: records calls
- Channel Core → CEL Events: records events
- Presence Manager → Manager API: forwards states
- Device Manager → Manager API: forwards states
- Stasis Events → Manager API: forwards events
- CDR Records → Manager API: emits records
- CEL Events → Manager API: emits events
- Manager Client → Manager API: issues actions
- Manager API → Manager Client: returns events