<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt;color:#000000;"><DIV></DIV>
<DIV>Here is the description of the project:</DIV>
<DIV> </DIV>
<DIV>We want to build a system that would play a recorded message when a human or an answer machine picks up the phone(eventually for multiple of phone numbers). For a human, we want to play the message after the human speaks. For answer machine, we want to wait for the beep. To do this, we think that we have to get the RTP packets and determine when is the right timing to play the message.</DIV>
<DIV> </DIV>
<DIV>Currently, we have code in C# to play a recorded message when someone picks up the phone. Someone suggests me to try Media bugs but it is not working with the wrapper function for C# (swig code, because of the pointer to pointer type, unless I am wrong). So as our test, we call a wrapper function from C# with a "session" information, and inside the C++ code, we initialize a media bug with a call back function for READ. I got event for Media Bugs INIT and when Media Bugs CLOSE message but never got any READ event.</DIV>
<DIV> </DIV>
<DIV>Here are my questions:</DIV>
<DIV>1) How can I get the READ event from Media bugs event? It seems to me that when I call a routine to initialize(ADD) the Media bugs, I will get INIT and CLOSE event back right away event though we have not hung up the phone yet, and therefore we never got any READ events.</DIV>
<DIV> </DIV>
<DIV>2) If I am calling a number from C# code, how can I pass the session information to C++ code? (as I mention earlier I have modified function inside freeswitch_wrap.cxx to have call back in C++ code, but this is not the proper way)</DIV>
<DIV><BR>3) Is there a way to have packet send back to C# (I think those type "SWIGTYPE_p_p_..." is not working properly for C#, am I correct?)<BR> </DIV>
<DIV>Thanks in advance. Any help would be great!!</DIV>
<DIV> </DIV>Frankie
<DIV></DIV></div><br>
</body></html>