Пример #1
0
static void simple_tcp_register_compatibility_mode(){
	char route[256];
	LinphoneCoreManager* lcm;
	LCSipTransports transport = {0,5070,0,0};
	sprintf(route,"sip:%s",test_route);
	lcm = create_lcm();
	register_with_refresh_base_2(lcm->lc,FALSE,test_domain,route,FALSE,transport);
	linphone_core_manager_destroy(lcm);
}
Пример #2
0
static void redirect(){
	char route[256];
	LinphoneCoreManager* lcm;
	LCSipTransports transport = {-1,0,0,0};
	sprintf(route,"sip:%s:5064",test_route);
	lcm = create_lcm();
	linphone_core_set_user_agent(lcm->lc,"redirect",NULL);
	register_with_refresh_base_2(lcm->lc,FALSE,test_domain,route,FALSE,transport);
	linphone_core_manager_destroy(lcm);
}
Пример #3
0
static void authenticated_register_with_late_credentials(){
	LinphoneCoreManager *mgr;
	stats* counters;
	LCSipTransports transport = {5070,5070,0,5071};
	char route[256];
	
	sprintf(route,"sip:%s",test_route);
	
	mgr =  linphone_core_manager_new(NULL);
	mgr->lc->vtable.auth_info_requested=auth_info_requested2;
	counters = get_stats(mgr->lc);
	register_with_refresh_base_2(mgr->lc,FALSE,auth_domain,route,TRUE,transport);
	CU_ASSERT_EQUAL(counters->number_of_auth_info_requested,1);
	linphone_core_manager_destroy(mgr);
}
Пример #4
0
static void authenticated_register_with_wrong_credentials(){
	LinphoneCoreManager *mgr;
	stats* counters;
	LCSipTransports transport = {5070,5070,0,5071};
	LinphoneAuthInfo *info=linphone_auth_info_new(test_username,NULL,"wrong passwd",NULL,auth_domain); /*create authentication structure from identity*/
	char route[256];
	
	sprintf(route,"sip:%s",test_route);
	
	mgr=linphone_core_manager_new(NULL);
	mgr->lc->vtable.auth_info_requested=auth_info_requested2;
	
	linphone_core_add_auth_info(mgr->lc,info); /*add wrong authentication info to LinphoneCore*/
	counters = get_stats(mgr->lc);
	register_with_refresh_base_2(mgr->lc,TRUE,auth_domain,route,TRUE,transport);
	CU_ASSERT_EQUAL(counters->number_of_auth_info_requested,1);
	linphone_core_manager_destroy(mgr);
}
Пример #5
0
static void register_with_refresh_base(LinphoneCore* lc, bool_t refresh,const char* domain,const char* route) {
	LCSipTransports transport = {5070,5070,0,5071};
	register_with_refresh_base_2(lc,refresh,domain,route,FALSE,transport);
}