How do i duplicate SIP Headers in the request and response
Parasuraman Kumarasami <[email protected]> Mon, 08 Dec 2008 17:33:46 +0530
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
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