#NEWLINE# def recvRequest( self , req ) : #NEWLINE# #INDENT# if ( req . getMethod ( ) == 'BYE' ) : #NEWLINE# #INDENT# self . ua . sendUasResponse ( 487 , 'Request Terminated' ) #NEWLINE# self . ua . global_config [ '_sip_tm' ] . sendResponse ( req . genResponse ( 200 , 'OK' ) ) #NEWLINE# if ( req . countHFs ( 'also' ) > 0 ) : #NEWLINE# #INDENT# also = req . getHFBody ( 'also' ) . getUrl ( ) . getCopy ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# also = None #NEWLINE# #UNINDENT# event = CCEventDisconnect ( also , rtime = req . rtime , origin = self . ua . origin ) #NEWLINE# try : #NEWLINE# #INDENT# event . reason = req . getHFBody ( 'reason' ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . ua . equeue . append ( event ) #NEWLINE# if ( self . ua . expire_timer != None ) : #NEWLINE# #INDENT# self . ua . expire_timer . cancel ( ) #NEWLINE# self . ua . expire_timer = None #NEWLINE# #UNINDENT# self . ua . disconnect_ts = req . rtime #NEWLINE# return ( UaStateDisconnected , self . ua . disc_cbs , req . rtime , self . ua . origin ) #NEWLINE# #UNINDENT# return None