Call Recording - Simple question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jose,
  instead of pjsua_conf_connect(), I used pjmedia_conf_connect(pjsua_var.mconf, 0, recorder_port, 0) and pjmedia_conf_connect(pjsua_var.mconf, call_info.conf_slot, recorder_port, 0) to connect the soundcard and caller to the recorder. This works for me. I record the caller and called parties' voices.

Your code looks fine. I suspect there is something else connected to the conference bridge which is producing those loud static noise. Since you're hearing the wav file being played, your connection is picking up the intended and as well the unintended sources.

I presume you are playing the wav file at the calling device ?



________________________________
From: Jose Suarez <jsuarez@xxxxxxxxxxxxxx>
To: pjsip list <pjsip at lists.pjsip.org>
Sent: Sun, December 6, 2009 1:47:42 AM
Subject: Call Recording - Simple question

 
Hi all, I want to record a call. I'm developing an 
automatic dialer. I make a call and then play a wav file. During that call I 
want to record it. For do that I do the following function:
 
CDialerSIP::e_i_SIP_RetRecord CDialerSIP::record 
()
{
         pj_status_t 
pjStatus;
         std::string 
strLog;
         std::stringstream 
ssLog;
     
        
 pjStatus = pjsua_recorder_create 
(&(pj_str("./record.wav")),0,NULL,0,0,&m_pjRecorderId);
 
         if 
(pjStatus != PJ_SUCCESS)
        
 {
            
  m_oLogger.write ("record - pjsua_record_create - Fall?.", 
CDialerLogger::iLogError);
        
      return 
CDialerSIP::i_Record_Error;
        
 }
 
        
 pjStatus = pjsua_conf_connect ( pjsua_call_get_conf_port(m_pjCallId), 
pjsua_recorder_get_conf_port(m_pjRecorderId));
 
    
     if (pjStatus != PJ_SUCCESS)
    
     {
        
      m_oLogger.write ("record - pjsua_conf_connect - 
Fall?.", CDialerLogger::iLogError);
        
      return 
CDialerSIP::i_Record_Error;
        
 }
 
         sleep 
(10);
 
        
 pjsua_conf_disconnect (pjsua_call_get_conf_port(m_pjCallId), 
pjsua_player_get_conf_port(m_pjRecorderId));
 
    
     pjStatus = pjsua_recorder_destroy 
(m_pjRecorderId);
 
         if 
(pjStatus != PJ_SUCCESS)
        
 {
            
  m_oLogger.write ("record - pjsua_recorder_destroy - Fall?.", 
CDialerLogger::iLogError);
        
      return 
CDialerSIP::i_Record_Error;
        
 }
 
         ssLog 
<< "record - Ok";
 
        
 strLog = ssLog.str();
 
        
 m_oLogger.write (strLog, 
CDialerLogger::iLogInformation);
 
    
     return CDialerSIP::i_Record_Normal;
 
    }
 
m_pjCallId and m_pjRecorderId are members of the 
CDialerSIP' class.
 
I recorder during 10 senconds, in that time I'm 
playing a wav file, so the recorder file should contain samples of that file, 
but the recorder file only has silence with very loud noise, in that noise you 
can hear very very loud the samples of the playing file. Do you know what 
happen? 
 
Thanks in advance
Jose 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091207/16318aad/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux