<s> from random import random <EOL> from hashlib import md5 <EOL> from time import time <EOL> from SipConf import SipConf <EOL> from SipGenericHF import SipGenericHF <EOL> class SipCallId ( SipGenericHF ) : <EOL> hf_names = ( '<STR_LIT>' , '<STR_LIT:i>' ) <EOL> body = None <EOL> def __init__ ( self , body = None ) : <EOL> SipGenericHF . __init__ ( self , body ) <EOL> self . parsed = True <EOL> if body == None : <EOL> self . body = md5 ( str ( ( random ( ) * <NUM_LIT> L ) + time ( ) ) ) . hexdigest ( ) + '<STR_LIT:@>' + str ( SipConf . my_address ) <EOL> def __add__ ( self , other ) : <EOL> return SipCallId ( self . body + str ( other ) ) <EOL> def genCallId ( self ) : <EOL> self . body = md5 ( str ( ( random ( ) * <NUM_LIT> L ) + time ( ) ) ) . hexdigest ( ) + '<STR_LIT:@>' + str ( SipConf . my_address ) <EOL> def getCanName ( self , name , compact = False ) : <EOL> if compact : <EOL> return '<STR_LIT:i>' <EOL> return '<STR_LIT>' </s>
