How to check if a missed call has been called back

The Article explains how to check if a missed call has been called back from CDR-View.

Created: March 2020

Permalink: https://wildix.atlassian.net/wiki/x/0QLOAQ

Introduction

Issue:

Someone has called in and the call was missed, but we don’t know if anyone has called them back.

Resolution:

Check CDR-View data on all outgoing calls to see if the called number has called in previously and not been answered, then set a tag to say it’s been called back.

Incoming calls configuration

Edit the Dialplan procedure used for managing incoming calls ("main" in our example) by adding the following applications:

  • Set -> Tags select the tags that you would like to set for this type of calls
  • Set -> Caller name 
  • Call group - routes the call to the selected Call Group

Detailed description of Dialplan applications is in the Guide .


Outgoing calls configuration 

  • Create a separate Dialplan procedure ("users callback" in our example): 


Add 0. : 0 followed by any digit (external) as a called number and add the following applications:

  • Set -> FOO -> +44${EXTEN:1} - sets the variable FOO to the called number which the Dialplan references later on when dialling the trunk
  • Custom application -> NoOp(ToNumber is +44${EXTEN:1}) - describes what number has been dialled in connocial with + format
  • Custom application -> Set(CallCount=${SHELL(value=`sqlite3 /mnt/cdr/cdrdb "select count() from cdr where c_from = '+44${EXTEN:1}' and answer = '' and start > Datetime('now' ,'localtime','-60 minutes');"` && echo $value)}): - queries CDR to find out if the number called has called in previously within the last 60 minutes and has not been answered
  • Custom application -> Set(LastTag=${SHELL(value=`sqlite3 /mnt/cdr/cdrdb "select lastdata from cdr where c_from = '+44${EXTEN:1}' and answer = '' and start > Datetime('now' ,'localtime','-60 minutes');"` && echo $value)}): - checks what the last tag was against the missed call within the last 60 minutes
  • Custom application -> NoOp(CallCount is ${CallCount}) - describes the result if the called number had called in within the last 60 minutes and not been answered
  • Custom application -> NoOp(LastTag is ${LastTag:5}) - describes what the last tag against that missed call was
  • Jump to if -> ${CallCount} > 0 - checks to see if the outbound called number has called in previously and the call was missed then jumping to set a tag and dial the trunk
  • Dial the trunk - if the called number is not being returned from a missed call carry on calling without setting tag

Add callback as a called number and add the following applications:

  • Set -> Tags -> ${LastTag:5},Callback - sets a tag against the outbound leg of the call with the initial tag appended from the original missed call
  • Dial the trunk -> ${FOO} - uses the initial variable set which to dial the trunk with the initial called number

CDR Report Example