03-09-2022 01:16 PM
I've got a Netbeans project that runs fine in the IDE (sends sms message via Twilio). I've got no idea how to get that imported into a custom element though. Is there a guide for how to do this? Some example "hello world" type script from Cisco to show you how to build custom elements?
03-10-2022 05:09 AM
Start here on Cisco Devnet https://developer.cisco.com/docs/customer-voice-portal/
You will find custom element templates and some samples here https://developer.cisco.com/docs/customer-voice-portal/#!sample-code/java-sample-code
Using Netbeans, just code your Java class using the CVP custom Action Element template as the starting point. Deploy as a JAR onto CVP Studio C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.library.common\lib to appear in the palette and onto the VoiceXML server C:\Cisco\CVP\VXMLServer\common\lib for run-time. Doesn't have to be a JAR; you can deploy into /classes at those locations also if preferred.
03-10-2022 06:20 AM
Thanks so much for the reply. I've been looking through them. In netbeans I was able to add a class and dependency for Twilio so I could do the import statements and subsequent code. Where do i get the audium sdk or I need to find the .jars somewhere? Group ID, artifact ID, version?
import com.audium.server.AudiumException;
import com.audium.server.voiceElement.ActionElementBase;
import com.audium.server.session.ActionElementData;
**Working**
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Call;
import com.twilio.type.PhoneNumber;
import com.twilio.rest.api.v2010.account.Message;
03-10-2022 06:43 AM
Main thing you'll need is framework.jar. Sounds like you're using Maven, so copy the JAR from your CVP Studio or server and add it to your local Maven repo. Should then be able to locate dependency.
03-10-2022 09:57 AM
Thanks. You are correct on the Maven. I updated the pom file and now import statements look good and the code compiles fine. Can't get it to show up as a local element though. I moved the Arithmetics.jar over from devNet and that showed up just fine.
I've tried clean build, build with dependencies....uploading .jar and .class. Any thoughts?
03-10-2022 10:14 AM - edited 03-10-2022 10:15 AM
I'd need to see the code. Check the Studio startup log. Also, did you build on Java 8 or lower?
03-10-2022 06:54 PM
Where are the startup logs for Studio?
03-11-2022 01:47 AM
You'll find some logging under Help --> About Studio --> Installation Details --> Configuration --> View Error Log
03-14-2022 12:56 PM
03-14-2022 01:17 PM
Good to know you're over the hurdle. First custom element gets you on the right path to integrate pretty much anything now.
Paul
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide