I have a simple project create with c# (.Net Core 6.0)
I create a AGIScript class with Asternet and recieve the data from asterisk server.
it's working well, As long as both are in the same project (exe project).
public void ListenToAgi()
{
var agi = new AsteriskFastAGI();
agi.MappingStrategy = new GeneralMappingStrategy(new List<ScriptMapping>()
{
new ScriptMapping() {
ScriptClass = "HI.agiSample.MyAgi",
ScriptName = "getvariable"
}
});
agi.Start();
}
MyAgi class is:
using AsterNET.NetStandard.FastAGI;
namespace HI.agiSample
{
public class MyAgi : AGIScript
{
public override void Service(AGIRequest request, AGIChannel channel)
{
string result = GetVariable("result");
}
}
}
My problem is, when I move the MyAgi class to ClassLibrary project, it doesn’t work; the AGI listener doesn’t start listening. But if both classes are in the same project (exe), it's working well.
NOTES:
namespaceis same in both project , Only theassemblyname is different.Project Aiswindows desktopapplication andProject BisClassLibrary.