Not
sure why you would get that. You can take a look at the resip logs to see what
message was actually sent to the network and see if it’s corrupted before
sending.
-justin
From: Karlsson
[mailto:boost.regex@xxxxxxxxx]
Sent: Friday, October 03, 2008 11:05 AM
To: Justin Matthews
Cc: resiprocate-users
Subject: Re: [reSIProcate-users] How to got the header defination
"h_xxx" by the header name ?
Hi, I have encountering issue when I test it, I modify the User-Agent
header to a string, and
use wireshark to capture the SIP message, but got:
User-Agent:
\370L$\000\376\377\377\377\001\000\000\000\f\016\000\000\000\000\000\000\000\000\000\000
The attachment is screenshot,
why?
On Fri, Oct 3, 2008 at 9:59 PM, Justin Matthews <jmatthewsr@xxxxxxxxx> wrote:
Here is my response from an off-list message asking for
additional help on
adding a header using the string representation of the header name. I
haven't tested this and am not completely sure this is the best way to do
this, but here is my first take:
const resip::Data headerName("From");
resip::Data headerValue("some header value
here");
resip::SipMessage resipMsg;
resip::HeaderBase *headerBase =
HeaderBase::getInstance(resip::Headers::getType(headerName.c_str(),headerNam
e.size()));
if (headerBase)
{
if
(resipMsg.exists(*headerBase))
{
resipMsg.remove(*headerBase);
}
resipMsg.addHeader(headerBase->getTypeNum(),0,0,
headerValue.c_str(), headerValue.size());
//may want to make sure
that the headers added are valid...
try {
resipMsg.parseAllHeaders();
} catch (ParseException
&)
{}
}
-justin
|