#NEWLINE# def recvEvent( self , event ) : #NEWLINE# #INDENT# if ( isinstance ( event , CCEventDisconnect ) or isinstance ( event , CCEventFail ) or isinstance ( event , CCEventRedirect ) ) : #NEWLINE# #INDENT# self . ua . global_config [ '_sip_tm' ] . cancelTransaction ( self . ua . tr ) #NEWLINE# req = self . ua . genRequest ( 'BYE' , reason = event . reason ) #NEWLINE# self . ua . lCSeq += 1 #NEWLINE# self . ua . global_config [ '_sip_tm' ] . newTransaction ( req , laddress = self . ua . source_address ) #NEWLINE# self . ua . cancelCreditTimer ( ) #NEWLINE# self . ua . disconnect_ts = event . rtime #NEWLINE# return ( UaStateDisconnected , self . ua . disc_cbs , event . rtime , event . origin ) #NEWLINE# #UNINDENT# return None