How to divert an existing ongoing (silent) call to another extension?

Hey everybody!

I am pretty novice with asterisk & freepbx, but I think I am able to comprehend some basics.

I belong to a small scambaiting group in discord (we answer to “419” emails) and I have already set up several working scambaiting bots with US numbers and sip trunks from Callcentric, which pick up the phone and waste tons of time on scammers (particulary email scammers).

You can think of my bots as Lenny, but the responses are oriented around “are you the one from the emails?” “Is this transaction legit?” “remind me your name” “remind me how much money am I going to get” “This reminds me of a story…” etc etc.

My most successful bot is Franklin as you can see in the above screenshot :smiley:
Let me share the code (which is undoubtedly an edited version of Lenny bot:

exten => talk,1,set(i=${IF($["0${i}"="022"]?6:$[0${i}+1])})
same => n,ExecIf($[${i}=1]?MixMonitor(${UNIQUEID}_${STRFTIME(${EPOCH},,%d-%b-%Y_%H %M)}__[CALLERID_${CALLERID(number)}]_Franklin.wav))
same => n,set(j=${RAND(1,6)})
same => n,Playback(Franklin/${i}Franklin${j})
same => n,BackgroundDetect(Franklin-new/Backgroundnoise,2000)

Every time the bot speaks, it chooses randomly 1 out of 6 pre-recorded voice clips that I have grouped with the same context/intent, and when it reaches the 22nd line it returns back to the 6th.

I have also set up a fake IVR for them to call and try and claim a (fake) MTCN from western union :smiley:

So what I would like to do: WASTE MORE OF THEIR TIME!

I have noticed that most scammers use and insist on using Whatsapp for calls.
Now, I know that Whatsapp is proprietary and I am not asking how to setup an whatsapp sip trunk or whatever.

What I have succesfully done manually is:

  • Have WhatsApp Desktop running on my PC ready to accept incoming calls
  • Have Zoiper desktop running, ready to call my bot extension
  • Zoiper is set up to have as microphone input the audio output from Whatsapp, and the audio output is directed as microphone input to Whatsapp (this was done using Virtual Audio Cable)
  • Once whatsapp rings, I answer it and I immediatelly call my extension with zoiper, so that the scammer talks to the bot.

So… I would like to automate this!
My initial thought is to have a call already placed with zoiper to an extansion with idk, maybe whitenoise playing as hold music, and when a call comes in on whatsapp and it is automatically answered (will figure this out later, its doable), asterisk detects noise and transfers the call to my bot extension.

I am aware of
WaitForNoise([noiserequired,[iterations,[timeout]]])

But I need help setting up the rest of the dialplan…
Would someone more experienced be able to help me, if my idea is doable?
I am also open to other ideas on how to achieve whatsapp incoming calls diverted to asterisk!

P.S. If anyone into scambaiting and would like to join us, or just only to listen to the recordings of scammers talking to my bots, p.m. me and I send you a discord invite or share my spreadsheet where the above screenshot comes from :slight_smile:

2 Likes

If I understand the setup, you’d have a persistent call up between the proprietary program and your Asterisk system, so you really only have audio to work with.

I don’t think this is actually that complicated. WaitForNoise will continue in the dialplan once it detects noise. So, assuming that at that point, you’re waiting for a call, the dialplan will simply continue once a call arrives.

same => n,WaitForNoise()
same => n,Goto(my-bot,talk,1)

The more complicated issue might be detecting hang up - I’m not familiar with what indication you would get on the program side running on the PC. Somehow, you’ll need to detect that on the Asterisk side so you can “reset” the channel and go back to WaitForNoise to wait for the next call (and also stop the recording).

If you don’t have any way of getting this information out of band, you might have to effectively WaitForSilence to do the reverse. More details are probably needed on what audio cues are available. If there is a tone from the PC program on hangup, perhaps you could detect that asynchronously using TONE_DETECT?

1 Like

Wow I didn’t expect a reply so soon!

If I understand the setup, you’d have a persistent call up between the proprietary program and your Asterisk system, so you really only have audio to work with.

YES!
I have only audio to work with.
And yeah, I think WaitForSilence would work to hang up the phone and end the recording!
.
I think I might try your suggestion, I thought it would be more complicated :upside_down_face:

EDIT: I deleted sth I wrote, i wasn’t thinking right (I am not aware if Zoiper (in its free version at least) can be programmed to play a hangup sound/tone)

Why the requirement to use Zoiper?

I think a more robust softphone client like MicroSIP or tSIP would better suit this need. (MicroSIP does play a tone on hangup).

MicroSIP is easier to set up and use, but with more limited functionality than tSIP.

I think you could do anything with tSIP, maybe even cook a burger, but it’s a lot more work to set up.

Will look into tSIP!

Unrelated to your request. Would you mind sharing the audios for public use?

I intend to do this, yes!
However it is still a work in progress.
Speaking of which, here is a recording that just happened and broke the previous record of time wasted…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.