<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 17 September 2013 14:02, Olle E. Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br>Because the REGISTER has expires=0 on the contact, so this is a DEREGISTRATION,</div>
<div>and that's why you do not see any contacts in the 200 OK.</div><div>You need to check that you have contact headers before saving based on the 200 OK. Or possibly</div><div>read the response code from save().</div>
<span class=""><font color="#888888"><div><br></div></font></span></div></blockquote><div><br></div><div>I do understand that its a deregistration.  I want my Kamailio to remove the local registration, but it is not.</div>
<div><br></div><div>The registrar module save() documentation says that "The function processes a REGISTER message. It can add, remove or modify usrloc records depending on Contact and Expires HFs in the REGISTER message.".  So it seems it would do the right thing if it could see the actual REGISTER message.  But since I'm in the in reply_route looks like it is working off the reply.  In which case it can't "see" the Contact and especially not the ;expires=0.  Is that right?</div>
<div><br></div><div>So is there a way to get at the original REGISTER request in onreply_route?  Otherwise I guess I must use an avp to remember the request or something like that?  Since in the 200 OK there isn't really enough information to tell that its a de-registration.  Unless I can imply that from the missing Contact header?  But I think not since if there were multiple registrations the returned OK IIRC will still report the remaining registrations?</div>
<div><br></div><div>If I can figure out that the returned 200 OK is in response to a deregistration I guess I can use unregister() to remove my local registration.</div><div> </div><div>Steve</div></div></div></div>