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

Re: [reSIProcate-users] Content-type header


The code to add the parameter to the header looks correct, I'm guessing you are just adding it in the wrong spot.  There should be a way to do what you need without modifying the core resip code.  Judging from your code below you are interested in modifying the outbound MESSAGE request - are you using ClientPagerMessage to send MESSAGE requests, or are you sending within the context of an InviteSession (ie. InviteSession::message )? 

Scott

On Mon, Feb 22, 2010 at 9:42 PM, Rajan, Nihar <nihar.rajan@xxxxxxxxxxxxxxxx> wrote:
Hi All,
 
I hope it is the right forum to ask this question.
 I am using resiprocate basicmessage application to send one message to remote SIP phone.
I need to set "Content-Type: text/plain ;charset=iso-8859-1" otherwise I get unsupported MediaType error.
By adding following line of code I can get "Content-Type: text/plain "
 
clientDum.getMasterProfile()->addSupportedMimeType(MESSAGE, Mime("text", "plain"))
 
I want to add charset = UTF-8 in content-type header. So what extra work I need to do?
 
I tried by adding following codes in resip\dum\BaseCreator.cxx  makeInitialRequest()

SharedPtr<SipMessage> mLastRequest;

mLastRequest->header(h_ContentType).param(p_charset) = "UTF-8";
 
but failed to get desired result still "Content-Type: text/plain "
 
Please help.
 
Regards,
  ND

_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/