<div dir="ltr">Travis,<div><br></div><div>You don&#39;t really have to &quot;tell&quot; OpenSIPS if a client is unregistered.  In the simple case, you&#39;ll do a lookup() within your script, and it will return [1] with an error code of -1 if the contact is not registered.</div><div><br></div><div>If you want to run your logic when a client goes unregistered, rather than detecting it during the script execution, you can use an event route [2].  Here&#39;s a simple one I use to throw a syslog entry for such an occasion:</div><div><br></div><div><div>event_route[E_UL_AOR_DELETE] {</div><div>        $var(aor) = 0;</div><div>        fetch_event_params(&quot;aor=$var(aor)&quot;);</div><div>        xlog(&quot;L_NOTICE&quot;, &quot;** $var(aor) is DOWN\n&quot;);</div><div>}</div></div><div><br></div><div>Hopefully that&#39;s helpful.</div><div><br></div><div>  [1] <a href="http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294366">http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294366</a><br></div><div>  [2] <a href="http://www.opensips.org/html/docs/modules/2.1.x/usrloc.html#id295250">http://www.opensips.org/html/docs/modules/2.1.x/usrloc.html#id295250</a></div><div><br></div><div><br></div><div>- Jeff</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 8, 2015 at 11:07 AM, Travis Manson-Drake <span dir="ltr">&lt;<a href="mailto:travism@simplybits.com" target="_blank">travism@simplybits.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hello everyone!<br>
<br>
<u></u><u></u></p>
<p class="MsoNormal">Hope you’re all doing well.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Does anyone know of a way I might tell opensips when a UAC becomes un registered? Or what value I might tell it to parse to see if that UAC is unregistered?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Really what I’m trying to do is have an if statement that preforms some logic if the UAC reports back unregistered or unavail.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Any input is greatly appreciated!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Happy Holidays!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="line-height:115%"><b><span style="font-size:10.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy">Travis Manson-Drake<u></u><u></u></span></b></p>
<p class="MsoNormal" style="line-height:115%"><b><span style="font-size:10.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy">Voice Systems Analyst L1<u></u><u></u></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;color:navy">Simply Bits, LLC</span></b><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif;color:navy"><u></u><u></u></span></p>
<p class="MsoNormal"><b><i><span style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#ffc000">Now You’re Thinkin’ Smart!</span></i></b><span style="font-family:&quot;Arial&quot;,sans-serif;color:navy"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:115%"><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy">5225 N. Sabino Canyon Road
<br>
Tucson, AZ 85750<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:115%"><b><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy">Phone:</span></b><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy">
</span><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:#002060">520-545-0311</span><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:115%"><b><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy">Fax:</span></b><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy">
</span><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:#002060">520-545-7252<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:115%"><b><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy">Support Hotline</span></b><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy">:
</span><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:#002060">5205450333</span><span style="font-size:8.0pt;line-height:115%;font-family:&quot;Arial&quot;,sans-serif;color:navy"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Arial&quot;,sans-serif;color:#1f497d"><a href="http://www.simplybits.com/" title="http://www.simplybits.com/" target="_blank"><span style="font-size:8.0pt;font-family:&quot;Times New Roman&quot;,serif;color:#0563c1">www.simplybits.com</span></a><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>