I updated the code and output above.
I ran into an issue using $FROMEXTEN in the post call recording script it wouldn’t detect the call recording based off if the call direction was external.
So with a little thinking i decided to try and use the $FILENAME and parse that filename for a 4 digit length(which my extensions) are if yours are different then 4 change that value above.
This works better it detects call recording internal-internal, internal-external, and external-internal. My only trouble now is internal-internal. How can i determine who is the party that wanted the call recorded.
I was looking at asterisk output of mixmon it shows the channel id which is the calling party but i’m not sure if thats the receive or starting party or if it’s who called mixmon. If anyone has any input to that it would be greatly appreciated.