refactored sip_im_client.py to support different types of sessions

darcs-hash:20081127153557-b2873-8aa799fb804b4e04f2042a5145610e420827bc89