« Back to General Discussion - All Versions

Re: New Message from Pedro Rego in Customer Voice Portal (CVP) - General Di

Combination View Flat View Tree View
Threads [ Previous | Next ]
Showing 1 - 20 of 29 results.
of 2
Hello Everybody,

I need to know, how can i catch the hangup event during a call and make a record event on ordinary database or direct on CVP Reporting server.
 
For Example one  Application VXMl answer the customer call, and during your navigation on second menu called "Second Menu Billing" the customer hang up your own call.
 
We need indentify this Hang up during navigation and store a varible where this happens and write it on database.
 
Thanks
Pedro Rego
 

The only valid way to do catch the hangup in Studio/VxmlServer is using an End Of Call java class that checks how the call ended, and if it was a hangup, simulates what the CVP_Subdialog_Return does. The Java code below does this. It looks for session variables return0, return1, return2, return3 and returns them to ICM. In ICM, they'll show up in the Termination Variable table in the FromExtVXML array entries if you've configured these variable as Persistent.

You will have to compile this java and then configure the Studio app (Project / Properties / Call Studio / End Point Settings / End of Call - Class: EndClassSubRet
And you'll have to have the info in Session variables return0,1,2,3 (or modify the java to grab the session variables that you care about).


//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();
}
}
}
}

Hi Janine,

Do you have any update on VoiceXML invoke why its causing gateway to reload. While trying to pass parameters.

Phani.

The easiest thing to do is attach an EndClass to your application. This custom class will ALWAYS be called, even if the caller hangs up. Create a session variable in the start of the Application (use an App Modifier node) and initialize it. If your caller finishes the app correctly, you can set the variable to something else.

So the end class knows if the caller hung up – because the session var has the initial value. Write something suitable in the app log, something that the CVP Reporting server can find. I don’t know that server – never used it, don’t need it, not paying $20k for it.

Regards,
Geoff

That was interesting, Janine.

Regards,
Geoff

The above post useful me too

Thanks Janine and Geoff.

What version of IOS Gateway supports VoiceXML 2.0 and 2.1



Please let me know



Karthik.

Phani (Karthik), have you changed your forum name? This is Pedro's thread, please respect that and stay on the topic specific to this thread.


Janine,

I've seen a similar code sample before, I'm assuming that code overwrites whatever you have in the SubDialogeReturn element in Studio correct? (also assuming this app does not end in an app transfer or something other than a SubDialogReturn). Is there a way to populate directly to the PVs? I am just curious as to where the constraint lives that allows us to only use Caller_Input and FromExtVXML array.

Otherwise Pedro, you'll have to use the AddToLog method against the session API in the custom java that Janine posted to populate to the CVP reporting logs.. you'll find whatever you place in the AddToLog method in the VXML_Custom table in CVP Reporting. Or do as Geoff does and use come custom Java to write anywhere else.

-Ryan

I got some a problem with may previous account and need to update permissions, I am not sure about that. So created a new account.

If you guys have a time please review my post and get back to me.

Just to add. If you need more details, the CallEnd Action is very well described in Chapter 5.
http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/customer_voice_portal/cvp8_0/programming/guide/cvp_801_prog.pdf

Hemal



From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Wednesday, April 11, 2012 2:50 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Janine Graves in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: Indentify HANGUP and write on Report where happens.

Janine Graves has created a new message in the forum "General Discussion - All Versions":

--------------------------------------------------------------
The only valid way to do catch the hangup in Studio/VxmlServer is using an End Of Call java class that checks how the call ended, and if it was a hangup, simulates what the CVP_Subdialog_Return does. The Java code below does this. It looks for session variables return0, return1, return2, return3 and returns them to ICM. In ICM, they'll show up in the Termination Variable table in the FromExtVXML array entries if you've configured these variable as Persistent.

You will have to compile this java and then configure the Studio app (Project / Properties / Call Studio / End Point Settings / End of Call - Class: EndClassSubRet
And you'll have to have the info in Session variables return0,1,2,3 (or modify the java to grab the session variables that you care about).


//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();
}
}
}
}
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/5437194>

or simply reply to this email.

Not sure what you are up to man. However you are messing this forum up and you are persistent about it. You are mixing threads, coming with different id’s, asking same questions again and again to different people.
From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Wednesday, April 11, 2012 3:28 PM
To: cdicuser@developer.cisco.com
Subject: New Message from karthikmerc (simulated) in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: New Message from Pedro Rego in Customer Voice Portal (CVP) - General Di

karthikmerc (simulated) has created a new message in the forum "General Discussion - All Versions":

--------------------------------------------------------------
I got some a problem with may previous account and need to update permissions, I am not sure about that. So created a new account.

If you guys have a time please review my post and get back to me.
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/5437354>

or simply reply to this email.

Hi Ryan,

I didn't write that end class java from scratch, I got it from the post you mention. Can't remember who posted it, maybe Paul?

The End of Call java class executes no matter how the call ends. But, the java I posted checks if the ended with 'hangup', and only continues in that case. If the caller hangs up, the call flow does not execute the CVP Subdialog Return, so no worries about overwriting it. And conversely, if the call goes thru the CVP Subdialog Return, then the caller didn't hang up. So, no need to worry.

I know of no way to populate the PVs directly. When returning data from VxmlServer one can only populate caller_input, FromExtVXML[0],...[3]. It must be written into the IVR Service or ICM Service code on the Call Server. And, if the caller hangs up, the ICM script ends immediately, so the best you can do is return data that populates the CallTermination Variable table. One might be able to create a session variable in the End of Call java class, assign it the data, and have it show up in the Reporting Server. I haven't tested to see if variables created in End of Call java would make it to the reporting server, but I don't see why not. But, this doesn't address the PV problem.

Maybe Paul Tindall could file that as an enhancement request.

Great info. Thanks Janine!
________________________________
From: Cisco Developer Community Forums [cdicuser@developer.cisco.com]
Sent: Wednesday, April 11, 2012 3:45 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Janine Graves in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: New Message from Pedro Rego in Customer Voice Portal (CVP) - General Di

Janine Graves has created a new message in the forum "General Discussion - All Versions":

--------------------------------------------------------------
Hi Ryan,

I didn't write that end class java from scratch, I got it from the post you mention. Can't remember who posted it, maybe Paul?

The End of Call java class executes no matter how the call ends. But, the java I posted checks if the ended with 'hangup', and only continues in that case. If the caller hangs up, the call flow does not execute the CVP Subdialog Return, so no worries about overwriting it. And conversely, if the call goes thru the CVP Subdialog Return, then the caller didn't hang up. So, no need to worry.

I know of no way to populate the PVs directly. When returning data from VxmlServer one can only populate caller_input, FromExtVXML[0],...[3]. It must be written into the IVR Service or ICM Service code on the Call Server. And, if the caller hangs up, the ICM script ends immediately, so the best you can do is return data that populates the CallTermination Variable table. One might be able to create a session variable in the End of Call java class, assign it the data, and have it show up in the Reporting Server. I haven't tested to see if variables created in End of Call java would make it to the reporting server, but I don't see why not. But, this doesn't address the PV problem.

Maybe Paul Tindall could file that as an enhancement request.
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/5437562>

or simply reply to this email.

Ryan,
The code will not overwrite the subdialog return at all. These are two separate things. I have used this class to log certain things to database etc. This is more on the CVP side. While subdialog return typically returns your vals to ICM.
Also you can create end class that could write something to reporting server.
Hemal
________________________________
From: Cisco Developer Community Forums [cdicuser@developer.cisco.com]
Sent: Wednesday, April 11, 2012 3:22 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Ryan Hilfers in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: New Message from Pedro Rego in Customer Voice Portal (CVP) - General Di

Ryan Hilfers has created a new message in the forum "General Discussion - All Versions":

--------------------------------------------------------------
Phani (Karthik), have you changed your forum name? This is Pedro's thread, please respect that and stay on the topic specific to this thread.


Janine,

I've seen a similar code sample before, I'm assuming that code overwrites whatever you have in the SubDialogeReturn element in Studio correct? (also assuming this app does not end in an app transfer or something other than a SubDialogReturn). Is there a way to populate directly to the PVs? I am just curious as to where the constraint lives that allows us to only use Caller_Input and FromExtVXML array.

Otherwise Pedro, you'll have to use the AddToLog method against the session API in the custom java that Janine posted to populate to the CVP reporting logs.. you'll find whatever you place in the AddToLog method in the VXML_Custom table in CVP Reporting. Or do as Geoff does and use come custom Java to write anywhere else.

-Ryan
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/5438880>

or simply reply to this email.

Hi Ryan,

I didn't write that end class java from scratch, I got it from the post you mention. Can't remember who posted it, maybe Paul?

The End of Call java class executes no matter how the call ends. But, the java I posted checks if the ended with 'hangup', and only continues in that case. If the caller hangs up, the call flow does not execute the CVP Subdialog Return, so no worries about overwriting it. And conversely, if the call goes thru the CVP Subdialog Return, then the caller didn't hang up. So, no need to worry.

I know of no way to populate the PVs directly. When returning data from VxmlServer one can only populate caller_input, FromExtVXML[0],...[3]. It must be written into the IVR Service or ICM Service code on the Call Server. And, if the caller hangs up, the ICM script ends immediately, so the best you can do is return data that populates the CallTermination Variable table. One might be able to create a session variable in the End of Call java class, assign it the data, and have it show up in the Reporting Server. I haven't tested to see if variables created in End of Call java would make it to the reporting server, but I don't see why not. But, this doesn't address the PV problem.

Maybe Paul Tindall could file that as an enhancement request.

 
Great info. Thanks Janine! I am currently writing to the reporting server on an OnEndCall class just using the AddToLog method, so that is definitely possible. The point of only being able to populate to TCD is a great one, wouldn't have found that out until I tried this. Thanks!

Hi Ryan,

I didn't write that end class java from scratch, I got it from the post you mention. Can't remember who posted it, maybe Paul?

The End of Call java class executes no matter how the call ends. But, the java I posted checks if the ended with 'hangup', and only continues in that case. If the caller hangs up, the call flow does not execute the CVP Subdialog Return, so no worries about overwriting it. And conversely, if the call goes thru the CVP Subdialog Return, then the caller didn't hang up. So, no need to worry.

I know of no way to populate the PVs directly. When returning data from VxmlServer one can only populate caller_input, FromExtVXML[0],...[3]. It must be written into the IVR Service or ICM Service code on the Call Server. And, if the caller hangs up, the ICM script ends immediately, so the best you can do is return data that populates the CallTermination Variable table. One might be able to create a session variable in the End of Call java class, assign it the data, and have it show up in the Reporting Server. I haven't tested to see if variables created in End of Call java would make it to the reporting server, but I don't see why not. But, this doesn't address the PV problem.

Maybe Paul Tindall could file that as an enhancement request.

 
Great info. Thanks Janine! I am currently writing to the reporting server on an OnEndCall class just using the AddToLog method, so that is definitely possible. The point of only being able to populate to TCD is a great one, wouldn't have found that out until I tried this. Thanks!

Sry about the crazy posts.. not sure what happened. We've had enough of those in these forums lately.... And Hemal, you're exactly right... I completely blipped the IF statement (if (data.getHowCallEnded().equals("hangup"))... however IF for some crazy reason you wanted to use this code to return values in those variables it would be possible to use that code to do so if you always executed the vxml portion, not only on hangup. Anyway, not the purpose of this thread, thank you both for answering my questions.

-Ryan

 
Janine,
 
Yes, the original was an example I posted specifically in response to getting hangup indication and data back to ICM.  Unfortunately, further script processing doesn't happen once the final response from CVP gets back to ICM so it's not possible to move data from the ECCs to PVs; that would definitely require a code change.
 
Paul

Below code can be used:


public void onEndCall(CallEndAPI data) throws AudiumException
{
if (data.getHowCallEnded().equals("hangup"))
{
try {


String strTraversedElementPath= data.getElementHistory();// the element
detail where the call was hanged up

// insert the content of strTraversedElementPath to database table directly
from this class.

}




Regards,
Rakesh
Eat drink and find satisfaction in work, Enjoy the life with the one you
love,be happy and do good as long as you live.



From: Cisco Developer Community Forums <cdicuser@developer.cisco.com>
To: "cdicuser@developer.cisco.com" <cdicuser@developer.cisco.com>
Date: 12/04/2012 01:03
Subject: New Message from Pedro Rego in Customer Voice Portal (CVP) -
General Discussion - All Versions: Indentify HANGUP and write
on Report where happens.



Pedro Rego has created a new message in the forum "General Discussion - All
Versions":

--------------------------------------------------------------
Hello Everybody,

I need to know, how can i catch the hangup event during a call and make a
record event on ordinary database or direct on CVP Reporting server.

For Example one  Application VXMl answer the customer call, and during your
navigation on second menu called "Second Menu Billing" the customer hang up
your own call.

We need indentify this Hang up during navigation and store a varible where
this happens and write it on database.

Thanks
Pedro Rego

--
To respond to this post, please click the following link:

<
http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/5437146
>

or simply reply to this email.

Rakesh Ameta and other guys
 
Thanks for all samples
 
1 - The big question is after created this class inside my properties project we load on my endppoint Settings?
Properties-->CallStudio-->EndPointSettings-->On Application End
After that we use the (ADD...) button
 
2 - If the system Identify Hang-up i need record the 3 Session Variables (Created on my CISCO CVP application) on this database "SicrediCiscoReports" using this quey showed below.
 
I not so good im Java could you send a new sample with more details using this Database and this Query?
 
JNDI NAME : SicrediCiscoReports
 
QUERY:
INSERT INTO IVRDATA VALUES(
'{Data.Session.s_DataIVR1}'
'{Data.Session.s_DataIVR2}'
'{Data.Session.s_DataIVR3}'
 )
 
3 - Rakesh I do not need to know where and which element in the occors Hangup, the more it can be very helpful too for me.
Today I need to know the piece of the application that he own.(it belongs) Because this my intuite is use only variables
Could you explain your example?
Imagine I have a Menu Element called 'Car Menu', how could I use it on your exemplo below?
 
String strTraversedElementPath= data.getElementHistory();// the element
detail where the call was hanged up
Sorry about a lot of questions Thanks for all.

Showing 1 - 20 of 29 results.
of 2