]> sjero.net Git - linphone/blobdiff - console/commands.c
Add configuration parameter to enable ICE.
[linphone] / console / commands.c
index 776d2b2609e4e1b59a8653259391f36ad342ee7d..472531795efa2d9655afdcc0412226533586d9ee 100644 (file)
@@ -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;
 }