I would like to is there a possibility to know and send SIP commands to CUCM:
a- how to Hang up a ongoing call ? any specific commands ?
b- how to know if a call was hung up by a user ? any specific commands ?
Your help is most appreciated.
Unless you are the endpoint itself, I don't think there are any SIP commands to CUCM that can hangup a call.
Based on your requirements it seems that you are looking for third party call control and Cisco JTAPI and Cisco TAPI both provide interfaces to do that. You have to write an application using these interfaces. Cisco JTAPI contains a Cisco JTAPI test tool that can be useful to find out capabilities of Cisco JTAPI interface.