#NEWLINE# def recvRequest( self , req ) : #NEWLINE# #INDENT# if ( req . getMethod ( ) == 'INVITE' ) : #NEWLINE# #INDENT# self . ua . global_config [ '_sip_tm' ] . sendResponse ( req . genResponse ( 491 , 'Request Pending' ) ) #NEWLINE# return None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( req . getMethod ( ) == 'BYE' ) : #NEWLINE# #INDENT# self . ua . global_config [ '_sip_tm' ] . cancelTransaction ( event . ua . tr ) #NEWLINE# self . ua . global_config [ '_sip_tm' ] . sendResponse ( req . genResponse ( 200 , 'OK' ) ) #NEWLINE# event = CCEventDisconnect ( 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# self . ua . cancelCreditTimer ( ) #NEWLINE# self . ua . disconnect_ts = req . rtime #NEWLINE# return ( UaStateDisconnected , self . ua . disc_cbs , req . rtime , self . ua . origin ) #NEWLINE# #UNINDENT# #UNINDENT# return None