Example #1
0
        private void AriClient_OnStasisStartEvent(IAriClient sender, StasisStartEvent e)
        {
            sender.Channels.Answer(e.Channel.Id);
            numbers.Add(e.Channel.Caller.Number, e.Channel.Id);
            ssso.OnValidateNumberBefore?.Invoke(new OnValidateNumberBeforeArgs(e.Channel));
            bool callerIdValidated = ssso.ValidateNumber(sender, e.Channel);

            ssso.OnValidateNumberAfter?.Invoke(new OnValidateNumberAfterArgs(e.Channel, callerIdValidated ? Constants.CallerIdValidated : Constants.CallerIdValidationError));
            if (!callerIdValidated)
            {
                ssso.OnAuthenticationFailed(new OnAuthenticationFailedArgs(e.Channel, Constants.CallerIdValidationError));
                Hangup(e.Channel);
                return;
            }

            DtmfItem dtmfItem = new DtmfItem(e.Channel, ssso.MaxWaitingTime.Value);

            dtmfs.Add(e.Channel.Id, dtmfItem);
        }
Example #2
0
 public virtual bool ValidatePin(DtmfItem dtmfItem)
 {
     throw new EventHandlersNotImplementedException(nameof(ValidatePin));
 }
Example #3
0
 public EventArgs(DtmfItem _dtmfItem)
 {
     this.dtmfItem = _dtmfItem;
 }
 public OnAuthenticatedAfterArgs(DtmfItem _dtmfItem)
     : base(_dtmfItem)
 {
 }
 public OnValidatePinBeforeArgs(DtmfItem _dtmfItem)
     : base(_dtmfItem)
 {
 }
 public OnAuthenticatedBeforeArgs(DtmfItem _dtmfItem)
     : base(_dtmfItem)
 {
 }
Example #7
0
 public override bool ValidatePin(DtmfItem dtmfItem)
 {
     //Girilen Pin'i Kontrol Edilecek Kısım
     return(false);
 }
Example #8
0
 public OnValidatePinAfterArgs(DtmfItem _dtmfItem, string _cause)
     : base(_dtmfItem)
 {
     cause = _cause;
 }
 public OnAuthenticatedEventArgs(DtmfItem _dtmfItem, string _cause)
     : base(_dtmfItem)
 {
     cause = _cause;
 }