H323 custom extensions

Hi,

I have set up a new FreePBX 2.5.1 with an OOh323 connection to an Avaya Modular Messaging system. I have the H323 trunks running & I can dial the MM directly. However, I want to be able to forward calls to it & carry the original dialled number. I set up a custom extension using a custom dial string:

OOH323/${SOMEVARIABLE}@IP_ADDRESS_OF_MM

I need the ‘SomeVariable’ to contain the original dialled extension number that is being forwarded & have tried several of the available system ones - DNID, DIALLEDPEERNUMBER, EXTEN etc but it always leaves a blank. If I put in a physical number, it works fine, & proves the concept. However I want the dial string to contain the original dialled number for integration to the MM voicemail, so that doesn’t help.

Has anyone else tried this & got it working, or have another variable or method I can try

Thanks

System - Fresh install of Free PBX 2.5.1 on Centos 5.3 in VMware WS 6.5