I am using vicidialnow C.E with sangoma PRI card and my client requires the status of the dialed calls which were switched-off,busy.notreachable etc.
But vicidial in default logs all the calls not connected as NEW -LEAD so i amde some changes.
1. In dial plan i added call log .agi
***********************************************
exten => _X.,1,Set,CALLERID(number)=4466875900
exten => _X.,n,Monitor(gsm,${TIMESTAMP}_${EXTEN}_${CALLERID(num)},b)
exten => _X.,n,AGI(call_log.agi,${EXTEN})
exten => _X.,n,Dial(Zap/g0/${EXTEN},,tTo);
exten => _X.,n, Hangup();
***************************************
2.In hangup script i added call log agi , vhnagup.agi and my own edited vdhangup.agi which logs the call details to my table which i created is adterisk database.
*************************************************
exten => h,1,DeadAGI(call_log.agi,${EXTEN})
exten => h,2,DeadAGI(VD_hangup.agi,PRI-----DEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
exten => h,3,DeadAGI(arun_hangup.agi,PRI-----DEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
*************************************************
My script everything is working fine and i am geeting my reports but some times the CPU usage goes more than 100% for 25 Users and Asterisk stops automatically.
I have also disabled all unwanted cronjobs and removed recording-mixing from cron and doing it manually after the shift.
But still my Asterisk stops at some times (3-4 times a day.).
Please help is there any way to stop this.