3CX Call control API error dotnet build OMSamplesCore.csproj

antoniovaccaro

Silver Partner
Advanced Certified
Joined
Jun 29, 2023
Messages
5
Reaction score
0
Hi,
i'm trying to install 3CX Call control API on my 3CX linux Version 20.0 Update 6 (Build 486 Alpha)

Following 3CX Call control API , when i try to run the command dotnet build OMSamplesCore.csproj
the following errors appears

root@medialink:~# cd OMSamples
root@medialink:~/OMSamples# dotnet build OMSamplesCore.csproj
Individuazione dei progetti da ripristinare...
Tutti i progetti sono aggiornati per il ripristino.
/root/OMSamples/Samples/V20CallControlAPI.cs(168,124): error CS1503: Argomento 2: non è possibile convertire da 'string' a 'TCX.Configuration.Destination' [/root/OMSamples/OMSamplesCore.csproj::TargetFramework=net8.0]
/root/OMSamples/Samples/V20CallControlAPI.cs(168,144): error CS1503: Argomento 3: non è possibile convertire da 'bool' a 'TCX.PBXAPI.CallControlAPI.DivertReason' [/root/OMSamples/OMSamplesCore.csproj::TargetFramework=net8.0]
/root/OMSamples/Samples/V20CallControlAPI.cs(172,112): error CS1501: Nessun overload del metodo 'DivertAsync' accetta 1 argomenti [/root/OMSamples/OMSamplesCore.csproj::TargetFramework=net8.0]

Compilazione NON RIUSCITA.

/root/OMSamples/Samples/V20CallControlAPI.cs(168,124): error CS1503: Argomento 2: non è possibile convertire da 'string' a 'TCX.Configuration.Destination' [/root/OMSamples/OMSamplesCore.csproj::TargetFramework=net8.0]
/root/OMSamples/Samples/V20CallControlAPI.cs(168,144): error CS1503: Argomento 3: non è possibile convertire da 'bool' a 'TCX.PBXAPI.CallControlAPI.DivertReason' [/root/OMSamples/OMSamplesCore.csproj::TargetFramework=net8.0]
/root/OMSamples/Samples/V20CallControlAPI.cs(172,112): error CS1501: Nessun overload del metodo 'DivertAsync' accetta 1 argomenti [/root/OMSamples/OMSamplesCore.csproj::TargetFramework=net8.0]
Avvisi: 0
Errori: 3

Tempo trascorso 00:00:11.06
root@medialink:~/OMSamples#


Best regards
Antonio
 
Hi @antoniovaccaro, Where you able to resolve this? Im facing the exact same problem
 
Line 166 to 172, in OMSamples > Samples > V20CallControlAPI.cs

C#:
//replaces ringing connection on dn/sipdevice with new routes based on specified number
"divert" when !use_structured_destination =>
    await connections.ExtractFirstOrDefault(x => x.Status == ConnectionStatus.Ringing).DivertAsync(destination_string, false, DivertReason.ForwardAll),

//replaces ringing connection on dn/sipdevice with new route to specified destination
"divert" when use_structured_destination =>
    await connections.ExtractFirstOrDefault(x => x.Status == ConnectionStatus.Ringing).DivertAsync(structured_destination, DivertReason.ForwardAll),

This fixes it.
 
Indeed, that fixed it. Thanks alot
 

Forum statistics

Threads
112,142
Messages
590,937
Members
165,159
Latest member
Isuru Eranga