currently i'm using cucm version 6.x i'm able to connect cisco iphone now i need to kwnow the status of each phone to check before connecting the call . and also i need to subscribe those events using subscribesession method.
CUCM 6.x is a very old (and unsupported) version!
For application access to detailed phone call progress events and call control operations, you will want to look at the Cisco JTAPI API: https://developer.cisco.com/site/jtapi/index.gsp
You will find the JTAPI developer guide, JavaDocs, and other developer resources needed to get started.
Note, you may be referring to phone 'presence' status updates (e.g Idle or Busy) from CUCM IM & Presence server (aka Cisco Unified Presence,) which are available via several interfaces on CUP/IM&P including XMPP, SIP/SIMPLE, and REST/HTTP. More details available here: https://developer.cisco.com/site/im-and-presence/