After that Client B sends AnswerCallEvent to answer call. This event includes:
Please note that Step 1-2 are same data. It is used to get existing sip session on Application server. AnswerCallEvent is converted to 200 OK SIP response by using this information.
Problem:
The length of data which is conveyed with Step 1-2 is long about 196 chars.
Hello all,
I am trying to create a sip session between two clients that are using different protocols. One client uses SIP (Client A) and other one uses Restful (Client B). Signalling is shown below. Whenever INVITE message is received, it is converted to CallReceivedEvent for term side. This event includes :
- SipApplicationSession ID (used SipApplicationSession->getId() method),
- session information of SipServletRequest object (used SipServletRequest ->getSession() method).
- SDP of INVITE message.
After that Client B sends AnswerCallEvent to answer call. This event includes:
- SipApplicationSession ID (used SipApplicationSession->getId() method),
- session information of SipServletRequest object (used SipServletRequest ->getSession() method).
- Client B's SDP
Please note that Step 1-2 are same data. It is used to get existing sip session on Application server. AnswerCallEvent is converted to 200 OK SIP response by using this information.
Problem:
The length of data which is conveyed with Step 1-2 is long about 196 chars.
- Is there a way to minimize it under 100 chars?
- Is there another way to get sip session on Application Server?
- Step 1 is created based on CallID header of incoming INVITE message. Step 2 is created by mobicents. Is it possible to get longer data in next releases of mobicents for SipApplicationSession ID? How is it generated?
Signalling is as below:
Thank you,
Hatke
Hi,Please see inline
Jean
On Mon, Sep 3, 2012 at 1:17 PM, Hatke Özlem <hat...@gmail.com> wrote:Hello all,
I am trying to create a sip session between two clients that are using different protocols. One client uses SIP (Client A) and other one uses Restful (Client B). Signalling is shown below. Whenever INVITE message is received, it is converted to CallReceivedEvent for term side. This event includes :
- SipApplicationSession ID (used SipApplicationSession->getId() method),
- session information of SipServletRequest object (used SipServletRequest ->getSession() method).
- SDP of INVITE message.
After that Client B sends AnswerCallEvent to answer call. This event includes:
- SipApplicationSession ID (used SipApplicationSession->getId() method),
- session information of SipServletRequest object (used SipServletRequest ->getSession() method).
- Client B's SDP
Please note that Step 1-2 are same data. It is used to get existing sip session on Application server. AnswerCallEvent is converted to 200 OK SIP response by using this information.
Problem:
The length of data which is conveyed with Step 1-2 is long about 196 chars.
- Is there a way to minimize it under 100 chars?
Which data is 196 chars long ? Why is this a problem ?
The specs do not impose a maximum length, however HTTP spec raises a warning that we should be careful not to go beyond 255 characters. According to Hypertext Transfer Protocol – HTTP/1.1 section 3.2:
“…Servers ought to be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations might not properly support these lengths.”
- Is there another way to get sip session on Application Server?
Show me the code you use ? Why do you need another way to get the sip session ?
I need another way since maybe this data can be longer and i can have bigger value than 255 chars.
Code is:
public StatusCode sendAnswer(String sipApplicationSessionId, String sessionId, String sdpData) {
SipApplicationSession appSession = null;
SipServletRequest req = null;
SipServletResponse res = null;
appSession = sipSessionsUtil.getApplicationSessionById(sipApplicationSessionId);
SipSession sipSession = appSession.getSipSession(sessionId);
req = (SipServletRequest) sipSession.getAttribute(sessionId);
res = req.createResponse(SipServletResponse.SC_OK)
res.setContent(contents, "application/sdp");
res.send();
return StatusCode.SC_SUCCESSFUL;
}
- Step 1 is created based on CallID header of incoming INVITE message. Step 2 is created by mobicents. Is it possible to get longer data in next releases of mobicents for SipApplicationSession ID? How is it generated?
Why do you need longer data here for SipAppSession ID ? This is how it is generated https://code.google.com/p/sipservlets/source/browse/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipApplicationSessionKey.java