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); }
public virtual bool ValidatePin(DtmfItem dtmfItem) { throw new EventHandlersNotImplementedException(nameof(ValidatePin)); }
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) { }
public override bool ValidatePin(DtmfItem dtmfItem) { //Girilen Pin'i Kontrol Edilecek Kısım return(false); }
public OnValidatePinAfterArgs(DtmfItem _dtmfItem, string _cause) : base(_dtmfItem) { cause = _cause; }
public OnAuthenticatedEventArgs(DtmfItem _dtmfItem, string _cause) : base(_dtmfItem) { cause = _cause; }