コード例 #1
-1
ファイル: Program.cs プロジェクト: jgowdy/AsterNET
        private static void checkFastAGI()
        {
            Console.WriteLine(@"
            Add next lines to your extension.conf file
            exten => 200,1,agi(agi://" + DEV_HOST + @"/customivr)
            exten => 200,2,Hangup()
            reload Asterisk and dial 200 from phone.
            Also enter 'agi debug' from Asterisk console to more information.
            See CustomIVR.cs and fastagi-mapping.resx to detail.

            Ctrl-C to exit");
            AsteriskFastAGI agi = new AsteriskFastAGI();
            // Remove the lines below to enable the default (resource based) MappingStrategy
            // You can use an XML file with XmlMappingStrategy, or simply pass in a list of
            // ScriptMapping.
            // If you wish to save it to a file, use ScriptMapping.SaveMappings and pass in a path.
            // This can then be used to load the mappings without having to change the source code!

            agi.MappingStrategy = new GeneralMappingStrategy(new List<ScriptMapping>()
            {
                new ScriptMapping() {
                    ScriptClass = "Asterisk.NET.Test.CustomIVR",
                    ScriptName = "customivr"
                }
            });

            //agi.SC511_CAUSES_EXCEPTION = true;
            //agi.SCHANGUP_CAUSES_EXCEPTION = true;

            agi.Start();
        }
コード例 #2
-1
ファイル: Program.cs プロジェクト: d3en9/CallCRM
        static void Main(string[] args)
        {
            Console.Write("Asterisk AGI agent started.\nPress CTRL+C to stop agent.");

            AsteriskFastAGI agi = new AsteriskFastAGI();
            agi.Start();
        }
コード例 #3
-1
ファイル: Program.cs プロジェクト: roblthegreat/Asterisk.NET
		private static void checkFastAGI()
		{
			Console.WriteLine(@"
Add next lines to your extension.conf file
	exten => 200,1,agi(agi://" + DEV_HOST + @"/customivr)
	exten => 200,2,Hangup()
reload Asterisk and dial 200 from phone.
Also enter 'agi debug' from Asterisk console to more information.
See CustomIVR.cs and fastagi-mapping.resx to detail.

Ctrl-C to exit");
			AsteriskFastAGI agi = new AsteriskFastAGI();
			agi.Start();
		}