Author Message
krzychEd
Joined: Dec 12, 2019
Messages: 5
Offline
I have some problem, while I try to start call recording by using:

RecordMessageResponse response = voiceSvcs.recordMessage(request);

While I am trying to use this method I am getting CstaException:

ch.ecma.csta.errors.CstaException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_241]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_241]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_241]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_241]
at java.lang.Class.newInstance(Class.java:442) ~[na:1.8.0_241]
at com.avaya.mvcs.proxy.ClientNegAckToException.convertErrorToException(ClientNegAckToException.java:130) ~[proxy-1.0.jar:"8.0.1.0.0.109 November 22 2018"]
at com.avaya.mvcs.proxy.XmlGatewayClient.handleRequest(XmlGatewayClient.java:250) ~[proxy-1.0.jar:"8.0.1.0.0.109 November 22 2018"]
at com.avaya.mvcs.proxy.Pipeline.handleRequest(Pipeline.java:346) ~[proxy-1.0.jar:"8.0.1.0.0.109 November 22 2018"]
at com.avaya.mvcs.proxy.ClientProxy.routeRequest(ClientProxy.java:699) ~[proxy-1.0.jar:"8.0.1.0.0.109 November 22 2018"]
at com.avaya.mvap.svcproxy.ServiceProxy.marshallRequest(ServiceProxy.java:131) ~[proxy-1.0.jar:"8.0.1.0.0.109 November 22 2018"]
at com.avaya.mvap.svcproxy.VoiceUnitServicesProxy.recordMessage(VoiceUnitServicesProxy.java:244) ~[proxy-1.0.jar:"8.0.1.0.0.109 November 22 2018"]
at com.tenfold.tcc.phonesystem.avaya.AvayaAdapter.startCallRecording(AvayaAdapter.java:958) ~[classes/:na]

Is there any options to enable call recording? Or what causes this exception?

I am using:
Avaya Application Enablement Services
SW Version: 8.1.2.1.0.6-0
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
tell us more about how you registered the device you are trying to use this method on. Did you use 'server' media mode (that is a requirement)? Posting the device registration request your application is making would shed considerable light on this error.
krzychEd
Joined: Dec 12, 2019
Messages: 5
Offline
I register by using:
playAndRecordListener = new MyVoiceUnitListener(station,this, ext);
montSvcs.addVoiceUnitListener(id, playAndRecordListener);



private void addListeners(AvayaStation station, Ccm.Extension ext) throws CstaException {

// Add a listener so we can receive events indicating when the phone is
// registered / unregistered.
registrationListener = new MyRegistrationListener();
DeviceID id = station.getDeviceID();
montSvcs.addRegistrationListener(id, registrationListener);

// Add a listener to receive events indicating when announcements are
// done being played and when recordings have completed.
playAndRecordListener = new MyVoiceUnitListener(station,this, ext);
montSvcs.addVoiceUnitListener(id, playAndRecordListener);

// Add a listener to receive events when touch tones are detected.

// Add a listener to receive call control events
callControlListener = new AvayaCallControlListener(station, this, ext);

try {
montSvcs.addCallControlListener(id, callControlListener);
} catch (SubscribedResourceAvailabilityException e) {
logger.error("Failed to add call control listener, Reason: {}", e.getSubscribedResourceAvailabilityError());
throw e;
}

}

How can I use 'server' media mode?
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
The Voice Unit Services is used to request the AE Services server to record and/or play media into a call for you. In order to use it, you must register the DMCC terminal in Server media mode. When you do this, AE Services requests Communication Manager to send media for the terminal to AE Services.

A registration request for a terminal in Server media mode would look something like:

MediaInfo localMediaInfo = new MediaInfo();
String[] codecList = codecList = new String[] { Audio.G711U };
localMediaInfo.setCodecs(codecList);

LoginInfo login = new LoginInfo();
login.setPassword(password);
login.setDependencyMode(dependencyMode);
login.setMediaMode(MediaMode.SERVER); <<<<<<

RegisterTerminalRequest regRequest = new RegisterTerminalRequest();
regRequest.setDevice(deviceID);
regRequest.setLoginInfo(login);
regRequest.setLocalMediaInfo(localMediaInfo);


Note, there is no need to give RTP/RTCP IP Address & Ports as AE Services will provide its own IP Address & ports to Communication Manager.

If you register the terminal in Client mode (so media is delivered to your own address & port) then you will need to implement some sort of RTP stack to receive the media and save it to a file.

Martin
Go to:   
Mobile view