Commit fd852f01 authored by Ghislain MARY's avatar Ghislain MARY

Add configuration parameter to enable ICE.

parent c4bf7958
......@@ -850,6 +850,16 @@ lpc_cmd_firewall(LinphoneCore *lc, char *args)
{
linphone_core_set_firewall_policy(lc,LinphonePolicyNoFirewall);
}
else if (strcmp(args,"ice")==0)
{
setting = linphone_core_get_stun_server(lc);
if ( ! setting )
{
linphonec_out("No stun server address is defined, use 'stun <address>' first\n");
return 1;
}
linphone_core_set_firewall_policy(lc,LinphonePolicyUseIce);
}
else if (strcmp(args,"stun")==0)
{
setting = linphone_core_get_stun_server(lc);
......@@ -883,6 +893,9 @@ lpc_cmd_firewall(LinphoneCore *lc, char *args)
case LinphonePolicyUseNatAddress:
linphonec_out("Using supplied nat address %s.\n", setting ? setting : linphone_core_get_nat_address(lc));
break;
case LinphonePolicyUseIce:
linphonec_out("Using ice with stun server %s to discover firewall address\n", setting ? setting : linphone_core_get_stun_server(lc));
break;
}
return 1;
}
......
......@@ -740,7 +740,8 @@ typedef struct _LCCallbackObj
typedef enum _LinphoneFirewallPolicy{
LinphonePolicyNoFirewall,
LinphonePolicyUseNatAddress,
LinphonePolicyUseStun
LinphonePolicyUseStun,
LinphonePolicyUseIce
} LinphoneFirewallPolicy;
typedef enum _LinphoneWaitingState{
......
This diff is collapsed.
......@@ -171,6 +171,11 @@ void linphone_gtk_use_stun_toggled(GtkWidget *w){
linphone_core_set_firewall_policy(linphone_gtk_get_core(),LinphonePolicyUseStun);
}
void linphone_gtk_use_ice_toggled(GtkWidget *w){
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
linphone_core_set_firewall_policy(linphone_gtk_get_core(),LinphonePolicyUseIce);
}
void linphone_gtk_mtu_changed(GtkWidget *w){
if (GTK_WIDGET_SENSITIVE(w))
linphone_core_set_mtu(linphone_gtk_get_core(),gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
......@@ -956,6 +961,9 @@ void linphone_gtk_show_parameters(void){
case LinphonePolicyUseStun:
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_stun")),TRUE);
break;
case LinphonePolicyUseIce:
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_ice")),TRUE);
break;
}
mtu=linphone_core_get_mtu(lc);
if (mtu<=0){
......
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