<div dir="ltr">Hello All,<div>Just bumping in to check if there's a better way to remove an existing contact from the location. My idea was to remove from the location a record with particular callid or particular contact on specific scenarios. So I do the following:</div><div>On a successful registration I store the some id that my device has along with callid and contact. </div><div>On a subsequent registration, I compare the id and callid, if they are different from the current registration, I need to remove the existing contact with this callid</div><div>If the id and callid is same, I do nothing.</div><div><br></div><div>Thanks,</div><div><br></div><div>- Jayesh</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 10, 2015 at 6:59 PM Jayesh Nambiar <<a href="mailto:jayesh1017@gmail.com">jayesh1017@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Forgot to mention. I'm using version 2.1.<div><br></div><div>Thanks,</div><div><br></div><div>- Jayesh</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 10, 2015 at 6:01 PM Jayesh Nambiar <<a href="mailto:jayesh1017@gmail.com" target="_blank">jayesh1017@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>I've been trying to delete specific contact for AOR using the remove function in the registrar module, but somehow it doesn't remove it from the location.</div><div>My db_mode is 0 as I only want to store it in opensips memory. I hav the "use_domain" param as 1. On register, the contact gets stored in the following format:</div><div>
<p><span>sip:579e08000@203.153.53.130:49612;rinstance=477b5477848ba584;transport=tcp</span></p><p><span>I tried multiple ways to remove this:</span></p><p><span>1) remove("location", "sip:</span><a href="mailto:579e08000@abc.com" target="_blank">579e08000@abc.com</a>", "sip:579e08000@203.153.53.130:49612;rinstance=477b5477848ba584;transport=tcp")</p><p>2) <span>remove("location", "sip:</span><a href="mailto:579e08000@abc.com" target="_blank">579e08000@abc.com</a>", "<a href="http://sip:579e08000@203.153.53.130:49612" target="_blank">sip:579e08000@203.153.53.130:49612</a>")</p><p>Also, I'd like to mention that I have an edge proxy in the middle who proxies the REGISTER to this Registrar and I use the PATH module to route back reliably. I'm essentially trying to remove location entry for particular endpoints based on some conditions.</p><p>Any help is appreciated. Thanks,</p><p>- Jayesh</p></div></div></blockquote></div></blockquote></div>