BelledonneCommunications / linphone-xamarin

Linphone.org mirror for linphone-xamarin (git://git.linphone.org/linphone-xamarin.git)
https://www.linphone.org/
GNU General Public License v3.0
26 stars 21 forks source link

Change port 5060? #49

Open kovenko opened 1 year ago

kovenko commented 1 year ago

All you need to do to register is to make changes.

MainPage.xaml.cs
private void OnRegistration(Core lc, ProxyConfig config, RegistrationState state, string message)
-            proxyConfig.ServerAddr = domain.Text;
+            proxyConfig.ServerAddr = $"{domain.Text}:{port.Text}";

MainPage.xaml
        <StackLayout x:Name="stack_registrar">
            <Entry x:Name="username" Placeholder="Username" Text="" />
            <Entry x:Name="password" Placeholder="Password" IsPassword="false" Text=""/>
            <Entry x:Name="domain" Placeholder="Domain" Text=""/>
+           <Entry x:Name="port" Placeholder="Port" Text=""/>

To make a call, you need to understand more carefully. The ProxyConfig object contains the correct address and port values in proxyConfig.ServerAddr, but the call is on port 5060.