Caller Hangup: This has been answered many times on the Forum already. Go to Google and search: developer.cisco.com caller hangup - here's one such place where it was discussed: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/5437146
You have to create an End of Call java class and check for how the call ended:
public void onEndCall(CallEndAPI data) throws AudiumException
{
if (data.getHowCallEnded().equals("hangup"))
{ blah blah blah
}
}
Hi Janine
Many thanks for your reply and yes i know that there are a numerous number of these in the forum but it´s hard to get a clear view of what´s really needed to accomplish this. I took your code from your other thread and compiled it. I hope it went ok as the javac did not complain about anything and i got the .class file. Although im having issues that when putting the .class file in c:\cvp\vxmlserver\applications\voicemail\java\applications\classes the vxml server complains during start up. The error in the error_log states :
Root Cause: java.lang.NoClassDefFoundError: AudiumException (wrong name: com/audium/server/AudiumException)
This is what i compiled :
//These classes are used by on call end classes
import com.audium.core.vfc.VException;
import com.audium.core.vfc.VPreference;
import com.audium.core.vfc.form.VBlock;
import com.audium.core.vfc.form.VForm;
import com.audium.core.vfc.util.VAction;
import com.audium.core.vfc.util.VMain;
import com.audium.server.AudiumException;
import com.audium.server.proxy.EndCallInterface;
import com.audium.server.session.CallEndAPI;
/**
* If caller hung up, send data
* from the Session variables return0, return1, return2, return3
* to ICM into ECC variables FromExtVxml[0], [1], [2], [3]
*/
public class EndClassSubRet implements EndCallInterface
{
/**
* All On End Call classes must implement this method. Use the passed
* CallEndAPI class to get useful information. Making changes here will
* do nothing as the call has already ended.
*/
public void onEndCall(CallEndAPI data) throws AudiumException
{
if (data.getHowCallEnded().equals("hangup"))
{
try {
//get data to return to ICM from these Session variables:
//and return 'hangup' in the caller_input ECC variable of ICM
//return0, return1, return2, return3
String return0 = (String) data.getSessionData("return0");
String return1 = (String) data.getSessionData("return1");
String return2 = (String) data.getSessionData("return2");
String return3 = (String) data.getSessionData("return3");
VPreference pref = data.getPreference();
VMain vxml = VMain.getNew(pref);
VForm form = VForm.getNew(pref);
VBlock block = VBlock.getNew(pref);
VAction var = VAction.getNew(pref, VAction.VARIABLE, "caller_input", "hangup", VForm.WITH_QUOTES);
block.add(var);
VAction returnTag = null;
if(return0 != null){
VAction var0=VAction.getNew(pref, VAction.VARIABLE, "FromExtVXML0", return0, VForm.WITH_QUOTES);
block.add(var0);
if(return1 != null){
VAction var1=VAction.getNew(pref, VAction.VARIABLE, "FromExtVXML1", return1, VForm.WITH_QUOTES);
block.add(var1);
if(return2 != null){
VAction var2=VAction.getNew(pref, VAction.VARIABLE, "FromExtVXML2", return2, VForm.WITH_QUOTES);
block.add(var2);
if(return3 != null){
VAction var3=VAction.getNew(pref, VAction.VARIABLE, "FromExtVXML3", return3, VForm.WITH_QUOTES);
block.add(var3);
returnTag = VAction.getNew(pref, VAction.RETURN, "caller_input FromExtVXML0 FromExtVXML1 FromExtVXML2 FromExtVXML3");
} else{
returnTag = VAction.getNew(pref, VAction.RETURN, "caller_input FromExtVXML0 FromExtVXML1 FromExtVXML2");
}
}else {
returnTag = VAction.getNew(pref, VAction.RETURN, "caller_input FromExtVXML0 FromExtVXML1");
}
}else {
returnTag = VAction.getNew(pref, VAction.RETURN, "caller_input FromExtVXML0");
}
}else {
returnTag = VAction.getNew(pref, VAction.RETURN, "caller_input");
}
block.add(returnTag);
form.add(block);
vxml.add(form);
data.setCustomVxmlResponse(vxml);
} catch (VException ex) {
ex.printStackTrace();
}
}
}
}