[reSIProcate] Printing parameters in ExtensionHeader
I write this mail because I have a problem using the reSIProcate libraries.
I'm using it to add a new header (ProxyToProxyAuthenticate, created by
ExtensionHeader feature) and
have the following problem. I succedd in creating this new header and adding it
to the SIP message. In addition I enclose a standard parameter (algorithm) in
this new header. I'm sure it has been created, as if I can stamp it if
retrieved with the instruction
new_mess->header(h_ProxyToProxyAuthenticate).back().param(p_algorithm).c_str()
but if I stamp the whole SIP message after converting it to a char pointer using
the attached function, while the old headers are correctly displayed (the names
as well
as their parameters) in the new one just its name is displayed (it
seems the parameter doesn't exist, but I'm sure it does, as I have displayed it
previouslly).
Do you have any idea that could explain this?
Thank you in advance
Julian
--------------------------------------------------
char* msg2str(SipMessage* msg){
resip::Data& DatatoSend = msg->getEncoded();
DatatoSend.clear();
resip::DataStream encodeStream(DatatoSend);
msg->encode(encodeStream);
encodeStream.flush(); // pronto per partire
return (char*)DatatoSend.c_str();
}