https://github.com/sipcapture/sipgrep/blob/1cc00079cd80310f7e8b1a696e9a02b8a2b25e04/src/sipgrep.c#L1063 I think 'wirte_deadline' must be assigned with current time to make correct file name by time. if ((split_file_value = atoi(request + 9)) > 0) { **write_deadline = (unsigned)time(NULL);** return 0; }