CALLERIDNUM is not working in 1.2.5 Version of Asterisk

I have succesfuly installed an 1.2.5 Asterisk PBX Server together with a Siemens HIPATH PBX via a Digium Card. Everything is working smoothly exept when I am trying to record an inbound call.

Externsion.conf

exten => _XXX,1,Answer
exten => _XXX,2,Wait(1)
exten => _XXX,3,Set(TIMEOUT(response)=1000)
exten => XXX,4,Monitor(gsm,/home/cron/${TIMESTAMP}${CALLERIDNUM})

This script is actually answers a call ,waits for a second and records the inbound call to a gsm file in the /home/cron/ directory with a name of timestamp_calleridnum

The script is working and I am getting the following output

-Accepting call from ‘[color=green]200[/color]’ to ‘100’ on channel 0/13, span 1
-Executing Answer(“ZAP/13-1”,"") in new stack
-Executing Wait(“ZAP/13-1”,“1”) in new stack
-Set Response Timeout to 1000
-Executing Monitor (“Za/13-1”, “gsm|/home/cron/20060309-130401_[color=green]200[/color]”) in new stack

But sometimes I am getting the following

-Accepting call from ‘[color=red]200[/color]’ to ‘100’ on channel 0/13, span 1
-Executing Answer(“ZAP/13-1”,"") in new stack
-Executing Wait(“ZAP/13-1”,“1”) in new stack
-Set Response Timeout to 1000
-Executing Monitor (“Za/13-1”, “gsm|/home/cron/20060309-130401_[color=red]270[/color]”) in new stack

Pay Attension that the extension ‘200’ is shown as 270 in the monitor command. ( RED COLOUR )

The real problem is that my CDR info stores the wrong extension number (270) causing problems to my production line.

Any Ideas?

CALLERIDNUM is deprecated anyway … you should be using CALLERID(“num”)

I have tried CALLERID(“num”) but with no luck.

exten => _XXX,1,Answer
exten => _XXX,2,Wait(1)
exten => _XXX,3,Set(TIMEOUT(response)=1000)
exten => XXX,4,Monitor(gsm,/home/cron/${TIMESTAMP}${CALLERID(num)})

The same error. Wrong CallerID(num) in the Monitor Command !!!

Any More Ideas ???
I could realy need a help cause I am deeply stack here.

Thanks

Callerid(number)=0123456789