Share From: http://www.ucunleashed.com/?p=129
Forking diagram looks like a fork. Hence it is called forking

A user can get registered from multiple IP addresses. So for a proxy, it becomes difficult to identify the correct contact where user will be reachable. Proxy will try to attempt all the available contact addresses either sequentially or in parallel depending its administrative settings. This process of trying out different contact addresses of the destination party in parallel is called ‘Forking’. Forking requires keeping track of transaction states so it is not going to work with stateless proxies. It can be performed by call stateful proxy or transaction stateful proxy.

Consider this call flow (as in image above) wherein an INVITE has reached a proxy (stateful one), proxy consults location service for list of contact addresses for the destination party. Location service returns two contact addresses. Stateful proxy has been set to perform forking. So it will create two transactions, towards each contact address. For n contact addresses, there will be n transactions on the client side will be created.
There will some positive responses and some negative ones from various contact addresses being tried. The negative ones had been because destination not reachable, user busy i.e. any 4xx,5xx,6xx response. Negative response transactions will be terminated automatically. Proxy will have to choose one of the transaction out of several positive ones. Proxy will choose the one based on first come first serve basis.
Basically, After receiving the first 200 OK from any of destinations, the proxy will immediately issue CANCEL request towards all the pending transactions. By pending transactions I mean, the ones that have only received provisional responses. Calling party will be connected to the chosen called party by the proxy
本文介绍了Session Initiation Protocol (SIP)中的Forking机制,详细解释了当用户从多个IP地址注册时,代理如何通过并行尝试不同联系地址来确定可达的联系点。文章还探讨了状态代理在这一过程中扮演的角色,以及如何处理正负响应以建立有效连接。

被折叠的 条评论
为什么被折叠?



