[Asterisk-Dev] using ast_request("zap", format, "pseudo")?

Tony Mountifield tony at softins.clara.co.uk
Tue May 25 11:05:24 MST 2004


[ posted a couple of weeks ago on asterick-users, with no response ]

I'm trying to produce some enhancements to one of the applications,
and am trying to use ast_request("zap", format, "pseudo") to create
a new channel on /dev/zap/pseudo, which I can then bind to a zaptel
conference and play a stream to it.

I've been using as inspiration the Radio Repeater app, app_rpt.c,
which uses this technique to play idents and announcements.

Unfortunately, I can't get it to work. In chan_zap.c, having called
zt_request(), it decides that the zt_pvt for my X100P card is a
sufficient match for the request, which terminates the search loop
and then fails later tests.

There should be special processing for CHAN_PSEUDO, but by the time
zt_request gets to the test (p->channel == CHAN_PSEUDO) around line
8524 of chan_zap.c, the p returned by available() has channel==1.

I suspect either a bug in the function available(), or the pseudo
device needs its own zt_pvt entry, but I don't yet understand deeply
enough to be sure.

Could anyone knowledgable in this area advise? Thanks!

Tony

-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list