LOG4CXX_DEBUG(s_log, "SIP INVITE");
LOG4CXX_DEBUG(s_sipPacketLog, "SIP INVITE");
bool TrySipInvite(EthernetHeaderStruct* ethernetHeader, IpHeaderStruct* ipHeader, UdpHeaderStruct* udpHeader, u_char* udpPayload){	bool result = false;	if (memcmp("INVITE", (void*)udpPayload, 1) == 0)	{		result = true;		int sipLength = ntohs(udpHeader->len);		char* sipEnd = (char*)udpPayload + sipLength;		SipInviteInfoRef info(new SipInviteInfo());		char* fromField = memFindAfter("From: ", (char*)udpPayload, sipEnd);		char* toField = NULL;		char* callIdField = NULL;		char* audioField = NULL;		if(fromField)		{			if(s_sipExtractionLog->isDebugEnabled())			{				CStdString from;				GrabLine(fromField, sipEnd, from);				s_sipExtractionLog->forcedLog(Level::DEBUG, "from: " + from);			}			char* fromFieldEnd = memFindEOL(fromField, sipEnd);			char* sipUser = memFindAfter("sip:", fromField, fromFieldEnd);			if(sipUser)			{				GrabAlphaNumToken(sipUser, fromFieldEnd, info->m_from);			}			else			{				GrabAlphaNumToken(fromField, fromFieldEnd, info->m_from);			}			toField = memFindAfter("To: ", fromField, sipEnd);		}		if(toField)		{			char* toFieldEnd = NULL;			if(s_sipExtractionLog->isDebugEnabled())			{				CStdString to;				toFieldEnd = GrabLine(toField, sipEnd, to);				s_sipExtractionLog->forcedLog(Level::DEBUG, "to: " + to);			}			char* sipUser = memFindAfter("sip:", toField, toFieldEnd);			if(sipUser)			{				GrabAlphaNumToken(sipUser, toFieldEnd, info->m_to);			}			else			{				GrabAlphaNumToken(toField, toFieldEnd, info->m_to);			}			callIdField = memFindAfter("Call-ID: ", toField, sipEnd);		}		if(callIdField)		{			GrabToken(callIdField, info->m_callId);			audioField = memFindAfter("m=audio ", callIdField, sipEnd);		}		if(audioField)		{			GrabToken(audioField, info->m_fromRtpPort);			info->m_fromIp = ipHeader->ip_src;			RtpSessionsSingleton::instance()->ReportSipInvite(info);		}		LOG4CXX_DEBUG(s_log, "SIP INVITE");	}	return result;}