Re: How do i duplicate SIP Headers in the request and response

Parasuraman Kumarasami <[email protected]> Tue, 09 Dec 2008 16:46:48 +0530
Newsgroups gmane.comp.voip.nist-sip
Message-ID <[email protected]>
M. Ranganathan wrote:
> Why on earth would you want to add duplicates of the CSeq header?
> There is only one of those allowed.  You cannot add multiple cseq
> headers.
>
>
> On Mon, Dec 8, 2008 at 7:03 AM, Parasuraman Kumarasami
> <[email protected]> wrote:
>   
>> Hi All,
>>
>> I want to duplicate SIP headers using Jain SIP Stack.
>> Am not able to do so while creating a response using the
>> below mentioned code.
>>
>> CSeqHeader c = (CSeqHeader) res.getHeader(CSeqHeader.NAME);
>>           res.addHeader(c);
>>           res.addHeader(c);
>>           res.addHeader(c);
>>           res.addHeader(c);
>>           res.addHeader(c);
>>
>> My expected output is as follows:
>>
>> SIP/2.0 401 Unauthorized
>> Call-ID: [email protected]
>> Cseq: 4 REGISTER
>> Cseq: 4 REGISTER
>> Cseq: 4 REGISTER
>> Cseq: 4 REGISTER
>> Cseq: 4 REGISTER
>> From: <sip:[email protected]>;tag=3c001267
>> To: <sip:[email protected]>;tag=39a87697
>> Via: SIP/2.0/UDP
>> 127.0.0.1:5060;branch=z9hG4bKb1cb0d9875ef7b7b38000a0e7ac13055
>> Contact: "UserA" <sip:[email protected]:5070;transport=udp>
>> Content-Length: 0
>>
>> Pls tell me where I go wrong.
>>
>> Thanks in Advance..!!
>>
>> Regard's
>> Parasuraman
>> _______________________________________________
>> nist-sip mailing list
>> [email protected]
>> http://www-x.antd.nist.gov/mailman/listinfo/nist-sip
>>
>>     
>
>
>
>   
Hello,

Please its an urgent. need to be done.
can any one help to do so..

Thanks
Parasuraman