- Joined
- May 20, 2025
- Messages
- 10
- Reaction score
- 10
Hi, I need to know how I can forward or divert a call to an external number through a call processing script.
Code:
destination = "Extension."+"605"+"."; // it's work normally as it should i need same function for external calls
var has_valid_destination = DestinationStruct.TryParse(
destination,
out var destination_struct
);
if (has_valid_destination)
{
var result = await MyCall
.AssureMedia()
.ContinueWith(
x =>
{
MyCall.SetBackgroundAudio(
true,
new string[]
{
"/var/lib/3cxpbx/Instance1/Data/Ivr/Prompts/USProgresstone.wav",
}
);
return MyCall.RouteToAsync(destination_struct);
},
TaskContinuationOptions.OnlyOnRanToCompletion
)
.Unwrap();
return true;
}