< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index | Next in Thread > |
Hi Scott, I think I have accidentally come across a bug in the tag parser. The original from-tag that isn't parsed correctly is tag=fromtag12345 If I change it to tag=tag12345 It is parsed correctly. I think the string "from" is affecting the way parameters are parsed. Joegen --------------------- Here is the test code: int main(int argc , char** argv) { using namespace resip; Data buffer = "OPTIONS sip:homer@192.168.1.11:5060;transport=tcp SIP/2.0\r\n" "From: sip:homertest@192.168.1.10:5060;tag=fromtag12345\r\n" "To: sip:homer@192.168.1.11:5060;tag=totag6789\r\n" "Contact: sip:homertest@192.168.1.10:5060;transport=tcp\r\n" "Via: SIP/2.0/TCP 192.168.1.10:5060;branch=z9hG4bK1234\r\n" "CSeq: 1 OPTIONS\r\n" "User-Agent: sipXecs\r\n" "Call-ID: homertest12345\r\n\r\n"; SipMessage* msg = SipMessage::make(buffer); std::string fromTag; std::string toTag; if (msg->exists(h_To)) toTag = msg->const_header(h_To).exists(p_tag) ? msg->const_header(h_To).param(p_tag).c_str() : std::string(); if (msg->exists(h_From)) fromTag = msg->const_header(h_From).exists(p_tag) ? msg->const_header(h_From).param(p_tag).c_str() : std::string(); std::cout << "From-tag: " << fromTag << " To-Tag: " << toTag; return 0; } On 03/17/2012 11:58 PM, Scott Godin wrote:
|