{"action":"created","issue":{"url":"https://api.github.com/repos/onsip/rtpengine/issues/10","labels_url":"https://api.github.com/repos/onsip/rtpengine/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/onsip/rtpengine/issues/10/comments","events_url":"https://api.github.com/repos/onsip/rtpengine/issues/10/events","html_url":"https://github.com/onsip/rtpengine/issues/10","id":123551778,"number":10,"title":"Hold/unhold turning off call recording and not finishing current recording","user":{"login":"dbmikus","id":123053,"avatar_url":"https://avatars.githubusercontent.com/u/123053?v=3","gravatar_id":"","url":"https://api.github.com/users/dbmikus","html_url":"https://github.com/dbmikus","followers_url":"https://api.github.com/users/dbmikus/followers","following_url":"https://api.github.com/users/dbmikus/following{/other_user}","gists_url":"https://api.github.com/users/dbmikus/gists{/gist_id}","starred_url":"https://api.github.com/users/dbmikus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbmikus/subscriptions","organizations_url":"https://api.github.com/users/dbmikus/orgs","repos_url":"https://api.github.com/users/dbmikus/repos","events_url":"https://api.github.com/users/dbmikus/events{/privacy}","received_events_url":"https://api.github.com/users/dbmikus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-22T20:35:15Z","updated_at":"2015-12-23T18:11:13Z","closed_at":null,"body":"# Reproduce Problem\r\n\r\n1. Call between two users, with RTP proxied over rtpengine and \"record-call=yes\" sent in the offer message\r\n2. Place one call on hold\r\n3. Unhold the call\r\n\r\nThis generates another offer, but this offer might not include the \"record-call=yes\" flag. This will disable call recording part-way through the call, but we aren't properly freeing memory, closing file descriptors, and moving metadata files to their trigger location when this happens.\r\n\r\n# Solutions\r\n\r\n## Option A\r\n\r\nThe user can turn on and off recording during the call at will, through rtpengine messages. If the user sends another message, we can either treat the absence of the \"record-call\" flag as meaning stop recording or only stop recording if we get a \"record-call=no\" flag. I think we should only stop recording if we get an explicit \"no\".\r\n\r\nWe could also let the user turn back on call-recording stuff, too.\r\n\r\n## Option B\r\n\r\nCall recording is turned on at the start of a call, or not at all. We will ignore future \"record-call\" messages.\r\n\r\n# My Opinion\r\n\r\nI greatly prefer **Option A** where we only turn off recording if another rtpengine message includes \"record-call=no\". I think, if we do this, we should also let the user turn back on call recording. Everything will still go to the same PCAP file, but we will only write rtpengine when a `record_call` variable is true.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/onsip/rtpengine/issues/comments/166961213","html_url":"https://github.com/onsip/rtpengine/issues/10#issuecomment-166961213","issue_url":"https://api.github.com/repos/onsip/rtpengine/issues/10","id":166961213,"user":{"login":"josephfrazier","id":6473925,"avatar_url":"https://avatars.githubusercontent.com/u/6473925?v=3","gravatar_id":"","url":"https://api.github.com/users/josephfrazier","html_url":"https://github.com/josephfrazier","followers_url":"https://api.github.com/users/josephfrazier/followers","following_url":"https://api.github.com/users/josephfrazier/following{/other_user}","gists_url":"https://api.github.com/users/josephfrazier/gists{/gist_id}","starred_url":"https://api.github.com/users/josephfrazier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephfrazier/subscriptions","organizations_url":"https://api.github.com/users/josephfrazier/orgs","repos_url":"https://api.github.com/users/josephfrazier/repos","events_url":"https://api.github.com/users/josephfrazier/events{/privacy}","received_events_url":"https://api.github.com/users/josephfrazier/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T18:11:12Z","updated_at":"2015-12-23T18:11:12Z","body":"@dbmikus, I think we're talking past each other a bit. While it's important for us to figure out the end user's expected behavior (w.r.t. recording) for hold/unhold/monitor/whisper/barge/transfer/etc, I think this issue should stay focused on rtpengine's behavior regarding rtpengine_offer and rtpengine_answer (and `start recording`, `stop recording`, should those come into play).\r\n\r\nI agree with @etamme in https://github.com/onsip/rtpengine/issues/10#issuecomment-166953353. It sounds like rtpengine (in its [current state](https://github.com/onsip/rtpengine/commit/332254313588d42691eb72e627bca465e3140724)) will behave as expected if it receives \"record-call=yes\" with every offer/answer."}}