Send an email with custom destination

Hello community,
i would like to know, how i can put into email body the information about the last executed contex. Let me explain much clear as possible. I have created custom destination for sending an email when the call exit without response by a queues. When the call flow come into my custom destination, i would like to insert into email body the queue number about the call come from, but i have tried all global variables without success, now i can only have the ${UNIQUEID} variable and the datetime information, but the uniqueid can be understood only by the Freepbx administrator.
This is my custom destination (custom-context)

[send-email-unanswer]
exten => s,1,NoOp(Entering user defined context [send-email] in extensions_custom.conf)
exten => s,n,System(echo ‘Call ID: ${UNIQUEID}, from number ${CALLERID(number)} at ${STRFTIME(${EPOCH},%X del %x)}’ | mail -s ‘Unanswered call’ ‘[email protected] [email protected]’)
exten => s,n,Return()

If i could get the information saved into cel mysql table about the call, maybe the required queues id number may can be available as variable?

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