Modify 3CX sample Call Processing Script for PIN to play custom prompt

Status
Not open for further replies.

yules67

Silver Partner
Joined
May 17, 2023
Messages
10
Reaction score
6
Hi,

Since custom DTMF IVR are not available in V20 (sad), I want to use the 3CX sample Call Processing Script for PIN with a custom promp instead of Text to Speech.
I've change the line :
C#:
await MyCall.PlayPrompt(null, new [] {"PLSENTER", "PIN", "THENPRESPND"}, PlayPromptOptions.ResetBufferAtStart|PlayPromptOptions.CancelPlaybackAtFirstChar);
with :
C#:
await MyCall.PlayPrompt(null, new [] {"/pathToProject/RequestPIN.wav"}, PlayPromptOptions.ResetBufferAtStart|PlayPromptOptions.CancelPlaybackAtFirstChar);
and the right prompt is played but in the same time the background music is played too.

I've tried to delete/change several part of the line where "SetBackgroundAudio" is mentioned but i can't get it right.

How to do that properly ?
 
Try this:
MyCall.SetBackgroundAudio(false, new string[] { });
 
Try this:
MyCall.SetBackgroundAudio(false, new string[] { });

Good answer !
Good thing I taught you that, :rolleyes:
I see you're following my instructions well. xD


Okay okay, I admit, I didn't teach you anything lol.xD
I didn't even know that, but I'll take note. Thanks for sharing.
 
Good answer !
Good thing I taught you that, :rolleyes:
I see you're following my instructions well. xD


Okay okay, I admit, I didn't teach you anything lol.xD
I didn't even know that, but I'll take note. Thanks for sharing.
Haha, that's just a part of the C# code you can see in any CFD app, you just need to look carefully.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,953
Messages
589,915
Members
164,850
Latest member
masvty