Skip to end of banner
Go to start of banner

How to check from CDR-View whether missed call has been called back

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Created: March 2020

Permalink:

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
  • Set -> Caller name
  • Call group


Outgoing calls configuration 

Create a separate Dialplan procedure ("user callback" in our example)0.

  • Set -> FOO -> +44${EXTEN:1} - this is setting the variable FOO to the called number which the Dialplan reference 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.
  • 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 seconds
  • NoOp(CallCount is ${CallCount}) | describes the result if the called number had called in within the last 60 minutes and not been answered
  • NoOp(LastTag is ${LastTag:5}) | describes what the last tag against that missed call was
  • Jump to if - ${CallCount} > 0 - | checking 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

callback

  • 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} - use initial variable set which to dial the trunk with the initial called number.

CDR Report Example 

  • No labels