New Channel development and ast_frame structure


#1

Hi,

I developing a new channel to Asterisk to add support to our voice cards.

My company has some PCI voice cards that uses a DSP processor with driver for Linux and Windows.

Now I’m trying to create this new channel. I take a look on all existing channels and I could start loading and unloading the module, detecting RING and passing it to Asterisk, etc…

My problem (for now) is how to pass the DTMF detected to Asterisk because I’m using my own detection algorithm (inside firmware). As far I can see, I need to fill an ast_frame structure to do that. Am I correct? If yes, I’d like to know more information about this structure…

Any help will be appreciated.


#2

Ok,

I found from myself…

To pass the detected DTMF I need to fill a ast_frame structure with:

f.frametype = AST_FRAME_DTMF;
f.subclass = EventContext->data;  /* My DTMF Code */

and after that, queue this structure with the function ast_queue_frame…

Regards