linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Implemented Logout but app crashed on calling


From: Eli Burke
Subject: Re: [Linphone-developers] Implemented Logout but app crashed on calling with other user name
Date: Fri, 1 Aug 2014 11:19:57 -0400

If you are switching between user accounts, there is a much less destructive way to log in and out. The Linphone core keeps linked lists of proxy information and auth information. Search linphonecore.h for linphone_core_create_proxy_config and linphone_core_create_auth_info for the full API. 

To log in to an account, create and add auth info and proxy config, and it will automatically start registration:
linphone_core_add_auth_info(lc, _authInfo);
linphone_core_add_proxy_config(lc, _proxyCfg);

When you want to log out, simply remove the proxy config and the auth info:
linphone_core_remove_proxy_config(lc, _proxyCfg);
linphone_core_remove_auth_info(lc, _authInfo);

(as you can see, I have my accounts encapsulated in an Objective C class and do not use the LinphoneCoreSettingsStore)

Pro-tip: Linphone supports multiple simultaneous registrations. When making an outgoing call linphone_core_set_default_proxy determines which registration is used. You may experience issues if you use linphone to persist your accounts; the linphonerc setting "store_auth_info=0" turns off the one, and a small patch to coreapi/proxy.c linphone_proxy_config_write_to_config_file() to add a corresponding “store_proxy_info” flag will take care of the problem. Or you could call linphone_core_clear_proxy_config and linphone_core_clear_all_auth_info when you launch your app each time. 

-Eli

On Aug 1, 2014, at 4:04 AM, address@hidden wrote:

Date: Fri, 01 Aug 2014 15:26:58 +0800
From: Vicky Dhas <address@hidden>
To: "address@hidden" <address@hidden>
Subject: [Linphone-developers] [Linphone] Implemented Logout but app
crashed on calling with other user name
Message-ID: <D0016242.20A67%address@hidden>
Content-Type: text/plain; charset="iso-8859-1"

Hello Experts,

I am facing one issue, I have mentioned the  steps so the issue is
understood and helped to fix.

1. I login using One username and password
2. Call --> All Ok
3. Logout --> This is not there in SIP so have implemted following code to
reset linphone as below
   [self destroyLibLinphone];

   [self createLinphoneCore];



   // reset network state to trigger a new network connectivity assessment

   linphone_core_set_network_reachable(theLinphoneCore, FALSE);


1. Call again login with another user
1. Till the SIP address passed to the function (- (void)call:(NSString
*)address displayName:(NSString*)displayName transfer:(BOOL)transfer {
2. ) all is okay but the app gives me EXCESS ? BAD ACCESS at line
(linphone_call_set_user_pointer(call, data);
3. )
2. If restart the application It works fine with second user logged in.
3. I assume that some where I am not resetting the linphone settings back to
the way as Application starts.

Please help me to get hold of this issue as to how I can reset all settings
same as the application starts.

Thanks,

Regards,
Vicky Dhas


Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


reply via email to

[Prev in Thread] Current Thread [Next in Thread]