Forking in SIP

本文介绍了Session Initiation Protocol (SIP)中的Forking机制,详细解释了当用户从多个IP地址注册时,代理如何通过并行尝试不同联系地址来确定可达的联系点。文章还探讨了状态代理在这一过程中扮演的角色,以及如何处理正负响应以建立有效连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

Share From: http://www.ucunleashed.com/?p=129

Forking diagram looks like a fork. Hence it is called forking


 

12-1bmp


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.


 

 

 

12-2bmp

 

 

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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值