0

I am using sip servlets api to make sip calls,

My requirement is to connect two calls in conference, for this I need to modify call-id for one of the invite request, but it is not allowing me to modify call-id in header part and my code is as follows:

SipServletRequest forkedRequest = linkedSession.createRequest("INVITE");
ipFactory sipFactory = (SipFactory)getServletContext().getAttribute("javax.servlet.sip.SipFactory");
SipURI sipUri = (SipURI)sipFactory.createURI("sip:msml@192.168.149.113");
forkedRequest.setRequestURI(sipUri);
forkedRequest.setContent(secondSdp,"application/sdp");
forkedRequest.addHeader("Call-ID",sipServletResponse.getCallId());

and I was getting following error:

Header[Call-ID] is system header, cant add,cant modify it!!!

Can any one suggest on this? make sure how to modify call-id

TZHX
  • 5,291
  • 15
  • 47
  • 56

1 Answers1

1

SIP Servlets Specification specifically forbids to modify the Call-ID Header which is a System Header. Please read the specification at https://jcp.org/en/jsr/detail?id=289

Which conference provider enforces you to have the same Call-ID for 2 different calls to be able to join the same conference ? This seems like a very bad design and against the SIP RFC itself https://www.rfc-editor.org/rfc/rfc3261#section-8.1.1.4

Community
  • 1
  • 1
jeand
  • 2,325
  • 14
  • 12
  • what are the best and easy to implement conference providers do we have? I have approx similar problem, i have a single call setup implemented using SipServlets.. How can i implement conference? – Farhan Jun 25 '18 at 12:33
  • @Farhan I would go with something like Restcomm for implementing Conference see how easy is it at https://www.restcomm.com/docs/connect/rcml/conference-rcml.html#conference. You can even do it with the Restcomm Visual Designer without coding anything in less than 5 minutes https://www.restcomm.com/docs/restcommone_cloud/Quick%20Start%20Guide_RestcommONE%20Cloud.html – jeand Jun 26 '18 at 13:12