ladendirekt / pjsip4net

A wrapper library exposing the pjsip library to the .NET world in a OO-friendly way.
71 stars 42 forks source link

Latest version problems #87

Closed bkraut closed 6 years ago

bkraut commented 6 years ago

Hi,

when I upgrade to the latest version 0.2.2. I get runtime errors when I run the app.

2018/04/06 16:24:33:160 [DEBUG] root - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
   at pjsip4net.IM.DefaultImManager..ctor(IRegistry localRegistry, IIMApiProvider imApi, ICallApiProvider callApi, IEventsProvider eventsProvider) in c:\Users\alexm\Documents\GitHub\pjsip4net\pjsip4net\IM\DefaultImManager.cs:line 35
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at pjsip4net.Core.Container.SimpleContainer.RegisterAsSingleton[T,T1]() in c:\Users\alexm\Documents\GitHub\pjsip4net\pjsip4net.Core\Container\SimpleContainer.cs:line 46
   at pjsip4net.Core.Container.SimpleContainer.RegisterAsSingleton[T,T1,T2]() in c:\Users\alexm\Documents\GitHub\pjsip4net\pjsip4net.Core\Container\SimpleContainer.cs:line 53
   at pjsip4net.Configuration.DefaultComponentConfigurator.Configure(IContainer container) in c:\Users\alexm\Documents\GitHub\pjsip4net\pjsip4net\Configuration\DefaultComponentConfigurator.cs:line 20
   at pjsip4net.Core.Configuration.Configure.<RunConfigurators>b__2(IConfigureComponents c) in c:\Users\alexm\Documents\GitHub\pjsip4net\pjsip4net.Core\Configuration\Configure.cs:line 121
   at pjsip4net.Core.Utils.Extensions.Each[T](IEnumerable`1 collection, Action`1 act) in c:\Users\alexm\Documents\GitHub\pjsip4net\pjsip4net.Core\Utils\Extensions.cs:line 13
   at pjsip4net.Core.Configuration.Configure.RunConfigurators() in c:\Users\alexm\Documents\GitHub\pjsip4net\pjsip4net.Core\Configuration\Configure.cs:line 121
   at pjsip4net.Configuration.BuildUserAgent.Build(Configure cfg) in c:\Users\alexm\Documents\GitHub\pjsip4net\pjsip4net\Configuration\BuildUserAgent.cs:line 38
   at CCAdmin.Core.Views.CallCenterWindow..ctor(CallAgent callAgent) in C:\repositories\vsnet\agencija-iq\cc-sip-client\CCAdmin\Core\Views\CallCenterWindow.xaml.cs:line 54
   at CCAdmin.Core.Views.LoginWindow.checkLogin() in C:\repositories\vsnet\agencija-iq\cc-sip-client\CCAdmin\Core\Views\LoginWindow.xaml.cs:line 63
The program '[16272] CCAdmin.exe' has exited with code -1 (0xffffffff).

This is how I run the lib:

XmlConfigurator.Configure();
            var cfg = Configure.Pjsip4Net() //dynamically discovers interop assembly and loads API providers unless concrete version loader specified
                .FromConfig();//read configuration from .config file 
            var bla = cfg.Build();
            ua = bla.Start();//build and start

Is there some known problems with this version? Best, Bojan

siniypin commented 6 years ago

Looks like it didn't find any pjsip.Interop dll. Make sure you copy it to the build directory.

bkraut commented 6 years ago

Hi,

It seems that this is not a problem as I see the dll in the bin - both Debug and Release folder.

Best,

 Bojan

On 6. 04. 2018 21:33, Robert wrote:

Looks like it didn't find any pjsip.Interop dll. Make sure you copy it to the build directory.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/siniypin/pjsip4net/issues/87#issuecomment-379354923, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-v1bG5PIodio9lmzdaXOv3gq48-2Eqks5tl8MCgaJpZM4TKJ_1.

-- msc. Bojan Kraut, CEO telephone: +386 2 33 242 00 mobile: +386 31 302 782 email: bojan.kraut@alcyone.si

Alcyone d.o.o. Tržaška cesta 53, 2000 Maribor, Slovenia, Europe email: info@alcyone.si web: http://www.alcyone.si skype: alcyone.si

OPOZORILO: Elektronska pošta lahko vsebuje informacije zaupne narave, namenjene samo naslovniku. Če je bilo zaradi napake v naslovu ali pri prenosu sporočilo poslano drugam, prosimo, da o tem obvestite avtorja elektronskega sporocila. Če sporočilo ni bilo namenjeno vam, informacij v sporočŤilu ne smete uporabljati, razkriti, širiti, kopirati, natisniti ali kakorkoli uporabiti. DISCLAIMER: This e-mail contains proprietary information some or all of which may be legally privileged. It is for the intended recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on on this e-mail.

siniypin commented 6 years ago

Well, it definitely is a problem as no API integration dlls get loaded. Are you running it in a x86 mode and is pjsua.dll copied to the same folder?

bkraut commented 6 years ago

Hi,

this is it:

<?xml version="1.0" encoding="utf-8"?>

     
   
         
       
         
                 
                                                                                                                      192.168.1.85     192.168.1.85                                                                                                                                                                                                                                                                                                                                                                                                                                                             MetropolisDark                                                                                                                                    

Best,

 Bojan

On 6. 04. 2018 21:32, Robert wrote:

Kindly post your config file here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/siniypin/pjsip4net/issues/87#issuecomment-379354623, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-v1Vzwm_EID8_TeLxvVxKsLVDwWKfhks5tl8KxgaJpZM4TKJ_1.

-- msc. Bojan Kraut, CEO telephone: +386 2 33 242 00 mobile: +386 31 302 782 email: bojan.kraut@alcyone.si

Alcyone d.o.o. Tržaška cesta 53, 2000 Maribor, Slovenia, Europe email: info@alcyone.si web: http://www.alcyone.si skype: alcyone.si

OPOZORILO: Elektronska pošta lahko vsebuje informacije zaupne narave, namenjene samo naslovniku. Če je bilo zaradi napake v naslovu ali pri prenosu sporočilo poslano drugam, prosimo, da o tem obvestite avtorja elektronskega sporocila. Če sporočilo ni bilo namenjeno vam, informacij v sporočŤilu ne smete uporabljati, razkriti, širiti, kopirati, natisniti ali kakorkoli uporabiti. DISCLAIMER: This e-mail contains proprietary information some or all of which may be legally privileged. It is for the intended recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on on this e-mail.

siniypin commented 6 years ago

Can you list pjsip related dlls in your bin folder? Are all three (pjsip, .Interop, pjsua) present?

siniypin commented 6 years ago

See https://github.com/siniypin/pjsip4net/issues/88#issuecomment-397840338

siniypin commented 6 years ago

Sorry, you've spotted this problem a few months ago, but I didn't realize a mess until today. Cheers!

siniypin commented 6 years ago

Removed packages v 0.2.x from NuGet.