Can phone play sound/ringtone?

In looking through the API, I don’t see any way for an app to be able to prompt the phone to play some sort of sound or ringtone. Is it possible? Granted, I know it could definitely be abused (ah, the old toilet flushing sound that Sun used to include with SunOS!), but it could also be quite handy to create an alarm app that doesn’t depend on PBX features. Thanks!

You can’t let it play a soundfile i think.
The only way to do that is to start an outgoing call to an extension in the Dialplan that answers the call and plays the soundfile through the speaker.
The function is digium.phone.dial(parameters)