I think the CDR generator of the Asterisk
needs change to record the complete information.
Agreed. However, there are still challenges here. First, you could use
the custom_csv to create your own CDR layout that includes the dialed
number, but you'd still need to come up with a way to get
*snipped
Second, when using a .call file (or the manager interface's Originate
action) the 'Dial' action is executed BEFORE entry into the dialplan, so
if it fails, nothing in your dialplan is executed and you get a somewhat
*snipped
not *exactly* true.
you need to add
;this extension