Error 500 when retrieving Call-ID using ARI

Hello, I’m using the ari golang library to retrieve the Call-ID of an existing channel handle using GetVariable("CHANNEL(pjsip,call-id)"). This call ends up creating a GET HTTP request to /channels/<key-id>/variable?variable=CHANNEL(pjsip,call-id), but asterisk responds with 500 Error With Function, do you know what could be the reason for this response? Thanks

Is there anything of note on the Asterisk console? Is it actually a PJSIP channel and not some other kind?