IVR Entries Report

Here is the dialplan we use , its all added to the extensions_override_freepbx.conf but could be split over overide and custom conf files but prefered to keep in the same place for simplicities sake. Im sure it can be improved upon but it does its job.

    [ivr-track]
exten => s,1,Noop(Lets Build our IVR trail ${IVR_trail})
same => n,GotoIf($["${IVR_trail}"=""]?new:again)
same => n(new),Set(__IVR_trail=${IVR_CONTEXT}-Opt-${ARG1})
same => n,Goto(setting)
same => n(again),Set(__IVR_trail=${IVR_trail}->-${IVR_CONTEXT}-Opt-${ARG1})
same => n(setting),Set(CDR(userfield)=${IVR_trail})

same => n,QueueLog(${IVR_CONTEXT},${UNIQUEID},NONE,ENTERQUEUE,|option|${ARG1})
same => n,QueueLog(${IVR_CONTEXT},${UNIQUEID},option${ARG1},CONNECT,0|${UNIQUEID}|0)
same => n,QueueLog(${IVR_CONTEXT},${UNIQUEID},option${ARG1},COMPLETEAGENT,0|0|0)
;same => n,QueueLog(${IVR_CONTEXT},${UNIQUEID},NONE,INFO,IVR|${ARG1})
same => n,Set(__ivrreturn=0)
same => n,Return()

[ivr-3]
exten => 1,1,Gosub(ivr-track,s,1(${EXTEN}))
exten => 2,1,Gosub(ivr-track,s,1(${EXTEN}))
exten => 3,1,Gosub(ivr-track,s,1(${EXTEN}))
exten => 4,1,Gosub(ivr-track,s,1(${EXTEN}))
3 Likes