Skip to content

Commit cf3c1d1

Browse files
authored
Tested and fixed a number of the SIP example apps. (#1189)
1 parent 7872496 commit cf3c1d1

File tree

12 files changed

+29
-21
lines changed

12 files changed

+29
-21
lines changed

examples/SIPExamples/GetStartedVideo/Program.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// History:
1515
// 21 Feb 2020 Aaron Clauson Created, Dublin, Ireland.
1616
// 02 Feb 2021 Aaron Clauson Simplified by switching to video test pattern only.
17+
// 30 Sep 2024 Aaron Clauson Can't find a SIP echo server that supports video calls :(
1718
//
1819
// License:
1920
// BSD 3-Clause "New" or "Revised" License, see included LICENSE.md file.
@@ -41,7 +42,11 @@ namespace demo
4142
class Program
4243
{
4344
// Need to find a new echo endpoint since the sipsorcery cloud was turned off to save $$. 14 Jan 2024.
44-
private static string DESTINATION = "[email protected]";
45+
//private static string DESTINATION = "[email protected]"; // Doesn't support video.
46+
//private static string DESTINATION = "[email protected]"; // Doesn't support video.
47+
//private static string DESTINATION = "[email protected]"; // Authentication required.
48+
//private static string DESTINATION = "[email protected]"; // Not found.
49+
private static string DESTINATION = "???";
4550
private static int VIDEO_FRAME_WIDTH = 640;
4651
private static int VIDEO_FRAME_HEIGHT = 480;
4752

examples/SIPExamples/PlaySounds/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace demo
3434
{
3535
class Program
3636
{
37-
private static string DESTINATION = "aaron@192.168.1.101";
37+
private static string DESTINATION = "aaron@127.0.0.1:5080";
3838
private static SIPEndPoint OUTBOUND_PROXY = null;
3939

4040
private const string WELCOME_8K = "Sounds/hellowelcome8k.raw";

examples/SIPExamples/SIPProxy/SIPProxy.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<RootNamespace>StunServerExample</RootNamespace>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
1111
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
1212
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
13-
<PackageReference Include="SIPSorcery" Version="6.2.0" />
13+
<PackageReference Include="SIPSorcery" Version="8.0.0" />
1414
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
1515
</ItemGroup>
1616

examples/SIPExamples/SendDtmf/Program.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ namespace SIPSorcery
5151
{
5252
class Program
5353
{
54-
private static readonly string DEFAULT_DESTINATION_SIP_URI = "sip:*[email protected]"; // Custom Asterisk dialplan to speak back DTMF tones.
54+
//private static readonly string DEFAULT_DESTINATION_SIP_URI = "sip:*[email protected]"; // Custom Asterisk dialplan to speak back DTMF tones.
55+
private static readonly string DEFAULT_DESTINATION_SIP_URI = "sip:[email protected]:5080";
5556

5657
private static Microsoft.Extensions.Logging.ILogger Log = NullLogger.Instance;
5758

examples/SIPExamples/SendDtmf/SendDtmf.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
1010
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
1111
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
12-
<PackageReference Include="SIPSorcery" Version="6.2.0" />
13-
<PackageReference Include="SIPSorceryMedia.Windows" Version="0.0.31-pre" />
12+
<PackageReference Include="SIPSorcery" Version="8.0.0" />
13+
<PackageReference Include="SIPSorceryMedia.Windows" Version="6.0.5" />
1414
</ItemGroup>
1515

1616
</Project>

examples/SIPExamples/UserAgentClient/Program.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ namespace demo
3636
{
3737
class Program
3838
{
39-
private static readonly string DEFAULT_DESTINATION_SIP_URI = "sips:[email protected]";
39+
//private static readonly string DEFAULT_DESTINATION_SIP_URI = "sips:[email protected]";
40+
private static readonly string DEFAULT_DESTINATION_SIP_URI = "sip:[email protected]:5080";
4041

4142
private static Microsoft.Extensions.Logging.ILogger Log = NullLogger.Instance;
4243

examples/SIPExamples/UserAgentClient/UserAgentClient.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
1010
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
1111
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
12-
<PackageReference Include="SIPSorcery" Version="6.2.0" />
13-
<PackageReference Include="SIPSorceryMedia.Windows" Version="0.0.31-pre" />
12+
<PackageReference Include="SIPSorcery" Version="8.0.0" />
13+
<PackageReference Include="SIPSorceryMedia.Windows" Version="6.0.5" />
1414
</ItemGroup>
1515

1616
</Project>

examples/SIPExamples/UserAgentRegister/UserAgentRegister.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
1010
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
1111
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
12-
<PackageReference Include="SIPSorcery" Version="6.2.0" />
12+
<PackageReference Include="SIPSorcery" Version="8.0.0" />
1313
</ItemGroup>
1414

1515
</Project>

examples/SIPExamples/UserAgentServer/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace SIPSorcery
6868
{
6969
class Program
7070
{
71-
private static int SIP_LISTEN_PORT = 5080;
71+
private static int SIP_LISTEN_PORT = 5090;
7272
private static int SIPS_LISTEN_PORT = 5061;
7373
//private static int SIP_WEBSOCKET_LISTEN_PORT = 80;
7474
//private static int SIP_SECURE_WEBSOCKET_LISTEN_PORT = 443;
@@ -175,7 +175,7 @@ static void Main(string[] args)
175175

176176
UASInviteTransaction uasTransaction = new UASInviteTransaction(sipTransport, sipRequest, null);
177177
uas = new SIPServerUserAgent(sipTransport, null, uasTransaction, null);
178-
uas.CallCancelled += (uasAgent) =>
178+
uas.CallCancelled += (uasAgent, canelReq) =>
179179
{
180180
rtpCts?.Cancel();
181181
rtpSession.Close(null);

examples/SIPExamples/UserAgentServer/UserAgentServer.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
1010
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
1111
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
12-
<PackageReference Include="SIPSorcery" Version="6.2.0" />
12+
<PackageReference Include="SIPSorcery" Version="8.0.0" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

examples/SIPExamples/VideoPhoneCmdLine/Program.cs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
// History:
1212
// 23 Dec 2020 Aaron Clauson Created, Dublin, Ireland.
13+
// 30 Sep 2024 Aaron Clauson Broken :(. Needs investigation.
1314
//
1415
// License:
1516
// BSD 3-Clause "New" or "Revised" License, see included LICENSE.md file.

examples/SIPExamples/VideoPhoneCmdLine/VideoPhoneCmdLine.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
66
<UseWindowsForms>true</UseWindowsForms>
77
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -13,10 +13,10 @@
1313
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
1414
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
1515
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
16-
<PackageReference Include="SIPSorcery" Version="6.2.0" />
16+
<PackageReference Include="SIPSorcery" Version="8.0.0" />
1717
<PackageReference Include="SIPSorceryMedia.Encoders" Version="0.0.13" />
1818
<PackageReference Include="SIPSorceryMedia.FFmpeg" Version="1.4.2" />
19-
<PackageReference Include="SIPSorceryMedia.Windows" Version="0.0.31-pre" />
19+
<PackageReference Include="SIPSorceryMedia.Windows" Version="6.0.5" />
2020
</ItemGroup>
2121

2222
</Project>

0 commit comments

Comments
 (0)