On Nethvoice 14 it was possible to execute configure a custom script executed by nethcti at the end of the call
This feature is partially ported on NS8, but still doesn't work properly. Also if executed in nethcti-server container there are too many limitations (no bash, no curl, no php)
Proposed solution
Launche the script as an AGI in the macro-hangupcall