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

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
This function returns the reverse mapping of what the getMappedHFH
function returned. Which means the mapped name (without -, capitalized
and long notation) to the header name exactly as written in BNF of RFC3261.

        def getRevMappedHFH(hfh):
	"""This function returns the reverse mapping of what the getMappedHFH
	function returned. Which means the mapped name (without -, capitalized
	and long notation) to the header name exactly as written in BNF of RFC3261.
	"""
	hfh_dict = {'Accept': 'Accept', \
				'Acceptencoding': 'Accept-Encoding', \
				'Acceptlanguage': 'Accept-Language', \
				'Alertinfo': 'Alert-Info', \
				'Allow': 'Allow', \
				'Authorization': 'Authorization', \
				'Authenticationinfo': 'Authentication-Info', \
				'Callid': 'Call-ID', \
				'I': 'Call-ID', \
				'Callinfo': 'Call-Info', \
				'Contact': 'Contact', \
				'M': 'Contact', \
				'Contentdisposition': 'Content-Disposition', \
				'Contentencoding': 'Content-Encoding', \
				'E': 'Content-Encoding', \
				'Contentlanguage': 'Content-Language', \
				'Contentlength': 'Content-Length', \
				'L': 'Content-Length', \
				'Contenttype': 'Content-Type', \
				'C': 'Content-Type', \
				'Cseq': 'CSeq', \
				'Date': 'Date', \
				'Errorinfo': 'Error-Info', \
				'Expires': 'Expires', \
				'From': 'From', \
				'F': 'From', \
				'Inreplyto': 'In-Reply-To', \
				'Maxforwards': 'Max-Forwards', \
				'Mimeversion': 'MIME-Version', \
				'Minexpires': 'MinExpires', \
				'Organization': 'Organization', \
				'Priority': 'Priority', \
				'Proxyauthenticate': 'Proxy-Authenticate', \
				'Proxyauthorization': 'Proxy-Authorization', \
				'Proxyrequire': 'Proxy-Require', \
				'Recordroute': 'Record-Route', \
				'Referto': 'Refer-To', \
				'Replyto': 'Reply-To', \
				'Require': 'Require', \
				'Retryafter': 'Retry-After', \
				'Route': 'Route', \
				'Server': 'Server', \
				'Subject': 'Subject', \
				'S': 'Subject', \
				'Supported': 'Supported', \
				'K': 'Supported', \
				'Timestamp': 'Timestamp', \
				'To': 'To', \
				'T': 'To', \
				'Unsupported': 'Unsupported', \
				'Useragent': 'User-Agent', \
				'Via': 'Via', \
				'V': 'Via', \
				'Warning': 'Warning', \
				'Wwwauthenticate': 'WWW-Authenticate'}
	hfhl = hfh.replace("-", "").capitalize()
	if hfh_dict.has_key(hfhl):
		return hfh_dict[hfh.replace("-", "").capitalize()]
	else:
		return None
        


src/s/f/sftf-HEAD/SipMessage.py   sftf(Download)
		name is not know also the raw name will be used.
		"""
		if Helper.getRevMappedHFH(Helper.getMappedHFH(hfName)):
			self.headerFields[Helper.getMappedHFH(hfName)] = hfValue
		else:
		for i in hf_len:
			att, val = hf[i]
			att_m = Helper.getRevMappedHFH(att)
			if att_m is None:
				Log.logDebug("SipMessage.createEvent(): unable to map back the HFH: \'" + str(att) + "\'", 3)