Author Topic: Need help in platform SDK code  (Read 5626 times)

Offline Kash

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Need help in platform SDK code
« on: June 17, 2016, 10:39:09 AM »
Hi,

I am new to SDK and want to write small code(Say initial connection set up with config server and authetication) using Java Platform sdk 8.5.
In this forum, i have seen sample code for this. Can you tell me initial steps to start up with SDK.
Thank You.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Need help in platform SDK code
« Reply #1 on: June 17, 2016, 11:57:21 AM »
[list type=decimal]
[li]Genesys Training[/li]
[li]Genesys documentation[/li]
[li]PSDK Samples provided by Genesys[/li]
[/list]

Offline Kash

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: Need help in platform SDK code
« Reply #2 on: June 20, 2016, 08:45:21 AM »
Thank You Kubig.

I could start with SDK code like opening connection to Tserver and making agent login ready, not ready .

I was able to make call as
RequestMakeCall requestMakeCall = RequestMakeCall.create(thisDN,otherDN,MakeCallType.Regular);

I want to do load test and want to make 100-200 calls altogether at one route point using SDK. I know, we can do this using PBX simulator, but I need to do it using SDK.

Can you let me know if this can be achieved using SDK. If yes, please guide me in writing this.

Thank You.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Need help in platform SDK code
« Reply #3 on: June 20, 2016, 11:28:38 AM »
Sdk control Genesys objects. You still need a PBX to do real calls. So you would need 200 DNs monitored by your app to dial to that RP.

Enviado de meu E6633 usando Tapatalk


Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Need help in platform SDK code
« Reply #4 on: June 20, 2016, 11:33:19 AM »
Cav is right, but in this case you can use the predictive calls, which can be dialed from RP as the source - see the RequestMakePredictiveCall namespace/assembly for more details

Offline Kash

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: Need help in platform SDK code
« Reply #5 on: June 21, 2016, 07:56:32 AM »
Thank You Cav and Kubig for your inputs.

I tried doing RequestMakePredictiveCall.
RequestMakePredictiveCall requestMakePredictive = RequestMakePredictiveCall.create(thisDN, otherDN, timeout);
Code worked if I give thisDN as Routepoint, otherDN as extension. But this is not solving my purpose of load testing. I can take only one call with this at a time.

If i try to give other DN as another route point where I have loaded my code to execute, I get error as Invalid Num.
Its like, I have to generate 100 calls/sec to a routepoint which have code loaded to be executed.

I don't have option of doing call generation as suggested by Cav as there are few limitations.

Can you guide me how I can proceed further.

Thank You.



Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Need help in platform SDK code
« Reply #6 on: June 21, 2016, 08:29:11 AM »
You did something wrong, because you should make more predictive call at one routing point at the same time. There is no other approach using internal resources. The only one suggested and the best way is through PBX simulator or any SIP generator in case using SIP server as a switch

Offline Kash

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: Need help in platform SDK code
« Reply #7 on: June 21, 2016, 10:45:38 AM »
Hi Kubig,

I have put code something like this

Endpoint tserverEndpoint = new Endpoint("TServer","Hostname",3030);
TServerProtocol tserverProtocol = new TServerProtocol(tserverEndpoint);

tserverProtocol.open();
RequestRegisterAddress requestRegisterAddress = RequestRegisterAddress.create("DNRP1",RegisterMode.ModeShare,
                                                                                  ControlMode.RegisterDefault,AddressType.DN);

Message response = tserverProtocol.request(requestRegisterAddress);

RequestRegisterAddress requestRegisterAddress1 = RequestRegisterAddress.create("DNRP2",RegisterMode.ModeShare,
ControlMode.RegisterDefault,AddressType.DN);

Message response1 =tserverProtocol.request(requestRegisterAddress1);

RequestRegisterAddress requestRegisterAddress2 = RequestRegisterAddress.create("DNExtension",RegisterMode.ModeShare,
ControlMode.RegisterDefault,AddressType.DN);

Message response2 =tserverProtocol.request(requestRegisterAddress2);


RequestMakePredictiveCall requestMakePredictive = RequestMakePredictiveCall.create("DNRP1", "DNRP2", 60);
Message requestMakePredictive1 = tserverProtocol.request(requestMakePredictive);

When i am executing the request, am getting Invalid DN error. :(

and if I executes the request as

RequestMakePredictiveCall requestMakePredictive = RequestMakePredictiveCall.create("DNRP1", "DNExtension", 60);
Message requestMakePredictive1 = tserverProtocol.request(requestMakePredictive);
Call hits to extension. But I need to make the calls hit to Route point instead of Extension.
Can you check this and let me know what I missed here.

Thank You.

Offline Kash

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: Need help in platform SDK code
« Reply #8 on: August 17, 2016, 04:40:51 AM »
Hi All,


I am trying to initiate a call from Route point and want it to hit to another RP where I have loaded code  which will further route it to extension.

Trying to acheive something like this
RP1-->RP2-->Extension
Have kept something like below in my code

RequestMakePredictiveCall requestMakePredictive = RequestMakePredictiveCall.create("Routepoint1", "Routepoint2", 60);

but am getting error like CallState:SitInvalidnum

Can you let me know if this is Achievable using PSDK.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Need help in platform SDK code
« Reply #9 on: August 17, 2016, 11:59:44 AM »
Voice call? Can't be...as voice needs a real extension, RP are logical.

Enviado de meu E6633 usando Tapatalk