[Freeswitch-users] FreeTDM - Using ftdm_channel_wait with FTDM_EVENTS

Andrea Coslovich coslovich.innovats at yahoo.it
Wed Oct 9 11:59:30 MSD 2013


Dear guys,



I'm new to the list so first of all let me thank the FreeSWITCH developers for their great work.

But now I must come to the point.
I have an A104 Sangoma board and I'm developing an application based on FreeTDM library.
I've started by using and modifying the examples "freeswitch/libs/freetdm/src/test*.c" and now I'm able to retreive and send the audio data from/to the board. I'm using the "ftdm_channel_wait" to know when I can read/write from the freetdm's queues and all seems to work well. But I have a big issue when I try to use "ftdm_channel_wait" with the flag "FTDM_EVENTS" (flags=(ftdm_wait_flags_t)FTDM_EVENTS). Basically, what happen is that the "ftdm_channel_wait(ftdmchan,&flags,-1)" never exits even if the channel receives DTMF or is been hung-up. I've also tried to use "ftdm_channel_command(ftdmchan,FTDM_COMMAND_ENABLE_DTMF_DETECT,NULL)" before the "ftdm_channel_wait" but nothing changed.
Now, my questions are the following:
1. What kind of events can cause the exit of "ftdm_channel_wait" function? I've seen the "ftdm_event_type_t" that defines "FTDM_EVENT_DTMF" and "FTDM_EVENT_OOB". Is it the answer to my question?
2. Is there something that I need to do before call "ftdm_channel_wait" to enable the "events generation"?

I hope to be in the right place for these questions. Otherwise, please let me know where I can find someone that can help me.

I haven't put a lot in this mail because I wasn't really sure if this is the right mail-list but, of course, if you need more information and details to help me don't esitate to ask.

Excuse me for my bad english.

Have a nice day!

Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131009/c0db61f6/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list