Hi Guys
I have a specific need to play audio annoucements to both parties on connection of any calls that states the call will be recorded.
I have acheived this with the Dial() application and the included “Play an announcement” option it has, all good so far.
But futher to this need, for compliance reasons we need to log an entry somewhere (log file, syslog etc) that proves the annoucement was played to the parties.
I have somewhat got this working but its NOT elegant at all and has its flaws.
I have implemented the following in my Dial Plan (just a small snip of the relevant section)
exten => _X.,1,GotoIf($[${DEVICE_STATE(PJSIP/${EXTEN})} != INVALID]?10:15)
exten => _X.,10,Log(compliance,Calling Party: ${CDR(clid)} - Called Party: ${EXTEN} - Play VR annoucement)
exten => _X.,n,Dial(PJSIP/${EXTEN},300,aA(call-recorded:call-recorded))
exten => _X.,n,Congestion(10)
exten => _X.,15,Log(compliance,Calling Party: ${CDR(clid)} - Called Party: ${EXTEN} - Play VR annoucement)
exten => _X.,n,Dial(PJSIP/${EXTEN}@CUCM,300,aA(call-recorded:call-recorded))
exten => _X.,n,Congestion(10)
As you can see I am using the Log() application to generate a specific log entry which states the Calling and Called party and states it has “Play VR annoucement”
I then added this in the logger.conf which is working perfectly and I get an entry into local log file as well as a Syslog sent out to my external Syslog Server that stores these logs.
[general]
custom_levels = compliance
[logfiles]
compliance.log => compliance
syslog.local1 => compliance
The flaw here is that it is logging my entry before the Dial() application is envoked, and if my call is not actually successful, ie it rings and never gets answere or ended before the call was answered etc, then I have an entry that is not realistically true.
The question is do any of you have a better solution as my knowledge on the programatical side of the Dial Plan is limited, in which I can generate this log entry based on certain outcomes of the DIal() application, in other word if the Call Succeeded in that it was answered then I log the entry if the call was rejected or never answered then I dont log an entry?