Hello, I need some help regarding the transport layer of a SIP server. Consider the following scenario :
The transport layer successively receives a number of messages for a *particular connection* (messages from the same client) in some order - say INVITE followed by a CANCEL. (Actually this situation of an INVITE followed immediately by an CANCEL is not valid since the UA that has sent the INVITE, cannot send a CANCEL, or for that matter any request, without first receiving either a provisional or a final response from the proxy. But we can assume that a rogue UA could do this.) In case such a scenario exists, we have to make sure that the messages are given in the *same* order to the application above. In case of a single threaded server, this is not a problem. However, in a thread pool implementation, it is a problem, as we are not able to ensure that the messages are processed in the same order in which they arrived at the server (there is a definite possibility of the CANCEL processing completing before INVITE although INVITE arrived first). So after this processing is over, the CANCEL will be posted to the application's queue *before* the INVITE. In this case, the proxy application will have to reject the CANCEL. It will then accept the INVITE and rely on the UA to send another CANCEL. So could somebody throw some light on the following: 1. Can you offer a valid scenario in which consecutive messages generated by the UA would be required to be processed in the order in which they were received? 2. How can I ensure serialization of inputs while using a threadpool? 3. Is this serial processing of the input messages really necessary at all? 4. What if the messages are posted to the application in a different order? Thanks and regards, ~Tanmay Z.
----------------------------------------------------------------------------------------------------------------------- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. ------------------------------------------------------------------------------------------------------------------------
