Commit 5ee5a324 authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Fix linphonerc reading on wp8

parent bf73a512
[sip]
sip_port=5092
sip_tcp_port=5092
sip_tls_port=5093
default_proxy=0
ping_with_options=0
register_only_when_network_is_up=0
[auth_info_0]
username=laure
userid=laure
passwd=secret
realm="sip.example.org"
[proxy_0]
reg_proxy=sip.example.org
reg_identity=sip:laure@sip.example.org
reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
[rtp]
audio_rtp_port=9010
video_rtp_port=9012
[video]
display=0
capture=0
show_local=0
size=vga
enabled=0
self_view=0
automatically_initiate=0
automatically_accept=0
device=StaticImage: Static picture
\ No newline at end of file
[sip]
sip_port=5082
sip_tcp_port=5082
sip_tls_port=5083
default_proxy=0
ping_with_options=0
register_only_when_network_is_up=0
[auth_info_0]
username=marie
userid=marie
passwd=secret
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_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
[friend_0]
url="Paupoche" <sip:pauline@sip.example.org>
pol=accept
subscribe=0
[rtp]
audio_rtp_port=8070
video_rtp_port=8072
[video]
display=0
capture=0
show_local=0
size=vga
enabled=0
self_view=0
automatically_initiate=0
automatically_accept=0
device=StaticImage: Static picture
\ No newline at end of file
[sip]
sip_port=5072
sip_tcp_port=5072
sip_tls_port=5073
default_proxy=0
[auth_info_0]
username=liblinphone_tester
userid=liblinphone_tester
passwd=secret
realm="auth.example.org"
[auth_info_1]
username=pauline
userid=pauline
passwd=secret
realm="sip.example.org"
[auth_info_2]
username=liblinphone_tester
userid=liblinphone_tester
passwd=secret
realm="auth1.example.org"
[auth_info_3]
username=marie
userid=marie
passwd=secret
realm="sip.example.org"
[proxy_0]
reg_proxy=sip.example.org;transport=tls
reg_identity=sip:pauline@sip.example.org
reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
[proxy_1]
reg_proxy=sip.example.org;transport=tcp
reg_identity=sip:marie@sip.example.org
reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
[proxy_2]
reg_proxy=auth1.example.org
reg_identity=sip:liblinphone_tester@auth1.example.org
reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
[sip]
sip_port=5072
sip_tcp_port=5072
sip_tls_port=5073
default_proxy=0
ping_with_options=0
register_only_when_network_is_up=0
[auth_info_0]
username=pauline
userid=pauline
passwd=secret
realm="sip.example.org"
[proxy_0]
reg_proxy=sip.example.org;transport=tls
reg_route=sip.example.org;transport=tls;lr
reg_identity=sip:pauline@sip.example.org
reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
#[friend_0]
#url="Mariette" <sip:marie@sip.example.org>
#pol=accept
#subscribe=0
[rtp]
audio_rtp_port=8090
video_rtp_port=8092
[video]
display=0
capture=0
show_local=0
size=vga
enabled=0
self_view=0
automatically_initiate=0
automatically_accept=0
device=StaticImage: Static picture
\ No newline at end of file
......@@ -129,6 +129,11 @@
</Page>
</ItemGroup>
<ItemGroup>
<Content Include="Assets\laure_rc" />
<Content Include="Assets\marie_rc" />
<Content Include="Assets\oldphone.wav" />
<Content Include="Assets\pauline_rc" />
<Content Include="Assets\multi_account_lrc" />
<None Include="Properties\AppManifest.xml" />
<None Include="Properties\WMAppManifest.xml">
<SubType>Designer</SubType>
......@@ -139,6 +144,7 @@
<Content Include="Assets\ApplicationIcon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\ringback.wav" />
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......@@ -170,6 +176,7 @@
<Name>LibLinphoneTester</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
......
......@@ -2,7 +2,8 @@
#include "linphone-tester-native.h"
#include "ortp/logging.h"
#include "cunit/Util.h"
#include "cunit/Util.h"
using namespace linphone_tester_native;
using namespace Platform;
......
......@@ -141,8 +141,8 @@ static bool_t call(LinphoneCoreManager* caller_mgr,LinphoneCoreManager* callee_m
}
static void simple_call(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCore* lc_marie=marie->lc;
LinphoneCore* lc_pauline=pauline->lc;
......@@ -182,8 +182,8 @@ static void simple_call(void) {
}
static void cancelled_call(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCall* out_call = linphone_core_invite(pauline->lc,"marie");
linphone_call_ref(out_call);
......@@ -200,7 +200,7 @@ static void cancelled_call(void) {
}
static void call_with_dns_time_out(void) {
LinphoneCoreManager* marie = linphone_core_manager_new(NULL);
LinphoneCoreManager* marie = linphone_core_manager_new(NULL, NULL);
LCSipTransports transport = {9773,0,0,0};
linphone_core_set_sip_transports(marie->lc,&transport);
linphone_core_iterate(marie->lc);
......@@ -215,8 +215,8 @@ static void call_with_dns_time_out(void) {
}
static void cancelled_ringing_call(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCall* out_call = linphone_core_invite(pauline->lc,"marie");
linphone_call_ref(out_call);
......@@ -233,8 +233,9 @@ static void cancelled_ringing_call(void) {
}
static void early_declined_call(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCall* in_call;
LinphoneCall* out_call = linphone_core_invite(pauline->lc,"marie");
linphone_call_ref(out_call);
......@@ -254,8 +255,8 @@ static void early_declined_call(void) {
}
static void call_terminated_by_caller(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
CU_ASSERT_TRUE(call(pauline,marie));
/*just to sleep*/
......@@ -268,8 +269,8 @@ static void call_terminated_by_caller(void) {
}
static void call_paused_resumed(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCall* call_obj;
CU_ASSERT_TRUE(call(pauline,marie));
......@@ -306,8 +307,8 @@ static bool_t pause_call_1(LinphoneCoreManager* mgr_1,LinphoneCall* call_1,Linph
}
static void call_paused_resumed_from_callee(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCall* call_obj;
CU_ASSERT_TRUE(call(pauline,marie));
......@@ -332,8 +333,8 @@ static void call_paused_resumed_from_callee(void) {
}
static void call_with_video_added(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCall* call_obj;
LinphoneVideoPolicy pauline_policy;
LinphoneCallParams* marie_params;
......@@ -375,12 +376,12 @@ static void call_with_video_added(void) {
}
static void simple_conference(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCoreManager* laure = linphone_core_manager_new(FILE_PREFIX, "laure_rc");
stats initial_marie_stat;
stats initial_pauline_stat;
stats initial_laure_stat;
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* laure = linphone_core_manager_new("./tester/laure_rc");
LinphoneCall* marie_call_pauline;
LinphoneCall* pauline_called_by_marie;
......@@ -432,8 +433,8 @@ static void simple_conference(void) {
}
static void srtp_call(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
linphone_core_set_media_encryption(marie->lc,LinphoneMediaEncryptionSRTP);
linphone_core_set_media_encryption(pauline->lc,LinphoneMediaEncryptionSRTP);
......@@ -453,9 +454,8 @@ static void srtp_call(void) {
}
static void early_media_call(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_early_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_early_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
CU_ASSERT_TRUE(call(pauline,marie));
......@@ -471,9 +471,9 @@ static void early_media_call(void) {
}
static void simple_call_transfer(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* laure = linphone_core_manager_new("./tester/laure_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCoreManager* laure = linphone_core_manager_new(FILE_PREFIX, "laure_rc");
LinphoneCall* pauline_called_by_marie;
LinphoneCall* marie_call_pauline;
......@@ -521,9 +521,9 @@ static void simple_call_transfer(void) {
}
static void call_transfer_existing_call_outgoing_call(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* laure = linphone_core_manager_new("./tester/laure_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
LinphoneCoreManager* laure = linphone_core_manager_new(FILE_PREFIX, "laure_rc");
LinphoneCall* marie_call_pauline;
LinphoneCall* pauline_called_by_marie;
......
......@@ -82,15 +82,22 @@ void reset_counters( stats* counters) {
memset(counters,0,sizeof(stats));
}
LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char* file,int proxy_count) {
LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char* path, const char* file, int proxy_count) {
LinphoneCore* lc;
int retry=0;
stats* counters;
lc = linphone_core_new(v_table,NULL,file,NULL);
char filepath[50];
char ringpath[50];
char ringbackpath[50];
sprintf(filepath, "%s/%s", path, file);
lc = linphone_core_new(v_table,NULL,filepath,NULL);
linphone_core_set_user_data(lc,&global_stat);
counters = (stats*)linphone_core_get_user_data(lc);
linphone_core_set_ring(lc,"./share/rings/oldphone.wav");
linphone_core_set_ringback(lc,"./share/ringback.wav");
sprintf(ringpath, "%s/%s", path, "oldphone.wav");
sprintf(ringbackpath, "%s/%s", path, "ringback.wav");
linphone_core_set_ring(lc, ringpath);
linphone_core_set_ringback(lc, ringbackpath);
reset_counters(counters);
CU_ASSERT_EQUAL(ms_list_size(linphone_core_get_proxy_config_list(lc)),proxy_count);
......@@ -140,7 +147,7 @@ static void enable_codec(LinphoneCore* lc,const char* type,int rate) {
}
}
LinphoneCoreManager* linphone_core_manager_new(const char* rc_file) {
LinphoneCoreManager* linphone_core_manager_new(const char* path, const char* rc_file) {
LinphoneCoreManager* mgr= malloc(sizeof(LinphoneCoreManager));
LinphoneProxyConfig* proxy;
memset (mgr,0,sizeof(LinphoneCoreManager));
......@@ -151,7 +158,7 @@ LinphoneCoreManager* linphone_core_manager_new(const char* rc_file) {
mgr->v_table.new_subscription_request=new_subscribtion_request;
mgr->v_table.notify_presence_recv=notify_presence_received;
mgr->v_table.transfer_state_changed=linphone_transfer_state_changed;
mgr->lc=configure_lc_from(&mgr->v_table,rc_file,rc_file?1:0);
mgr->lc=configure_lc_from(&mgr->v_table, path, rc_file, rc_file?1:0);
enable_codec(mgr->lc,"PCMU",8000);
linphone_core_set_user_data(mgr->lc,&mgr->stat);
linphone_core_get_default_proxy(mgr->lc,&proxy);
......
......@@ -40,6 +40,11 @@ typedef struct {
test_t *tests;
} test_suite_t;
#if WINAPI_FAMILY_PHONE_APP
#define FILE_PREFIX "Assets"
#else
#define FILE_PREFIX "./tester"
#endif
#ifdef __cplusplus
extern "C" {
......@@ -131,7 +136,7 @@ typedef struct _LinphoneCoreManager {
} LinphoneCoreManager;
LinphoneCoreManager* linphone_core_manager_new(const char* rc_file);
LinphoneCoreManager* linphone_core_manager_new(const char * path, const char* rc_file);
void linphone_core_manager_destroy(LinphoneCoreManager* mgr);
void reset_counters( stats* counters);
......@@ -147,7 +152,7 @@ void auth_info_requested(LinphoneCore *lc, const char *realm, const char *userna
LinphoneCore* create_lc_with_auth(unsigned int with_auth) ;
LinphoneAddress * create_linphone_address(const char * domain);
LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char* file,int proxy_count);
LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char* path, const char* file, int proxy_count);
bool_t wait_for(LinphoneCore* lc_1, LinphoneCore* lc_2,int* counter,int value);
bool_t wait_for_list(MSList* lcs,int* counter,int value,int timeout_ms);
......
......@@ -62,8 +62,8 @@ void linphone_chat_message_state_change(LinphoneChatMessage* msg,LinphoneChatMes
}
static void text_message(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
char* to = linphone_address_as_string(marie->identity);
LinphoneChatRoom* chat_room = linphone_core_create_chat_room(pauline->lc,to);
linphone_chat_room_send_message(chat_room,"Bla bla bla bla");
......@@ -74,8 +74,8 @@ static void text_message(void) {
}
static void text_message_with_ack(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
char* to = linphone_address_as_string(marie->identity);
LinphoneChatRoom* chat_room = linphone_core_create_chat_room(pauline->lc,to);
LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu");
......@@ -88,8 +88,8 @@ static void text_message_with_ack(void) {
}
static void text_message_with_external_body(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
char* to = linphone_address_as_string(marie->identity);
LinphoneChatRoom* chat_room = linphone_core_create_chat_room(pauline->lc,to);
LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu");
......@@ -105,8 +105,8 @@ static void text_message_with_external_body(void) {
}
static void text_message_with_send_error(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
char* to = linphone_address_as_string(pauline->identity);
LinphoneChatRoom* chat_room = linphone_core_create_chat_room(marie->lc,to);
LinphoneChatMessage* message = linphone_chat_room_create_message(chat_room,"Bli bli bli \n blu");
......
......@@ -43,7 +43,7 @@ void notify_presence_received(LinphoneCore *lc, LinphoneFriend * lf) {
}
static void simple_publish(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneProxyConfig* proxy;
linphone_core_get_default_proxy(marie->lc,&proxy);
linphone_proxy_config_edit(proxy);
......@@ -54,8 +54,8 @@ static void simple_publish(void) {
}
static void simple_subscribe(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(FILE_PREFIX, "pauline_rc");
const MSList* marie_friends = linphone_core_get_friend_list(marie->lc);
LinphoneFriend* friend;
CU_ASSERT_PTR_NOT_NULL_FATAL(marie_friends);
......@@ -74,7 +74,7 @@ static void simple_subscribe(void) {
}
static void unsubscribe_while_subscribing(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
LinphoneCoreManager* marie = linphone_core_manager_new(FILE_PREFIX, "marie_rc");
LinphoneFriend* friend = linphone_friend_new_with_addr("sip:toto@git.linphone.org"); /*any unexisting address*/
linphone_friend_edit(friend);
linphone_friend_enable_subscribes(friend,TRUE);
......
......@@ -224,7 +224,7 @@ static void authenticated_register_with_late_credentials(){
}
static LinphoneCore* configure_lc(LinphoneCoreVTable* v_table) {
return configure_lc_from(v_table,"./tester/multi_account_lrc",3);
return configure_lc_from(v_table, FILE_PREFIX, "multi_account_lrc", 3);
}
static void multiple_proxy(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment