Variables named with a "-"

I’m a noob when it comes to scripting mikrotik. How do you use varables with a name that contains a “-” ?

Reading the manual at https://wiki.mikrotik.com/wiki/Manual:PPP_AAA
For /ppp profile under section “on-up” it states:

Execute script on user login-event. These are available variables that are accessible for the event script:

user
local-address
remote-address
caller-id
called-id
interface

When I insert a script like this:

/log info message="test $user"

The log states “test myusername” every time myusername logs in.
But if I do the following:

/log info message="test $caller-id"

I don’t get the caller id in the log. What I find in the log is “test -id”
How do I make use of this variable?

You need to use double quotes for variable with spesial characters.
Then use parentheses and . to join text and variable.
Example:

[
:local "us-er" "demo"
:log info message= ("user=".$"us-er")
]

result in log file:
user=demo

You find information about double quote variable in the manual
https://wiki.mikrotik.com/wiki/Manual:Scripting
Search for “Valid characters”

Thanks