{"action":"created","issue":{"url":"https://api.github.com/repos/RestComm/RestComm-Core/issues/828","repository_url":"https://api.github.com/repos/RestComm/RestComm-Core","labels_url":"https://api.github.com/repos/RestComm/RestComm-Core/issues/828/labels{/name}","comments_url":"https://api.github.com/repos/RestComm/RestComm-Core/issues/828/comments","events_url":"https://api.github.com/repos/RestComm/RestComm-Core/issues/828/events","html_url":"https://github.com/RestComm/RestComm-Core/issues/828","id":129757944,"number":828,"title":"Decouple MGCP resources management from the MmsCallController actor","user":{"login":"hrosa","id":7796608,"avatar_url":"https://avatars.githubusercontent.com/u/7796608?v=3","gravatar_id":"","url":"https://api.github.com/users/hrosa","html_url":"https://github.com/hrosa","followers_url":"https://api.github.com/users/hrosa/followers","following_url":"https://api.github.com/users/hrosa/following{/other_user}","gists_url":"https://api.github.com/users/hrosa/gists{/gist_id}","starred_url":"https://api.github.com/users/hrosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrosa/subscriptions","organizations_url":"https://api.github.com/users/hrosa/orgs","repos_url":"https://api.github.com/users/hrosa/repos","events_url":"https://api.github.com/users/hrosa/events{/privacy}","received_events_url":"https://api.github.com/users/hrosa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RestComm/RestComm-Core/labels/2.%20Enhancement","name":"2. Enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/RestComm/RestComm-Core/labels/Core%20engine","name":"Core engine","color":"fef2c0"},{"url":"https://api.github.com/repos/RestComm/RestComm-Core/labels/Help%20Wanted","name":"Help Wanted","color":"009800"},{"url":"https://api.github.com/repos/RestComm/RestComm-Core/labels/Normal-Priority","name":"Normal-Priority","color":"bfe5bf"},{"url":"https://api.github.com/repos/RestComm/RestComm-Core/labels/Tech%20Debt","name":"Tech Debt","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"hrosa","id":7796608,"avatar_url":"https://avatars.githubusercontent.com/u/7796608?v=3","gravatar_id":"","url":"https://api.github.com/users/hrosa","html_url":"https://github.com/hrosa","followers_url":"https://api.github.com/users/hrosa/followers","following_url":"https://api.github.com/users/hrosa/following{/other_user}","gists_url":"https://api.github.com/users/hrosa/gists{/gist_id}","starred_url":"https://api.github.com/users/hrosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrosa/subscriptions","organizations_url":"https://api.github.com/users/hrosa/orgs","repos_url":"https://api.github.com/users/hrosa/repos","events_url":"https://api.github.com/users/hrosa/events{/privacy}","received_events_url":"https://api.github.com/users/hrosa/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/RestComm/RestComm-Core/milestones/15","html_url":"https://github.com/RestComm/RestComm-Core/milestones/7.6.0","labels_url":"https://api.github.com/repos/RestComm/RestComm-Core/milestones/15/labels","id":1397428,"number":15,"title":"7.6.0","description":"","creator":{"login":"gvagenas","id":588875,"avatar_url":"https://avatars.githubusercontent.com/u/588875?v=3","gravatar_id":"","url":"https://api.github.com/users/gvagenas","html_url":"https://github.com/gvagenas","followers_url":"https://api.github.com/users/gvagenas/followers","following_url":"https://api.github.com/users/gvagenas/following{/other_user}","gists_url":"https://api.github.com/users/gvagenas/gists{/gist_id}","starred_url":"https://api.github.com/users/gvagenas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvagenas/subscriptions","organizations_url":"https://api.github.com/users/gvagenas/orgs","repos_url":"https://api.github.com/users/gvagenas/repos","events_url":"https://api.github.com/users/gvagenas/events{/privacy}","received_events_url":"https://api.github.com/users/gvagenas/received_events","type":"User","site_admin":false},"open_issues":170,"closed_issues":1,"state":"open","created_at":"2015-11-06T10:31:01Z","updated_at":"2016-02-02T12:34:14Z","due_on":"2016-01-31T22:00:00Z","closed_at":null},"comments":1,"created_at":"2016-01-29T12:53:32Z","updated_at":"2016-02-02T22:34:47Z","closed_at":null,"body":"The current FSM of the MmsCallController has grown quite large and complex because it tries to manage all MGCP resources generated during the call: 1 BridgeEndpoint, 1 Connection and 1 Link.\r\n\r\nAs a result we have a very complex workflow with too many intermediary states, related by MGCP resource management (I estimate around 10):\r\n\r\n![call-mscontrol](https://cloud.githubusercontent.com/assets/7796608/12675997/79b8581e-c686-11e5-8dad-e540c1dcd6fb.png)\r\n\r\nA much more efficient approach is to group related MGCP resources under new actors with well-defined workflow, decoupling this complex logic from the Call Controller. This is exactly what the MediaGroup actor is doing.\r\n\r\nMy suggestion is to mimic the JSR309 spec and introduce the NetworkConnection actor, which will wrap said resources. Here is a class diagram to show relationship between different resources:\r\n\r\n![call-mscontrol-classes](https://cloud.githubusercontent.com/assets/7796608/12676082/472448d0-c687-11e5-9abf-93b332993cbd.png)\r\n"},"comment":{"url":"https://api.github.com/repos/RestComm/RestComm-Core/issues/comments/178866996","html_url":"https://github.com/RestComm/RestComm-Core/issues/828#issuecomment-178866996","issue_url":"https://api.github.com/repos/RestComm/RestComm-Core/issues/828","id":178866996,"user":{"login":"hrosa","id":7796608,"avatar_url":"https://avatars.githubusercontent.com/u/7796608?v=3","gravatar_id":"","url":"https://api.github.com/users/hrosa","html_url":"https://github.com/hrosa","followers_url":"https://api.github.com/users/hrosa/followers","following_url":"https://api.github.com/users/hrosa/following{/other_user}","gists_url":"https://api.github.com/users/hrosa/gists{/gist_id}","starred_url":"https://api.github.com/users/hrosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrosa/subscriptions","organizations_url":"https://api.github.com/users/hrosa/orgs","repos_url":"https://api.github.com/users/hrosa/repos","events_url":"https://api.github.com/users/hrosa/events{/privacy}","received_events_url":"https://api.github.com/users/hrosa/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T22:34:47Z","updated_at":"2016-02-02T22:34:47Z","body":"First draft for the FSM of the new NetworkConnection actor\r\n\r\n![networkconnection-state](https://cloud.githubusercontent.com/assets/7796608/12766742/130ac910-c9fd-11e5-9cfc-11a8a97cc16f.png)\r\n"}}