Author Topic: Develop Call Recording solution using 8.1 SDK  (Read 7923 times)

Offline dmodi

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Develop Call Recording solution using 8.1 SDK
« on: February 09, 2015, 05:32:29 PM »
My question may sound naive. Please pardon my ignorance.  I am a newbie to Genesys.

I am trying to implement call recording in two ways on a Genesys Sip Server using SDK 8.1

1.  I am getting a span (mirror)  for all call centre agents traffic.  I would like to get all call metadata through the T-Server SDK while I get all media for recording from the span. 

What request should I use to get call events for the monitored extensions ?

The SDK documentation mentions of two methods that I can think of -

a.  Register a DN using RequestRegisterAddress with registermode as ModeMonitor.  Does this register the DN to my application as a third party just to receive the call events on this extension ?
b.  RequestStartCallMonitoring - I see that the events on this are relatively fewer than the earlier namespace request.


2. We will be using a single step conferencing type of method to record work from home agents.  We will not be getting WFH agent traffic in the span.  We would therefore need to get a copy of the media.  We are thinking of registering a phone using sip endpoint sdk and based on call events for the WFH agents, put our phone in conference on the call thereby receiving a copy of the media to our recorder.  Is this the correct method ?  Can we get any sample code that implements this ?

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2709
  • Karma: 41
Re: Develop Call Recording solution using 8.1 SDK
« Reply #1 on: February 09, 2015, 07:04:45 PM »
The topic is so general and it is not possible to answer with few words. So, in general, in case when you have passive recording (span ports), you have to just register as an T-Server client and observe specified DNs. Then you can receive all attached data. You do not need use "RequestStartCallMonitoring" or any type of conference.

From my point of view, that SPAN ports are not necessary at all and you can use "active" recording mode, where the Genesys Media Server provide the media/stream replication to specified recording servers. The CTI integration is still same as is mentioned above.

If you want, send me PS and I will try to give you some hints.
« Last Edit: February 09, 2015, 07:47:12 PM by Kubig »
Genesys certified professional consultant (GVP, SIP, GIR and Troubleshooting)

Offline dmodi

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Develop Call Recording solution using 8.1 SDK
« Reply #2 on: February 25, 2015, 05:24:49 PM »
Thanks Kubig for your help.

Passive recording -

I have successfully registered the DN's that I am interested in receiving unsolicited call events.  Except for the EventRegistered in response to my request I do not receive any unsolicited call events.  I have tried RegisterMode.ModeMonitor as well as RegisterMode.ModeShare.

How do I request unsolicited call events as a third party application for the DN's I have registered ?

Thanks in advance.

Offline dmodi

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Develop Call Recording solution using 8.1 SDK
« Reply #3 on: March 03, 2015, 05:49:41 PM »
Update -

We have been able to get the required call and agent events.  We should be OK as far as passive call recording is concerned.

For active recording, when we get the required call event that we wish to record actively, we send a private service request as follows -

                    KeyValueCollection reasons = new KeyValueCollection();
                    KeyValueCollection extensions = new KeyValueCollection();
                    extensions.Add("record", "source");
                    extensions.Add("id", ev.CallUuid);
                    extensions.Add("dest", "sip:" + sipSocketListenerIP + ":" + sipSocketListenerPort);
                    RequestPrivateService requestPrivateService = RequestPrivateService.Create(3013, ev.thisDN, ev.connID, ev.userData, reasons, extensions);
                    tServerProtocol.Send(requestPrivateService);


As per Genesys active recording documentation, we should get a sip invite on the listener socket. 

We get an 'EventACK' to our request followed by an 'EventAttachedDataChanged'.  This event contains the following attributes -

      'GSIP_REC_FN' [str] = "CE937U6TP90HF509O6NAINAN3O004O6H"
      'GSIP_RECORD' [str] = "ON"

We do not receive an invite on our listener socket.  The above attributes indicates that the media server is creating a recording file and not duplicating and sending us the RTP packets.

How do we make the media server forward the packets to us ?  Is that a change in the Genesys configuration ?  Will the RTP packets be received on the same port as the invite ?

Thanks for your help.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2709
  • Karma: 41
Re: Develop Call Recording solution using 8.1 SDK
« Reply #4 on: March 03, 2015, 05:58:28 PM »
You have mixed T-Lib protocol with SIP and RTP protocols - that are totally different levels. When you start the active recording session, the SIP server contact RM, which should select MCP for required service basis on configured rules. Then MCP will invite the recorder server IP:PORT (by default IP:5060) , both endpoint send own SDP and within signalization will be one of them select and used. Afterthat the RTP from MCP should be replicated to the recording server. For properly working you have to of course deploy all necessary components and configure all objects like VoIP service, LRGs, etc. Did you configure LRG for recording client and recording server? Is the integration between SIP server and RM working? What says logs?

PS: If you want to help with configuration Genesys env, feel free to post me a PM.
« Last Edit: March 04, 2015, 06:27:38 PM by Kubig »
Genesys certified professional consultant (GVP, SIP, GIR and Troubleshooting)

Offline dmodi

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Develop Call Recording solution using 8.1 SDK
« Reply #5 on: March 11, 2015, 05:17:38 PM »
What is the correct way to sending AttributeExtensions ?  What is wrong with the following code -

KeyValueCollection extensions = new KeyValueCollection();
extensions.Add("RTP-PASSWORD","7364533");
RequestPrivateService rps = RequestPrivateService.Create(2,DN,null,null,null,extensions);
tserverprotocol.Send(rps);


We receive an invalid attribute error -

EventError' ('52')
message attributes:
AttributeErrorMessage [str] = "Invalid attribute"
AttributeErrorCode [int] = 53
AttributePrivateMsgID [int] = 2
AttributeEventSequenceNumber [long] = 4694558
AttributeExtensions [bstr] = KVList:
      'RTP-PASSWORD' [str] = "7364533"


The Genesys support team says I am sending the attribute extensions in the wrong format.

What is the correct way ?

Thanks in advance.

Dave

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2709
  • Karma: 41
Re: Develop Call Recording solution using 8.1 SDK
« Reply #6 on: March 11, 2015, 05:59:39 PM »
According to the error message, it seems like the password value does not match the configured value on SIP server application object level. Try to attach or check logs records before the EventError is generated. There should be the root-cause visible.
« Last Edit: March 11, 2015, 06:14:47 PM by Kubig »
Genesys certified professional consultant (GVP, SIP, GIR and Troubleshooting)

Offline dmodi

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Develop Call Recording solution using 8.1 SDK
« Reply #7 on: March 11, 2015, 06:49:48 PM »
Thanks Kubig.

Genesys support mentions that the attribute is not being sent in the correct format.

They say the attributeextensions should appear as follows -

message RequestPrivateService
        AttributePrivateMsgID   2
        AttributeThisDN '7103'
        AttributeExtensions     [23] 00 01 00 00..
                'RTP-PASSWORD'  '7364533'
        AttributeReferenceID    5


whereas in the error message it appears as -

AttributeExtensions [bstr] = KVList:
      'RTP-PASSWORD' [str] = "7364533"

Is it something to do with encoding or serialization ?

Thanks

Offline Fra

  • Hero Member
  • *****
  • Posts: 856
  • Karma: -4
Re: Develop Call Recording solution using 8.1 SDK
« Reply #8 on: March 11, 2015, 06:50:42 PM »
What is the correct way to sending AttributeExtensions ?  What is wrong with the following code -

KeyValueCollection extensions = new KeyValueCollection();
extensions.Add("RTP-PASSWORD","7364533");
RequestPrivateService rps = RequestPrivateService.Create(2,DN,null,null,null,extensions);
tserverprotocol.Send(rps);


We receive an invalid attribute error -

EventError' ('52')
message attributes:
AttributeErrorMessage [str] = "Invalid attribute"
AttributeErrorCode [int] = 53
AttributePrivateMsgID [int] = 2
AttributeEventSequenceNumber [long] = 4694558
AttributeExtensions [bstr] = KVList:
      'RTP-PASSWORD' [str] = "7364533"


The Genesys support team says I am sending the attribute extensions in the wrong format.

What is the correct way ?

Thanks in advance.

Dave

Check Knova Id: 31395 article out on the Genesys KB. Looks very similar to the issue you've come across.

Fra

Offline dmodi

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Develop Call Recording solution using 8.1 SDK
« Reply #9 on: March 11, 2015, 07:01:14 PM »

Can you provide a link ?

Thanks

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2709
  • Karma: 41
Re: Develop Call Recording solution using 8.1 SDK
« Reply #10 on: March 11, 2015, 07:05:10 PM »
It is not seems like the root-cause. Mentioned bug was related to RequestPrivateService with ID 3013 and not to ID 2. But, install the latest release of SIP server would be the best
Genesys certified professional consultant (GVP, SIP, GIR and Troubleshooting)


Offline Fra

  • Hero Member
  • *****
  • Posts: 856
  • Karma: -4
Re: Develop Call Recording solution using 8.1 SDK
« Reply #12 on: March 11, 2015, 07:08:01 PM »
It is not seems like the root-cause. Mentioned bug was related to RequestPrivateService with ID 3013 and not to ID 2. But, install the latest release of SIP server would be the best
Maybe. But it's worth checking whether he's running the same SIP Server version mentioned there in the article.

Offline dmodi

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Develop Call Recording solution using 8.1 SDK
« Reply #13 on: March 11, 2015, 07:12:55 PM »
The attribute is correctly listed in that article

AttributeExtensions [2] 00 00..

Whereas in my case the attribute in the log is as follows -

AttributeExtensions [bstr] = KVList:
      'RTP-PASSWORD' [str] = "7364533"

It should list as following -

  AttributeExtensions     [23] 00 01 00 00..
                'RTP-PASSWORD'  '7364533'

It appears it is not able to proper read the values I am sending.  Isn't this a serialization issue ?

Thanks

Offline Fra

  • Hero Member
  • *****
  • Posts: 856
  • Karma: -4
Re: Develop Call Recording solution using 8.1 SDK
« Reply #14 on: March 11, 2015, 07:33:28 PM »
The attribute is correctly listed in that article

AttributeExtensions [2] 00 00..

Whereas in my case the attribute in the log is as follows -

AttributeExtensions [bstr] = KVList:
      'RTP-PASSWORD' [str] = "7364533"

It should list as following -

  AttributeExtensions     [23] 00 01 00 00..
                'RTP-PASSWORD'  '7364533'

It appears it is not able to proper read the values I am sending.  Isn't this a serialization issue ?

Thanks

  • what version of SIP Server are you running? Is it the same affected by the bug described in that article?
  • is rtp-info-password option configured correctly in SIP Server? Which section did you configure it in?
  • Are you issuing the RequestPrivateService against a specific DN? I can't see the AttributeThisDn
  • Can you please post the *SIP Server* log snippet covering from the RequestPrivateService until after the relevant EventError?
  • I guess you grabbed the log from your end rather than from SIP Server, hence the quotation marks may appear different: you got double quotes on both the AttributeErrorMessage and the RTP-PASSWORD:


    EventError' ('52')
    message attributes:
    AttributeErrorMessage [str] = "Invalid attribute"
    AttributeErrorCode [int] = 53
    AttributePrivateMsgID [int] = 2
    AttributeEventSequenceNumber [long] = 4694558
    AttributeExtensions [bstr] = KVList:
          'RTP-PASSWORD' [str] = "7364533"
« Last Edit: March 11, 2015, 07:42:17 PM by Fra »