current I am trying to get dtmf code when calling.
so to do this, I made python file and add the code to dialplan like this.
exten=>.,1,Set(CALLERID(num)=${cid})
exten=>.,n,Gosub(monitor,${EXTEN},1)
same => _X!,1,Answer()
same => n,WaitForSilence(1500,1)
same=> n,Playback(waitmusic)
same => n,WaitForSilence(1500,1)
same => n,AGI(cx_agi/dtmf.py,${CALLERID(number)},${EXTEN},${UNIQUEID})
same=> n,BackGround(waitmusic)
same => n,WaitForSilence(1500,1)
same=> n,BackGround(waitmusic)
same=>n,WaitExten(3)
same => n,Dial(SIP/${EXTEN})
but I can not get dtmf code yet.
while check agi debug, I can see this error too.
File “/usr/lib/python2.7/site-packages/asterisk/agi.py”, line 211, in get_result
raise AGIUnknownError(code, ‘Unhandled code or undefined response’)
asterisk.agi.AGIUnknownError: (511, ‘Unhandled code or undefined response’)
– <Local/99904443453888000@out1-00000000;2>AGI Script cx_agi/dtmf.py completed, returning 0
please help me about this problem,