[reSIProcate] Parameters into Extension header

Lorenzo webmaster at frascati1.org
Thu Jan 26 09:00:25 CST 2006


Hi all,
I want to insert a new exstension header (Proxy-to-ProxyAuthenticate) 
for testing pourpose.
I want this header like standard Authenticate header of SIP but I have a 
problem.
I create the extension header correctly and I set some parameters 
(p_algorithm = MD5, for example) and I'm sure that is included into the 
message (I'm able to print it on video). When I "encode" the whole 
message into a string with the functun you told me in the last email 
(Data::from(msg); cout << from.c_str(); ) I can't see the parameters 
(not even the message). Just the word "true" is printed.
With a function that I made (and that I append) I'm able to print the 
message with the new header too, but without the parameters.
Is it a bug or my fault?

Best Regards,

Lorenzo

resip::Data msg2str(SipMessage* msg){

	resip::Data& DatatoSend = msg->getEncoded();
	DatatoSend.clear();
	resip::DataStream encodeStream(DatatoSend);
	msg->encode(encodeStream);
	encodeStream.flush();   // pronto per partire

	return DatatoSend;
}



and in a main:

resip::Data mydata =  msg2str(msg);
cout << mydata.c_str() <<endl;



More information about the resiprocate-devel mailing list