freeswitch@internal> managed TestIvr
-ERR no reply
freeswitch@internal> 2010-09-02 14:23:34.096077 [ERR] switch_cpp.cpp:1177 Exception in Execute(TestIvr): System.NullReferenceException: Object reference not set to an instance of an object
at System.Runtime.Remoting.Contexts.Context.get_NeedsContextSink () [0x00000] in <filename unknown>:0
at (wrapper xdomain-invoke) FreeSWITCH.ApiPluginExecutor:ExecuteApi (string,intptr,intptr)
at (wrapper remoting-invoke-with-check) FreeSWITCH.ApiPluginExecutor:ExecuteApi (string,intptr,intptr)
at FreeSWITCH.Loader.Execute (System.String command, IntPtr streamHandle, IntPtr eventHandle) [0x00000] in <filename unknown>:0
2010-09-02 14:23:34.096077 [ERR] mod_managed.cpp:404 Execute failed for TestIvr (unknown module or exception).
--- My source code ---
using System;
using System.Collections.Generic;
using System.Text;
using FreeSWITCH;
using FreeSWITCH.Native;
namespace Ivr
{
public class TestIvr : IAppPlugin, IApiPlugin
{
public static void Main(string[] args)
{
}
public void Run(AppContext context)
{
context.Session.Answer();
context.Session.sleep(2000, 0);
context.Session.Hangup("");
}
public void Execute(ApiContext context)
{
Console.WriteLine("!!!!WORKING!!!!");
}
public void ExecuteBackground(ApiBackgroundContext context)
{
}
}
}
Thanks.