How to configure ip camera on asterisk for videosurveillance

Hello everyone,
I would like to configure an ip camera on asterisk server to be able to call the camera from X-lite and also to call x-lite from the camera when motion is detected.
But till now and after many researches I have no clear idea to do this…can someone give me some directive please!
Best regards

If the camera has a sip client, use it. If there is none, you can use ZoneMinder.

Thanks for your help, But how configure the sip client for the camera…what are the files responsible for this configuration?

Usually you configure this with the web-interface of the camera. As far as Asterisk is concerned, it is a normal SIP account.