<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I have a scenario where I want to send a custom SIP package whenever a call is successfully established or definitely missed. This works pretty well, except when a user has multiple devices online.<br>

<br></div>I need to send exactly one packet. When initiating the call I set a flag, in the reply route I check for that flag, and on the first 4xx or 2xx response the packet gets sent out. After that I reset the flag, so no other packet is generated for another response coming in.<br>

<br></div>Now when a user has two devices and rejects the call on the first one but accepts it on the second, I see this call as missed, not answered. So I need to use the first 2xx response or the last 4xx response. For that I need to find out how many branches are open at the moment. But I'm missing something. I registered two devices on the same AOR. I tried accessing $branch(count) in the onreply route, but it is always 0. $br and $bR are <null>. <br>

<br></div>Does anyone have an idea, how to get that information in the reply_route?<br><br></div>Best Regards,<br>Sebastian<br><div><div><div><div><div><div><div></div></div></div></div></div></div></div></div>