Author Message
VictorBalbas
Joined: Jan 19, 2011
Messages: 0
Offline
Hello,

I am getting InvalidParameterValueException on getDeviceId method.
I have checked extension and switchName and they are correct.
Is there any other reason for getDeviceId method to throw that Exception?

Thanks
VictorBalbas
Joined: Jan 19, 2011
Messages: 0
Offline
More information.

I got this message from DMCC log:

com.avaya.mvcs.proxy.ClientProxy routeRequest WARNING Received an unexpected Exception 1
VictorBalbas
Joined: Jan 19, 2011
Messages: 0
Offline
Ok.

It was just a missunderstanding.

ElderPierre
Joined: Feb 21, 2011
Messages: 0
Offline
Hi I am getting this same error
ch.ecma.csta.errors.InvalidParameterValueException

when i pass a phone extension to the getDeviceID method!!
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
What is the full XML you are sending?
What do the AES dmcc-trace.log.0 show when that XML is received?
What is the full exception?
Does it point at the invalid field?
Have you checked your XML against the XSD?
Are you using the SDK or did you compile your own XML generation software from the XSDs?
Have you compared your getDeviceID request with that generated by the DMCC dashboard?

Here are the two valid getDeviceID requests..

---------------------
Outgoing XML 2
<?xml version="1.0" encoding="utf-8"?>
<GetDeviceId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.avaya.com/csta">
<switchName>S8300</switchName>
<extension>32000</extension>
</GetDeviceId>


---------------------

<?xml version="1.0" encoding="utf-8"?>
<GetDeviceId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.avaya.com/csta">
<switchIPInterface>135.9.231.41</switchIPInterface>
<extension>32000</extension>
</GetDeviceId>
-----------------------
ElderPierre
Joined: Feb 21, 2011
Messages: 0
Offline
I am trying to get the make call to work,
I am using this code:

private DeviceID getDeviceID(final String extension) throws Exception {
      System.out.println("");
      System.out.println("in getDeviceID() extension is:" + extension);
      String switchName = "10.163.x.x";
      if (useTelURI) {
         System.out.println("in getDeviceID(),useTelURI :");
         DeviceID deviceId = new DeviceID();
         deviceId.setContent(extension);
         return deviceId;
      } else {
         System.out.println("Elder,in getDeviceID(),NO useTelURI :");

         DeviceServices devSvcs = (DeviceServices) Softphone.FE_csta
               .getService(com.avaya.csta.device.DeviceServices.class
                     .getName());
         // DeviceServices devSvcs = (DeviceServices) provider
         // .getService(com.avaya.csta.device.DeviceServices.class
         // .getName());
         System.out.println(",after provider.getxx :");
         // Create a new request object and populate the needed fields.
         GetThirdPartyDeviceId devRequest = new GetThirdPartyDeviceId();
         System.out.println(",after getThirdparty...:");
         devRequest.setExtension(extension);
         System.out.println("after setExtension():");
         devRequest.setSwitchName(switchName);
         System.out.println(",setswitchname,devRequest"
               + devRequest.toString());
         // Send the request to get a phone's id.
         GetThirdPartyDeviceIdResponse devResponse = devSvcs
               .getThirdPartyDeviceID(devRequest);
         System.out.println("after getThirdpartydeviceid)");
         return devResponse.getDevice();
      }
   }

but I ma getting this error:
Elder,in getDeviceID() extension is:3865
Elder,in getDeviceID(),NO useTelURI :
Elder,after provider.getxx :
Elder,after getThirdparty...:null
Elder,after getThirdparty...:
Elder,after setExtension():
Elder,setswitchname,devRequestsession[null] com.avaya.csta.binding.GetThirdPartyDeviceId@d8e902
Sep 1, 2011 3:33:21 PM com.avaya.mvcs.proxy.ClientProxy routeRequest
WARNING: Received an unexpected Exception 1
ch.ecma.csta.errors.InvalidParameterValueException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at java.lang.Class.newInstance0(Class.java:355)
   at java.lang.Class.newInstance(Class.java:308)
   at com.avaya.mvcs.proxy.ClientNegAckToException.convertErrorToException(ClientNegAckToException.java:105)
   at com.avaya.mvcs.proxy.XmlGatewayClient.handleRequest(XmlGatewayClient.java:233)
   at com.avaya.mvcs.proxy.Pipeline.handleRequest(Pipeline.java:346)
   at com.avaya.mvcs.proxy.ClientProxy.routeRequest(ClientProxy.java:612)
   at com.avaya.mvap.svcproxy.ServiceProxy.marshallRequest(ServiceProxy.java:106)
   at com.avaya.mvap.svcproxy.DeviceServicesProxy.getThirdPartyDeviceID(DeviceServicesProxy.java:160)
   at sampleapps.softphone.FeContacts_dum.getDeviceID(FeContacts_dum.java:371)
   at sampleapps.softphone.FeContacts_dum.femakeCall(FeContacts_dum.java:301)
   at sampleapps.softphone.FeContacts_dum$3.actionPerformed(FeContacts_dum.java:254)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
   at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
   at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
   at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
   at java.awt.Component.processMouseEvent(Component.java:6289)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
   at java.awt.Component.processEvent(Component.java:6054)
   at java.awt.Container.processEvent(Container.java:2041)
   at java.awt.Component.dispatchEventImpl(Component.java:4652)
   at java.awt.Container.dispatchEventImpl(Container.java:2099)
   at java.awt.Component.dispatchEvent(Component.java:4482)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
.
.
.
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
Could you use this FAQ (use the devconnect search tool searching on logging.properties to locate it)

How can I monitor the XML being sent and received by the AE Services Server (debug, log, trace)?

and show me the XML your application is sending. I can put my finger on the mistake much faster that way.

However I think the mistake is
String switchName = "10.163.x.x";


switchName would refer to the "switch name" for a communications link between AE Services and CM over which messages are exchanged... this Switch Name has a H.323 Gatekeeper, which has IP addresses for H.323 registrations which are used to handle device registrations.. The SwitchName needs to be provisioned through the AE Services OA&M -> Communication Manager tab. The Switch Name will need to have a AE Services OA&M AE Services -> TSAPI T-LINK provisioned using it at the end of the day for you to use the Thrird Party Call Control Services. If this is greek, please refer to the AE Services Administration and Maintenance Guide and search for "Switch Name"
ElderPierre
Joined: Feb 21, 2011
Messages: 0
Offline
John;

I made the change, but still not working, got the following message:


in getDeviceID() extension is:3865
Elder,in getDeviceID(),NO useTelURI :
,after provider.getxx :
,after getThirdparty...:
after setExtension():
,setswitchname,devRequestsession[null] com.avaya.csta.binding.GetThirdPartyDeviceId@a36771
after getThirdpartydeviceid,devResponse.getDevice()[3865:s8300::0]
after get device id
Exception in MakeCall: [Ljava.lang.StackTraceElement;@742397

-----------here is the program code:
private DeviceID getDeviceID(final String extension) throws Exception {
      System.out.println("");
      System.out.println("in getDeviceID() extension is:" + extension);
      String switchName = "s8300"; // "10.163.x.x";
      if (useTelURI) {
         System.out.println("in getDeviceID(),useTelURI :");
         DeviceID deviceId = new DeviceID();
         deviceId.setContent(extension);
         return deviceId;
      } else {
         System.out.println("Elder,in getDeviceID(),NO useTelURI :");

         DeviceServices devSvcs = (DeviceServices) Softphone.FE_csta
               .getService(com.avaya.csta.device.DeviceServices.class
                     .getName());
         // DeviceServices devSvcs = (DeviceServices) provider
         // .getService(com.avaya.csta.device.DeviceServices.class
         // .getName());
         System.out.println(",after provider.getxx :");
         // Create a new request object and populate the needed fields.
         GetThirdPartyDeviceId devRequest = new GetThirdPartyDeviceId();
         System.out.println(",after getThirdparty...:");
         devRequest.setExtension(extension);
         System.out.println("after setExtension():");
         devRequest.setSwitchName(switchName);
         System.out.println(",setswitchname,devRequest"
               + devRequest.toString());
         // Send the request to get a phone's id.
         GetThirdPartyDeviceIdResponse devResponse = devSvcs
               .getThirdPartyDeviceID(devRequest);
         System.out
               .println("after getThirdpartydeviceid,devResponse.getDevice()"
                     + devResponse.getDevice());
         return devResponse.getDevice();
      }
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
well
1) your are apparently getting the deviceID now which you weren't before, so you have a different problem.
2) The printed DeviceID doesn't have any values populated in the IP portion of the device ID indicating that you did not provision a H.323 gatekeeper for the switch connection. Please review the documentation "AE Services Administration and Maintenance Guide" as it relates to setting up DMCC Call Control services, for information regarding how to properly provision a Switch Connection (name), and the H.323 Gatekeeper. In short your next issue is in AES OA&<+M you need to click the H.323 Gatekeeper button associated with the 'S8300' switch connection, and provision the IP address for Communication Manager (10.163.x.x, only use the real IP).
ElderPierre
Joined: Feb 21, 2011
Messages: 0
Offline
Hi John;

I do have the ip address of the CM in the h,323 gateway.

Also, I tried the "TSAPI Test", ( Utilities
> Diagnostics > AE Service > TSAPI Test)
and i got an error:
cstaMakeCall() failed with CSTA Universal Failure Error 5:
Invalid calling device

I typed in :
Tlink:AVAYA#S8300#CSTA#MONTREAES01
User: cmapi1.username=xxxx
Password: cmapi1.password=yyyy
from : an extenion. e.g: 3865
to : another extension: e.g: 3902

and I got the error above.

my setting in the AES seems to be pretty straight forward!!1
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
have you disabled the security database checks in some form? I usually set the CTI user to unrestricted.
AES OA&M -> Security -> Security Database -> Users
-> List all Users
select the one you are using [Edit]

check the 'unrestricted access' flag.


The deviceID you receive back should look like
[3865:s8300:10.163.x.x:0]
or
[3865:s8300:0.0.0.0:0] - depending on your AE Services release.
The fact that the IP section is blank indicates no H.323 Gatekeeper.
ElderPierre
Joined: Feb 21, 2011
Messages: 0
Offline
Weird, the TSAPI test works now, I don't think I did anything!!

user:aeservr
password:aesPassword
from:3865
to:3902

result:
TSAPI Test Result
cstaMakeCall() succeeded!
cstaClearConnection() succeeded!

So the problem is somewhere in the code. checking..

is there any gateway settings on the CM side?, because on the AES side the:
Communication Manager Interface--> Switch Connections --> Edit H.323 Gatekeeper:
shiows the ip address of the CM
ElderPierre
Joined: Feb 21, 2011
Messages: 0
Offline
You are right John, its the IP it is not resolving:

in getDeviceID() extension is:3865
Elder,in getDeviceID(),NO useTelURI :
,after provider.getxx :
,after getThirdparty...:
after setExtension():
,setswitchname,devRequestsession[null] com.avaya.csta.binding.GetThirdPartyDeviceId@13f16b4
after getThirdpartydeviceid,devResponse.getDevice()[3865:s8300::0]
after get device id
after new makecall
after request.setCallingFevice
calledDevice is:[3865:s8300::0]
after request.setCalledDirectoryNumber(calledDevice
Exception in MakeCall: [Ljava.lang.StackTraceElement;@158497c

code:
try {
         DeviceID calledDevice;
         System.out.println("numberToCall is:" + numberToCall);
         calledDevice = getDeviceID(numberToCall);
         System.out.println("after get device id");
         // calledDevice =(DeviceID)calledNumber;
         // Make a call.
         MakeCall request = new MakeCall();
         // request.setCallingDevice(myDeviceId);
         System.out.println("after new makecall");
         request.setCallingDevice(Softphone.fedevice);
         // request.setCalledDirectoryNumber(calledDeviceId);
         System.out.println("after request.setCallingFevice");
         System.out.println("calledDevice is:" + calledDevice);
         request.setCalledDirectoryNumber(calledDevice);
         System.out
               .println("after request.setCalledDirectoryNumber(calledDevice");
         MakeCallResponse response = callControlSvcs.makeCall(request);
         System.out
               .println("after MakeCallResponse response = callControlSvcs.makeCall(request);");
ElderPierre
Joined: Feb 21, 2011
Messages: 0
Offline
Whn I use the dashboard, I get the following event response:
Make Call Response:7 Error:<?xml version="1.0" encoding="UTF-8"?><CSTAErrorCode xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3"><operation>objectNotKnown</operation></CSTAErrorCode>
Make Call Response:8 Error:<?xml version="1.0" encoding="UTF-8"?><CSTAErrorCode xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3"><operation>objectNotKnown</operation></CSTAErrorCode>

Outgoing XML 8
<?xml version="1.0" encoding="utf-8"?>
<MakeCall xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<callingDevice typeOfNumber="other" mediaClass="notKnown">3902:s8300:10.169.112.xx:0</callingDevice>
<calledDirectoryNumber typeOfNumber="other" mediaClass="notKnown">3865</calledDirectoryNumber>
<callCharacteristics>
<priorityCall>false</priorityCall>
</callCharacteristics>
</MakeCall>
-----------------------
Incoming XML 8
<?xml version="1.0" encoding="UTF-8"?>
<CSTAErrorCode xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<operation>objectNotKnown</operation>
</CSTAErrorCode>
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
are you really putting xx in your IP address? "3902:s8300:10.169.112.xx:0" no use in hiding it from me... it is on your private LAN. I am a bit confused as to what IPs you are presenting are 'real' and which ones you have doctored.

The TSAPI test call is 'down stream' of a bunch of DMCC code. SO we could say that the problems are with your interaction with DMCC, and not with the TSAPI stuff.

use a secure shell tool (ssh or putty) and gain access to a linux prompt from AE Services. then navigate to /opt/mvap/logs/

take a look at dmcc-trace.log.0 while you are attempting to connect from the dashboard or your app. make note of the exception and 30 or so lines before that... that will give you teh best insight into what is failing.
Go to:   
Mobile view