Simple recorded audio phone survey

We’re looking to get some feedback from our customers and it will be a bit more than can be answered by pressing a digit. We already so some post-call NPS surveys that get sent out via cURL to be ingested.

We have an inbound DID that hits an IVR to press 1 if the person is interested and it drops the user into a Custom Destination of a context in extensions_custom.conf. We’ll later be either doing some transcribing or listening through their responses.
Everything seemingly works as expected:

  • Call comes into IVR
  • Press 1, goes to context
  • Instructions Play
  • Recording is started
  • Question 1 Plays, 10s delay
  • Question 2 Plays, 10s delay
  • Thank you message plays
  • Call ends

Except then looking at the CDR (or just the actual file itself) there’s no audio recorded. The file is 60B with only header data in the .WAV file.

I’m sure it’s something basic I’m overlooking, any help would be greatly appreciated.

Here’s what I’m working with on the context:

exten => s,1,Answer()

; Instructions
exten => s,n,Playback(/var/lib/asterisk/sounds/en/custom/Survey-Instruction)
exten => s,n,WaitDigit(.5)

; Start recording
exten => s,n,Gosub(sub-record-check,s,1(generic,${FROM_DID},force))

; Question 1
exten => s,n,Playback(/var/lib/asterisk/sounds/en/custom/Survey-Q1)
exten => s,n,WaitDigit(10)

; Question 2
exten => s,n,Playback(/var/lib/asterisk/sounds/en/custom/Survey-Q2)
exten => s,n,WaitDigit(10)

; Play thank you message and hangup
exten => s,n,Playback(/var/lib/asterisk/sounds/en/custom/Survey-Thank_You)
exten => s,n,Hangup() 

I’ve also tried forcing recording at the Inbound Route level and stopping recording before the last Playback, as ideally I do only want the two questions, neither made a difference.

You want to record the audio of the IVR/Survey interaction?

Settings > Advanced Settings > Call Record Options > No

That’s it! Perfect.

I really only want it on this one context, no reason for other queues and whatnot so that led me to CALL_REC_OPTION variable from the FreePBX settings, then MONITOR_REC_OPTION global Asterisk variable.

I was able to set the variable in the context:
exten => s,n,Set(MONITOR_REC_OPTION='')
And it appears to be working as I’d hoped. All other calls still only record on channels being answered by a person and this starts recording immediately when the voice prompt starts talking.

Thanks for your assistance.

1 Like

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