Hi could anyone help me with this problem?
I have a macro in my dialplan, for example:
exten=s,1,Answer()
exten=s,n,Dial(${ARG2},20,A(blah))
exten=s,n,Goto(s-${DIALSTATUS},1)
exten=s-NOANSWER,1,TrySystem(echo "no answer" > /tmp/log.txt)
exten=s-NOANSWER,n,Voicemail(${ARG1},u)
exten=s-NOANSWER,n,Goto(default,s,1)
exten=s-BUSY,1,TrySystem(echo "busy" > /tmp/log.txt)
exten=s-BUSY,n,Voicemail(${ARG1},b)
exten=s-BUSY,n,Goto(default,s,1)
exten=s-ANSWER,1,TrySystem(echo "Answered" > /tmp/log.txt)
exten=s-ANSWER,n,Goto(default,s,1)
exten=s-CHANUNAVAIL,1,TrySystem(echo "CHANUNAVAIL" > /tmp/log.txt)
exten=s-CHANUNAVAIL,n,Goto(default,s,1)
exten=_s-.,1,TrySystem(echo "${DIALSTATUS}" > /tmp/log.txt)
exten=_s-.,n,Goto(default,s,1)
exten=a,1,VoicemailMain(${ARG1})
However, when the call is “BUSY” or “NOANSWER”, i can receive the newly created log file, but if I answered the call, nothing happened.
So could anyone help me that how i can track the “answered” channel and do stuff according to it, say for example, i want to log the call time?
Thanks in advance!