How to handle UserEvent

Jun 15, 2015 at 8:06 PM
Hello.

i described two Classes
    public class UserEventAction : AsterNET.Manager.Action.ManagerAction
    {
        #region Action

        /// <summary>
        ///     Get the name of this action, i.e. "Originate".
        /// </summary>
        public override string Action
        {
            get { return "UserEvent"; }
        }

        #endregion

        #region UserEvent
        
        /// <summary>
        /// Мой эвент
        /// </summary>
        public string UserEvent { get { return "ICallBackThis"; } }

        #endregion

        public string SourceChannel { get; set; }

        public string Exten { get; set; }

        public string Destination { get; set; }

    }
and
   public class ICallBackThisEvent: AsterNET.Manager.Event.UserEvent
    {
        public ICallBackThisEvent(ManagerConnection source)
            : base(source)
        {
            UserEventName = "ICallBackThis";
        }

        public string SourceChannel { get; set; }

        public string Exten { get; set; }

        public string Destination { get; set; }

    }
and i run
asterConn = new ManagerConnection(amiHost, amiPort, amiUserName, amiPassword);

            try
            {
                asterConn.Login();
                
                asterConn.Dial += astCon_Dial;
                
                asterConn.Cdr += asterConn_Cdr;

                asterConn.RegisterUserEventClass(typeof(ICallBackThisEvent));

                asterConn.FireAllEvents = true;

                asterConn.UserEvents += asterConn_UserEvents;

                asterConn.UnhandledEvent += asterConn_UnhandledEvent;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
i send to my Asterisk action: UserEvent
                UserEventAction ue = new UserEventAction();
                ue.Destination = e.CallerId;
                ue.Exten = this.extension;
                ue.SourceChannel = e.Channel;

                asterConn.SendAction(ue);
in telnet i see
Event: UserEvent
Privilege: user,all
UserEvent: ICallBackThis
Action: UserEvent
ActionID: 41413_5#
SourceChannel: SIP/Tel-2266033-00000728
Exten: 033
Destination: "9069148833" <9069148833>
but my asterConn_UserEvents or asterConn_UnhandledEvent is not called.
why?