Problem with Call record()
-
Roland Moriz
It was suggested to try without the format option:
@recorded_file = @call.record :silence => 3, :maxduration => 120DEBUG agi: >>> RECORD FILE "/tmp/recording_%d" "gsm" "#" "120" "0" "BEEP" "s=3"same problem.
-
Roland Moriz
The old version I used was http://github.com/jicksta/adhearsion
-
Ben Langfeld
One thing that stands out is the lack of comma delimiters between arguments (removed here: http://github.com/adhearsion/adhearsion/commit/0444c6955c20ffcea6d7... since response() does not introduce delimiters like execute() does). Roland believes whitespace param separation is ok for RECORD FILE. Previous version of this app was using Jay's repo.
-
Roland Moriz
I think I've the problem/solution:
It's the timeout!
Record expects timeout in seconds
RECORD FILE expects timeout in milisecondsSo it might be reasonable to change the adhearsion code:
… silence = options.delete(:silence) || 0 maxduration = options.delete(:maxduration) || -1 escapedigits = options.delete(:escapedigits) || "#" maxduration_milliseconds = maxduration * 1000 if (silence > 0) response("RECORD FILE", filename, format, escapedigits, maxduration_milliseconds, 0, "BEEP", "s=#{silence}") else response("RECORD FILE", filename, format, escapedigits, maxduration_milliseconds, 0, "BEEP") end … -
Ben Klang
- Milestone set to 0.8.5
- Assigned user set to Ben Klang
- Milestone order changed from 3028 to 0
-
Ben Klang
- State changed from new to fixcommitted
- Tag changed from voip record to agi, record
I've merged your changes and made a tweak to how the maxduration is calculated. The changes have been pushed so I'm marking this "fixcommitted". Thanks!
-
Ben Klang
- State changed from fixcommitted to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.