Hi Itzik,
I took a second look at my dialplan sample and realize that I made a mistake during writing it. I have corrected it at the previous post and I am attaching it here again. It is a better approach to write it.
[custom-restart-server]
exten => _X!,1,Answer
same => n,Playback(agent-logoff)
same => n,Hangup()
Thank you,
Daniel Friedman
Trixton LTD.