Sub-record-check to force audio recording in custom ivr

Hi
I am using asterisk 16.28.0 and FreePBX 16.0.26 .
I am writing a custom ivr into extensions_custom.conf on an inbound call.
I will like to record the audio as well and I can do it via MixMonitor, but I saw a sub-record-check .
Can I use sub-record-check to force a recording audio ? If yes how do I call it exten => s,n,Gosub(sub-record-check,s,1())?

[custom-remove-blocks-son]
exten => s,1,NoOp(Entering AutoRemoveBlocksSON Dialed number ${CALLERID(dnid)} ${CALLERID(number)} in extensions_custom.conf ${UNIQUEID} ${CHANNEL} ${ENTITYID} ${CDR(accountcode)})
exten => s,n,Wait(1)
exten => s,n,MixMonitor(2023/06/30/test-inbound.WAV)
exten => s,n,Playback(silence/1&custom/greetingSON)                                                                                                       
.
.
.

  1. Find the context in the config file and see if it has an include line for something custom. If it does use the context referenced in the include command, in exctensions_custom.conf.

  2. Copy sub-record-check into extensions_override.conf and add your lines there. It will override the generated context and use your override instead. The downside is if anything changes with this context in the future, it will be ignored as it is using your override.

Hi
Thanks for your reply , but I am able to call exten => s,n,Gosub(sub-record-check,s,1()) but I do not know what parameters to add so I will force it to record the audio .

For example, I saw in the extensions_additional.conf , exten => 81001,n,Gosub(sub-record-check,s,1(conf,81001,never)) . If I add exten => s,n,Gosub(sub-record-check,s,1(conf,81001,never))
on line 3 instead of MixMonitor it will call it but it will not create the audio .

Has anyone used sub-record-check instead
of MixMonitor on a custom dial ?

These questions might be better suited for the asterisk community.

To use the fpbx subroutines to enable recording of an inbound call, you would add a line to your dialplan that looks like this

Gosub(sub-record-check,s,1(generic,${FROM_DID},force))

acceptable values for the third argument are: dontcare, force, yes, no or never.

1 Like

Thanks Lorne , yes it works !

Many Thanks
Antonis

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