If i need a script for asterisk?

Hello,

I’m quite new in this field and have one question. I have asterisk installed on server and 3 extensions. My task is to generate an xml from asterisk on every incoming call with the following parameters on it

when call start

Call ID
A number
B number
Call start time

When call end

Call ID
B number

Please advice how can i solve this task??

It is not possible to give a specific answer without seeing your dialplan. That is likely to require enough work that you would need to hire an consultant using the Biz and Jobs forum.

However the normal ways are to use CDRs or CEL (google for details). CDRs are only suitable for simple cases.

The files you will get are CSV, so you will need to write an application in your choice of language and using your choice of XML support library (or just explicitly writing the XML structure) to convert it into XML.