AI-Phone should record video and audio only during call initiation and answering.

we have successfully completed the AI-Phone integration with Milestone software and implemented motion-based video and audio recording.

But we required AI-Phone should record video and audio only during call initiation and answering.

Recording is governed by rules, you probably now have the “Default Record on Motion Rule” active.

You could make a “Record on Event” rule and make sure the AI-Phone sends events both when recording should be started and another when it should be stopped.

If you use user-defined events your rule could look like this:

To send the events use TriggerCommand

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_messaging_1_1_message_id_1_1_control.html&tree=tree_search.html?search=triggercommand

You can see sending the command in use in the Configuration Access sample (Trigger button).

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/configaccessviasdk/readme.html&tree=tree_2.html

The rule can work for all your cameras, instead of one rule for each camera, if you send the camera info with the event, just like the sample does..