Possible bug in ControlPlayBack


When using ControlPlayBack there are certain variables set such as:

I have found when testing that if CPLAYBACKSTATUS has the value of SUCCESS then CPLAYBACKSTOPKEY will have the value of the last time it was used. So say I listen to a file and my stop key was #, I then listen again but listen to the entire file the variable CPLAYBACKSTOPKEY will have a value of # even though it was never set for the last time ControlPlayBack was called.

It doesn’t set any of the variables to empty at the start, since CPLAYBACKSTOPKEY is only set in a normal case the value would carry over. The easiest option would be to just set the value to nothing before invoking ControlPlayback in the dialplan.

@jcolp I did that and I understand why it has the last value (since on success it isn’t set) but I would think on exit it would clear that out. If I were to submit a patch it would be accepted or is this anticipated behavior and we would want to keep it as is?

It would likely be accepted. Waiting to put any changes up though would be a good idea, as things are moving to Github at the end of the month.


Can you please define ‘on exit’? I’d imagine getting the vars cleared on ControlPlayback start.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.