Ask caller to approve Call Recordiing

As I just want to check if the caller disagrees with recording the call, this would work at the end of extensions_custom.conf?

[from-trunk-recordrefusalcheck]
exten => recordcheck,n,GotoIf($["${CALLTYPE}" = "internal"]?from-trunk)
exten => recordcheck,n,ExecIf($["${CALLTYPE}" = "external"]?Read(recordRefusal,custom/record_for_QA.wav,1,,1,3))
exten => recordcheck,n,ExecIf($["${CALLTYPE}" = "external" | "${recordRefusal}" = "" ]?Set(ARG1=force)
exten => recordcheck,n,ExecIf($["${CALLTYPE}" = "external" | "${recordRefusal}" = "1" ]?Set(ARG1=no)
exten => recordcheck,n,Goto(from-trunk)

I guess it should be fine for now to use the variables @dickson used in his example. Or it won’t work this way? For sure it could break in the future.

This won’t work.
The 5 lines I provided are intended to integrate into a specific spot in the the dial-plan to give maximum return for minimal investment.
Copy, Paste, Insert, Save, (You are welcome I guess?)

The _override.conf file is there for just this reason. To allow users to make modifications to a fairly complex and actually a very intricate and efficient example of of diaplan code.
I gave, what I feel, are a pretty detailed instructions how to make it work. Don’t just say “oh use a custom context” and not give any details. That is how you break a PBX.

Hi dickson,

i believe your instructions are the easiest approach and will work fine, but I prefer a way that will work even after updates. If I figured out a solution that works for me, I will post it.

Thanks for your approach. I guess I can start to work with it, after I figured out how to send a trunk to a custom context. Unfortunately I couldn’t get it working by setting the custom context in these both fields: