示例#1
0
 void getInfoDigits()
 {
     InfoDigits = 0;
     if (AccessNumber.Length == 12)
     {
         var _infoDigitsStr = AccessNumber.Substring(10, 2);
         InfoDigits = byte.Parse(_infoDigitsStr);
     }
 }
示例#2
0
        public Session(ISessionChannel pSessionChannel)
        {
            //State = SessionState.Leg1;

            Channel       = pSessionChannel;
            CallId        = pSessionChannel.CallId;
            OrigIPAddress = pSessionChannel.OrigIPAddress;

            parseAccessNumber(pSessionChannel.AccessNumber);

            getInfoDigits();
            if (InfoDigits > 0)
            {
                AccessNumber = AccessNumber.Substring(0, 10);
            }

            ANI = pSessionChannel.ANI;
            Id  = Guid.NewGuid().ToString("N");
        }