invariant is not true error
ismira opened this issue · comments
` var cfg = Configure.Pjsip4Net().FromConfig();
userAccount = cfg.Build().Start();
userAccount.ImManager.NatDetected += OnNatDetected;
userAccount.CallManager.CallRedirected += CallRedirected;
userAccount.CallManager.IncomingDtmfDigit += IncomingDtmfDigit;
userAccount.CallManager.IncomingCall += CallManager_IncomingCall;
userAccount.CallManager.Ring += CallManager_Ring;
userAccount.CallManager.CallStateChanged += CallManager_CallStateChanged;
userAccount.AccountManager.AccountStateChanged += AccountManager_AccountStateChanged;
IAccount account = userAccount.AccountManager.Register(x => x.WithExtension("0002").WithPassword("123456789Aa").Through("5060").At("192.168.1.16").Register());
while (!account.IsRegistered)
Thread.Sleep(5000);
userAccount.CallManager.MakeCall(x => x.At("192.168.1.16").From(userAccount.AccountManager.GetAccountById(userAccount.AccountManager.Accounts[0].Id)).RecordTo(@"C:\Users\user\source\repos\softConsole\softConsole\ss").Through("5060").To("0001").Call());
Console.ReadLine();`
hi ,
userAccount.CallManager.MakeCall error invariant not true ?
Hi,
You have to use SIP URI instend of just a destination number.
I using this:
// string desinationUri = "sip:0502147096@192.168.10.9:5160";
userAccount.CallManager.MakeCall(account, destinationUri);