[OpenSIPS-Users] Cachedb_local question

Jeff Pyle jeff.pyle at fidelityvoice.com
Tue Dec 8 17:49:51 CET 2015


Travis,

You don't really have to "tell" OpenSIPS if a client is unregistered.  In
the simple case, you'll do a lookup() within your script, and it will
return [1] with an error code of -1 if the contact is not registered.

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's a simple one I use to throw a syslog entry for such an occasion:

event_route[E_UL_AOR_DELETE] {
        $var(aor) = 0;
        fetch_event_params("aor=$var(aor)");
        xlog("L_NOTICE", "** $var(aor) is DOWN\n");
}

Hopefully that's helpful.

  [1]
http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294366
  [2] http://www.opensips.org/html/docs/modules/2.1.x/usrloc.html#id295250


- Jeff


On Tue, Dec 8, 2015 at 11:07 AM, Travis Manson-Drake <travism at simplybits.com
> wrote:

> Hello everyone!
>
> Hope you’re all doing well.
>
>
>
> 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?
>
>
>
> Really what I’m trying to do is have an if statement that preforms some
> logic if the UAC reports back unregistered or unavail.
>
>
>
> Any input is greatly appreciated!
>
>
>
> Happy Holidays!
>
>
>
>
>
> *Travis Manson-Drake*
>
> *Voice Systems Analyst L1*
>
> *Simply Bits, LLC*
>
> *Now You’re Thinkin’ Smart!*
>
> 5225 N. Sabino Canyon Road
> Tucson, AZ 85750
>
> *Phone:* 520-545-0311
>
> *Fax:* 520-545-7252
>
> *Support Hotline*: 5205450333
>
> www.simplybits.com
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20151208/fad262ab/attachment.htm>


More information about the Users mailing list