Hi there,
The greeting of an extension is actually not manipulated through the API but by XML files located in C:\ProgramData\3CX\Instance1\Data\Ivr\Voicemail\Data\XXX where XXX is the extension number.
If no files are found in this folder or if it doesn't exist then it's the default prompt that applies.
If however there is a file named "greetings.xml" with following contents as long with a wav file matching in same directory then a custom prompt applies for all profiles:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<overrides>
<greeting profile="default" file="Yourfile.wav" />
</overrides>
If you need separate greetings for certain profiles you may make a test extension, configure it as wanted through the management console, then check the XML file generated.