- Joined
- Aug 8, 2024
- Messages
- 27
- Reaction score
- 24
We announce that the call may be recorded for almost all our myriads of DIDs. I wanted a way to do it at the trunk level but soon realized you can't do it in CFD (correct me if I'm wrong). So I did an "Add from Store" of the holiday.cs and attached it to my trunk. I attached a "recording.wav" file to the script. I modified the script to play "recording.wav" before doing it's normal thing.
Where you see this:
I changed it to this:
It was a quick hack that hopefully helps someone else. If someone has a way to improve it (perhaps some error checking for missing wav file) I wouldn't be unhappy.
For calls that I don't want it to play, I send those to another trunk. Since my vendor let's me setup multiple trunks to the same PBX it gives me what I want in the most simplistic way I've found so far.
Where you see this:
if(MyCall.Caller.DN is ExternalLine externalLine && MyCall.IsInbound) //only from trunk{ //get the inbound targetI changed it to this:
if(MyCall.Caller.DN is ExternalLine externalLine && MyCall.IsInbound) //only from trunk{ await MyCall.AssureMedia().ContinueWith(x => MyCall.PlayPrompt(null, new [] {"recording.wav"}, PlayPromptOptions.Blocked)).Unwrap(); //get the inbound targetIt was a quick hack that hopefully helps someone else. If someone has a way to improve it (perhaps some error checking for missing wav file) I wouldn't be unhappy.
For calls that I don't want it to play, I send those to another trunk. Since my vendor let's me setup multiple trunks to the same PBX it gives me what I want in the most simplistic way I've found so far.