Hi All,
My requirement is, when a call comes to my extension,
I will tranfer the control to my agent who has to accept the call.
Now I have to keep track of the time when agent has lifted the call, so
for that I am using the my cdr table userField to set that time.
but some reason it does’t work, SetCDRUserField inSide the screen (i.e internalDocument macro).
where as when I keep that SetCDRUserField out side screen(ie. Document macro),
it updates my cdr table with that value.
can some one point me to right direction.
I am below this code.
[macro-Documet]
exten => s,1,Dial(SIP/123…@sip, 60, M(InternalDocumet))
[macro-InternalDocumet]
exten => s,1,Read(ACCEPT|/var/lib/asterisk/sounds/pressonetotakecall|1)
exten => s,2,GotoIf($[${ACCEPT} = 1 ]?3:6)
exten => s,3,set(CallAcceptTime=${STRFTIME(${EPOCH},GMT+8,%Y-%m-%d %H:%M:%S)})
exten => s,4,SetCDRUserField(documet-${CallAcceptTime})
exten => s,5,Goto(9)
exten => s,6,SetCDRUserField(" ")
exten => s,7,Playback(/var/lib/asterisk/sounds/agent-busy)
exten => s,8,Set(MACRO_RESULT=CONTINUE)
exten => s,9,NOOP(InternalDocument compeleted)
Any help is highly appreciated.
Thanks & Regards,
Ajay.