Added DBDel, DBDelTree, checklist for MS1, enum support for 1.8

This commit is contained in:
skrusty_cp 2013-04-03 08:54:33 -07:00
parent e930f0bb31
commit 07a2548381
9 changed files with 345 additions and 8 deletions

View file

@ -127,6 +127,8 @@
<Compile Include="Manager\Action\ChallengeAction.cs" /> <Compile Include="Manager\Action\ChallengeAction.cs" />
<Compile Include="Manager\Action\ChangeMonitorAction.cs" /> <Compile Include="Manager\Action\ChangeMonitorAction.cs" />
<Compile Include="Manager\Action\CommandAction.cs" /> <Compile Include="Manager\Action\CommandAction.cs" />
<Compile Include="Manager\Action\DBDelAction.cs" />
<Compile Include="Manager\Action\DBDelTreeAction.cs" />
<Compile Include="Manager\Action\DBGetAction.cs" /> <Compile Include="Manager\Action\DBGetAction.cs" />
<Compile Include="Manager\Action\DBPutAction.cs" /> <Compile Include="Manager\Action\DBPutAction.cs" />
<Compile Include="Manager\Action\EventsAction.cs" /> <Compile Include="Manager\Action\EventsAction.cs" />
@ -134,6 +136,7 @@
<Compile Include="Manager\Action\GetConfigAction.cs" /> <Compile Include="Manager\Action\GetConfigAction.cs" />
<Compile Include="Manager\Action\GetVarAction.cs" /> <Compile Include="Manager\Action\GetVarAction.cs" />
<Compile Include="Manager\Action\HangupAction.cs" /> <Compile Include="Manager\Action\HangupAction.cs" />
<Compile Include="Manager\Action\ListCommandsAction.cs" />
<Compile Include="Manager\Action\ManagerActionEvent.cs"> <Compile Include="Manager\Action\ManagerActionEvent.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
@ -309,6 +312,10 @@
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </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>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -0,0 +1,54 @@
using System;
namespace Asterisk.NET.Manager.Action
{
/// <summary>
///
/// </summary>
public class DBDelAction : ManagerAction
{
private string family;
private string key;
public override string Action
{
get { return "DBDel"; }
}
/// <summary>
/// Get/Set the the Family of the entry to delete.
/// </summary>
public string Family
{
get { return family; }
set { this.family = value; }
}
/// <summary>
/// Get/Set the the key of the entry to delete.
/// </summary>
public string Key
{
get { return key; }
set { this.key = value; }
}
/// <summary>
/// Creates a new empty DBDelAction.
/// </summary>
public DBDelAction()
{
}
/// <summary>
/// Creates a new DBDelAction that deletes the value of the database entry
/// with the given key in the given family.
/// </summary>
/// <param name="family">the family of the key</param>
/// <param name="key">the key of the entry to retrieve</param>
public DBDelAction(string family, string key)
{
this.family = family;
this.key = key;
}
}
}

View file

@ -0,0 +1,54 @@
using System;
namespace Asterisk.NET.Manager.Action
{
/// <summary>
///
/// </summary>
public class DBDelTreeAction : ManagerAction
{
private string family;
private string key;
public override string Action
{
get { return "DBDelTree"; }
}
/// <summary>
/// Get/Set the the Family of the entry to delete.
/// </summary>
public string Family
{
get { return family; }
set { this.family = value; }
}
/// <summary>
/// Get/Set the the key of the entry to delete.
/// </summary>
public string Key
{
get { return key; }
set { this.key = value; }
}
/// <summary>
/// Creates a new empty DBDelTreeAction.
/// </summary>
public DBDelTreeAction()
{
}
/// <summary>
/// Creates a new DBDelTreeAction that deletes the database true
/// with the given key in the given family.
/// </summary>
/// <param name="family">the family of the key</param>
/// <param name="key">the key of the entry to retrieve</param>
public DBDelTreeAction(string family, string key)
{
this.family = family;
this.key = key;
}
}
}

View file

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Asterisk.NET.Manager.Action
{
class ListCommandsAction
{
}
}

View file

@ -7,6 +7,10 @@ namespace Asterisk.NET.Manager
ASTERISK_1_0 = 10, ASTERISK_1_0 = 10,
ASTERISK_1_2 = 12, ASTERISK_1_2 = 12,
ASTERISK_1_4 = 14, ASTERISK_1_4 = 14,
ASTERISK_1_6 = 16 ASTERISK_1_6 = 16,
ASTERISK_1_8 = 18,
ASTERISK_10 = 100,
ASTERISK_11 = 110,
ASTERISK_12 = 120
} }
} }

View file

@ -0,0 +1,103 @@
 Action Privilege Synopsis
------ --------- --------
[ ] WaitEvent <none> Wait for an event to occur
--Queue Actions
[ ] QueueReset <none> Reset queue statistics
[ ] QueueReload <none> Reload a queue, queues, or any sub-section of a queue o
[ ] QueueRule <none> Queue Rules
[ ] QueuePenalty agent,all Set the penalty for a queue member
[ ] QueueLog agent,all Adds custom entry in queue_log
[x] QueuePause agent,all Makes a queue member temporarily unavailable
[x] QueueRemove agent,all Remove interface from queue.
[x] QueueAdd agent,all Add interface to queue.
[ ] QueueSummary <none> Queue Summary
[x] QueueStatus <none> Queue Status
[ ] Queues <none> Queues
-- Agent Actions
[x] AgentLogoff agent,all Sets an agent as no longer logged in
[x] Agents agent,all Lists agents and their status
-- SKINNY Actions
[ ] SKINNYshowline system,reportin Show SKINNY line (text format)
[ ] SKINNYlines system,reportin List SKINNY lines (text format)
[ ] SKINNYshowdevic system,reportin Show SKINNY device (text format)
[ ] SKINNYdevices system,reportin List SKINNY devices (text format)
-- Voicemail Actions
[ ] VoicemailUsersL call,reporting, List All Voicemail User Information
[x] MailboxCount call,reporting, Check Mailbox Message Count
[x] MailboxStatus call,reporting, Check Mailbox
-- SIP Actions
[ ] SIPnotify system,all Send a SIP notify
[ ] SIPshowregistry system,reportin Show SIP registrations (text format)
[ ] SIPqualifypeer system,reportin Show SIP peer (text format)
[x] SIPshowpeer system,reportin Show SIP peer (text format)
[x] SIPpeers system,reportin List SIP peers (text format)
-- IAX Actions
[ ] IAXregistry system,reportin Show IAX registrations
[ ] IAXnetstats system,reportin Show IAX Netstats
[ ] IAXpeerlist system,reportin List IAX Peers
[ ] IAXpeers system,reportin List IAX Peers
-- Call Actions
[ ] PlayDTMF call,all Play DTMF signal on a specific channel.
[ ] Bridge call,all Bridge two channels already in the PBX
[ ] Park call,all Park a channel
[x] ParkedCalls <none> List parked calls
[x] Getvar call,reporting, Gets a Channel Variable
[x] Setvar call,all Set Channel Variable
[x] Originate originate,all Originate Call
[ ] Atxfer call,all Attended transfer
[ ] Redirect call,all Redirect (transfer) a call
[x] Hangup system,call,all Hangup Channel
[ ] SendText call,all Send text message to channel
-- Monitor Actions
[ ] UnpauseMonitor call,all Unpause monitoring of a channel
[ ] PauseMonitor call,all Pause monitoring of a channel
[x] ChangeMonitor call,all Change monitoring filename of a channel
[x] StopMonitor call,all Stop monitoring a channel
[x] Monitor call,all Monitor a channel
-- AGI Actions
[ ] AGI agi,all Add an AGI command to execute by Async AGI
-- AstDB Actions
[x] DBDelTree system,all Delete DB Tree
[x] DBDel system,all Delete DB Entry
[x] DBPut system,all Put DB Entry
[x] DBGet system,reportin Get DB Entry
-- System Actions
[ ] ShowDialPlan config,reportin List dialplan
[ ] ModuleCheck system,all Check if module is loaded
[ ] ModuleLoad system,all Module management
[ ] CoreShowChannel system,reportin List currently active channels
[ ] Reload system,config,a Send a reload event
[ ] CoreStatus system,reportin Show PBX core status variables
[ ] CoreSettings system,reportin Show PBX core settings (version etc)
[x] UpdateConfig config,all Update basic configuration
[ ] CreateConfig config,all Creates an empty file in the configuration directory
[ ] GetConfigJSON system,config,a Retrieve configuration (JSON format)
[x] GetConfig system,config,a Retrieve configuration
[ ] ListCategories config,all List categories in configuration file
[ ] ListCommands <none> List available manager commands
[x] Command command,all Execute Asterisk CLI Command
[x] AbsoluteTimeout system,call,all Set Absolute Timeout
[x] ExtensionState call,reporting, Check Extension Status
[x] Status system,call,rep Lists channel status
-- Custom Event Actions
[ ] UserEvent user,all Send an arbitrary event
-- Manager Actions
[x] Ping <none> Keepalive command
[x] Challenge <none> Generate Challenge for MD5 Auth
[x] Login <none> Login Manager
[x] Logoff <none> Logoff Manager
[x] Events <none> Control Event Flow

View file

@ -0,0 +1,91 @@
./apps/app_dial.c:686:Event: Begin
./apps/app_dial.c:702:Event: End
./apps/app_meetme.c:4517:Event: MeetmeList
./apps/app_meetme.c:4548:Event: MeetmeListComplete
./apps/app_queue.c:6354:Event: QueueSummary
./apps/app_queue.c:6371:Event: QueueSummaryComplete
./apps/app_queue.c:6406:Event: QueueParams
./apps/app_queue.c:6426:Event: QueueMember
./apps/app_queue.c:6447:Event: QueueEntry
./apps/app_queue.c:6469:Event: QueueStatusComplete
./apps/app_userevent.c:49:Event: UserEvent
./apps/app_userevent.c:50:Event:
./apps/app_userevent.c:88:Event:
./apps/app_voicemail.c:10741:Event: VoicemailUserEntry
./apps/app_voicemail.c:10804:Event: VoicemailUserEntryComplete
./channels/chan_agent.c:1644:Event: Agents
./channels/chan_agent.c:1658:Event: AgentsComplete
./channels/chan_dahdi.c:13522:Event:
./channels/chan_dahdi.c:14614:Event:
./channels/chan_dahdi.c:16446:Event: DAHDIShowChannels
./channels/chan_dahdi.c:16469:Event: DAHDIShowChannels
./channels/chan_dahdi.c:16491:Event: DAHDIShowChannelsComplete
./channels/chan_iax2.c:6455:Event: PeerEntry
./channels/chan_iax2.c:6733:Event: PeerEntry
./channels/chan_iax2.c:6753:Event: PeerlistComplete
./channels/chan_iax2.c:6846:Event: RegistryEntry
./channels/chan_iax2.c:6862:Event: RegistrationsComplete
./channels/chan_sip.c:15242:Event: RegistryEntry
./channels/chan_sip.c:15257:Event: RegistrationsComplete
./channels/chan_sip.c:15290:Event: PeerlistComplete
./channels/chan_sip.c:15453:Event: PeerEntry
./channels/chan_sip.c:19723:Event:
./channels/chan_sip.c:21996:Event: header
./channels/chan_skinny.c:2994:Event: DeviceEntry
./channels/chan_skinny.c:3044:Event: DevicelistComplete
./channels/chan_skinny.c:3258:Event: LineEntry
./channels/chan_skinny.c:3305:Event: LinelistComplete
./channels/chan_skinny.c:5705:Event:
./channels/chan_skinny.c:5714:Event: None
./channels/chan_skinny.c:5718:Event: Redial
./channels/chan_skinny.c:5762:Event: New
./channels/chan_skinny.c:5801:Event: Hold
./channels/chan_skinny.c:5806:Event: Transfer
./channels/chan_skinny.c:5815:Event: DND
./channels/chan_skinny.c:5832:Event: Forward
./channels/chan_skinny.c:5850:Event: Forward
./channels/chan_skinny.c:5868:Event: Forward
./channels/chan_skinny.c:5888:Event: Backspace
./channels/chan_skinny.c:5892:Event: End
./channels/chan_skinny.c:5945:Event: Resume
./channels/chan_skinny.c:5960:Event: Answer
./channels/chan_skinny.c:5982:Event: Info
./channels/chan_skinny.c:5986:Event: Conference
./channels/chan_skinny.c:5995:Event: Park
./channels/chan_skinny.c:6016:Event: Join
./channels/chan_skinny.c:6021:Event: Meetme
./channels/chan_skinny.c:6025:Event: Pickup
./channels/chan_skinny.c:6029:Event: Group
./channels/chan_skinny.c:6033:Event:
./main/db.c:605:Event: DBGetResponse
./main/event.c:1396:Event:
./main/features.c:4965:Event: ParkedCall
./main/features.c:4985:Event: ParkedCallsComplete
./main/manager.c:1719:Event: WaitEventComplete
./main/manager.c:1822:Event: FullyBooted
./main/manager.c:2059:Event: Status
./main/manager.c:2085:Event: Status
./main/manager.c:2109:Event: StatusComplete
./main/manager.c:2794:Event: EventStringToSend
./main/manager.c:2813:Event:
./main/manager.c:2956:Event: CoreShowChannel
./main/manager.c:2980:Event: CoreShowChannelsComplete
./main/manager.c:3481:Event:
./main/manager.c:4280:Event: Placeholder
./main/pbx.c:6081:Event: ListDialplan
./main/pbx.c:6105:Event: ListDialplan
./main/pbx.c:6121:Event: ListDialplan
./main/pbx.c:6131:Event: ListDialplan
./main/pbx.c:6192:Event: ShowDialPlanComplete
./main/rtp.c:1033:Event:
./main/rtp.c:1048:Event:
./res/res_agi.c:2790:Event: Start
./res/res_agi.c:2814:Event: End
./res/res_agi.c:2839:Event: End
./res/res_agi.c:2848:Event: End
./res/res_agi.c:693:Event: Start
./res/res_agi.c:726:Event: Exec
./res/res_agi.c:728:Event: Exec
./res/res_agi.c:762:Event: End
./utils/muted.c:628:Event:
./utils/muted.c:629:Event:

View file

@ -1335,7 +1335,6 @@ namespace Asterisk.NET.Manager
#region determineVersion() #region determineVersion()
protected internal AsteriskVersion determineVersion() protected internal AsteriskVersion determineVersion()
{ {
// First try version check to 1.4 & 1.6
Response.ManagerResponse response; Response.ManagerResponse response;
response = SendAction(new Action.CommandAction("core show version"), defaultResponseTimeout * 2); response = SendAction(new Action.CommandAction("core show version"), defaultResponseTimeout * 2);
if (response is Response.CommandResponse) if (response is Response.CommandResponse)
@ -1347,12 +1346,14 @@ namespace Asterisk.NET.Manager
if (m.Groups.Count >= 2) if (m.Groups.Count >= 2)
{ {
version = m.Groups[1].Value; version = m.Groups[1].Value;
if (version.StartsWith("1.4.")) if (version.StartsWith("1.4."))
return AsteriskVersion.ASTERISK_1_4; return AsteriskVersion.ASTERISK_1_4;
else if (version.StartsWith("1.6.") || version.StartsWith("1.8.")) else if (version.StartsWith("1.6."))
return AsteriskVersion.ASTERISK_1_6; return Manager.AsteriskVersion.ASTERISK_1_6;
else else if (version.StartsWith("1.8."))
throw new ManagerException("Unknown Asterisk version " + version); return Manager.AsteriskVersion.ASTERISK_1_8;
else
throw new ManagerException("Unknown Asterisk version " + version);
} }
} }
} }

View file

@ -1,3 +1,14 @@
03.04.2013 (skrusty)
Added direct support for Asterisk 1.8 in version Enum
Added documentation for events and actions in Asterisk 1.6.2.24 (last version in 1.6.2 branch)
Added DBDel Action
Added DBDelTree Action
15.03.2013 (skrusty)
Fixed Ping/Pong disconnection bug
Added mappings for events: BridgeEventHandler, DTMFEventHandler, TransferEventHandler, QueueCallerAbandonEventHandler
18.01.2013 (ppumkin) 18.01.2013 (ppumkin)
Re-homed project to CodePlex with TFS Support Re-homed project to CodePlex with TFS Support
Upgraded Project to .NET 4.5 Upgraded Project to .NET 4.5