Merge branch 'master' into AsterNET-1.x_merge_to_Master

This commit is contained in:
Deantwo 2021-04-23 11:56:10 +02:00
commit 7a71c78962
61 changed files with 2985 additions and 2820 deletions

View file

@ -1,3 +1,5 @@
language: csharp
solution: ./Asterisk.2013/Asterisk.2013.sln
script: xbuild /p:Configuration=Travis ./Asterisk.2013/Asterisk.2013.sln
dotnet: 2.0.0
mono: none
script: dotnet build ./Asterisk.2013/Asterisk.NET/AsterNET.csproj -c Travis -f netstandard2.0

View file

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{80ADC18F-2BFC-4B79-B264-5244E4F2FEED}"
ProjectSection(SolutionItems) = preProject
@ -10,7 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsterNET", "Asterisk.NET\AsterNET.csproj", "{BC6E7DBA-C05A-45FE-A2A3-B1637CE16274}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AsterNET", "Asterisk.NET\AsterNET.csproj", "{BC6E7DBA-C05A-45FE-A2A3-B1637CE16274}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsterNET.WinForm", "Asterisk.NET.WinForm\AsterNET.WinForm.csproj", "{03687626-613A-4E41-8F60-7C7839D6DD5D}"
EndProject
@ -52,4 +52,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FD16BE51-C7E5-49FB-B78C-D1E477961D6A}
EndGlobalSection
EndGlobal

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -11,7 +11,7 @@
<RootNamespace>Asterisk.NET.Test</RootNamespace>
<AssemblyName>Asterisk.NET.Test</AssemblyName>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>

View file

@ -138,13 +138,13 @@ Ctrl-C to exit");
manager.RegisterUserEventClass(typeof(UserAgentLoginEvent));
// Add or Remove events
manager.UserEvents += new UserEventHandler(dam_UserEvents);
manager.UserEvents += new EventHandler<UserEvent>(dam_UserEvents);
// Dont't display this event
manager.NewExten += new NewExtenEventHandler(manager_IgnoreEvent);
manager.NewExten += new EventHandler<NewExtenEvent>(manager_IgnoreEvent);
// Display all other
manager.UnhandledEvent += new ManagerEventHandler(dam_Events);
manager.UnhandledEvent += new EventHandler<ManagerEvent>(dam_Events);
// +++ Only to debug purpose
manager.FireAllEvents = true;
@ -288,7 +288,7 @@ Ctrl-C to exit");
Console.WriteLine("Redirect Call from " + ORIGINATE_CHANNEL + " to " + ORIGINATE_EXTRA_CHANNEL + " or press ESC.");
// Wait for Dial Event from ORIGINATE_CHANNEL
DialEventHandler de = new DialEventHandler(dam_Dial);
EventHandler<DialEvent> de = new EventHandler<DialEvent>(dam_Dial);
manager.Dial += de;
while (transferChannel == null)
{
@ -323,7 +323,7 @@ Ctrl-C to exit");
// Link event used to define monitor channel
Console.WriteLine("Monitor call. Please call " + ORIGINATE_CHANNEL + " and answer or press ESC.");
// Wait for Link event
LinkEventHandler le = new LinkEventHandler(dam_Link);
EventHandler<LinkEvent> le = new EventHandler<LinkEvent>(dam_Link);
manager.Link += le;
while (monitorChannel == null)
{

View file

@ -1,3 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Asterisk.NET.WinForm</RootNamespace>
<AssemblyName>Asterisk.NET.WinForm</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>

View file

@ -28,7 +28,7 @@ namespace AsterNET.WinForm
btnConnect.Enabled = false;
manager = new ManagerConnection(address, port, user, password);
manager.UnhandledEvent += new ManagerEventHandler(manager_Events);
manager.UnhandledEvent += new EventHandler<ManagerEvent>(manager_Events);
try
{
// Uncomment next 2 line comments to Disable timeout (debug mode)

View file

@ -1,14 +1,14 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AsterNET.WinForm.Properties {
namespace Asterisk.NET.WinForm.Properties {
using System;
@ -19,7 +19,7 @@ namespace AsterNET.WinForm.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@ -39,7 +39,7 @@ namespace AsterNET.WinForm.Properties {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AsterNET.WinForm.Properties.Resources", typeof(Resources).Assembly);
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Asterisk.NET.WinForm.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;

View file

@ -1,18 +1,18 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AsterNET.WinForm.Properties {
namespace Asterisk.NET.WinForm.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

View file

@ -1,3 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>

View file

@ -1,42 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BC6E7DBA-C05A-45FE-A2A3-B1637CE16274}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AsterNET</RootNamespace>
<AssemblyName>AsterNET</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
<Version>1.3.0</Version>
<Copyright>Copyright © 2017</Copyright>
<Authors>Ben Merrills</Authors>
<PackageLicenseUrl>https://github.com/AsterNET/AsterNET/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/AsterNET/AsterNET</PackageProjectUrl>
<PackageTags>VB.NET, Asterisk, C#, AsterNET, DotNET, Asterisk.NET</PackageTags>
<Description>AsterNET an Asterisk FastAGI and AMI framework for .NET</Description>
<PackageReleaseNotes>Please see: https://github.com/AsterNET/AsterNET/commits/master</PackageReleaseNotes>
<Configurations>Debug;Release;Travis</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
@ -70,338 +46,28 @@
<DocumentationFile>bin\Travis\AsterNET.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Common.cs" />
<Compile Include="FastAGI\AGIChannel.cs" />
<Compile Include="FastAGI\AGIConnectionHandler.cs" />
<Compile Include="FastAGI\Exceptions\AGIException.cs" />
<Compile Include="FastAGI\Exceptions\AGIHangupException.cs" />
<Compile Include="FastAGI\Exceptions\AGINetworkException.cs" />
<Compile Include="FastAGI\AGIReader.cs" />
<Compile Include="FastAGI\AGIReply.cs" />
<Compile Include="FastAGI\AGIRequest.cs" />
<Compile Include="FastAGI\AsteriskFastAGI.cs" />
<Compile Include="FastAGI\Command\AGICommand.cs" />
<Compile Include="FastAGI\Command\GetFullVariableCommand.cs" />
<Compile Include="FastAGI\Command\ReceiveTextCommand.cs" />
<Compile Include="FastAGI\Command\SayDateTimeCommand.cs" />
<Compile Include="FastAGI\AGIWriter.cs" />
<Compile Include="FastAGI\AGIScript.cs" />
<Compile Include="FastAGI\Command\AnswerCommand.cs" />
<Compile Include="FastAGI\Command\ChannelStatusCommand.cs" />
<Compile Include="FastAGI\Command\ControlStreamFileCommand.cs" />
<Compile Include="FastAGI\Command\DatabaseDelCommand.cs" />
<Compile Include="FastAGI\Command\DatabaseDelTreeCommand.cs" />
<Compile Include="FastAGI\Command\DatabaseGetCommand.cs" />
<Compile Include="FastAGI\Command\DatabasePutCommand.cs" />
<Compile Include="FastAGI\Command\ExecCommand.cs" />
<Compile Include="FastAGI\Command\GetDataCommand.cs" />
<Compile Include="FastAGI\Command\GetOptionCommand.cs" />
<Compile Include="FastAGI\Command\GetVariableCommand.cs" />
<Compile Include="FastAGI\Command\HangupCommand.cs" />
<Compile Include="FastAGI\Command\NoopCommand.cs" />
<Compile Include="FastAGI\Command\ReceiveCharCommand.cs" />
<Compile Include="FastAGI\Command\RecordFileCommand.cs" />
<Compile Include="FastAGI\Command\SayAlphaCommand.cs" />
<Compile Include="FastAGI\Command\SayDigitsCommand.cs" />
<Compile Include="FastAGI\Command\SayNumberCommand.cs" />
<Compile Include="FastAGI\Command\SayPhoneticCommand.cs" />
<Compile Include="FastAGI\Command\SayTimeCommand.cs" />
<Compile Include="FastAGI\Command\SendImageCommand.cs" />
<Compile Include="FastAGI\Command\SendTextCommand.cs" />
<Compile Include="FastAGI\Command\SetAutoHangupCommand.cs" />
<Compile Include="FastAGI\Command\SetCallerIdCommand.cs" />
<Compile Include="FastAGI\Command\SetContextCommand.cs" />
<Compile Include="FastAGI\Command\SetExtensionCommand.cs" />
<Compile Include="FastAGI\Command\SetMusicOffCommand.cs" />
<Compile Include="FastAGI\Command\SetMusicOnCommand.cs" />
<Compile Include="FastAGI\Command\SetPriorityCommand.cs" />
<Compile Include="FastAGI\Command\SetVariableCommand.cs" />
<Compile Include="FastAGI\Command\StreamFileCommand.cs" />
<Compile Include="FastAGI\Command\TDDModeCommand.cs" />
<Compile Include="FastAGI\Command\VerboseCommand.cs" />
<Compile Include="FastAGI\Command\WaitForDigitCommand.cs" />
<Compile Include="FastAGI\Exceptions\InvalidCommandSyntaxException.cs" />
<Compile Include="FastAGI\Exceptions\InvalidOrUnknownCommandException.cs" />
<Compile Include="FastAGI\IMappingStrategy.cs" />
<Compile Include="FastAGI\MappingStrategies\GeneralMappingStrategy.cs" />
<Compile Include="FastAGI\MappingStrategies\ResourceMappingStrategy.cs" />
<Compile Include="FastAGI\MappingStrategy.cs" />
<Compile Include="FastAGI\Script\AGINoAction.cs" />
<Compile Include="IO\ServerSocket.cs" />
<Compile Include="IO\SocketConnection.cs" />
<Compile Include="IParseSupport.cs" />
<Compile Include="Manager\Action\AbsoluteTimeoutAction.cs" />
<Compile Include="Manager\Action\AgentCallbackLoginAction.cs" />
<Compile Include="Manager\Action\AgentLogoffAction.cs" />
<Compile Include="Manager\Action\AgentsAction.cs" />
<Compile Include="Manager\Action\AGIAction.cs" />
<Compile Include="Manager\Action\AOCMessageAction.cs" />
<Compile Include="Manager\Action\AtxferAction.cs" />
<Compile Include="Manager\Action\BridgeAction.cs" />
<Compile Include="Manager\Action\ChallengeAction.cs" />
<Compile Include="Manager\Action\ChangeMonitorAction.cs" />
<Compile Include="Manager\Action\CommandAction.cs" />
<Compile Include="Manager\Action\ConfbridgeKickAction.cs" />
<Compile Include="Manager\Action\ConfbridgeListAction.cs" />
<Compile Include="Manager\Action\ConfbridgeListRoomsAction.cs" />
<Compile Include="Manager\Action\ConfbridgeLockAction.cs" />
<Compile Include="Manager\Action\ConfbridgeMuteAction.cs" />
<Compile Include="Manager\Action\ConfbridgeSetSingleVideoSrcAction.cs" />
<Compile Include="Manager\Action\ConfbridgeStartRecordAction.cs" />
<Compile Include="Manager\Action\ConfbridgeStopRecordAction.cs" />
<Compile Include="Manager\Action\ConfbridgeUnlockAction.cs" />
<Compile Include="Manager\Action\ConfbridgeUnmuteAction.cs" />
<Compile Include="Manager\Action\CoreSettingsAction.cs" />
<Compile Include="Manager\Action\CoreShowChannelsAction.cs" />
<Compile Include="Manager\Action\CoreStatusAction.cs" />
<Compile Include="Manager\Action\CreateConfigAction.cs" />
<Compile Include="Manager\Action\DBDelAction.cs" />
<Compile Include="Manager\Action\DBDelTreeAction.cs" />
<Compile Include="Manager\Action\DBGetAction.cs" />
<Compile Include="Manager\Action\DBPutAction.cs" />
<Compile Include="Manager\Action\EventsAction.cs" />
<Compile Include="Manager\Action\ExtensionStateAction.cs" />
<Compile Include="Manager\Action\GetConfigAction.cs" />
<Compile Include="Manager\Action\GetVarAction.cs" />
<Compile Include="Manager\Action\HangupAction.cs" />
<Compile Include="Manager\Action\ListCommandsAction.cs" />
<Compile Include="Manager\Action\ManagerActionEvent.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Manager\Action\LoginAction.cs" />
<Compile Include="Manager\Action\LogoffAction.cs" />
<Compile Include="Manager\Action\MailboxCountAction.cs" />
<Compile Include="Manager\Action\MailboxStatusAction.cs" />
<Compile Include="Manager\Action\ManagerAction.cs" />
<Compile Include="Manager\Action\ManagerActionResponse.cs" />
<Compile Include="Manager\Action\MonitorAction.cs" />
<Compile Include="Manager\Action\OriginateAction.cs" />
<Compile Include="Manager\Action\ParkAction.cs" />
<Compile Include="Manager\Action\ParkedCallsAction.cs" />
<Compile Include="Manager\Action\PingAction.cs" />
<Compile Include="Manager\Action\ProxyAction.cs" />
<Compile Include="Manager\Action\QueueAddAction.cs" />
<Compile Include="Manager\Action\QueueLogAction.cs" />
<Compile Include="Manager\Action\QueuePauseAction.cs" />
<Compile Include="Manager\Action\QueuePenaltyAction.cs" />
<Compile Include="Manager\Action\QueueReloadAction.cs" />
<Compile Include="Manager\Action\QueueRemoveAction.cs" />
<Compile Include="Manager\Action\QueueResetAction.cs" />
<Compile Include="Manager\Action\QueueRuleAction.cs" />
<Compile Include="Manager\Action\QueueStatusAction.cs" />
<Compile Include="Manager\Action\RedirectAction.cs" />
<Compile Include="Manager\Action\SetCDRUserFieldAction.cs" />
<Compile Include="Manager\Action\SetVarAction.cs" />
<Compile Include="Manager\Action\SIPPeersAction.cs" />
<Compile Include="Manager\Action\SIPShowPeerAction.cs" />
<Compile Include="Manager\Action\StatusAction.cs" />
<Compile Include="Manager\Action\StopMonitorAction.cs" />
<Compile Include="Manager\Action\UpdateConfigAction.cs" />
<Compile Include="Manager\Action\ZapDialOffhookAction.cs" />
<Compile Include="Manager\Action\ZapDNDOffAction.cs" />
<Compile Include="Manager\Action\ZapDNDOnAction.cs" />
<Compile Include="Manager\Action\ZapHangupAction.cs" />
<Compile Include="Manager\Action\ZapShowChannelsAction.cs" />
<Compile Include="Manager\Action\ZapTransferAction.cs" />
<Compile Include="Manager\AsteriskVersion.cs" />
<Compile Include="Manager\Event\AbstractAgentVariables.cs" />
<Compile Include="Manager\Event\AbstractConfbridgeEvent.cs" />
<Compile Include="Manager\Event\BlindTransferEvent.cs" />
<Compile Include="Manager\Event\BridgeActivityEvent.cs" />
<Compile Include="Manager\Event\BridgeCreateEvent.cs" />
<Compile Include="Manager\Event\BridgeDestroyEvent.cs" />
<Compile Include="Manager\Event\BridgeStateEvent.cs" />
<Compile Include="Manager\Event\BridgeEnterEvent.cs" />
<Compile Include="Manager\Event\BridgeLeaveEvent.cs" />
<Compile Include="Manager\Event\ConfbridgeEndEvent.cs" />
<Compile Include="Manager\Event\ConfbridgeJoinEvent.cs" />
<Compile Include="Manager\Event\ConfbridgeLeaveEvent.cs" />
<Compile Include="Manager\Event\ConfbridgeListCompleteEvent.cs" />
<Compile Include="Manager\Event\ConfbridgeListEvent.cs" />
<Compile Include="Manager\Event\ConfbridgeListRoomsCompleteEvent.cs" />
<Compile Include="Manager\Event\ConfbridgeListRoomsEvent.cs" />
<Compile Include="Manager\Event\ConfbridgeStartEvent.cs" />
<Compile Include="Manager\Event\ConfbridgeTalkingEvent.cs" />
<Compile Include="Manager\Event\ConnectionStateEvent.cs" />
<Compile Include="Manager\Event\AGIExecEvent.cs" />
<Compile Include="Manager\Event\AsyncAGIEvent.cs" />
<Compile Include="Manager\Event\BridgeEvent.cs" />
<Compile Include="Manager\Event\ChannelReloadEvent.cs" />
<Compile Include="Manager\Event\ChannelUpdateEvent.cs" />
<Compile Include="Manager\Event\DialEndEvent.cs" />
<Compile Include="Manager\Event\DialBeginEvent.cs" />
<Compile Include="Manager\Event\FailedACLEvent.cs" />
<Compile Include="Manager\Event\QueueCallerJoinEvent.cs" />
<Compile Include="Manager\Event\QueueCallerLeaveEvent.cs" />
<Compile Include="Manager\Event\MeetmeMuteEvent.cs" />
<Compile Include="Manager\Event\DTMFEvent.cs" />
<Compile Include="Manager\Event\FaxReceivedEvent.cs" />
<Compile Include="Manager\Event\JabberEvent.cs" />
<Compile Include="Manager\Event\JitterBufStatsEvent.cs" />
<Compile Include="Manager\Event\MeetmeEndEvent.cs" />
<Compile Include="Manager\Event\MeetmeTalkRequestEvent.cs" />
<Compile Include="Manager\Event\MobileStatusEvent.cs" />
<Compile Include="Manager\Event\ModuleLoadReportEvent.cs" />
<Compile Include="Manager\Event\MonitorStartEvent.cs" />
<Compile Include="Manager\Event\MonitorStopEvent.cs" />
<Compile Include="Manager\Event\NewAccountCodeEvent.cs" />
<Compile Include="Manager\Event\OriginateResponseEvent.cs" />
<Compile Include="Manager\Event\PRIEvent.cs" />
<Compile Include="Manager\Event\QueueMemberPauseEvent.cs" />
<Compile Include="Manager\Event\QueueMemberPenaltyEvent.cs" />
<Compile Include="Manager\Event\QueueMemberRinginuseEvent.cs" />
<Compile Include="Manager\Event\RTPReceiverStatEvent.cs" />
<Compile Include="Manager\Event\RTCPSentEvent.cs" />
<Compile Include="Manager\Event\RTCPReceivedEvent.cs" />
<Compile Include="Manager\Event\RTPSenderStatEvent.cs" />
<Compile Include="Manager\Event\ShowDialPlanCompleteEvent.cs" />
<Compile Include="Manager\Event\AttendedTransferEvent.cs" />
<Compile Include="Manager\Event\TransferEvent.cs" />
<Compile Include="Manager\Event\UnknownEvent.cs" />
<Compile Include="Manager\Event\VarSet.cs" />
<Compile Include="Manager\Event\QueueCallerAbandonEvent.cs" />
<Compile Include="Manager\Event\MasqueradeEvent.cs" />
<Compile Include="Manager\Exceptions\AuthenticationFailedException.cs" />
<Compile Include="Manager\IActionVariable.cs" />
<Compile Include="Manager\Response\GetConfigResponse.cs" />
<Compile Include="Manager\Response\OriginateResponse.cs" />
<Compile Include="Manager\ManagerConnection.cs" />
<Compile Include="Manager\Exceptions\EventTimeoutException.cs" />
<Compile Include="Manager\Event\AbstractAgentEvent.cs" />
<Compile Include="Manager\Event\AbstractParkedCallEvent.cs" />
<Compile Include="Manager\Event\AbstractQueueMemberEvent.cs" />
<Compile Include="Manager\Event\AgentCallbackLoginEvent.cs" />
<Compile Include="Manager\Event\AgentCallbackLogoffEvent.cs" />
<Compile Include="Manager\Event\AgentCalledEvent.cs" />
<Compile Include="Manager\Event\AgentCompleteEvent.cs" />
<Compile Include="Manager\Event\AgentConnectEvent.cs" />
<Compile Include="Manager\Event\AgentDumpEvent.cs" />
<Compile Include="Manager\Event\AgentLoginEvent.cs" />
<Compile Include="Manager\Event\AgentLogoffEvent.cs" />
<Compile Include="Manager\Event\AgentsCompleteEvent.cs" />
<Compile Include="Manager\Event\AgentsEvent.cs" />
<Compile Include="Manager\Event\AlarmClearEvent.cs" />
<Compile Include="Manager\Event\AlarmEvent.cs" />
<Compile Include="Manager\Event\CdrEvent.cs" />
<Compile Include="Manager\Event\AbstractChannelEvent.cs" />
<Compile Include="Manager\Event\ConnectEvent.cs" />
<Compile Include="Manager\Event\DBGetResponseEvent.cs" />
<Compile Include="Manager\Event\DialEvent.cs" />
<Compile Include="Manager\Event\DisconnectEvent.cs" />
<Compile Include="Manager\Event\DNDStateEvent.cs" />
<Compile Include="Manager\Event\ExtensionStatusEvent.cs" />
<Compile Include="Manager\Event\HangupEvent.cs" />
<Compile Include="Manager\Event\HoldedCallEvent.cs" />
<Compile Include="Manager\Event\HoldEvent.cs" />
<Compile Include="Manager\Event\JoinEvent.cs" />
<Compile Include="Manager\Event\LeaveEvent.cs" />
<Compile Include="Manager\Event\LinkEvent.cs" />
<Compile Include="Manager\Event\LogChannelEvent.cs" />
<Compile Include="Manager\Event\ManagerEvent.cs" />
<Compile Include="Manager\Event\AbstractMeetmeEvent.cs" />
<Compile Include="Manager\Event\MeetmeJoinEvent.cs" />
<Compile Include="Manager\Event\MeetmeLeaveEvent.cs" />
<Compile Include="Manager\Event\MeetmeStopTalkingEvent.cs" />
<Compile Include="Manager\Event\MeetmeTalkingEvent.cs" />
<Compile Include="Manager\Event\MessageWaitingEvent.cs" />
<Compile Include="Manager\Event\NewCallerIdEvent.cs" />
<Compile Include="Manager\Event\NewChannelEvent.cs" />
<Compile Include="Manager\Event\NewExtenEvent.cs" />
<Compile Include="Manager\Event\NewStateEvent.cs" />
<Compile Include="Manager\Event\ParkedCallEvent.cs" />
<Compile Include="Manager\Event\ParkedCallGiveUpEvent.cs" />
<Compile Include="Manager\Event\ParkedCallsCompleteEvent.cs" />
<Compile Include="Manager\Event\ParkedCallTimeOutEvent.cs" />
<Compile Include="Manager\Event\PeerEntryEvent.cs" />
<Compile Include="Manager\Event\PeerlistCompleteEvent.cs" />
<Compile Include="Manager\Event\PeerStatusEvent.cs" />
<Compile Include="Manager\Event\QueueEntryEvent.cs" />
<Compile Include="Manager\Event\QueueEvent.cs" />
<Compile Include="Manager\Event\ChallengeResponseFailedEvent.cs" />
<Compile Include="Manager\Event\InvalidAccountIDEvent.cs" />
<Compile Include="Manager\Event\DeviceStateChangeEvent.cs" />
<Compile Include="Manager\Event\ChallengeSentEvent.cs" />
<Compile Include="Manager\Event\SuccessfulAuthEvent.cs" />
<Compile Include="Manager\Event\QueueMemberAddedEvent.cs" />
<Compile Include="Manager\Event\QueueMemberEvent.cs" />
<Compile Include="Manager\Event\QueueMemberPausedEvent.cs" />
<Compile Include="Manager\Event\QueueMemberRemovedEvent.cs" />
<Compile Include="Manager\Event\QueueMemberStatusEvent.cs" />
<Compile Include="Manager\Event\QueueParamsEvent.cs" />
<Compile Include="Manager\Event\QueueStatusCompleteEvent.cs" />
<Compile Include="Manager\Event\RegistryEvent.cs" />
<Compile Include="Manager\Event\ReloadEvent.cs" />
<Compile Include="Manager\Event\RenameEvent.cs" />
<Compile Include="Manager\Event\ResponseEvent.cs" />
<Compile Include="Manager\Event\ShutdownEvent.cs" />
<Compile Include="Manager\Event\StatusCompleteEvent.cs" />
<Compile Include="Manager\Event\StatusEvent.cs" />
<Compile Include="Manager\Event\UnholdEvent.cs" />
<Compile Include="Manager\Event\UnlinkEvent.cs" />
<Compile Include="Manager\Event\UnparkedCallEvent.cs" />
<Compile Include="Manager\Event\UserEvent.cs" />
<Compile Include="Manager\Event\ZapShowChannelsCompleteEvent.cs" />
<Compile Include="Manager\Event\ZapShowChannelsEvent.cs" />
<Compile Include="Manager\Exceptions\ManagerException.cs" />
<Compile Include="Manager\ManagerReader.cs" />
<Compile Include="Manager\Originate.cs" />
<Compile Include="Manager\ResponseEventHandler.cs" />
<Compile Include="Manager\ResponseEvents.cs" />
<Compile Include="Manager\ResponseHandler.cs" />
<Compile Include="Manager\Response\ChallengeResponse.cs" />
<Compile Include="Manager\Response\CommandResponse.cs" />
<Compile Include="Manager\Response\ExtensionStateResponse.cs" />
<Compile Include="Manager\IResponseHandler.cs" />
<Compile Include="Manager\Response\MailboxCountResponse.cs" />
<Compile Include="Manager\Response\MailboxStatusResponse.cs" />
<Compile Include="Manager\Response\ManagerError.cs" />
<Compile Include="Manager\Response\ManagerResponse.cs" />
<Compile Include="Manager\Exceptions\TimeoutException.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Logger.cs" />
<Compile Include="Util\MD5Support.cs" />
<Compile Include="Util\ThreadClass.cs" />
<Compile Include="Util\ThreadPool.cs" />
<Compile Include="Helper.cs" />
<Compile Include="Util\ThreadTask.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<None Remove="Manager\Documentation\Asterisk-1.6.2.24\AMI Commands.txt" />
<None Remove="Manager\Documentation\Asterisk-1.6.2.24\AMI Events.txt" />
</ItemGroup>
<ItemGroup>
<Content Include="Manager\Documentation\Asterisk-1.6.2.24\AMI Commands.txt" />
<Content Include="Manager\Documentation\Asterisk-1.6.2.24\AMI Events.txt" />
</ItemGroup>
<ItemGroup>
<Folder Include="Manager\Documentation\Asterisk-1.8.x\" />
<Folder Include="Manager\Documentation\Asterisk-10\" />
<Folder Include="Manager\Documentation\Asterisk-11\" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
<Reference Include="System.Web" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Collections.NonGeneric">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Threading">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Threading.Thread">
<Version>4.3.0</Version>
</PackageReference>
</ItemGroup>
</Project>

View file

@ -12,8 +12,6 @@ namespace AsterNET.FastAGI
private readonly bool _SCHANGUP_CAUSES_EXCEPTION;
private readonly AGIReader agiReader;
private readonly AGIWriter agiWriter;
private AGIReply agiReply;
public AGIChannel(SocketConnection socket, bool SC511_CAUSES_EXCEPTION, bool SCHANGUP_CAUSES_EXCEPTION)
{
@ -34,18 +32,10 @@ namespace AsterNET.FastAGI
_SCHANGUP_CAUSES_EXCEPTION = SCHANGUP_CAUSES_EXCEPTION;
}
/// <summary>
/// Get last AGI Reply.
/// </summary>
public AGIReply LastReply
{
get { return agiReply; }
}
public AGIReply SendCommand(AGICommand command)
{
agiWriter.SendCommand(command);
agiReply = agiReader.ReadReply();
AGIReply agiReply = agiReader.ReadReply();
int status = agiReply.GetStatus();
if (status == (int) AGIReplyStatuses.SC_INVALID_OR_UNKNOWN_COMMAND)
throw new InvalidOrUnknownCommandException(command.BuildCommand());

View file

@ -557,12 +557,12 @@ namespace AsterNET.FastAGI
int i = parameter.IndexOf('=');
if (i > 0)
{
name = HttpUtility.UrlDecode(parameter.Substring(0, i));
name = WebUtility.UrlDecode(parameter.Substring(0, i));
if (parameter.Length > i + 1)
val = HttpUtility.UrlDecode(parameter.Substring(i + 1));
val = WebUtility.UrlDecode(parameter.Substring(i + 1));
}
else if (i < 0)
name = HttpUtility.UrlDecode(parameter);
name = WebUtility.UrlDecode(parameter);
else
continue;

View file

@ -102,8 +102,8 @@ namespace AsterNET.FastAGI
protected internal int GetChannelStatus()
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.ChannelStatusCommand());
return channel.LastReply.ResultCode;
AGIReply lastReply = channel.SendCommand(new Command.ChannelStatusCommand());
return lastReply.ResultCode;
}
#endregion
@ -118,8 +118,8 @@ namespace AsterNET.FastAGI
protected internal string GetData(string file)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.GetDataCommand(file));
return channel.LastReply.GetResult();
AGIReply lastReply = channel.SendCommand(new Command.GetDataCommand(file));
return lastReply.GetResult();
}
#endregion
@ -137,8 +137,8 @@ namespace AsterNET.FastAGI
protected internal string GetData(string file, long timeout)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.GetDataCommand(file, timeout));
return channel.LastReply.GetResult();
AGIReply lastReply = channel.SendCommand(new Command.GetDataCommand(file, timeout));
return lastReply.GetResult();
}
#endregion
@ -158,8 +158,8 @@ namespace AsterNET.FastAGI
protected internal string GetData(string file, long timeout, int maxDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.GetDataCommand(file, timeout, maxDigits));
return channel.LastReply.GetResult();
AGIReply lastReply = channel.SendCommand(new Command.GetDataCommand(file, timeout, maxDigits));
return lastReply.GetResult();
}
#endregion
@ -177,8 +177,8 @@ namespace AsterNET.FastAGI
protected internal char GetOption(string file, string escapeDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.GetOptionCommand(file, escapeDigits));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.GetOptionCommand(file, escapeDigits));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -196,8 +196,8 @@ namespace AsterNET.FastAGI
protected internal char GetOption(string file, string escapeDigits, int timeout)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.GetOptionCommand(file, escapeDigits, timeout));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.GetOptionCommand(file, escapeDigits, timeout));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -210,8 +210,8 @@ namespace AsterNET.FastAGI
protected internal int Exec(string application)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.ExecCommand(application));
return channel.LastReply.ResultCode;
AGIReply lastReply = channel.SendCommand(new Command.ExecCommand(application));
return lastReply.ResultCode;
}
#endregion
@ -225,8 +225,8 @@ namespace AsterNET.FastAGI
protected internal int Exec(string application, string options)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.ExecCommand(application, options));
return channel.LastReply.ResultCode;
AGIReply lastReply = channel.SendCommand(new Command.ExecCommand(application, options));
return lastReply.ResultCode;
}
#endregion
@ -291,8 +291,8 @@ namespace AsterNET.FastAGI
protected internal char StreamFile(string file, string escapeDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.StreamFileCommand(file, escapeDigits));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.StreamFileCommand(file, escapeDigits));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -318,8 +318,8 @@ namespace AsterNET.FastAGI
protected internal char SayDigits(string digits, string escapeDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.SayDigitsCommand(digits, escapeDigits));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.SayDigitsCommand(digits, escapeDigits));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -345,8 +345,8 @@ namespace AsterNET.FastAGI
protected internal char SayNumber(string number, string escapeDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.SayNumberCommand(number, escapeDigits));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.SayNumberCommand(number, escapeDigits));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -372,8 +372,8 @@ namespace AsterNET.FastAGI
protected internal char SayPhonetic(string text, string escapeDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.SayPhoneticCommand(text, escapeDigits));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.SayPhoneticCommand(text, escapeDigits));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -399,8 +399,8 @@ namespace AsterNET.FastAGI
protected internal char SayAlpha(string text, string escapeDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.SayAlphaCommand(text, escapeDigits));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.SayAlphaCommand(text, escapeDigits));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -426,8 +426,8 @@ namespace AsterNET.FastAGI
protected internal char SayTime(long time, string escapeDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.SayTimeCommand(time, escapeDigits));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.SayTimeCommand(time, escapeDigits));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -440,10 +440,10 @@ namespace AsterNET.FastAGI
protected internal string GetVariable(string name)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.GetVariableCommand(name));
if (channel.LastReply.ResultCode != 1)
AGIReply lastReply = channel.SendCommand(new Command.GetVariableCommand(name));
if (lastReply.ResultCode != 1)
return null;
return channel.LastReply.Extra;
return lastReply.Extra;
}
#endregion
@ -468,8 +468,8 @@ namespace AsterNET.FastAGI
protected internal char WaitForDigit(int timeout)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.WaitForDigitCommand(timeout));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.WaitForDigitCommand(timeout));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -484,10 +484,10 @@ namespace AsterNET.FastAGI
protected internal string GetFullVariable(string name)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.GetFullVariableCommand(name));
if (channel.LastReply.ResultCode != 1)
AGIReply lastReply = channel.SendCommand(new Command.GetFullVariableCommand(name));
if (lastReply.ResultCode != 1)
return null;
return channel.LastReply.Extra;
return lastReply.Extra;
}
#endregion
@ -502,10 +502,10 @@ namespace AsterNET.FastAGI
protected internal string GetFullVariable(string name, string channelName)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.GetFullVariableCommand(name, channelName));
if (channel.LastReply.ResultCode != 1)
AGIReply lastReply = channel.SendCommand(new Command.GetFullVariableCommand(name, channelName));
if (lastReply.ResultCode != 1)
return null;
return channel.LastReply.Extra;
return lastReply.Extra;
}
#endregion
@ -530,8 +530,8 @@ namespace AsterNET.FastAGI
protected internal char SayDateTime(long time, string escapeDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.SayDateTimeCommand(time, escapeDigits));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.SayDateTimeCommand(time, escapeDigits));
return lastReply.ResultCodeAsChar;
}
/// <summary>
@ -545,8 +545,8 @@ namespace AsterNET.FastAGI
protected internal char SayDateTime(long time, string escapeDigits, string format)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.SayDateTimeCommand(time, escapeDigits, format));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.SayDateTimeCommand(time, escapeDigits, format));
return lastReply.ResultCodeAsChar;
}
/// <summary>
@ -561,8 +561,8 @@ namespace AsterNET.FastAGI
protected internal char SayDateTime(long time, string escapeDigits, string format, string timezone)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.SayDateTimeCommand(time, escapeDigits, format, timezone));
return channel.LastReply.ResultCodeAsChar;
AGIReply lastReply = channel.SendCommand(new Command.SayDateTimeCommand(time, escapeDigits, format, timezone));
return lastReply.ResultCodeAsChar;
}
#endregion
@ -576,10 +576,10 @@ namespace AsterNET.FastAGI
protected internal string DatabaseGet(string family, string key)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.DatabaseGetCommand(family, key));
if (channel.LastReply.ResultCode != 1)
AGIReply lastReply = channel.SendCommand(new Command.DatabaseGetCommand(family, key));
if (lastReply.ResultCode != 1)
return null;
return channel.LastReply.Extra;
return lastReply.Extra;
}
#endregion
@ -662,8 +662,8 @@ namespace AsterNET.FastAGI
protected internal int RecordFile(string file, string format, string escapeDigits, int timeout)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.RecordFileCommand(file, format, escapeDigits, timeout));
return channel.LastReply.ResultCode;
AGIReply lastReply = channel.SendCommand(new Command.RecordFileCommand(file, format, escapeDigits, timeout));
return lastReply.ResultCode;
}
/// <summary>
@ -687,8 +687,8 @@ namespace AsterNET.FastAGI
protected internal int RecordFile(string file, string format, string escapeDigits, int timeout, int offset, bool beep, int maxSilence)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.RecordFileCommand(file, format, escapeDigits, timeout, offset, beep, maxSilence));
return channel.LastReply.ResultCode;
AGIReply lastReply = channel.SendCommand(new Command.RecordFileCommand(file, format, escapeDigits, timeout, offset, beep, maxSilence));
return lastReply.ResultCode;
}
#endregion
@ -710,8 +710,8 @@ namespace AsterNET.FastAGI
protected internal int ControlStreamFile(string file)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.ControlStreamFileCommand(file));
return channel.LastReply.ResultCode;
AGIReply lastReply = channel.SendCommand(new Command.ControlStreamFileCommand(file));
return lastReply.ResultCode;
}
/// <summary>
/// Plays the given file, allowing playback to be interrupted by the given
@ -731,8 +731,8 @@ namespace AsterNET.FastAGI
protected internal int ControlStreamFile(string file, string escapeDigits)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.ControlStreamFileCommand(file, escapeDigits));
return channel.LastReply.ResultCode;
AGIReply lastReply = channel.SendCommand(new Command.ControlStreamFileCommand(file, escapeDigits));
return lastReply.ResultCode;
}
/// <summary>
/// Plays the given file, allowing playback to be interrupted by the given
@ -753,8 +753,8 @@ namespace AsterNET.FastAGI
protected internal int ControlStreamFile(string file, string escapeDigits, int offset)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.ControlStreamFileCommand(file, escapeDigits, offset));
return channel.LastReply.ResultCode;
AGIReply lastReply = channel.SendCommand(new Command.ControlStreamFileCommand(file, escapeDigits, offset));
return lastReply.ResultCode;
}
/// <summary>
/// Plays the given file, allowing playback to be interrupted by the given
@ -778,8 +778,8 @@ namespace AsterNET.FastAGI
protected internal int ControlStreamFile(string file, string escapeDigits, int offset, string forwardDigit, string rewindDigit, string pauseDigit)
{
AGIChannel channel = this.Channel;
channel.SendCommand(new Command.ControlStreamFileCommand(file, escapeDigits, offset, forwardDigit, rewindDigit, pauseDigit));
return channel.LastReply.ResultCode;
AGIReply lastReply = channel.SendCommand(new Command.ControlStreamFileCommand(file, escapeDigits, offset, forwardDigit, rewindDigit, pauseDigit));
return lastReply.ResultCode;
}
#endregion

View file

@ -647,7 +647,9 @@ namespace AsterNET
{
string name = line.Substring(0, delimiterIndex).ToLower(CultureInfo).Trim();
string val = line.Substring(delimiterIndex + 1).Trim();
if (val == "<null>")
if (list.Contains(name))
list[name] += Environment.NewLine + val;
else if (val == "<null>")
list[name] = null;
else
list[name] = val;
@ -874,12 +876,13 @@ namespace AsterNET
#region RegisterEventHandler(Dictionary<int, int> list, int index, Type eventType)
internal static void RegisterEventHandler(Dictionary<int, int> list, int index, Type eventType)
internal static void RegisterEventHandler(Dictionary<int, Func<ManagerEvent, bool>> list, Type eventType, Func<ManagerEvent, bool> action)
{
int eventHash = eventType.Name.GetHashCode();
var eventTypeName = eventType.Name;
int eventHash = eventTypeName.GetHashCode();
if (list.ContainsKey(eventHash))
throw new ArgumentException("Event class already registered : " + eventType.Name);
list.Add(eventHash, index);
throw new ArgumentException("Event class already registered : " + eventTypeName);
list.Add(eventHash, action);
}
#endregion

View file

@ -6,6 +6,9 @@ using System;
namespace AsterNET.IO
{
/// <summary>
/// Socket connection to asterisk.
/// </summary>
public class SocketConnection
{
private TcpClient tcpClient;
@ -23,21 +26,29 @@ namespace AsterNET.IO
/// <param name="port">client port</param>
/// <param name="encoding">encoding</param>
public SocketConnection(string host, int port, Encoding encoding)
:this(new TcpClient(host, port), encoding)
{
initial = true;
this.encoding = encoding;
this.tcpClient = new TcpClient(host, port);
this.networkStream = this.tcpClient.GetStream();
this.reader = new StreamReader(this.networkStream, encoding);
this.writer = new BinaryWriter(this.networkStream, encoding);
}
/// <summary>
/// Consructor
/// </summary>
/// <param name="host">client host</param>
/// <param name="port">client port</param>
/// <param name="encoding">encoding</param>
/// <param name="receiveBufferSize">size of the receive buffer.</param>
public SocketConnection(string host, int port,int receiveBufferSize, Encoding encoding)
: this (new TcpClient(host, port) {ReceiveBufferSize = receiveBufferSize }, encoding)
{
}
#endregion
#region Constructor - SocketConnection(socket)
/// <summary>
/// Constructor
/// </summary>
/// <param name="socket">TCP client from Listener</param>
/// <param name="tcpClient">TCP client from Listener</param>
/// <param name="encoding">encoding</param>
internal SocketConnection(TcpClient tcpClient, Encoding encoding)
{

View file

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AsterNET.Manager.Action
{
/// <summary>
/// Redirect all channels currently bridged to the specified channel to the specified destination.<br />
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_BlindTransfer">https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_BlindTransfer</see>
/// </summary>
class BlindTransferAction : ManagerAction
{
/// <summary>
/// Creates a new empty <see cref="BlindTransferAction"/>.
/// </summary>
public BlindTransferAction()
{
}
/// <summary>
/// Creates a new <see cref="BlindTransferAction"/>.
/// </summary>
/// <param name="channel"></param>
/// <param name="context"></param>
/// <param name="extension"></param>
public BlindTransferAction(string channel, string context, string extension)
{
Channel = channel;
Context = context;
Exten = extension;
}
/// <summary>
/// Get the name of this action, i.e. "BlindTransfer".
/// </summary>
public override string Action
{
get { return "BlindTransfer"; }
}
/// <summary>
/// Gets or sets the channel.
/// </summary>
public string Channel { get; set; }
/// <summary>
/// Gets or sets the context.
/// </summary>
public string Context { get; set; }
/// <summary>
/// Gets or sets the extension.
/// </summary>
public string Exten { get; set; }
}
}

View file

@ -26,6 +26,8 @@
public string Conference { get; set; }
public string RecordFile { get; set; }
public override string Action
{
get { return "ConfbridgeStartRecord"; }

View file

@ -0,0 +1,57 @@
namespace AsterNET.Manager.Action
{
/// <summary>
/// Dynamically add filters for the current manager session
/// The filters added are only used for the current session. Once the connection is closed the filters are removed.
/// This comand requires the system permission because this command can be used to create filters that may bypass filters defined in manager.conf
/// </summary>
public class FilterAction : ManagerAction
{
#region Action
/// <summary>
/// Get the name of this action, i.e. "Filter".
/// </summary>
public override string Action
{
get { return "Filter"; }
}
#endregion
#region Operation
/// <summary>
/// Add - Add a filter
/// </summary>
public string Operation { get; set; }
#endregion
#region Filter
/// <summary>
/// Filters can be whitelist or blacklist
/// Example whitelist filter: "Event: Newchannel"
/// Example blacklist filter: "!Channel: DAHDI.*"
/// </summary>
public string Filter { get; set; }
#endregion
#region FilterAction(string filter)
/// <summary>
/// Add - Add a filter
/// </summary>
/// <param name="filter">Add a filter</param>
/// <param name="operation">Filters can be whitelist or blacklist</param>
public FilterAction(string filter, string operation = "Add")
{
Filter = filter;
Operation = operation;
}
#endregion
}
}

View file

@ -0,0 +1,33 @@
namespace AsterNET.Manager.Action
{
/// <inheritdoc />
/// <summary>
/// The ModuleLoadAction loads/unloads Asterisk modules.
/// </summary>
public class ModuleLoadAction : ManagerAction
{
/// <summary>
/// Creates ModuleLoadAction for given module.
/// </summary>
//// <param name="module">module to load/unload.</param>
//// <param name="loadType">loadType parameter can have the following values: load/unload</param>
public ModuleLoadAction(string module, string loadType)
{
Module = module;
LoadType = loadType;
}
/// <inheritdoc />
public override string Action => "ModuleLoad";
/// <summary>
/// Get the name of the module.
/// </summary>
public string Module { get; }
/// <summary>
/// Get the type of action (load/unload).
/// </summary>
public string LoadType { get; }
}
}

View file

@ -67,6 +67,15 @@ namespace AsterNET.Manager.Action
#endregion
#region ChannelId
/// <summary>
/// Get/Set originated channel id
/// </summary>
public string ChannelId { get; set; }
#endregion
#region Context
/// <summary>

View file

@ -94,5 +94,11 @@ namespace AsterNET.Manager.Action
/// true if the queue member should be paused when added.
/// </summary>
public bool Paused { get; set; }
/// <summary>
/// Get/Set an alternate interface to be used to determine the state of the member.<br />
/// Available since Asterisk 12.
/// </summary>
public string StateInterface { get; set; }
}
}

View file

@ -2,7 +2,6 @@ namespace AsterNET.Manager.Action
{
/// <summary>
/// The QueuePauseAction makes a queue member temporarily unavailabe (or available again).<br />
/// It is implemented in apps/app_queue.c<br />
/// Available since Asterisk 1.2.
/// </summary>
public class QueuePauseAction : ManagerAction
@ -57,11 +56,13 @@ namespace AsterNET.Manager.Action
/// <param name="iface">the interface of the member to make unavailable</param>
/// <param name="queue">the queue the member is made unvailable on</param>
/// <param name="paused">true to make the member unavailbale, false to make the member available</param>
public QueuePauseAction(string iface, string queue, bool paused)
/// <param name="reason">the reason for paused when the member is made unavailable</param>
public QueuePauseAction(string iface, string queue, bool paused, string reason = null)
{
this.Interface = iface;
this.Queue = queue;
this.Paused = paused;
this.Reason = reason;
}
/// <summary>
@ -73,21 +74,26 @@ namespace AsterNET.Manager.Action
}
/// <summary>
/// Get/Set the interface of the member to make available or unavailable.<br />
/// The name of the interface (tech/name) to pause or unpause.<br />
/// This property is mandatory.
/// </summary>
public string Interface { get; set; }
/// <summary>
/// Get/Set Returns the name of the queue the member is made available or unavailable on.
/// The name of the queue in which to pause or unpause this member.<br />
/// If null, the member will be paused or unpaused in all the queues it is a member of.
/// </summary>
public string Queue { get; set; }
/// <summary>
/// Get/Set if the member is made available or unavailable.<br />
/// true to make the member unavailbale,<br />
/// false make the member available
/// Pause or unpause the interface.<br />
// Set to 'true' to pause the member or 'false' to unpause.
/// </summary>
public bool Paused { get; set; }
/// <summary>
/// Text description, returned in the event QueueMemberPaused.
/// </summary>
public string Reason { get; set; }
}
}

View file

@ -0,0 +1,51 @@
using AsterNET.Manager.Event;
using System;
namespace AsterNET.Manager.Action
{
/// <summary>
/// Show queue summary
/// </summary>
/// <seealso cref="Manager.Action.QueueStatusAction" />
public class QueueSummaryAction : ManagerActionEvent
{
#region Action
/// <summary>
/// Get the name of this action, i.e. "Filter".
/// </summary>
public override string Action
{
get { return "QueueSummary"; }
}
#endregion
#region MyRegion
/// <summary>
/// Name of queue
/// </summary>
public string Queue { get; set; }
#endregion
#region QueueSummaryAction(string queue)
public QueueSummaryAction(string queue)
{
Queue = queue;
}
#endregion
#region ActionCompleteEventClass()
public override Type ActionCompleteEventClass()
{
return typeof(QueueSummaryEvent);
}
#endregion
}
}

View file

@ -0,0 +1,26 @@
namespace AsterNET.Manager.Action
{
/// <inheritdoc />
/// <summary>
/// The ReloadAction reloads Asterisk modules.
/// </summary>
public class ReloadAction : ManagerAction
{
/// <summary>
/// Creates ReloadAction for given module.
/// </summary>
//// <param name="module">module to reload.</param>
public ReloadAction(string module)
{
Module = module;
}
/// <inheritdoc />
public override string Action => "Reload";
/// <summary>
/// Get the name of the module.
/// </summary>
public string Module { get; }
}
}

View file

@ -114,7 +114,8 @@ namespace AsterNET.Manager.Action
/// <param name="variable">Variable to work on</param>
/// <param name="value">Value to work on</param>
/// <param name="match">Extra match required to match line</param>
public void AddCommand(string action, string category, string variable, string value, string match)
/// <param name="options">Extra match required to match line</param>
public void AddCommand(string action, string category, string variable, string value, string match, string options)
{
var i = actionCounter++;
var index = i.ToString().PadLeft(6, '0');
@ -133,31 +134,39 @@ namespace AsterNET.Manager.Action
if (!string.IsNullOrEmpty(match))
actions.Add("Match-" + index, match);
if (!string.IsNullOrEmpty(options))
Actions.Add("Options-" + index, options);
}
public void AddCommand(string action, string category, string variable, string value, string match)
{
AddCommand(action, category, variable, value, match, null);
}
public void AddCommand(string action, string category, string variable, string value)
{
AddCommand(action, category, variable, value, null);
AddCommand(action, category, variable, value, null, null);
}
public void AddCommand(string action, string category, string variable)
{
AddCommand(action, category, variable, null, null);
AddCommand(action, category, variable, null, null, null);
}
public void AddCommand(string action, string category)
{
AddCommand(action, category, null, null, null);
AddCommand(action, category, null, null, null, null);
}
public void AddCommand(string action)
{
AddCommand(action, null, null, null, null);
AddCommand(action, null, null, null, null, null);
}
public void AddCommand()
{
AddCommand(null, null, null, null, null);
AddCommand(null, null, null, null, null, null);
}
#endregion

View file

@ -16,7 +16,14 @@ namespace AsterNET.Manager.Event
public string Queue { get; set; }
/// <summary>
/// Get/Set the name of the member's interface.
/// Get/Set the name of the member's interface.<br />
/// Added in Asterisk 12
/// </summary>
public string Interface { get; set; }
/// <summary>
/// Get/Set the name of the member's interface.<br />
/// Removed in asterisk 12
/// </summary>
public string Member { get; set; }

View file

@ -16,7 +16,8 @@ namespace AsterNET.Manager.Event
public long HoldTime { get; set; }
/// <summary>
/// Get/Set bridged channel.
/// Get/Set bridged channel. <br />
/// Removed from Asterisk 12
/// </summary>
public string BridgedChannel { get; set; }

View file

@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AsterNET.Manager.Event
{
/// <summary>
/// Raised when a queue member is notified of a caller in the queue and fails to answer.<br/>
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_AgentRingNoAnswer">https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_AgentRingNoAnswer</see>
/// </summary>
public class AgentRingNoAnswerEvent : AbstractAgentVariables
{
/// <summary>
/// Creates a new <see cref="AgentRingNoAnswerEvent"/> using the given <see cref="ManagerConnection"/>.
/// </summary>
/// <param name="source"></param>
public AgentRingNoAnswerEvent(ManagerConnection source)
: base(source)
{
}
/// <summary>
/// Gets or sets the queue.
/// </summary>
public string Queue { get; set; }
/// <summary>
/// Gets or sets the name of the agent.
/// </summary>
public string AgentName { get; set; }
/// <summary>
/// Gets or sets the agent called.
/// </summary>
public string AgentCalled { get; set; }
/// <summary>
/// Gets or sets the channel calling.
/// </summary>
public string ChannelCalling { get; set; }
/// <summary>
/// Gets or sets the destination channel.
/// </summary>
public string DestinationChannel { get; set; }
/// <summary>
/// Gets or sets the Caller*ID of the calling channel.
/// </summary>
public string CallerId { get; set; }
/// <summary>
/// Get/Set the Caller*ID number of the calling channel.
/// </summary>
public string CallerIdNum { get; set; }
/// <summary>
/// Get/Set the Caller*ID name of the calling channel.
/// </summary>
public string CallerIdName { get; set; }
/// <summary>
/// Gets or sets the context.
/// </summary>
public string Context { get; set; }
/// <summary>
/// Gets or sets the extension.
/// </summary>
public string Extension { get; set; }
/// <summary>
/// Gets or sets the priority.
/// </summary>
public string Priority { get; set; }
/// <summary>
/// Get/Set the amount of time the caller was on ring.
/// </summary>
public long RingTime { get; set; }
}
}

View file

@ -39,18 +39,102 @@ namespace AsterNET.Manager.Event
public string Status { get; set; }
/// <summary>
/// Get/Set the name of channel this agent logged in from or "n/a" if the agent is not logged in.
/// Get/Set the name of channel this agent logged in from or "n/a" if the agent is not logged in.<br />
/// Removed on Asterisk 12 app_agent_pool.so module. Use Channel instead.
/// </summary>
public string LoggedInChan { get; set; }
/// <summary>
/// Get/Set the time (in seconds since 01/01/1970) when the agent logged in or 0 if the user is not logged.
/// Get/Set the numerical Caller*ID of the channel this agent is talking toor "n/a" if this agent is talking to nobody.<br />
/// Removed on Asterisk 12 app_agent_pool.so module. Use TalkingToChan instead.
/// </summary>
public string TalkingTo { get; set; }
/// <summary>
/// Get/Set BRIDGEPEER value on agent channel.<br />
/// Present if Status value is AGENT_ONCALL.
/// </summary>
public string TalkingToChan { get; set; }
/// <summary>
/// Get/Set Epoche time when the agent started talking with the caller.<br />
/// Present if Status value is AGENT_ONCALL.
/// </summary>
public string CallStarted { get; set; }
/// <summary>
/// Get/Set the time (in seconds since 01/01/1970).<br />
/// Present if Status value is AGENT_IDLE or AGENT_ONCALL.
/// </summary>
public long LoggedInTime { get; set; }
/// <summary>
/// Get/Set the numerical Caller*ID of the channel this agent is talking toor "n/a" if this agent is talking to nobody.
/// Get/Set a numeric code for the channel's current state, related to ChannelStateDesc.
/// </summary>
public string TalkingTo { get; set; }
public int ChannelState { get; set; }
/// <summary>
/// Get/Set a description for the channel's current state.<br />
/// This is one of
/// <dl>
/// <dt>Down</dt>
/// <dt>Rsrvd</dt>
/// <dt>OffHook</dt>
/// <dt>Dialing</dt>
/// <dt>Ring</dt>
/// <dt>Ringing</dt>
/// <dt>Up</dt>
/// <dt>Busy</dt>
/// <dt>Dialing Offhook</dt>
/// <dt>Pre-ring</dt>
/// <dt>Unknown</dt>
/// </dl>
/// </summary>
public string ChannelStateDesc { get; set; }
/// <summary>
/// Get/Set the callerID number.
/// </summary>
public string CallerIDNum { get; set; }
/// <summary>
/// Get/Set the callerID name.
/// </summary>
public string CallerIDName { get; set; }
/// <summary>
/// Get/Set the connected line number.
/// </summary>
public string ConnectedLineNum { get; set; }
/// <summary>
/// Get/Set the connected line name.
/// </summary>
public string ConnectedLineName { get; set; }
/// <summary>
/// Get/Set the account codee.
/// </summary>
public string AccountCode { get; set; }
/// <summary>
/// Get/Set the context.
/// </summary>
public string Context { get; set; }
/// <summary>
/// Get/Set the extension.
/// </summary>
public string Exten { get; set; }
/// <summary>
/// Get/Set the agent priority.
/// </summary>
public int Priority { get; set; }
/// <summary>
/// Get/Set the uniqueid of the oldest channel associated with this channel.
/// </summary>
public int Linkedid { get; set; }
}
}

View file

@ -6,7 +6,7 @@ namespace AsterNET.Manager.Event
{
public class BlindTransferEvent : ManagerEvent
{
public bool Result { get; set; }
public string Result { get; set; }
public string TransfererChannel { get; set; }
public string TransfererChannelState { get; set; }
public string TransfererChannelStatedesc { get; set; }

View file

@ -6,11 +6,21 @@ using System.Threading.Tasks;
namespace AsterNET.Manager.Event
{
/// <summary>
/// An ConfbridgeListCompleteEvent is triggered after the state of all Confbridges has been reported in response to an ConfbridgeListAction.<br/>
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/ConfBridge+AMI+Actions">https://wiki.asterisk.org/wiki/display/AST/ConfBridge+AMI+Actions</see>
/// </summary>
/// /// <seealso cref="ConfbridgeListEvent" />
public class ConfbridgeListCompleteEvent : ResponseEvent
{
/// <summary>
/// Creates a new <see cref="ConfbridgeListCompleteEvent"/>.
/// </summary>
/// <param name="source"><see cref="ManagerConnection"/></param>
public ConfbridgeListCompleteEvent(ManagerConnection source)
: base(source)
{
}
}
}

View file

@ -6,29 +6,122 @@ using System.Threading.Tasks;
namespace AsterNET.Manager.Event
{
/// <summary>
/// Raised as part of the ConfbridgeList action response list.<br/>
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_ConfbridgeList">https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_ConfbridgeList</see>
/// </summary>
public class ConfbridgeListEvent : AbstractConfbridgeEvent
{
/// <summary>
///
/// </summary>
public string CallerIDNum { get; set; }
/// <summary>
///
/// </summary>
public string CallerIDName { get; set; }
/// <summary>
///
/// Identifies this user as an admin user.
/// </summary>
public string Admin { get; set; }
/// <summary>
///
/// Identifies this user as a marked user.
/// </summary>
public string MarkedUser { get; set; }
/// <summary>
/// Must this user wait for a marked user to join?
/// </summary>
public string WaitMarked { get; set; }
/// <summary>
/// Does this user get kicked after the last marked user leaves?
/// </summary>
public string EndMarked { get; set; }
/// <summary>
/// Is this user waiting for a marked user to join?
/// </summary>
public string Waiting { get; set; }
/// <summary>
/// The current mute status.
/// </summary>
public string Muted { get; set; }
/// <summary>
/// Is this user talking?
/// </summary>
public string Talking { get; set; }
/// <summary>
/// The number of seconds the channel has been up.
/// </summary>
public string AnsweredTime { get; set; }
/// <summary>
/// A numeric code for the channel's current state, related to ChannelStateDesc
/// </summary>
public string ChannelState { get; set; }
/// <summary>
/// The number of seconds the channel has been up.
/// </summary>
public string ChannelStateDesc { get; set; }
/// <summary>
/// Gets or sets the Caller*ID number.
/// </summary>
public string CallerIDNum { get; set; }
/// <summary>
/// Gets or sets the Caller*ID name.
/// </summary>
public string CallerIDName { get; set; }
/// <summary>
/// Gets or sets the connected line number.
/// </summary>
public string ConnectedLineNum { get; set; }
/// <summary>
/// Gets or sets the name of the connected line.
/// </summary>
public string ConnectedLineName { get; set; }
/// <summary>
/// Gets or sets the language.
/// </summary>
public string Language { get; set; }
/// <summary>
/// Gets or sets the account code.
/// </summary>
public string AccountCode { get; set; }
/// <summary>
/// Gets or sets the context.
/// </summary>
public string Context { get; set; }
/// <summary>
/// Gets or sets the exten.
/// </summary>
public string Exten { get; set; }
/// <summary>
/// Gets or sets the priority.
/// </summary>
public string Priority { get; set; }
/// <summary>
/// Gets or sets the Uniqueid.
/// </summary>
public string Uniqueid { get; set; }
/// <summary>
/// Gets or sets the Linkedid.
/// Uniqueid of the oldest channel associated with this channel.
/// </summary>
public string Linkedid { get; set; }
/// <summary>
/// Creates a new <see cref="ConfbridgeListEvent"/>.
/// </summary>
/// <param name="source"></param>
public ConfbridgeListEvent(ManagerConnection source)
: base(source)
{

View file

@ -6,9 +6,17 @@ using System.Threading.Tasks;
namespace AsterNET.Manager.Event
{
/// <summary>
/// An ConfbridgeListRoomsCompleteEvent is triggered after the state of all ConfBridgeRooms has been reported in response to an ConfbridgeListRoomsAction.<br/>
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/ConfBridge+AMI+Actions">https://wiki.asterisk.org/wiki/display/AST/ConfBridge+AMI+Actions</see>
/// </summary>
/// <seealso cref="ConfbridgeListRoomsEvent" />
public class ConfbridgeListRoomsCompleteEvent : ResponseEvent
{
/// <summary>
/// Creates a new <see cref="ConfbridgeListRoomsCompleteEvent"/>.
/// </summary>
/// <param name="source"><see cref="ManagerConnection"/></param>
public ConfbridgeListRoomsCompleteEvent(ManagerConnection source)
: base(source)
{

View file

@ -6,23 +6,31 @@ using System.Threading.Tasks;
namespace AsterNET.Manager.Event
{
/// <summary>
/// Raised as part of the ConfbridgeListRooms action response list.<br/>
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_ConfbridgeList">https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_ConfbridgeList</see>
/// </summary>
public class ConfbridgeListRoomsEvent : AbstractConfbridgeEvent
{
/// <summary>
///
/// Gets or sets the parties.
/// </summary>
public int Parties { get; set; }
/// <summary>
///
/// Gets or sets the marked.
/// </summary>
public int Marked { get; set; }
/// <summary>
///
/// Gets or sets the locked.
/// </summary>
public string Locked { get; set; }
/// <summary>
/// Creates a new <see cref="ConfbridgeListRoomsEvent"/>.
/// </summary>
/// <param name="source"><see cref="ManagerConnection"/></param>
public ConfbridgeListRoomsEvent(ManagerConnection source)
: base(source)
{

View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsterNET.Manager.Event
{
public class ConfbridgeMuteEvent : AbstractConfbridgeEvent
{
public ConfbridgeMuteEvent(ManagerConnection source)
: base(source)
{
}
}
}

View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsterNET.Manager.Event
{
public class ConfbridgeUnmuteEvent : AbstractConfbridgeEvent
{
public ConfbridgeUnmuteEvent(ManagerConnection source)
: base(source)
{
}
}
}

View file

@ -12,7 +12,7 @@ namespace AsterNET.Manager.Event
public bool Reconnect
{
get { return this.reconnect; }
set { this.reconnect = true; }
set { this.reconnect = value; }
}
public ConnectionStateEvent(ManagerConnection source)

View file

@ -0,0 +1,28 @@
namespace AsterNET.Manager.Event
{
/// <summary>
/// Raised when a DTMF digit has started on a channel.<br/>
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ManagerEvent_DTMFBegin">https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ManagerEvent_DTMFBegin</see>
/// </summary>
public class DTMFBeginEvent : ManagerEvent
{
/// <summary>
/// Creates a new <see cref="DTMFBeginEvent"/> using the given <see cref="ManagerConnection"/>.
/// </summary>
/// <param name="source"></param>
public DTMFBeginEvent(ManagerConnection source)
: base(source)
{
}
/// <summary>
/// Gets or sets the direction.
/// </summary>
public string Direction { get; set; }
/// <summary>
/// Gets or sets the digit.
/// </summary>
public string Digit { get; set; }
}
}

View file

@ -0,0 +1,33 @@
namespace AsterNET.Manager.Event
{
/// <summary>
/// Raised when a DTMF digit has ended on a channel.<br/>
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ManagerEvent_DTMFEnd">https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ManagerEvent_DTMFEnd</see>
/// </summary>
public class DTMFEndEvent : ManagerEvent
{
/// <summary>
/// Creates a new <see cref="DTMFEndEvent"/> using the given <see cref="ManagerConnection"/>.
/// </summary>
/// <param name="source"></param>
public DTMFEndEvent(ManagerConnection source)
: base(source)
{
}
/// <summary>
/// Gets or sets the direction.
/// </summary>
public string Direction { get; set; }
/// <summary>
/// Gets or sets the digit.
/// </summary>
public string Digit { get; set; }
/// <summary>
/// Gets or sets the duration ms.
/// </summary>
public int DurationMs { get; set; }
}
}

View file

@ -0,0 +1,23 @@
namespace AsterNET.Manager.Event
{
/// <summary>
/// A HangupRequestEvent is raised when a channel is hang up.<br/>
/// </summary>
public class HangupRequestEvent : AbstractChannelEvent
{
/// <inheritdoc />
public HangupRequestEvent(ManagerConnection source) : base(source)
{
}
/// <summary>
/// Uniqueid of the oldest channel associated with this channel.
/// </summary>
public string LinkedId { get; set; }
/// <summary>
/// Get/Set the cause of the hangup.
/// </summary>
public int Cause { get; set; }
}
}

View file

@ -15,7 +15,7 @@ namespace AsterNET.Manager.Event
/// Get/Set the Caller*ID number of the channel that joined the queue if set.
/// If the channel has no caller id set "unknown" is returned.
/// </summary>
public string CallerId { get; set; }
public string CallerIdNum { get; set; }
/// <summary>
/// Get/Set the Caller*ID name of the channel that joined the queue if set.

View file

@ -0,0 +1,45 @@
namespace AsterNET.Manager.Event
{
/// <summary>
/// A MusicOnHoldEvent is triggered when music on hold starts or stops on a channel.<br/>
/// It is implemented in res/res_musiconhold.c.<br/>
/// Available since Asterisk 1.6
/// </summary>
public class MusicOnHoldEvent : ManagerEvent
{
/// <summary>
/// Creates a new <see cref="MusicOnHoldEvent" />.
/// </summary>
/// <param name="source"><see cref="ManagerConnection"/></param>
public MusicOnHoldEvent(ManagerConnection source) : base(source)
{
}
/// <summary>
/// Gets or sets the state.
/// </summary>
public string State { get; set; }
/// <summary>
/// Gets or sets the class.<br/>
/// The class of music being played on the channel.
/// </summary>
public string Class { get; set; }
/// <summary>
/// Gets or sets the account code.
/// </summary>
public string AccountCode { get; set; }
/// <summary>
/// Gets or sets the language.
/// </summary>
public string Language { get; set; }
/// <summary>
/// Gets or sets the Linked Id<br/>
/// UniqueId of the oldest channel associated with this channel.
/// </summary>
public string LinkedId { get; set; }
}
}

View file

@ -0,0 +1,85 @@
namespace AsterNET.Manager.Event
{
/// <summary>
/// Raised when music on hold has started on a channel.<br />
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_MusicOnHoldStart">https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_MusicOnHoldStart</see>
/// </summary>
public class MusicOnHoldStartEvent : ManagerEvent
{
/// <summary>
/// Creates a new <see cref="MusicOnHoldStartEvent" />.
/// </summary>
/// <param name="source"><see cref="ManagerConnection"/></param>
public MusicOnHoldStartEvent(ManagerConnection source) : base(source)
{
}
/// <summary>
/// Gets or sets the class.<br/>
/// The class of music being played on the channel.
/// </summary>
public string Class { get; set; }
/// <summary>
/// Gets or sets the channel state.<br/>
/// A numeric code for the channel's current state, related to ChannelStateDesc
/// </summary>
public string ChannelState { get; set; }
/// <summary>
/// Gets or sets the channel state description.
/// </summary>
public string ChannelStateDesc { get; set; }
/// <summary>
/// Gets or sets the Caller*ID number.
/// </summary>
public string CallerIDNum { get; set; }
/// <summary>
/// Gets or sets the Caller*ID name.
/// </summary>
public string CallerIDName { get; set; }
/// <summary>
/// Gets or sets the connected line number.
/// </summary>
public string ConnectedLineNum { get; set; }
/// <summary>
/// Gets or sets the connected line name.
/// </summary>
public string ConnectedLineName { get; set; }
/// <summary>
/// Gets or sets the language.
/// </summary>
public string Language { get; set; }
/// <summary>
/// Gets or sets the account code.
/// </summary>
public string AccountCode { get; set; }
/// <summary>
/// Gets or sets the context.
/// </summary>
public string Context { get; set; }
/// <summary>
/// Gets or sets the exten.
/// </summary>
public string Exten { get; set; }
/// <summary>
/// Gets or sets the priority.
/// </summary>
public string Priority { get; set; }
/// <summary>
/// Gets or sets the Linked Id
/// UniqueId of the oldest channel associated with this channel.
/// </summary>
public string LinkedId { get; set; }
}
}

View file

@ -0,0 +1,79 @@
namespace AsterNET.Manager.Event
{
/// <summary>
/// Raised when music on hold has stopped on a channel.<br />
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_MusicOnHoldStop">https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_MusicOnHoldStop</see>
/// </summary>
public class MusicOnHoldStopEvent : ManagerEvent
{
/// <summary>
/// Creates a new <see cref="MusicOnHoldStopEvent" />.
/// </summary>
/// <param name="source"><see cref="ManagerConnection"/></param>
public MusicOnHoldStopEvent(ManagerConnection source) : base(source)
{
}
/// <summary>
/// Gets or sets the channel state.<br/>
/// A numeric code for the channel's current state, related to ChannelStateDesc
/// </summary>
public string ChannelState { get; set; }
/// <summary>
/// Gets or sets the channel state description.
/// </summary>
public string ChannelStateDesc { get; set; }
/// <summary>
/// Gets or sets the Caller*ID number.
/// </summary>
public string CallerIDNum { get; set; }
/// <summary>
/// Gets or sets the Caller*ID name.
/// </summary>
public string CallerIDName { get; set; }
/// <summary>
/// Gets or sets the connected line number.
/// </summary>
public string ConnectedLineNum { get; set; }
/// <summary>
/// Gets or sets the connected line name.
/// </summary>
public string ConnectedLineName { get; set; }
/// <summary>
/// Gets or sets the language.
/// </summary>
public string Language { get; set; }
/// <summary>
/// Gets or sets the account code.
/// </summary>
public string AccountCode { get; set; }
/// <summary>
/// Gets or sets the context.
/// </summary>
public string Context { get; set; }
/// <summary>
/// Gets or sets the exten.
/// </summary>
public string Exten { get; set; }
/// <summary>
/// Gets or sets the priority.
/// </summary>
public string Priority { get; set; }
/// <summary>
/// Gets or sets the Linked Id
/// UniqueId of the oldest channel associated with this channel.
/// </summary>
public string LinkedId { get; set; }
}
}

View file

@ -17,11 +17,13 @@ namespace AsterNET.Manager.Event
private int status;
private bool paused;
private string name;
private bool incall;
private string pausedReason;
/// <summary>
/// Get/Set the name of the queue member.
/// </summary>
public string Name
/// <summary>
/// Get/Set the name of the queue member.
/// </summary>
public string Name
{
get { return this.name; }
set { this.name = value; }
@ -123,8 +125,27 @@ namespace AsterNET.Manager.Event
get { return this.paused; }
set { this.paused = value; }
}
/// <summary>
/// Is this queue member in call??<br/>
/// Available since Asterisk 12.<br/>
/// true if this member is in call,
/// false if not
/// </summary>
public bool InCall
{
get { return this.incall; }
set { this.incall = value; }
}
/// <summary>
/// Paused reason if the queue member is paused
/// </summary>
public string PausedReason
{
get { return this.pausedReason; }
set { this.pausedReason = value; }
}
public QueueMemberEvent(ManagerConnection source)
public QueueMemberEvent(ManagerConnection source)
: base(source)
{
}

View file

@ -0,0 +1,48 @@
namespace AsterNET.Manager.Event
{
/// <summary>
///
/// </summary>
public class QueueSummaryEvent : ManagerEvent
{
public QueueSummaryEvent(ManagerConnection source)
: base(source)
{
}
/// <summary>
/// Queue name
/// </summary>
public string Queue { get; set; }
/// <summary>
/// Logged operators count in queue
/// </summary>
public int LoggedIn { get; set; }
/// <summary>
/// Available operators in queue
/// </summary>
public int Available { get; set; }
/// <summary>
/// Calls count
/// </summary>
public int Callers { get; set; }
/// <summary>
///
/// </summary>
public int HoldTime { get; set; }
/// <summary>
/// Total talk time
/// </summary>
public int TalkTime { get; set; }
/// <summary>
///
/// </summary>
public int LongestHoldTime { get; set; }
}
}

View file

@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Generic;
namespace AsterNET.Manager
{
/// <summary>
/// IActionVariable
/// </summary>
interface IActionVariable
{
Dictionary<string, string> GetVariables();

File diff suppressed because it is too large Load diff

View file

@ -273,11 +273,10 @@ namespace AsterNET.Manager
if (processingCommandResult)
{
string lineLower = line.ToLower(Helper.CultureInfo);
if (lineLower == "--end command--")
if (lineLower == "--end command--" || lineLower == "")
{
var commandResponse = new CommandResponse();
Helper.SetAttributes(commandResponse, packet);
commandList.Add(line);
commandResponse.Result = commandList;
processingCommandResult = false;
packet.Clear();
@ -308,11 +307,11 @@ namespace AsterNET.Manager
mrConnector.DispatchEvent(connectEvent);
continue;
}
if (line.Trim().ToLower(Helper.CultureInfo) == "response: follows")
if (line.Trim().ToLower(Helper.CultureInfo) == "response: follows"
|| line.Trim().ToLower(Helper.CultureInfo).EndsWith("command output follows"))
{
// Switch to wait "--END COMMAND--" mode
// Switch to wait "--END COMMAND--"/"" mode
processingCommandResult = true;
packet.Clear();
commandList.Clear();
Helper.AddKeyValue(packet, line);
continue;

View file

@ -2,6 +2,11 @@ using System.Collections.Generic;
namespace AsterNET.Manager
{
/// <summary>
/// Originates an outbound call and connects it to a specified extension or application.<br/>
/// It will block until the outgoing call fails or gets answered.<br/>
/// At that point, it will exit with the status variable set and dialplan processing will continue.
/// </summary>
public class Originate
{
private string account;
@ -18,9 +23,8 @@ namespace AsterNET.Manager
#region Account
/// <summary>
/// Get/Set the account code to use for the originated call.
/// The account code is included in the call detail record generated for this
/// call and will be used for billing.
/// Get/Set the account code to use for the originated call.<br/>
/// The account code is included in the call detail record generated for this call and will be used for billing.
/// </summary>
public string Account
{
@ -60,7 +64,7 @@ namespace AsterNET.Manager
#region Context
/// <summary>
/// Get/Set the name of the context of the extension to connect to.
/// Get/Set the name of the context of the extension to connect to.<br/>
/// If you set the context you also have to set the exten and priority properties.
/// </summary>
public string Context
@ -74,7 +78,7 @@ namespace AsterNET.Manager
#region Exten
/// <summary>
/// Get/Set the extension to connect to.
/// Get/Set the extension to connect to.<br/>
/// If you set the extension you also have to set the context and priority properties.
/// </summary>
public string Exten
@ -88,8 +92,8 @@ namespace AsterNET.Manager
#region Priority
/// <summary>
/// Get/Set the priority of the extension to connect to. If you set the priority
/// you also have to set the context and exten properties.
/// Get/Set the priority of the extension to connect to.<br/>
/// If you set the priority you also have to set the context and exten properties.
/// </summary>
public int Priority
{
@ -129,8 +133,7 @@ namespace AsterNET.Manager
/// <summary>
/// Get/Set the timeout for the origination (in seconds) for the origination.<br />
/// The channel must be answered within this time, otherwise the origination
/// is considered to have failed and an OriginateFailureEvent is generated.<br />
/// The channel must be answered within this time, otherwise the origination is considered to have failed and an OriginateFailureEvent is generated.<br />
/// If not set, a default value of 30 seconds.
/// </summary>
public long Timeout

View file

@ -6,7 +6,7 @@ using AsterNET.Manager.Response;
namespace AsterNET.Manager
{
/// <summary>
/// A combinded event and response handler that adds received events and the response to a ResponseEvents object.
/// A combined event and response handler that adds received events and the response to a ResponseEvents object.
/// </summary>
public class ResponseEventHandler : IResponseHandler
{
@ -17,11 +17,11 @@ namespace AsterNET.Manager
private int hash;
/// <summary>
/// Creates a new instance.
/// Creates a new instance<see cref="ResponseEventHandler"/>.
/// </summary>
/// <param name="events">the ResponseEvents to store the events in</param>
/// <param name="actionCompleteEventClass">the type of event that indicates that all events have been received</param>
/// <param name="thread">the thread to interrupt when the actionCompleteEventClass has been received</param>
/// <param name="connection"><see cref="ManagerConnection"/></param>
/// <param name="action"><see cref="ManagerActionEvent"/></param>
/// <param name="autoEvent"><see cref="AutoResetEvent"/></param>
public ResponseEventHandler(ManagerConnection connection, ManagerActionEvent action, AutoResetEvent autoEvent)
{
this.connection = connection;
@ -30,22 +30,34 @@ namespace AsterNET.Manager
this.autoEvent = autoEvent;
}
/// <summary>
/// Gets the response events.
/// </summary>
public ResponseEvents ResponseEvents
{
get { return events; }
}
/// <summary>
/// Gets the action.
/// </summary>
public ManagerAction Action
{
get { return action; }
}
/// <summary>
/// Gets or sets the hash.
/// </summary>
public int Hash
{
get { return hash; }
set { hash = value; }
}
/// <summary>
/// Frees this instance.
/// </summary>
public void Free()
{
connection = null;
@ -56,6 +68,10 @@ namespace AsterNET.Manager
events = null;
}
/// <summary>
/// This method is called when a response is received.
/// </summary>
/// <param name="response"><see cref="ManagerResponse"/></param>
public void HandleResponse(ManagerResponse response)
{
events.Response = response;
@ -66,6 +82,10 @@ namespace AsterNET.Manager
autoEvent.Set();
}
/// <summary>
/// Handles the event.
/// </summary>
/// <param name="e"><see cref="ManagerEvent"/></param>
public void HandleEvent(ManagerEvent e)
{
// should always be a ResponseEvent, anyway...

View file

@ -12,29 +12,37 @@ namespace AsterNET.Manager
{
private readonly List<ResponseEvent> events;
/// <summary> Creates a new instance.</summary>
/// <summary>
/// Creates a new <see cref="ResponseEvents"/>.
/// </summary>
public ResponseEvents()
{
events = new List<ResponseEvent>();
Complete = false;
}
/// <summary>
/// Gets or sets the response.
/// </summary>
public ManagerResponse Response { get; set; }
/// <summary>
/// Gets the list of events.
/// </summary>
public List<ResponseEvent> Events
{
get { return events; }
}
/// <summary>
/// Indicats if all events have been received.
/// Indicates if all events have been received.
/// </summary>
public bool Complete { get; set; }
/// <summary>
/// Adds a ResponseEvent that has been received.
/// </summary>
/// <param name="e">the ResponseEvent that has been received.</param>
/// <param name="e"><see cref="ResponseEvent"/></param>
public void AddEvent(ResponseEvent e)
{
lock (((IList) events).SyncRoot)

View file

@ -15,10 +15,10 @@ namespace AsterNET.Manager
private ManagerResponse response;
/// <summary>
/// Creates a new instance.
/// Creates a new <see cref="ResponseHandler"/>.
/// </summary>
/// <param name="result">the result to store the response in</param>
/// <param name="thread">the thread to interrupt when the response has been received</param>
/// <param name="action"><see cref="ManagerAction"/></param>
/// <param name="autoEvent"><see cref="AutoResetEvent"/></param>
public ResponseHandler(ManagerAction action, AutoResetEvent autoEvent)
{
response = null;
@ -26,22 +26,34 @@ namespace AsterNET.Manager
this.autoEvent = autoEvent;
}
/// <summary>
/// Gets the response.
/// </summary>
public ManagerResponse Response
{
get { return this.response; }
}
/// <summary>
/// Gets the action.
/// </summary>
public ManagerAction Action
{
get { return this.action; }
}
/// <summary>
/// Gets or sets the hash.
/// </summary>
public int Hash
{
get { return hash; }
set { hash = value; }
}
/// <summary>
/// Frees this instance.
/// </summary>
public void Free()
{
autoEvent = null;
@ -49,6 +61,10 @@ namespace AsterNET.Manager
response = null;
}
/// <summary>
/// This method is called when a response is received.
/// </summary>
/// <param name="response">the response received</param>
public virtual void HandleResponse(ManagerResponse response)
{
this.response = response;

View file

@ -0,0 +1,30 @@
using System.Threading.Tasks;
using AsterNET.Manager.Action;
namespace AsterNET.Manager.Response
{
/// <summary>
///
/// </summary>
public class TaskResponseHandler : IResponseHandler
{
public TaskResponseHandler(ManagerAction action)
{
TaskCompletionSource = new TaskCompletionSource<ManagerResponse>(TaskCreationOptions.RunContinuationsAsynchronously);
Action = action;
}
public TaskCompletionSource<ManagerResponse> TaskCompletionSource { get; }
public ManagerAction Action { get; }
public int Hash { get; set; }
public void HandleResponse(ManagerResponse response)
{
TaskCompletionSource.TrySetResult(response);
}
public void Free() { }
}
}

View file

@ -7,7 +7,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>186124f7-82fa-4562-8b87-33d53a84e8ba</ProjectGuid>
<SHFBSchemaVersion>1.9.9.0</SHFBSchemaVersion>
<SHFBSchemaVersion>2017.9.26.0</SHFBSchemaVersion>
<!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual Studio adds them anyway -->
<AssemblyName>Documentation</AssemblyName>
<RootNamespace>Documentation</RootNamespace>
@ -49,16 +49,17 @@
<ContentPlacement>AboveNamespaces</ContentPlacement>
<NamespaceSummaries>
<NamespaceSummaryItem name="(global)" isDocumented="False" xmlns="" />
<NamespaceSummaryItem name="AsterNET" isDocumented="True" xmlns="">AsterNet</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.FastAGI" isDocumented="True" xmlns="">AsterNet FastAGI</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.FastAGI.Command" isDocumented="True" xmlns="">AsterNet FastAGI Command</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.FastAGI.MappingStrategies" isDocumented="True" xmlns="">AsterNet FastAGI Mapping Strategies</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.IO" isDocumented="True" xmlns="">AsterNet IO</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Manager" isDocumented="True" xmlns="">AsterNet Manager</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Manager.Action" isDocumented="True" xmlns="">AsterNet Manager Action</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Manager.Event" isDocumented="True" xmlns="">AsterNet Manager Event</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Manager.Response" isDocumented="True" xmlns="">AsterNet Manager Response</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Util" isDocumented="True" xmlns="">AsterNet Util</NamespaceSummaryItem></NamespaceSummaries>
<NamespaceSummaryItem name="AsterNET" isDocumented="True" xmlns="">AsterNet</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.FastAGI" isDocumented="True" xmlns="">AsterNet FastAGI</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.FastAGI.Command" isDocumented="True" xmlns="">AsterNet FastAGI Command</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.FastAGI.MappingStrategies" isDocumented="True" xmlns="">AsterNet FastAGI Mapping Strategies</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.IO" isDocumented="True" xmlns="">AsterNet IO</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Manager" isDocumented="True" xmlns="">AsterNet Manager</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Manager.Action" isDocumented="True" xmlns="">AsterNet Manager Action</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Manager.Event" isDocumented="True" xmlns="">AsterNet Manager Event</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Manager.Response" isDocumented="True" xmlns="">AsterNet Manager Response</NamespaceSummaryItem>
<NamespaceSummaryItem name="AsterNET.Util" isDocumented="True" xmlns="">AsterNet Util</NamespaceSummaryItem>
</NamespaceSummaries>
<ProjectSummary>
AsterNET is an open source .NET framework for Asterisk AMI and FastAGI. AsterNET allows you to talk to Asterisk AMI from any .NET application and create FastAGI applications in any .NET language. http://www.xdev.net/projects/asternet/ </ProjectSummary>
</PropertyGroup>

View file

@ -7,21 +7,27 @@ AsterNET is an open source framework for Asterisk AMI and FastAGI. AsterNET allo
AsterNET is made up of two key components, FastAGI and Manager Interface. Each allows you to interact with Asterisk in different ways. FastAGI allows you to control the flow of a call from another machine (a dedicated AGI server for example) and Manager Interface allows you to obtain state information and interact with Asterisk.
## AsterNET on IRC
Join in the conversation on Freenode, #asternet
Join in the conversation on Freenode, [#asternet](https://webchat.freenode.net/?channels=asternet)
## How to Get AsterNET
You can now get AsterNET via nuget by doing
- Download a release: https://github.com/AsterNET/AsterNET/releases
- Download the latest source code from GitHub project
- Download via NuGet:
> PM> Install-Package AsterNET
or by visiting: https://www.nuget.org/packages/AsterNET/
## Documentation
[http://asternet.github.io/AsterNET](http://asternet.github.io/AsterNET/html/79b6241e-05a3-441c-b6a1-51f2b5b7f265.htm)
- [AsterNET Documentation](http://asternet.github.io/AsterNET)
- [Official Asterisk Documentation](https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Documentation)
## History
AsterNET is a fork of Asterisk.NET. Now we've reached release status and AsterNET version 1.0.0 we feel this is a good separation point from the original project.
*Special Thanks*
## Special Thanks
http://www.zapappi.com and http://www.jetbrains.com/resharper/
We'd like to thank JetBrains for our community licenses of ReShaper. A very useful tool that's helping us to refactor the code and improve general development much quicker. If you'd like to try it yourself, visit http://www.jetbrains.com