Message Boards Message Boards
Combination View Flat View Tree View
Threads [ Previous | Next ]
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
 
<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.
RE: Recording
Answer
1/31/12 12:54 PM as a reply to Abhishek Malhotra.
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;
RE: Recording
Answer
1/31/12 1:31 PM as a reply to Ahmed Fayomy.
CiscoRTPInputStartedEv and CiscoRTPOutputStartedEv which indicate media is setup are delivered to terminalChangedEvent of call observer.
RE: Recording
Answer
1/31/12 2:43 PM as a reply to Abhishek Malhotra.
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,
RE: Recording
Answer
2/2/12 9:28 AM as a reply to Ahmed Fayomy.
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?,


.
Hi Thanks for your mail. I will be on vacation from 02/02/2012 to 13/02/2012. In case of urgency, Please contact Lava Kumar.
RE: Recording
Answer
2/2/12 11:31 AM as a reply to Ahmed Fayomy.
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.
RE: Recording
Answer
2/7/12 10:41 AM as a reply to Abhishek Malhotra.
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
RE: Recording
Answer
2/10/12 11:18 PM as a reply to Ahmed Fayomy.
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.
RE: Recording
Answer
2/13/12 12:53 PM as a reply to David Staudt.
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:Alice@192.168.1.64>
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:Alice@192.168.1.64>;tag=1329126422084

but can you help me in that,
RE: Recording
Answer
2/13/12 6:00 PM as a reply to Ahmed Fayomy.
Crossposted http://developer.cisco.com/web/sip/forums/-/message_boards/view_message/5146763
RE: Recording
Answer
2/23/12 10:23 AM as a reply to David Staudt.
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;