Is there a way to pass variable (e.g. ${SIPCALLID}) to dynamic feature function call?
What I need to do is to record DTMF digits pressed in a call and somehow relate it back to particular CDR via SIPCALLID or any other vairable.
And by the way I am not talking about using the READ function. I simply need Asterisk constantly scan for DTMF digits (so that is why I choose using dyanmic feature map) and whatever DTMF digits is being pressed during a CONNECTED call, asterisk will record it. I know I can turn on the logger, but still that won’t let me relate dtmf digits to a particular call.
Is that possible?
I checked the example in the features.conf file which:
retrieveinfo => #8,peer,Set(ARRAY(CDR(mark),CDR(name))=${ODBC_FOO(${CALLERID(num)})})
so using that example, I wrote:
retrieveinfo => #8,peer,Set(ODBC_InsDTMFPressed()=${CALLERID(num)},8)
where InsDTMFPressed is in func_odbc.conf:
Insert Into DTMF_Pressed (SIPCallID,DTMF_Digit) Values (’${SQL_ESC(${VAL1})}’,’${SQL_ESC(${VAL2})}’)
But when I tried using it, in the database, it recorded the string “${CALLERID(num)}” instead of the actuall callerid number. So it leads me think that dynamic feature is NOT capable of getting variable from the call itslef? Or am I missing some setting so that it will actually get the variable duirng the call?
Thank you!