Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Returns a sequence of the required header field names for a given reply
code number.

        def get_rpl_hfh_dict(code):
	"""Returns a sequence of the required header field names for a given reply
	code number.
	"""
	man_rpl_hfh = ['Via', 'From', 'To', 'Call-ID', 'CSeq']
	rpl_hfh_dict = { 100: man_rpl_hfh, \
					200: man_rpl_hfh, \
					300: man_rpl_hfh, \
					400: man_rpl_hfh, \
					500: man_rpl_hfh, \
					600: man_rpl_hfh}
	if rpl_hfh_dict.has_key(code):
		return rpl_hfh_dict[code]
	else:
		return None
        


src/s/f/sftf-HEAD/Transaction.py   sftf(Download)
		reply.version = copy.copy(req.version)
		# copy only the mandatory HFHs
		cp_hfh = Helper.get_rpl_hfh_dict(code)
		if cp_hfh is None:
			Log.logDebug("Transaction.createReply(): code not in reply HFH table, looking up generic code", 5)
			code_generic = (code / 100) * 100
			cp_hfh = Helper.get_rpl_hfh_dict(code_generic)

src/s/f/sftf-HEAD/TestCase.py   sftf(Download)
			elif isinstance(Message, SipReply):
				mes_req = False
				man_hfh = Helper.get_rpl_hfh_dict(Message.code)
				if man_hfh is None:
					Log.logDebug("TestCase.writeMessageToNetwork(): trying generic lookup of the reply code", 3)
					code_generic = (Message.code / 100) * 100
					man_hfh = Helper.get_rpl_hfh_dict(code_generic)