[Freeswitch-users] How to set up a DTMF callback in C or C#?
kris at livecall.com
Sat Feb 12 11:32:54 MSK 2011
I'll try to put it on the list again.
I don't use any of those functions, but there is a way to do it somehow with
delegates(the C# pointers). I use the API like this. I don't know much..3
months ago I didn't know anything about C# or FreeSwitch. Just have to read
and try things since there aren't many C# examples out there.
FreeSWITCH.Native.Api fsApi = new FreeSWITCH.Native.Api();
ev_all.GetHeader("Caller-Unique-ID") + " start " + filename + " 10 mux");
----- Original Message -----
From: "Frankie Yiu" <yky1628 at yahoo.com>
To: <kris at livecall.com>
Sent: Friday, February 11, 2011 7:03 PM
Subject: Re: [Freeswitch-users] How to set up a DTMF callback in C or C#?
Thanks for your reply earlier, it works.
For some reason, I can not reply the thread so I send you this
Since you might know about using C# w/ FreeSwitch, I might ask you this:
1) If I want to use the Media bugs, how can I do this in C#? I see a
method that I want to use in swig.cs: "switch_core_media_bug_add", but what
the parameters for the call back function?
>From the definition in switch_types.h:
switch_bool_t (*switch_media_bug_callback_t) (switch_media_bug_t *, void *,
but what is it in C# since it does not have pointers?
2) I see that some functions have type like this "SWIGTYPE_p_p_ ..." (for
example: SWIGTYPE_p_p_switch) , do these type really work (expecially for
pointer to pointer type in C/C++)? I tried to call:
SWIGTYPE_p_p_switch_frame frame, uint flags, int stream_id) "
but seem like when I pass in a variable for frame, when the program gets to
freeswitch_wrap.cxx side, it lost its frame's memory address/place holder.
doing something wrong?
Thanks in advance.
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
More information about the FreeSWITCH-users