<s> from SipAddressHF import SipAddressHF <EOL> from SipGenericHF import SipGenericHF <EOL> from SipConf import SipConf <EOL> from SipAddress import SipAddress <EOL> from SipURL import SipURL <EOL> from ESipHeaderIgnore import ESipHeaderIgnore <EOL> class SipContact ( SipAddressHF ) : <EOL> hf_names = ( '<STR_LIT>' , '<STR_LIT:m>' ) <EOL> asterisk = False <EOL> def __init__ ( self , body = None , address = None ) : <EOL> if body == '<STR_LIT:*>' : <EOL> SipGenericHF . __init__ ( self , body ) <EOL> self . asterisk = True <EOL> return <EOL> SipAddressHF . __init__ ( self , body , address ) <EOL> if body == None and address == None : <EOL> self . address = SipAddress ( name = '<STR_LIT>' , url = SipURL ( host = SipConf . my_address , port = SipConf . my_port ) ) <EOL> def getCanName ( self , name , compact = False ) : <EOL> if compact : <EOL> return '<STR_LIT:m>' <EOL> return '<STR_LIT>' <EOL> def parse ( self ) : <EOL> if not self . asterisk : <EOL> return SipAddressHF . parse ( self ) </s>
