|
From: | Vicky Dhas |
Subject: | Re: [Linphone-developers] [Linphone] Implemented Logout but app crashed on calling with other user name |
Date: | Fri, 01 Aug 2014 16:03:57 +0800 |
User-agent: | Microsoft-MacOutlook/14.4.3.140616 |
Hi Team Experts, If I check the log and find that after continuos switching users login and then calling I get call crash in this function as highlighted line below. Also the log in the console gives this message: Ring MSTicker: We are late of 7416 miliseconds. 2014-08-01 16:01:54.758 NanoMCR[37863:90b] ms_filter_unlink: MSResample:0xcec7a70,0-->MSAQWrite:0xce41fb0,0 2014-08-01 16:01:54.762 NanoMCR[37863:4d0f] Ring MSTicker thread exiting 2014-08-01 16:01:54.763 NanoMCR[37863:90b] header_address parser error for [] - (void)call:(NSString *)address displayName:(NSString*)displayName transfer:(BOOL)transfer { if (!linphone_core_is_network_reachable(theLinphoneCore)) { UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Network Error",nil) message:NSLocalizedString(@"There is no network connection available, enable WIFI or WWAN prior to place a call",nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"Continue",nil) otherButtonTitles:nil]; [error show]; [error release]; return; }
CTCallCenter* callCenter = [[CTCallCenter alloc] init]; if ([callCenter currentCalls]!=nil) { [LinphoneLogger logc:LinphoneLoggerError format:"GSM call in progress, cancelling outgoing SIP call request"]; UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Cannot make call",nil) message:NSLocalizedString(@"Please terminate GSM call",nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"Continue",nil) otherButtonTitles:nil]; [error show]; [error release]; [callCenter release]; return; } [callCenter release];
LinphoneProxyConfig* proxyCfg; //get default proxy linphone_core_get_default_proxy(theLinphoneCore,&proxyCfg); LinphoneCallParams* lcallParams = linphone_core_create_default_call_parameters(theLinphoneCore); if([self lpConfigBoolForKey:@"edge_opt_preference"]) { bool low_bandwidth = self.network == network_2g; if(low_bandwidth) { [LinphoneLogger log:LinphoneLoggerLog format:@"Low bandwidth mode"]; } linphone_call_params_enable_low_bandwidth(lcallParams, low_bandwidth); } LinphoneCall* call=NULL;
if ([address length] == 0) return; //just return if ([address hasPrefix:@"sip:"] || [address hasPrefix:@"sips:"]) { LinphoneAddress* linphoneAddress = linphone_address_new([address cStringUsingEncoding:[NSString defaultCStringEncoding]]); if(displayName!=nil) { linphone_address_set_display_name(linphoneAddress,[displayName cStringUsingEncoding:[NSString defaultCStringEncoding]]); } if ([[LinphoneManager instance] lpConfigBoolForKey:@"override_domain_with_default_one"]) linphone_address_set_domain(linphoneAddress, [[[LinphoneManager instance] lpConfigStringForKey:@"domain" forSection:@"wizard"] cStringUsingEncoding:[NSString defaultCStringEncoding]]); if(transfer) { linphone_core_transfer_call(theLinphoneCore, linphone_core_get_current_call(theLinphoneCore), [address cStringUsingEncoding:[NSString defaultCStringEncoding]]); } else { call=linphone_core_invite_address_with_params(theLinphoneCore, linphoneAddress, lcallParams); } linphone_address_destroy(linphoneAddress); } else if (proxyCfg==nil){ UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid SIP address",nil) message:NSLocalizedString(@"Either configure a SIP proxy server from settings prior to place a call or use a valid SIP address (I.E sip:address@hidden)",nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"Continue",nil) otherButtonTitles:nil]; [error show]; [error release]; } else { char normalizedUserName[256]; LinphoneAddress* linphoneAddress = linphone_address_new(linphone_core_get_identity(theLinphoneCore)); linphone_proxy_config_normalize_number(proxyCfg,[address cStringUsingEncoding:[NSString defaultCStringEncoding]],normalizedUserName,sizeof(normalizedUserName)); linphone_address_set_username(linphoneAddress, normalizedUserName); if(displayName!=nil) { linphone_address_set_display_name(linphoneAddress, [displayName cStringUsingEncoding:[NSString defaultCStringEncoding]]); } if ([[LinphoneManager instance] lpConfigBoolForKey:@"override_domain_with_default_one"]) linphone_address_set_domain(linphoneAddress, [[[LinphoneManager instance] lpConfigStringForKey:@"domain" forSection:@"wizard"] cStringUsingEncoding:[NSString defaultCStringEncoding]]); if(transfer) { linphone_core_transfer_call(theLinphoneCore, linphone_core_get_current_call(theLinphoneCore), linphone_address_as_string_uri_only(linphoneAddress)); } else { call=linphone_core_invite_address_with_params(theLinphoneCore, linphoneAddress, lcallParams); } linphone_address_destroy(linphoneAddress); } if (call) { LinphoneCallAppData* data = "">LinphoneCallAppData alloc] init]; // data->videoRequested = linphone_call_params_video_enabled(lcallParams); /* will be used later to notify user if video was not activated because of the linphone core*/ linphone_call_set_user_pointer(call, data); } linphone_call_params_destroy(lcallParams); } Thanks, Regards, Vicky Dhas Please consider the impact to the environment before printing this email From: Vicky Dhas <address@hidden> Date: Friday, 1 August, 2014 3:26 PM To: "address@hidden" <address@hidden> Subject: [Linphone] Implemented Logout but app crashed on calling with other user name Hello Experts, I am facing one issue, I have mentioned the steps so the issue is understood and helped to fix.
[self destroyLibLinphone]; [self createLinphoneCore];
// reset network state to trigger a new network connectivity assessment linphone_core_set_network_reachable(theLinphoneCore, FALSE);
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 |
[Prev in Thread] | Current Thread | [Next in Thread] |