Correct string for Phone Apps

I’m deploying Mitel 6867i phones. I can program a soft key for the visual VM app, and it appends the extension when creating the .cfg. I want to map one of the hard keys to that app. So in the base file, I add the following 2 lines:

hardkey10 type: "xml"
hardkey10 value: “http://192.168.1.216:84/applications.php/voicemail/main?linestate=$$LINESTATE$$&user=2709

It works fine on the test phone, but I need the user (2709) to be a variable, to be substituted at rebuild.

Are you not using the Endpoint Manager? It should build the config files for you

I opened a ticket and support pointed me in the right direction.

I am using EPM, but I am programming a hard button on the phone. EPM has no visibility to it. I had to supstiture 2709 with line1Ext, prepended and appended with 2 underscore