Please see this Smart Client Insert Camera sample - https://doc.developer.milestonesys.com/html/index.html?base=samples/scinsertcamera.html&tree=tree_search.html?search=smart+client+insert+camera
This sample shows you how to insert a selected camera on a given position in the current view.
This works internally, you then also need in the plugin to develop the communication with your external app. The communication can be using your preferred method, or it can be using the method shown in the Chat sample.