[asterisk-dev] pseudo channel

Russell Bryant russell at digium.com
Tue Mar 17 09:42:02 CDT 2009


Steve Davies wrote:
>> I was trying to understand the chan_zap/chan_dahdi code.
>>
>> What is the point of sending commands / receiving events / reading & writing
>> voice packets over pseudo ("/dev/zap/pseudo") channels ?
>>
> 
> Person A: What is the most important thing a comedian needs to know?
> 
> Person B: I don't know what is the most....
> 
> Person A (interrupts): TIMING!
> 
> 
> I believe that /dev/zap/pseudo provides access to timing for Asterisk
> components that do not have a reliable clock source, without requiring
> or using up an actual voice resource from the zap/dahdi hardware. This
> is useful (for example) for Meetme where you can have attendees
> arriving and leaving, so cannot rely on anyone as a clock source.
> 
> (I hope that is right)

Not quite.  There is another interface for timing, /dev/dahdi/timer.

A psuedo channel is ... well ... a psuedo channel.  :-)

In the case of MeetMe, the conferencing engine lives inside of DAHDI. 
When a DAHDI channel calls into a conference, we can use an ioctl to ask 
DAHDI to put that channel in a conference.

When a non-DAHDI channel calls into the conference, we need some other 
way to get the audio to and from the conference.  That is where a psuedo 
channel comes in.  We open a DAHDI channel that doesn't actually have 
any DAHDI hardware associated with it.  We place this psuedo channel in 
the conference.  In Asterisk, we write the channel's audio to the psuedo 
channel, and then DAHDI mixes it into the conference.  We read from it 
to get that channel's audio.

Psuedo channels in chan_dahdi are a bit more weird, but it all comes 
down to cases where we need an interface into DAHDI that may or may not 
have hardware associated with it.  In the case of something like call 
waiting or three way calling, we have more channels in Asterisk than we 
have physical channels in DAHDI.  So, we have to open psuedo channels to 
manage things.

-- 
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list