Callfile Reporting - New Approach


(Communication Technologies) #1

FreePBX/Asterisk 14

We typically use call files to execute a variety of outreaches, using the userfield to report out on progress and outcomes. This works well except it does not account for the non-answered calls (bad number, no human/machine pickup). Where reporting is easy, using the userfield for the connected calls, it is considerably more difficult for the others.

I had a new idea, where I would make the customer phone number a set variable in the call file and instead dial the local extension 5555555555. The 5555555555 context would only exist to write a “Dialing” status in the userfield before calling the customer and connecting true answers to the real context.

I think I have it all worked out how I would do this, except:

  • Have the 5555555555 extension call out to the customer and wait for an answer (amd), on pickup it would go to the original context [outreach-context] for amd and processing.

  • After 45 seconds if there was no answer, or we got an invalid/disconnected number, we would note “call failure” in the user field and hangup.

Any ideas for dialplan here? Any other ideas that might accomplish the same goal (capturing outreach results for no answer dispositions)?

Note: FreePBX broadcast is not a viable option due to limited flexibility in the messaging that can go out and the fact that broadcast is hardcoded to a 30 second ring time, which is not long enough to hit major US carrier voicemails.


(Itzik) #2

The exit status in call files is just for that, see wiki: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Call+Files

But if you do want to use a custom internal context, then I guess you should use something like

Channel: local/s@outreach-context
Setvar: number=5555555555

And then the dialplan something like

[outreach-context]
exten => s,1,Noop(Entering context bla bla bla)
exten => s,n,Dial(local/${number}@from-internal,45)
exten => s,n,Set(CDR(userfield)=${DIALSTATUS})
exten => s,n,Hangup

You may also use the Hangup handler to process the logging as well.


(Communication Technologies) #3

Thanks for this, In order to get the call file variable, NOTE, into the CDR for the failed calls, I think I will need to use the internal context.


(Itzik) #4

The outgoing call is calling with the internal context.

You also might want to tweak it a little so it’ll always get stored.

[outreach-context]
exten => _.,1,Noop(Entering context bla bla bla)
exten => _.,n,Dial(local/${number}@from-internal,45)
exten => h,1,Set(CDR(userfield)=${DIALSTATUS})
exten => h,n,Hangup

#5

(system) closed #6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.