本文整理汇总了C#中FreeSWITCH.Native.CoreSession类的典型用法代码示例。如果您正苦于以下问题:C# CoreSession类的具体用法?C# CoreSession怎么用?C# CoreSession使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CoreSession类属于FreeSWITCH.Native命名空间,在下文中一共展示了CoreSession类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: originate
protected int originate(CoreSession a_leg_session, string dest, int timeout, switch_state_handler_table handlers)
{
int ret = freeswitchPINVOKE.CoreSession_originate(swigCPtr, CoreSession.getCPtr(a_leg_session), dest, timeout, switch_state_handler_table.getCPtr(handlers));
return ret;
}
开发者ID:newfront,项目名称:FreeSWITCH,代码行数:5,代码来源:swig.2010.cs
示例2: waitForAnswer
public void waitForAnswer(CoreSession calling_session)
{
freeswitchPINVOKE.CoreSession_waitForAnswer(swigCPtr, CoreSession.getCPtr(calling_session));
}
开发者ID:newfront,项目名称:FreeSWITCH,代码行数:4,代码来源:swig.2010.cs
示例3: getCPtr
internal static HandleRef getCPtr(CoreSession obj)
{
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
开发者ID:newfront,项目名称:FreeSWITCH,代码行数:4,代码来源:swig.2010.cs
示例4: Execute
public void Execute(CoreSession session, string name)
{
freeswitchPINVOKE.IvrMenu_Execute(swigCPtr, CoreSession.getCPtr(session), name);
}
开发者ID:newfront,项目名称:FreeSWITCH,代码行数:4,代码来源:swig.2010.cs
示例5: bridge
public static void bridge(CoreSession session_a, CoreSession session_b)
{
freeswitchPINVOKE.bridge(CoreSession.getCPtr(session_a), CoreSession.getCPtr(session_b));
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
}
开发者ID:newfront,项目名称:FreeSWITCH,代码行数:5,代码来源:swig.2010.cs
示例6: Api
public Api(CoreSession s) : this(freeswitchPINVOKE.new_Api(CoreSession.getCPtr(s)), true) {
}
开发者ID:rockxsj,项目名称:FreeSWITCH,代码行数:2,代码来源:swig.2010.cs
示例7: OriginateHandleHangup
/// <summary>
/// Performs originate. Returns ManagedSession on success, null on failure.
/// onHangup is called as a state handler, after the channel is truly hungup (CS_REPORTING).
/// </summary>
public static ManagedSession OriginateHandleHangup(CoreSession aLegSession, string destination, TimeSpan timeout, Action<ManagedSession> onHangup) {
var bleg = new ManagedSession();
bleg.originate_ondestroy_delegate = bleg.originate_ondestroy_method;
bleg.originate_onhangup_delegate = CreateStateHandlerDelegate(sess_b => {
if (onHangup != null) {
onHangup(sess_b);
}
});
bleg.originate_table = new switch_state_handler_table();
bleg.originate_table.on_reporting = WrapStateHandlerDelegate(bleg.originate_onhangup_delegate);
bleg.originate_table.on_destroy = WrapStateHandlerDelegate(bleg.originate_ondestroy_delegate);
bleg.originate_table.flags = (int)switch_state_handler_flag_t.SSH_FLAG_STICKY;
var res = 0 == bleg.originate(aLegSession, destination, (int)timeout.TotalSeconds, bleg.originate_table);
bleg.originate_keepalive_handle = GCHandle.Alloc(bleg, GCHandleType.Normal); // Prevent GC from eating the bleg
if (res) {
bleg.Initialize();
return bleg;
} else {
// Dispose to free the lock
// The bleg lives on with its unmanaged memory freed
// Until CS_DESTROY gets called
bleg.Dispose();
return null;
}
}
开发者ID:jasonbourneh0810,项目名称:FreeSWITCH,代码行数:30,代码来源:ManagedSession.cs
示例8: Originate
public bool Originate(CoreSession aLegSession, string destination, TimeSpan timeout) {
var res = 0 == this.originate(aLegSession, destination, (int)timeout.TotalMilliseconds, null);
if (res) {
this.Initialize();
}
return res;
}
开发者ID:jasonbourneh0810,项目名称:FreeSWITCH,代码行数:7,代码来源:ManagedSession.cs
注:本文中的FreeSWITCH.Native.CoreSession类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论