add check for displayname transmission in simple call test

This commit is contained in:
Simon Morlat 2014-11-07 18:33:15 +01:00
parent eff695ef11
commit 1285d1cf21
2 changed files with 20 additions and 2 deletions

View file

@ -317,13 +317,31 @@ static void simple_call(void) {
int leaked_objects;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
const LinphoneAddress *from;
LinphoneCall *pauline_call;
belle_sip_object_enable_leak_detector(TRUE);
begin=belle_sip_object_get_object_count();
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new( "pauline_rc");
CU_ASSERT_TRUE(call(pauline,marie));
CU_ASSERT_TRUE(call(marie,pauline));
pauline_call=linphone_core_get_current_call(pauline->lc);
CU_ASSERT_PTR_NOT_NULL(pauline_call);
/*check that display name is correctly propagated in From */
if (pauline_call){
from=linphone_call_get_remote_address(linphone_core_get_current_call(pauline->lc));
CU_ASSERT_PTR_NOT_NULL(from);
if (from){
const char *dname=linphone_address_get_display_name(from);
CU_ASSERT_PTR_NOT_NULL(dname);
if (dname){
CU_ASSERT_STRING_EQUAL(dname, "Super Marie");
}
}
}
liblinphone_tester_check_rtcp(marie,pauline);
end_call(marie,pauline);
linphone_core_manager_destroy(marie);

View file

@ -17,7 +17,7 @@ realm=sip.example.org
[proxy_0]
reg_proxy=sip.example.org;transport=tcp
reg_route=sip.example.org;transport=tcp;lr
reg_identity=sip:marie@sip.example.org
reg_identity="Super Marie" <sip:marie@sip.example.org>
reg_expires=3600
reg_sendregister=1
publish=0