< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate-users] How to set a custom header to a pagedmessage....


It doesn’t appear that the unknown headers are supported by resip::Contents. You could try the following:

 

·         ClientPagerMessage:: getMessageRequest(), note that there is a warning about interfering with the message queue.  You may need to call getMessageRequest to modify the request then call page().  I have not used this however, but may work.

·         Try looking at onReadyToSend or use a DumFeature to catch the message and adorn the specified header.

 

-justin

 

From: resiprocate-users-bounces@xxxxxxxxxxxxxxxxxxxx [mailto:resiprocate-users-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Nair, Rankarajan S. (Rankarajan S.)
Sent: Friday, August 03, 2007 3:18 PM
To: resiprocate-users@xxxxxxxxxxxxxxxxxxxx
Subject: Re: [reSIProcate-users] How to set a custom header to a pagedmessage....

 

I did not get any replies...is it possible to add custom headers to a MESSAGE (IM)?

thanks

 


From: resiprocate-users-bounces@xxxxxxxxxxxxxxxxxxxx [mailto:resiprocate-users-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Nair, Rankarajan S. (Rankarajan S.)
Sent: Thursday, August 02, 2007 11:42 AM
To: resiprocate-users@xxxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate-users] How to set a custom header to a pagedmessage....

I want to add a custom header to a paged message [IM].

But the Contents accepts only headers of h_contentType...

thanks.

/////////////////////////////////////////////////////////////////////////////////

Data[] aHeaders = {"xx","yy","zz","11"};

int nHeaders = 4;

SharedPtr<SipUserProfile> profile = "">

ClientPagerMessageHandle cpmh = mDum.makePagerMessage(NameAddr(toURI),profile);

auto_ptr<Contents> content(new PlainContents(Data(message)));

for(int i=0; i< nHeaders; i+=2){

Data name = aHeaders[i];

Data value = aHeaders[i+1];

UnknownHeaderType h_customHeader(name);

content->header(h_customHeader).push_back(StringCategory(value));

//error C2664: 'resip::H_ContentType::Type &resip::Contents::header(const resip::H_ContentType &) const' : cannot convert parameter 1 from 'resip::UnknownHeaderType' to 'const resip::H_ContentType

}

cpmh.get()->page(content);