New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app_record: Add RECORD_TIME output variable. #549
app_record: Add RECORD_TIME output variable. #549
Conversation
cherry-pick-to: none |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A user note should be added to the commit message about the addition of this dialplan variable.
This could clobber an existing variable. Maybe it should be master only? |
Ooh, excellent point I hadn't considered. That or turning it into a dialplan function which can pull info about the recording just done. |
This adds the RECORD_TIME variable to Record(), which is set to the recording duration before the application returns. Resolves: asterisk#548 UpgradeNote: The RECORD_TIME variable now contains the duration of Record() recordings in milliseconds.
3f0145e
to
d60acab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a UserNote (new feature) not UpgradeNote (possible breaking change).
It was requested this be master only because it "could" be breaking, that's why I removed the cherry picks and made it an upgrade note. Should it still be a user note? |
Since there could be a conflict in variable usage, I think UpgradeNote is appropriate. |
Is there another way this information could be made available without creating a channel variable? If it was a dialplan function as @jcolp mentioned you could make other information available too (recording format, file size, etc.) and that could be easily extendable in the future. Edit: And then it would be a candidate for cherry picking which would be good, Edit edit: Although I suppose a dialplan function have the same naming collision problem. I'm not sure if you can have a variable and a dialplan function with the same name. |
This PR has been marked stale because it has been in "Changes Requested" or "submitter-action-required" state for 28 days or more. Please make the requested changes within 14 days or the PR will be closed. |
Yeah, aside from that, a function to get the time feels kind of disjoint (at least to me), a variable is more consistent with the other things that are saved. Making it a function would probably also mean now a datastore is now needed to keep track of that, which seems like overkill for just exposing one piece of information. A function could be useful anyways but seems like it should be its own project to expose different information. Personally I don't really feel like changing this if it's only a suggestion, but if you feel this should absolutely be a function, then I can do so. |
I just tested this and you can have a variable and a function with the same name - there is no conflict:
This PR is not waiting on my review as far as I can tell. My opinion is that new functionality should not create channel variables that could trample those set by the user. It's a suggestion. |
I agree regarding not using dialplan variables. Older things use dialplan variables because at the time there was no other way. For inclusion I will require it to be a dialplan function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UpgradeNotes should be for changes in existing behavior a user should be aware of. This should be a UserNote.
Nevermind. But, the upgrade note should explain the possible conflict.
This PR has been marked stale because it has been in "Changes Requested" or "submitter-action-required" state for 28 days or more. Please make the requested changes within 14 days or the PR will be closed. |
6e8dccd
into
asterisk:master
Successfully merged to branch master. |
Um. What? |
@gtjoseph Yes... what? |
When did I actually approve this... why... looks back |
Oh, I never unapproved when we had our discussion. That explains it. I'm reverting this and reopening. |
This adds the RECORD_TIME variable to Record(),
which is set to the recording duration before
the application returns.
Resolves: #548