· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Asterisk Docs



* a software private branch exchange (PBX)
  • Asterisk can be run on almost any kind of hardware
    • uses Linux, BSD or Mac OS as their operating system
* features
  • classical PBX services
  • advanced features
    • voice mail, interactive voice response,
    • conference calling, automatic call distribution,
    • call forwarding, identity services
    • and call detail records
* interface
  • traditional TDM based systems (PSTN networks)
    • an additional hardware is needed
    • vendors such as Digium or Sangoma
    • PCI cards offering analog or digital telephony interfaces (ISDN BRI, PRI)
  • packet based systems (VoIP networks)
* suppored protocols
  • VoIP protocols
    • Session Initiation Protocol (SIP)
    • nter Asterisk Exchange protocol (IAX)
    • Media Gateway Control Protocol (MGCP)
    • H.323
    • CISCO Skinny protocol (SCCP)
  • TDM protocol
    • analog E&M
    • FXO
    • FXS
    • multifrequency tones
    • digital (ISDN) signalling protocols
* codecs
  • For encoding of voice for transmission over IP networks
    • ADPCM, G.711, G.723.1, G.726, G.729, GSM, iLBC,
    • LPC-10 or Speex

* insmod zaptel.ko

* insmod wctdm.ko

* ztcfg

* asterisk

관련 사이트

* http://www.asterisk.org/
  • Asterisk® was created by Mark Spencer of Digium, Inc in 1999.

* http://www.asterisknow.org/

#cd /usr/src

# svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk
# svn checkout http://svn.digium.com/svn/zaptel/trunk zaptel
# svn checkout http://svn.digium.com/svn/libpri/trunk libpri

# svn checkout http://svn.digium.com/svn/asterisk/branches/1.2 asterisk-1.2
# svn checkout http://svn.digium.com/svn/zaptel/branches/1.2 zaptel-1.2
# svn checkout http://svn.digium.com/svn/libpri/branches/1.2 libpri-1.2

* zaptel: Jim Dixon's open computer telephony hardware driver API

* zapata technology
  • an interface card, called "Tormenta" + a driver for this card + an API library for user-interface.

* http://www.lobstertech.com/doc/ast-12-func/


* /usr/lib/asterisk/modules

* app_ : applications which can be invoked from within the dialplan

* func_ : functions for use in the dialplan

* chan_ : channel drivers - e.g. for IAX2 or SIP

* codec_ : audio and video codecs

* format_ : audio and video formats

* cdr_ : call detailed records

* pbx_ : core features of the PBX -e.g. config-file parsing

* res_ : resources to be used by other modules - e.g. database access

startup process

* startup process

* how a call is processed

* Transfers, redirects, parking, ...

* main()
  • initialize core data and start core threads
  • Load and initialize modules
  • post-modules core initialization
  • go to sleep, waiting for signals

* core threads
  • remote console listener and handlers
  • event dispatching (trunk only)
  • device state processing
  • extension state (hint) processing
  • dns manager
  • manager and http losteners and sessions
  • channel threads (more on this later!)

* module threads
  • device state processing for app_queue
    • per device state change in 1.4
    • one thread in trunk
  • optional voicemail polling (trunk only)
    • done by channel drivers in 1.4
  • network monitor threads
  • "core show threads" CLI command to see a lost of active threads

* network monitor threads
  • created by channel drivers or another network interface module such as DUNDi
  • maintain connectivity
  • listen for incoming connections
  • hand off accepted connections to the core

* call processing
  • channel driver network monitor thread handles technology specific call setup
  • abstract channel (ast_channel) created and channel thread started (ast_pbx_start())
  • switching core (pbx.c) handles programmable call switching (dialplan)
  • applications service the channel (read and write audio with ast_read() and ast_write()) and some create outbound channels

* channel bridging
  • application creates an outbound channel
  • once outbound channel answers, two channels are "bridged" together
  • bridged channels pass audio directly between each other
  • bridging code may monitor channel state changes, timers, or watch for DTMF to activate features

* native channel bridging
  • bridged channels will natively bridge if they are of the same type
  • avoids translation to abstract channel interface for the media (maybe signaling)
  • SIP
    • re-INVITE media stream to flow between endpoints
  • ZAP
    • connect channels on the card

* Masquerading
  • new ast_channel gets created (ast_channel_alloc())
  • important data ripped out of the old channel and put into the new one (ast_do_masquerade())
  • the owning thread sees that the old channel has gone down and treats it just like a hangp
  • new channel carries on its new path. (owned by the parking service thread, or a new channel thread, ...)

fundamental consept

An Asterisk channel is created when a call comes in. Then, that channel goes through the dialplan and executes applications. Then, if that channel happens to run something like the Dial application, a second channel is created for an outbound call. If that outbound channel is answered, the two channels are then bridged. Bridging two channels together allows them to pass audio between each other. Frames received on one channel are passed to the bridge and transmitted out the other channel.

It's not reality that's important, but how you percieve things.

sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-07-04 08:52:06
Processing time 0.0016 sec