Forward Voicemail to Email
You can extend Voicent IVR platform by integrating it with web sites or any other software products. There are two basic methods (actions): HTTP or Java. HTTP is the protocol for the Internet. It is best used for web site
integration. Java is a general programming language. It can be used to extend Voicent IVR platform with virtually no limit. In this sample, we use the Java method.
Open the property page (Right mouse click on an element, then choose Properties... from the popup menu.) for the Voicemail to Email element, select the Action tab, then click the New button. (For existing action, choose the Edit button.)
The Java action for Voicemail to email is shown below:
Here the Java action is invoking Java method send of the class voicent.sample.MyEmailSender. The class is included in the Jar file: testjar.jar and it also requires additional jar file: activation.jar and mail.jar.
The send method has two argument. The first one of of type java.lang.String, and the value is __VG__LAST_RESULT__, (which is the recorded voice message file); the second argument is a variable email_address,
which we set to the voicemail owner's email address when the call flow is transitioned to the voicemail box.
When the system executes the action, it first loads all the Jar files; then it loads the Java Class specified and creates an instance of the class, and finally executes the specified method with the arguments.
If you want to check or use return values of a Java action, the return must be the Properties Class. The returned value can be access in the IVR Studio using the dot notation. For example, if the Java action
is named send_email, and the status return code is named "status_code", then it can be accessed as send_email.status_code. We can use the return value for prompt or as an argument for other actions.