How to implement getting live dtmf while call?

dear everyone
current I implemented dtmf getting solution.
but if i run this, while running detect dtmf code , I can not listen voice and hold music.
after finished the detect dtmf code part, I can listen voice and hold music again.
how to solve this problem?

otherwise how to implement getting live dtmf while call?

this is my dtmf getting solution

[DTMFcode]
exten => s,1,Answer(500)
exten => s,n,Wait(5)
exten => s,n,Set(i=1)
exten => s,n(loopdtmf),While($[${i} != 4])
exten => s,n,Read(dtmfno,s,10,5)
exten => s,n,NoOp(${dtmfno})
exten => s,n,Set(i=$[${i} + 1])
exten => s,n,GotoIf($[“${dtmfno}”=“” & “${i}”=“3”]?enddtmf)
exten => s,n,GotoIf($[“${dtmfno}”=“”]?loopdtmf)
exten => s,n,AGI(cx_agi/dtmf.py,${CALLERID(number)},${ARG2},${dtmfno},${ARG2})
exten => s,n(enddtmf),EndWhile()

this is whole call trace.

Why did you ask me to delete the previous post if you were just going to repost it?

past post is not good for explanation my problem.

Because he was accused of doing something less than legal with his script and probably didn’t want others to see that.

I have to say anything that involves trying to record DTMF tones doesn’t sound particularly legit!

current I implemented dtmf getting solution.
but if i run this, while running detect dtmf code , I can not listen voice and hold music.
after finished the detect dtmf code part, I can listen voice and hold music again.
how to solve this problem?

otherwise how to implement getting live dtmf while call?

this is my dtmf getting solution

[DTMFcode]
exten => s,1,Answer(500)
exten => s,n,Wait(5)
exten => s,n,Set(i=1)
exten => s,n(loopdtmf),While($[${i} != 4])
exten => s,n,Read(dtmfno,s,10,5)
exten => s,n,NoOp(${dtmfno})
exten => s,n,Set(i=$[${i} + 1])
exten => s,n,GotoIf($[“${dtmfno}”=“” & “${i}”=“3”]?enddtmf)
exten => s,n,GotoIf($[“${dtmfno}”=“”]?loopdtmf)
exten => s,n,AGI(cx_agi/dtmf.py,${CALLERID(number)},${ARG2},${dtmfno},${ARG2})
exten => s,n(enddtmf),EndWhile()

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