Send callerid as arg to rb file

i have a ruby app with for post something as arg to my web server for example: i want to send phone number for adding in my database i use this command

ruby /home/test.rb 123456

now i want to send callerid with asterisk in my extension.conf in set this commands

exten => 111,1,NoOp(${CDR})
exten => 111,2,System(ruby /home/test.rb “${CDR(clid)}”)
exten => 111,3,Dial,sip/111
exten => 111,4,Congestion

but nothing send to my ruby file
help please

Use CALLERID(num||name||all) without the quotes.

not working
i include my ruby path in my app and after calling in my asterisk console i see this:
System(“SIP/110-00000001”, “/tmp/test1.rb ““device” <110>””) in new stack

and do nothing but when i try to run /tmp/test1.rb ““device” <110>” is working in linux shell.

Check the permission of the user running asterisk or build an AGI instead system.