1 Reply Latest reply: May 2, 2016 5:24 AM by Piotr RSS

    sending CDR to FTP error

    mash@cisco

      HI guys MY cme is not sending CDR  detail to ftp server

       

      file-acct flush with-close

      Flushing the CDR data to file and closing file

      voice_file_acct_initiate_dump_to_file: Both file modes have failed in earlier attempt

      Use file-acct reset when the problem is recovered

       

       

      031078: Sep  7 10:29:09.390:  fact_cdr_flush_timer_stop

      031079: Sep  7 10:29:09.390:  CDR Flush timer expired, so flushing cdrs to file

      031080: Sep  7 10:29:09.390: voice_file_acct_write:

      031081: Sep  7 10:29:09.390: file_acct_write_local: file accounting buffer overflow,dumping to file

      031082: Sep  7 10:29:09.390: file_acct_write_local: error: file_acct buffer full. Drop msg

      031083: Sep  7 10:29:09.390:  Restarted cdr flush timer

      031084: Sep  7 10:29:09.390:  fact_cdr_flush_timer_start

       

      !

      gw-accounting aaa

      method first

      !

      gw-accounting file

      primary ftp 10.4.97.41/cisco/ username tms password 7 04480A161C35410A

      secondary ifs flash:cisco

      acct-template callhistory-detail

      maximum buffer-size  15

      maximum retry-count 3

      maximum fileclose-timer 300

      maximum cdrflush-timer 245

      cdr-format compact

      !

      Can any one help me to get the CDR uploaded to the ftp server

        • 1. Re: sending CDR to FTP error
          Piotr

          Try this first:

          show logging | include VOICE_FILE_ACCT

           

          You may find something similar to this:

          XXX  X XX:XX:XX.XXX: %VOICE_FILE_ACCT-3-DUMPFAIL: Could not dump to remote file - write to flash:<HOSTNAME>. Error=2594(Unknown error 2594)

          XXX  X XX:XX:XX.XXX: %VOICE_FILE_ACCT-1-ALLMODE_FAIL: All modes of file accounting have failed - File Based accounting is frozen, Fix error and Reset to start file based accounting again.


          Then start debugging FTP transactions using:

          debug ip ftp

          terminal monitor


          You may get a debug output like:

          XXX  X XX:XX:XX.XXX: voice_file_acct_initiate_dump_to_file: Both file modes have failed in earlier attempt

          XXX  X XX:XX:XX.XXX:  Use file-acct reset when the problem is recovered

          XXX  X XX:XX:XX.XXX: voice_file_acct_initiate_dump_to_file: Both file modes have failed in earlier attempt

          XXX  X XX:XX:XX.XXX:  Use file-acct reset when the problem is recovered


          To get more information you can use the following commands:

          debug voip fileacct

          debug voip dump-file-acct

          Look here to learn more about commands above: http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/debug/command/s1/db-s1-cr-book/db-v1.html

           

          Those two generates huge output (here is a tiny extract):

          XXX  X XX:XX:XX.XXX: : add attr:16D14XXX h323-connect-time(9) 31 XX:XX:XX.XXX: utc XXX XXX XX XXXX

          XXX  X XX:XX:XX.XXX: : add attr:16D14YYY h323-disconnect-time(10) 31 XX:XX:XX.XXX: utc XXX XXX XX XXXX

          XXX  X XX:XX:XX.XXX: : add attr:16D14ZZZ h323-disconnect-cause(11) 4 10

          Fields definitions may be found here: http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/service/8_5_1/cdrdef/cdradmin/cdrfdes.html

           

          Anyway, the solution is in first debug output (in blue). To initiate file processes manually type:

          file-acct reset

          file-acct flush with-close


          If FTP debug is still on the output may show FTP transaction dialog like this:

          XXX X XX:XX:XX.XXX: voice_file_acct_write:

          XXX X XX:XX:XX.XXX: file_acct_write_local: message (len=844) written to file_acct:

          18667 bytes left

          XXX X XX:XX:XX.XXX: FTP: 220

          XXX X XX:XX:XX.XXX: FTP: ---> USER XYZ

          XXX X XX:XX:XX.XXX: FTP: 331 Password required for XYZ

          XXX X XX:XX:XX.XXX: FTP: ---> ****

          XXX X XX:XX:XX.XXX: FTP: 230 Logged on

          XXX X XX:XX:XX.XXX: FTP: ---> TYPE I

          XXX X XX:XX:XX.XXX: FTP: 200 Type set to I

          XXX X XX:XX:XX.XXX: FTP: ---> PASV

          XXX X XX:XX:XX.XXX: FTP: 227 Entering Passive Mode

          XXX X XX:XX:XX.XXX: FTP: ---> APPE <HOSTNAME>.<HOSTNAME>.XX_XX_XXXX_XX_XX_XX.XXX

          XXX X XX:XX:XX.XXX: FTP: 150 Opening data channel for file upload to server of "/<HOSTNAME>.<HOSTNAME>.XX_XX_XXXX_XX_XX_XX.XXX"

          XXX X XX:XX:XX.XXX: handle_file_acct_dump_request :to_write is 0

          XXX X XX:XX:XX.XXX: handle_file_acct_dump_request :to_write is 1813

          XXX X XX:XX:XX.XXX: : File accounting,write successful to file

          XXX X XX:XX:XX.XXX: FTP: ---> QUIT

          XXX X XX:XX:XX.XXX: FTP: 226 Successfully transferred "/<HOSTNAME>.<HOSTNAME>.XX_XX_XXXX_XX_XX_XX.XXX"

          XXX X XX:XX:XX.XXX: FTP: ---> QUIT

          XXX X XX:XX:XX.XXX: voice_file_acct_unlock, ctx_id=  refcnt=1


          After this local file is buffering CDRs again...

          XXX X XX:XX:XX.XXX: voice_file_acct_write:

          XXX X XX:XX:XX.XXX: file_acct_write_local: message (len=963) written to file_acct:

          17917 bytes left

           

          ...until the buffer overflow, then CDRs are successfully sent to FTP and local buffer is recreated:

          XXX X XX:XX:XX.XXX: voice_file_acct_write:

          XXX X XX:XX:XX.XXX: file_acct_write_local: message (len=829) written to file_acct:

          514 bytes left

          XXX X XX:XX:XX.XXX: voice_file_acct_write:

          XXX X XX:XX:XX.XXX: file_acct_write_local: file accounting buffer overflow,dumping to file

          XXX X XX:XX:XX.XXX: voice_file_acct_initiate_dump_to_file: ctx_id=, url=ftp://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

          XXX X XX:XX:XX.XXX: voice_file_acct_lock, file_acct=16985A44,ctx_id=, refcnt=2

          XXX X XX:XX:XX.XXX: create_file_acct_buffer: buffer of 45k created from chunk 0x3BCBC80

           

          That solves the problem.

           

          Similar discussions:

          https://supportforums.cisco.com/discussion/10991026/ip-telephony-billing-issue-stonevoice

          https://supportforums.cisco.com/discussion/10813861/call-accounting-uc520

           

          Other:

          http://www.cisco.com/c/en/us/td/docs/ios/voice/cdr/developer/guide/cdrdev.pdf