No it doesn't work and this is the error I get.


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.

Yitzchok


On Thu, Sep 2, 2010 at 2:12 PM, Jeff Lenk <jeff@jefflenk.com> wrote:

One more question

When you load Demo.csx can you succesfully execute "managed ApiDemo" from
the cli?

--
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/mod-managed-on-linux-centos-tp5485480p5492242.html
Sent from the freeswitch-users mailing list archive at Nabble.com.

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org