cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1223
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: Marwa Ads on 13-12-2011 05:40:41 AM
Dear All,
I am trying to record the calls on the Cisco IP Phones, I've done the below configutation  at the CUCM to enable the recording :
 
1- Create a SIP trunk and added the IP Addess of my PC to receive the calls on.
2- Create Route Pattern and give it the above created trunk as the "Gate way/Route List"
3- Create Recording profile and Give it the Pattern as the remote destination address
4- Enable BIB at the IP Phone to record its calls and on the line i enabled:
- Recording Option: Application Invoked Call Recording Enabled
- Recording Profile: The above created profile
 
 
Then I wrote the below Code:
 

 TerminalConnection tc = ((CallCtlTermConnTalkingEv)ev).getTerminalConnection();
String tname = tc.getTerminal().getName().toUpperCase();
CiscoTerminalConnection ctc = (CiscoTerminalConnection)tc;
CiscoAddress ca = (CiscoAddress)ctc.getConnection().getAddress();
 
if ( (ca.getRecordingConfig(ctc.getTerminal()) == CiscoAddress.APPLICATION_CONTROLLED_RECORDING) &&
(ctc.getCallControlState() == CallControlTerminalConnection.TALKING))
                            {
                              ctc.startRecording(CiscoCall.PLAYTONE_NOLOCAL_OR_REMOTE);
   }
 

 
I receive the below Error:
"com.cisco.jtapi.PlatformExceptionImpl: Start Recording request failed: com.cisco.cti.client.CCNException"
 
Please help me in the above ..
 
Thanks,
Marwa
 

Subject: RE: Recording
Replied by: Abhishek Malhotra on 28-12-2011 10:44:38 AM
<em id="aui_3_2_0_11483" style="color: #525252; font-family: arial, helvetica, sans-serif; font-size: 11px; line-height: 15px; background-color: #dde1e6;"> CallControlTerminalConnection.TALKING 
doesnt necesarily means that call is answered and can be recorded. The call can be recorded once the media(RTP) stream is established. So, it would be good to check for RTP start events along with connection/terminalconnection state before invoking the API.

Subject: RE: Recording
Replied by: Ahmed Fayomy on 31-01-2012 07:54:16 AM
Dear Abhishek,
you said that "it would be good to check for RTP start events along with connection/terminalconnection state before invoking the API",
please tell me how i will do that check as i donnot know if the media (RTP) is established.

Thanks
Ahmed Fayomy;

Subject: RE: Recording
Replied by: Abhishek Malhotra on 31-01-2012 08:31:39 AM
CiscoRTPInputStartedEv and CiscoRTPOutputStartedEv which indicate media is setup are delivered to terminalChangedEvent of call observer.

Subject: RE: Recording
Replied by: Ahmed Fayomy on 31-01-2012 09:43:37 AM
Dear Abhishek,
i have an exception said "Start Recording request failed: com.cisco.cti.client.CCNException"

and that is my updated code, please tell me how i can fix this.

TerminalConnection tc;
CiscoTerminalConnection ctc;
CiscoAddress ca;


in callChangedEvent method

if(ev instanceof CallCtlTermConnTalkingEv){
  tc = ((CallCtlTermConnTalkingEv) ev).getTerminalConnection();
ctc = (CiscoTerminalConnection) tc.getConnection().getTerminalConnections()[0];
ca = (CiscoAddress) ctc.getConnection().getAddress();}
}


then in terminalChangedEvent method

if (ev instanceof CiscoRTPInputStartedEv) {
  Thread.sleep(5*1000);
   try {                               
            ctc.startRecording(CiscoCall.ACTIVE);
         } catch (Exception ex) {
               System.out.println("Exception in recording as " + ex.getMessage());
             }
                    
  }

Thanks,

Subject: RE: Recording
Replied by: Ahmed Fayomy on 02-02-2012 04:28:06 AM
i found in fourm that  when recording is initiated call manager sends two sip invites(basically two calls one each for customer and agent voice stream) to the recorder device via SIP Trunk. Ideally these scenarios are handled by having a recording profile to point to pattern with a SIP trunk which connects to a SIP recorder device. When recording is initiated, call manager sends two sip invites and recorder is suppose to send ack(SIP 200 OK) with sdp information within 5 seconds and then use its available channel(s) to record the two calls.

so is that meaning that using jtapi to accept these two invites calls is not right?,
and  how can i accept these two calls?
and how to be a sip server to be able to understand cucm sip messages?,


.

Subject: RE: Recording
Replied by: Abhishek Malhotra on 02-02-2012 06:31:23 AM
Using JTAPI you can accept(answer) calls on any JTAPI controlled device. JTAPI can control a lot of SIP Devices but there isnt a 3rd party recording device till date which it can monitor or control. 
For a recording solution, recorders are usually 3rd party SIP solutions that accept the calls(Invite) from CallManager and then record the media streams of these call.
SIP is a standard protocol and SIP messages from CUCM are no different but standard SIP messages as defined in RFC3261. I would suggest looking at standard SIP call flows as defined in RFC to understand how SIP calls are accepted.
 
For Recording/Monitoring, You can refer to Cisco Call Recording and Monitoring feature for the details about SIP Call Headers that might be useful to you.

Subject: RE: Recording
Replied by: Ahmed Fayomy on 07-02-2012 05:41:12 AM
Now i read about Sip server
but can you help me in how i can register my sip server with cucm and i need any help in how to run java SIP Server code in netbeans,
Thanks for your efficient help

Ahmed Fayomy

Subject: RE: Recording
Replied by: David Staudt on 10-02-2012 06:18:20 PM
Implementing a SIP stack is a bit beyond our ability to advise you here, the good news is that it's standards based and there is wide support on the net.  A quick google:
 
http://stackoverflow.com/questions/498043/what-is-the-currently-popular-java-sip-library
 
See the SIP Tech Center for documentation on the particulars of the UCM SIP messaging support:
 
http://developer.cisco.com/web/sip/docs (login with your CDN/DS associated Cisco.com ID to see the complete SIP trunk documentation)
 
One possible configuration is to setup the recording profile SIP trunk as a loop-back to the same UCM: e.g. the outgoing SIP trunk connects to an incoming SIP trunk configured on the same UCM, which is then routed to a CTI route point managed by your app.  In this scenario your app will get two simultaneous inbound calls when the recording is started.  The problemw ith this (and the reason why SIP trunk is normally used) is that your app won't be able to tell which call is the ear vs. the mouth audio stream (this can be discerned in the SIP headers if you use a trunk.)  If you app doesn't care about this - for example you just mix both streams into one stream for recording, then it could work and simply your app.

Subject: RE: Recording
Replied by: Ahmed Fayomy on 13-02-2012 07:53:38 AM
Dears,
i tried to register with CUCM SIP trunk as SIP server
as
1- my pc_ip is   "192.168.1.64"
2- CUCM ip is   "192.168.2.2"
3- SIP Trunk name is "Recorder"
i tried to send that register message,


REGISTER sip:192.168.2.2 SIP/2.0
Max-Forwards: 70
Content-Length: 0
Contact: sip:192.168.1.64:5060;transport=UDP
To: "Alice" <sip:[email protected]>
Cseq: 16  REGISTER
Via: SIP/2.0/UDP 192.168.2.2:5060;branch=z9hG4bK-1329126422083
Content-Type: text/html
Call-Id: 1329126422084
From: "Alice" <sip:[email protected]>;tag=1329126422084

but can you help me in that,

Subject: RE: Recording
Replied by: David Staudt on 13-02-2012 01:00:38 PM
Crossposted http://developer.cisco.com/web/sip/forums/-/message_boards/view_message/5146763

Subject: RE: Recording
Replied by: Ahmed Fayomy on 23-02-2012 05:23:43 AM
Dears;
i donot know if it is sitable to post here my question but i need your advice , as i need you to tell me if i missed any thing in my setup
as i read alot of pdfs that was talking about recording but i stopped at this point

1- i created sip trunk and configure as Cisco Monitoring and recording with my PC_IP.

2- i deploy my sip server application  and open sip socket with my  PC_IP.

3- i configured the ip phone with (Automatic recording).

4- when call started i got two invites calls

5- i sent from my sip application 200 ack.

but then i recieved
--------- > ack    then  ----------->  bye      from CUCM because
(Reason protocols: Q.850 cause = 65
   Bearer capability implemented)

Thanks;
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links